:root {
  --ink: #202724;
  --muted: #64706c;
  --soft: #eef6f3;
  --surface: #ffffff;
  --canvas: #fbfcfa;
  --line: #dce7e3;
  --teal: #16877a;
  --teal-dark: #0f665d;
  --amber: #f2b84b;
  --coral: #d96b4c;
  --blue: #326aa8;
  --shadow: 0 16px 40px rgba(22, 38, 34, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(251, 252, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.brand-text {
  white-space: nowrap;
}

.main-nav,
.site-footer nav,
.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.main-nav a,
.mobile-nav a,
.site-footer a,
.quick-links a,
.popular-strip a {
  border-radius: 8px;
  color: #34413d;
  font-weight: 650;
}

.main-nav a {
  padding: 9px 10px;
  font-size: 14px;
}

.main-nav a:hover,
.mobile-nav a:hover,
.quick-links a:hover,
.popular-strip a:hover {
  background: var(--soft);
  color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.mobile-nav {
  display: grid;
  gap: 6px;
  padding: 10px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.mobile-nav a {
  padding: 9px 10px;
}

main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 32px;
  align-items: stretch;
  padding: 48px 0 28px;
}

.hero-copy {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 135, 122, 0.12), transparent 45%),
    linear-gradient(165deg, rgba(242, 184, 75, 0.18), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow,
.tool-category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(22, 135, 122, 0.18);
  border-radius: 999px;
  background: rgba(22, 135, 122, 0.09);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 750;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.35;
}

.hero-copy p,
.tool-hero p,
.editorial-band p,
.narrow-page p,
.lead {
  color: var(--muted);
  font-size: 18px;
}

.tool-finder {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.finder-note {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.finder-note span {
  color: var(--muted);
  font-size: 14px;
}

.tool-finder label {
  font-weight: 800;
}

.tool-finder input,
.single-option select,
.option-grid input,
.option-grid select,
.option-grid textarea,
.tool-input,
.tool-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.tool-finder input,
.single-option select,
.option-grid input,
.option-grid select {
  min-height: 46px;
  padding: 10px 12px;
}

.tool-finder input:focus,
.single-option select:focus,
.option-grid input:focus,
.option-grid select:focus,
.tool-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 135, 122, 0.14);
}

.quick-links a,
.popular-strip a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}

.popular-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 650;
}

.tool-grid-section,
.related-tools,
.content-section,
.faq-section,
.editorial-band,
.guide-preview-section,
.guide-grid-section {
  padding: 28px 0;
}

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

.tool-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 135, 122, 0.4);
  box-shadow: var(--shadow);
}

.tool-card a {
  display: grid;
  height: 100%;
  align-content: start;
  gap: 10px;
  padding: 20px;
}

.tool-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.editorial-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 26px 0 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.workflow-band div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-band span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--coral);
  font-weight: 900;
}

.workflow-band h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.workflow-band p {
  margin-bottom: 0;
  color: var(--muted);
}

.tool-hero {
  padding: 34px 0 24px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--teal-dark);
  font-weight: 700;
}

.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 24px;
}

.tool-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 500px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.tool-input,
.tool-output {
  min-height: 318px;
  resize: vertical;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
}

.tool-output {
  background: #f8fbfa;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: rgba(22, 135, 122, 0.36);
  background: var(--soft);
}

.ghost-button {
  min-height: 36px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--teal-dark);
  font-size: 14px;
}

.inline-action {
  width: fit-content;
}

.single-option {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

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

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

.option-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

.stacked-inputs {
  display: grid;
  gap: 12px;
}

.stacked-inputs label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

.stacked-inputs input,
.small-textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.small-textarea {
  min-height: 92px;
  resize: vertical;
}

.checkline {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink) !important;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.split-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.split-inputs label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

.split-inputs .tool-input {
  min-height: 360px;
}

.tool-status {
  min-height: 28px;
  color: var(--muted);
  font-weight: 750;
}

.tool-status[data-type="ok"] {
  color: var(--teal-dark);
}

.tool-status[data-type="error"] {
  color: var(--coral);
}

.tool-preview {
  min-height: 318px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-preview h1,
.tool-preview h2,
.tool-preview h3 {
  margin: 0 0 10px;
}

.tool-preview pre {
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #18211e;
  color: #fff;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-row input {
  width: 58px;
  height: 46px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.color-swatch {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--teal);
}

.content-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  border-top: 1px solid var(--line);
}

.content-main,
.content-aside {
  padding-top: 14px;
}

.inline-guide-card {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inline-guide-card h2,
.inline-guide-card p {
  margin-bottom: 0;
}

.inline-guide-card .secondary-button {
  width: fit-content;
}

.content-main p,
.content-aside p,
.clean-list,
.faq-section p {
  color: var(--muted);
}

.clean-list {
  padding-left: 20px;
}

.clean-list li + li {
  margin-top: 6px;
}

.faq-section {
  border-top: 1px solid var(--line);
}

.faq-section details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 800;
}

.narrow-page {
  width: min(760px, calc(100% - 48px));
  padding: 42px 0 80px;
}

.narrow-page h1 {
  font-size: 42px;
}

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

.guide-grid.compact-guides {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(50, 106, 168, 0.34);
  box-shadow: var(--shadow);
}

.guide-card a {
  display: grid;
  height: 100%;
  align-content: start;
  gap: 10px;
  padding: 20px;
}

.guide-card h2,
.guide-card h3 {
  margin-bottom: 0;
}

.guide-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.guide-page {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 42px;
  align-items: start;
  padding: 42px 0 80px;
}

.guide-article {
  min-width: 0;
}

.guide-article h1 {
  font-size: 44px;
}

.guide-article section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.guide-article section p {
  color: var(--muted);
  font-size: 17px;
}

.guide-tool-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.guide-tool-callout p {
  margin: 4px 0 0;
  color: var(--muted);
}

.guide-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.guide-sidebar h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.guide-sidebar a {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--teal-dark);
  font-weight: 750;
}

.empty-state {
  padding: 50px 0 80px;
}

.login-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

.login-form input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.error-text {
  color: var(--coral) !important;
  font-weight: 750;
}

.stat-number {
  display: grid;
  gap: 4px;
  width: fit-content;
  min-width: 220px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.stat-number strong {
  font-size: 34px;
  line-height: 1;
}

.stats-table {
  width: 100%;
  margin: 12px 0 26px;
  border-collapse: collapse;
  background: #fff;
}

.stats-table th,
.stats-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.stats-table th {
  background: var(--soft);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px max(24px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
}

.site-footer a {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .home-hero,
  .tool-workspace,
  .content-section,
  .editorial-band,
  .guide-page {
    grid-template-columns: 1fr;
  }

  .tool-grid,
  .tool-grid.compact,
  .guide-grid,
  .guide-grid.compact-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-band {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
  }

  h1 {
    font-size: 38px;
  }

  .tool-panel {
    min-height: auto;
  }

  .split-inputs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  main,
  .narrow-page {
    width: min(100% - 28px, 1180px);
  }

  .brand-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-hero {
    padding-top: 24px;
  }

  .hero-copy,
  .tool-finder,
  .tool-panel {
    padding: 16px;
  }

  h1,
  .narrow-page h1 {
    font-size: 32px;
  }

  .tool-grid,
  .tool-grid.compact,
  .guide-grid,
  .guide-grid.compact-guides,
  .option-grid,
  .option-grid.two-cols,
  .workflow-band {
    grid-template-columns: 1fr;
  }

  .section-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-card {
    min-height: 170px;
  }
}
