:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5e6a7b;
  --line: #d9e0e8;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --blue: #2454d6;
  --teal: #0f8b8d;
  --green: #23855f;
  --gold: #b86b16;
  --shadow: 0 18px 48px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fafc 0%, #ffffff 38%);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
}

.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 650;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.hero {
  width: min(1120px, calc(100% - 32px));
  min-height: 520px;
  margin: 18px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
}

.hero-text {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 800;
  border: 1px solid var(--line);
}

.button.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button.secondary {
  background: #fff;
}

.tool-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 0.82;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-toolbar {
  display: flex;
  gap: 8px;
}

.preview-toolbar span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--line);
}

.preview-toolbar span:nth-child(1) {
  background: #df6b57;
}

.preview-toolbar span:nth-child(2) {
  background: #d8a927;
}

.preview-toolbar span:nth-child(3) {
  background: var(--green);
}

.preview-lines {
  display: grid;
  gap: 14px;
}

.preview-row {
  height: 18px;
  border-radius: 999px;
  background: #e6edf5;
}

.preview-row.strong {
  width: 78%;
  background: #c9d8f7;
}

.preview-row.short {
  width: 54%;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preview-grid div {
  min-height: 82px;
  border-radius: 8px;
  background: var(--soft);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
}

.preview-grid b {
  font-size: 1.45rem;
}

.preview-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.section,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 64px;
}

.section-heading {
  margin-bottom: 22px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: #b8c6d6;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.1);
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-weight: 850;
}

.tool-card:nth-child(2n) .tool-icon {
  background: var(--teal);
}

.tool-card:nth-child(3n) .tool-icon {
  background: var(--gold);
}

.tool-card p,
.split-section p,
.content-panel p,
.tool-panel p,
.guide-list p {
  color: var(--muted);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 46px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 42px;
}

.page-hero {
  padding: 58px 0 32px;
}

.page-hero h1 {
  font-size: clamp(2.35rem, 6vw, 4.2rem);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.tool-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.content-panel {
  margin-top: 22px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #c7d0dc;
  border-radius: 6px;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 250px;
  resize: vertical;
  line-height: 1.55;
}

.controls {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  min-height: 88px;
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.stat b {
  display: block;
  font-size: 1.6rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.result-box {
  min-height: 52px;
  border-radius: 6px;
  background: var(--soft);
  padding: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.notice {
  color: var(--muted);
  font-size: 0.92rem;
}

.guide-list {
  display: grid;
  gap: 12px;
}

.guide-list a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.site-footer {
  min-height: 92px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .hero,
  .tool-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 28px;
    margin-top: 10px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-nav,
  .site-footer nav,
  .hero-actions,
  .inline-controls {
    width: 100%;
  }

  .site-nav {
    justify-content: space-between;
  }

  .button {
    width: 100%;
  }

  .card-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .tool-preview {
    aspect-ratio: auto;
    min-height: 320px;
  }
}
