/* Warm editorial homepage system derived from DESIGN.md. */
.tools-home {
  --home-coral: #cc785c;
  --home-coral-active: #a9583e;
  --home-ink: #141413;
  --home-body: #3d3d3a;
  --home-muted: #6c6a64;
  --home-line: #e6dfd8;
  --home-canvas: #faf9f5;
  --home-soft: #f5f0e8;
  --home-card: #efe9de;
  --home-dark: #181715;
  --home-dark-raised: #252320;
  --home-on-dark: #faf9f5;
  margin: 0;
  color: var(--home-ink);
  background: var(--home-canvas);
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] .tools-home {
  --home-ink: #f2eee6;
  --home-body: #ccc5bb;
  --home-muted: #9e978e;
  --home-line: #37342f;
  --home-canvas: #181715;
  --home-soft: #211f1c;
  --home-card: #292621;
  --home-dark: #0e0e0d;
  --home-dark-raised: #302c27;
  color-scheme: dark;
}

.tools-home *, .tools-home *::before, .tools-home *::after { box-sizing: border-box; }
.tools-home a { color: inherit; text-decoration: none; }
.tools-home .eyebrow { margin: 0 0 18px; color: var(--home-coral); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tools-home .eyebrow span { margin-right: 7px; color: var(--home-ink); font-size: 16px; }

.tools-home .tools-header {
  min-height: 72px;
  padding: 10px max(24px, calc((100vw - 1280px) / 2));
  border-color: var(--home-line);
  background: rgba(250, 249, 245, .92);
  box-shadow: none;
}
.tools-home .tools-brand { color: var(--home-ink); }
.tools-home .tools-brand > span { color: #fff; border-radius: 8px; background: var(--home-ink); box-shadow: none; }
.tools-home .tools-brand strong { color: var(--home-ink); }
.tools-home .tools-brand em { color: var(--home-coral); }
html[data-theme="dark"] .tools-home .tools-header { background: rgba(24, 23, 21, .92); }
html[data-theme="dark"] .tools-home .tools-brand > span { color: var(--home-dark); background: var(--home-coral); }
html[data-theme="dark"] .tools-home .global-tool-nav,
html[data-theme="dark"] .tools-home .global-auth-actions {
  --header-ink: #f2eee6;
  --header-muted: #aaa39a;
  --header-surface: #292621;
  --header-line: #45413a;
  --header-accent: #cc785c;
}

.tools-home main { overflow: hidden; }
.tools-hero,
.tools-directory,
.workflow-band,
.tools-home .seo-content,
.home-cta { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }

.tools-home .tools-hero {
  min-height: 690px;
  padding: 94px 0 102px;
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(430px, 1.07fr);
  align-items: center;
  gap: 78px;
}
.hero-copy h1,
.tools-directory h2,
.workflow-band h2,
.tools-home .seo-content h2,
.home-cta h2 {
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
}
.hero-copy h1 { margin: 0; font-size: clamp(54px, 6vw, 79px); line-height: .98; letter-spacing: -.045em; }
.hero-copy h1 em { color: var(--home-coral); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 590px; margin: 28px 0 0; color: var(--home-body); font-size: 17px; line-height: 1.65; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions a { min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; gap: 15px; border-radius: 8px; font-size: 14px; font-weight: 650; }
.hero-actions .button-primary { color: #fff; background: var(--home-coral); }
.hero-actions .button-primary:active { background: var(--home-coral-active); }
.hero-actions .button-secondary { border: 1px solid var(--home-line); background: transparent; }
.hero-trust { margin: 31px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 19px; color: var(--home-muted); list-style: none; font-size: 12px; }
.hero-trust span { margin-right: 5px; color: var(--home-coral); }

.hero-product { padding: 28px 0 23px 24px; position: relative; }
.hero-product::before { content: ""; position: absolute; inset: 0 28px 0 0; border-radius: 16px; background: var(--home-card); transform: rotate(2deg); }
.product-window { min-height: 440px; position: relative; overflow: hidden; color: var(--home-on-dark); border-radius: 14px; background: var(--home-dark); box-shadow: 0 28px 65px rgba(35, 29, 22, .2); }
.window-bar { height: 53px; padding: 0 17px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #a09d96; border-bottom: 1px solid rgba(255,255,255,.09); font: 11px/1 ui-monospace, monospace; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #5f5b55; }
.window-dots i:first-child { background: var(--home-coral); }
.window-status { justify-self: end; color: #a09d96; }
.window-status i { width: 6px; height: 6px; margin-right: 5px; display: inline-block; border-radius: 50%; background: #5db872; box-shadow: 0 0 0 4px rgba(93,184,114,.12); }
.window-layout { min-height: 387px; display: grid; grid-template-columns: 60px 1fr; }
.window-sidebar { padding: 17px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; border-right: 1px solid rgba(255,255,255,.08); background: #1f1e1b; }
.window-sidebar strong, .window-sidebar span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; font: 11px/1 ui-monospace, monospace; }
.window-sidebar strong { margin-bottom: 12px; color: var(--home-dark); background: var(--home-coral); }
.window-sidebar span { color: #78746d; }
.window-sidebar .active { color: #fff; background: var(--home-dark-raised); }
.window-content { min-width: 0; display: flex; flex-direction: column; }
.window-content > header { min-height: 59px; padding: 0 19px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); font: 12px/1 ui-monospace, monospace; }
.window-content .method { padding: 5px 7px; color: #181715; border-radius: 4px; background: #5db8a6; font-size: 9px; font-weight: 800; }
.window-content header b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.window-content header small { margin-left: auto; color: #5db872; font-size: 9px; }
.code-panel { flex: 1; padding: 28px 16px; background: #181715; font: 13px/1.9 "JetBrains Mono", ui-monospace, monospace; }
.code-panel ol { margin: 0; padding-left: 39px; color: #66625d; }
.code-panel li { padding-left: 12px; }
.code-panel li::marker { font-size: 10px; }
.code-panel .punctuation { color: #c4c0b9; }
.code-panel .key { color: #78b7c5; }
.code-panel .string { color: #e8a55a; }
.code-panel .number { color: #b79ae8; }
.code-panel .boolean { color: #cc785c; }
.window-content > footer { min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #77736c; border-top: 1px solid rgba(255,255,255,.08); background: #1f1e1b; font-size: 9px; }
.window-content > footer button { padding: 8px 11px; color: var(--home-on-dark); border: 0; border-radius: 6px; background: var(--home-dark-raised); font: 10px/1 Inter, sans-serif; }
.floating-note { padding: 13px 16px; position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; border: 1px solid var(--home-line); border-radius: 10px; background: var(--home-canvas); box-shadow: 0 14px 35px rgba(35,29,22,.13); }
.floating-note > span { width: 25px; height: 25px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: #5db872; font-size: 11px; }
.floating-note div { display: grid; gap: 3px; }
.floating-note b { font-size: 10px; }
.floating-note small { color: var(--home-muted); font-size: 8px; }

.tools-home .tools-directory { padding: 94px 0 104px; border-top: 1px solid var(--home-line); }
.tools-home .tools-directory > header { margin-bottom: 42px; align-items: end; }
.tools-home .tools-directory h2 { color: var(--home-ink); font-size: clamp(43px, 5vw, 62px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.tools-home .tools-directory > header > p { max-width: 390px; color: var(--home-muted); font-size: 14px; line-height: 1.65; text-align: left; }
.tools-home .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tools-home .tool-card { min-height: 340px; padding: 28px; color: var(--home-ink); border: 0; border-radius: 12px; background: var(--home-card); box-shadow: none; transition: none; }
.tools-home .tool-card:nth-child(4n + 2), .tools-home .tool-card:nth-child(4n + 3) { background: var(--home-soft); }
.tools-home .tool-card:hover, .tools-home .tool-card:focus-visible { transform: none; border: 0; box-shadow: inset 0 0 0 2px var(--home-coral); }
.tools-home .tool-card::after { display: none; }
.tools-home .tool-card-top { grid-template-columns: auto 1fr auto; }
.tools-home .tool-mark { width: 44px; height: 44px; color: var(--home-ink); border: 1px solid var(--home-line); border-radius: 8px; background: var(--home-canvas); font-size: 13px; }
.tools-home .tool-category { color: var(--home-muted); font-size: 9px; letter-spacing: .12em; }
.tools-home .tool-arrow { color: var(--home-muted); }
.tools-home .tool-badge { padding: 5px 9px; color: #fff; border-radius: 999px; background: var(--home-coral); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tools-home .tool-card-copy { margin-top: 32px; }
.tools-home .tool-card h3 { font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif; font-size: 27px; font-weight: 600; letter-spacing: -.025em; }
.tools-home .tool-card-copy p { color: var(--home-body); font-size: 13px; line-height: 1.65; }
.tools-home .tool-card ul { margin-top: 24px; }
.tools-home .tool-card li { padding: 0; color: var(--home-muted); border: 0; background: transparent; font-size: 9px; }
.tools-home .tool-card li:not(:last-child)::after { content: "·"; margin-left: 7px; color: var(--home-coral); }
.tools-home .tool-open { color: var(--home-ink); font-size: 11px; }
.tools-home .tool-open b { color: var(--home-coral); }

.workflow-band { margin-block: 0 104px; padding: 66px; display: grid; grid-template-columns: .95fr 1.05fr; gap: 80px; color: var(--home-on-dark); border-radius: 14px; background: var(--home-dark); }
.workflow-band .eyebrow { color: #e8a55a; }
.workflow-band .eyebrow span { color: var(--home-on-dark); }
.workflow-copy h2 { margin: 0; font-size: clamp(40px, 4vw, 55px); line-height: 1.05; letter-spacing: -.035em; }
.workflow-copy > p:not(.eyebrow) { margin: 25px 0; color: #a09d96; font-size: 14px; line-height: 1.7; }
.workflow-copy > a { color: #e8a55a; font-size: 13px; font-weight: 650; }
.workflow-copy > a span { margin-left: 8px; }
.workflow-steps { margin: 0; padding: 0; display: grid; list-style: none; }
.workflow-steps li { padding: 20px 0; display: grid; grid-template-columns: 45px 1fr; gap: 17px; border-bottom: 1px solid rgba(255,255,255,.11); }
.workflow-steps li:first-child { padding-top: 0; }
.workflow-steps li:last-child { padding-bottom: 0; border: 0; }
.workflow-steps li > span { color: var(--home-coral); font: 11px/1.5 ui-monospace, monospace; }
.workflow-steps strong { font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.workflow-steps p { margin: 5px 0 0; color: #a09d96; font-size: 11px; line-height: 1.5; }

.tools-home .seo-content { margin-top: 0; margin-bottom: 105px; color: var(--home-ink); }
.tools-home .seo-content > header { max-width: 760px; }
.tools-home .seo-content .seo-kicker { color: var(--home-coral); }
.tools-home .seo-content h2 { color: var(--home-ink); font-size: clamp(40px, 5vw, 58px); font-weight: 500; line-height: 1.05; letter-spacing: -.035em; }
.tools-home .seo-content h3 { color: var(--home-ink); font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.tools-home .seo-content p { color: var(--home-muted); }
.tools-home .seo-content a { color: var(--home-coral); }
.tools-home .seo-card { border-color: var(--home-line); border-radius: 12px; background: var(--home-soft); }
.tools-home .seo-faq details { border-color: var(--home-line); }

.home-cta { margin-bottom: 104px; padding: 62px 66px; display: flex; align-items: center; justify-content: space-between; gap: 50px; color: #fff; border-radius: 14px; background: var(--home-coral); }
.home-cta .eyebrow { color: rgba(255,255,255,.72); }
.home-cta h2 { margin: 0; font-size: clamp(42px, 5vw, 61px); line-height: 1; letter-spacing: -.035em; }
.home-cta > a { min-height: 46px; padding: 0 21px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 16px; color: var(--home-ink); border-radius: 8px; background: var(--home-canvas); font-size: 13px; font-weight: 650; }

.tools-home .tools-footer { padding: 62px max(24px, calc((100vw - 1200px) / 2)); display: grid; grid-template-columns: 1.3fr .8fr .8fr 1fr; gap: 50px; color: #a09d96; border: 0; background: var(--home-dark); font-size: 11px; }
.tools-home .tools-footer > div:not(.footer-brand) { display: grid; align-content: start; gap: 11px; }
.tools-home .tools-footer > div > strong { margin-bottom: 5px; color: var(--home-on-dark); font-size: 11px; }
.tools-home .tools-footer a { color: #a09d96; }
.tools-home .footer-brand { display: flex; align-items: start; gap: 10px; color: var(--home-on-dark); }
.tools-home .footer-brand > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--home-dark); border-radius: 8px; background: var(--home-coral); font-size: 9px; font-weight: 800; }
.tools-home .footer-brand strong { padding-top: 9px; }
.tools-home .footer-brand em { color: var(--home-coral); font-style: normal; }
.tools-home .tools-footer > p { margin: 0; line-height: 1.7; }
.tools-home .tools-footer small { margin-top: 18px; display: block; color: #69655f; }

@media (max-width: 1000px) {
  .tools-home .tools-hero { grid-template-columns: 1fr 1fr; gap: 38px; }
  .tools-home .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-band { padding: 50px; gap: 48px; }
  .tools-home .tools-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .tools-home .tools-header { grid-template-columns: auto 1fr; }
  .tools-home .tools-header .global-tool-nav { order: 3; grid-column: 1 / -1; width: 100%; }
  .tools-home .tools-header .global-auth-actions { justify-self: end; }
  .tools-hero, .tools-directory, .workflow-band, .tools-home .seo-content, .home-cta { width: min(100% - 28px, 1200px); }
  .tools-home .tools-hero { min-height: 0; padding: 68px 0 76px; grid-template-columns: 1fr; gap: 52px; }
  .hero-copy h1 { font-size: clamp(48px, 15vw, 68px); }
  .hero-product { padding-left: 0; }
  .hero-product::before { inset-right: 10px; }
  .product-window { min-height: 390px; }
  .tools-home .tools-directory { padding-block: 72px; }
  .tools-home .tools-directory > header { align-items: start; flex-direction: column; }
  .tools-home .tool-grid { grid-template-columns: 1fr; }
  .tools-home .tool-card { min-height: 305px; }
  .workflow-band { margin-bottom: 76px; padding: 40px 28px; grid-template-columns: 1fr; gap: 50px; }
  .home-cta { margin-bottom: 76px; padding: 44px 28px; align-items: start; flex-direction: column; }
  .tools-home .tools-footer { padding-block: 50px; grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 430px) {
  .hero-actions { flex-direction: column; }
  .hero-actions a { justify-content: center; }
  .hero-trust { gap: 11px; }
  .window-layout { grid-template-columns: 44px 1fr; }
  .window-sidebar { padding-inline: 5px; }
  .window-sidebar strong, .window-sidebar span { width: 30px; }
  .code-panel { padding-inline: 8px; font-size: 10px; }
  .code-panel ol { padding-left: 31px; }
  .floating-note { right: -2px; }
}

/* Beat the legacy light-theme homepage selectors without affecting other tools. */
html[data-theme="light"] .tools-home { color: var(--home-ink); background: var(--home-canvas); }
html[data-theme="light"] .tools-home .tools-header { border-color: var(--home-line); background: rgba(250, 249, 245, .92); box-shadow: none; }
html[data-theme="light"] .tools-home .tool-card,
html[data-theme="light"] .tools-home .tool-card:hover,
html[data-theme="light"] .tools-home .tool-card:focus-visible {
  color: var(--home-ink);
  border: 0;
  background: var(--home-card);
  box-shadow: none;
}
html[data-theme="light"] .tools-home .tool-card:nth-child(4n + 2),
html[data-theme="light"] .tools-home .tool-card:nth-child(4n + 3) { background: var(--home-soft); }
html[data-theme="light"] .tools-home .tool-card:hover,
html[data-theme="light"] .tools-home .tool-card:focus-visible { box-shadow: inset 0 0 0 2px var(--home-coral); }
html[data-theme="light"] .tools-home .tool-card li { background: transparent; }
