/* Shared public design for the landing page, search resources, catalogue and cover journey. */
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) {
  --site-width: 1280px;
  --site-gutter: clamp(22px, 4vw, 48px);
  --site-heading: clamp(40px, 4.3vw, 64px);
  --ink: #191919;
  --ink-soft: #444444;
  --ink-hover: #333333;
  --paper: #ffffff;
  --paper-deep: #eeeeee;
  --card: #ffffff;
  --panel: #ffffff;
  --acid: #dddddd;
  --acid-dark: #cecece;
  --lime: #dddddd;
  --surface: #ffffff;
  --surface-soft: #f4f4f4;
  --line: #dddddd;
  --border-strong: #cecece;
  --wine: #242424;
  --wine-soft: #f0f0f0;
  --accent-hover: #444444;
  --muted: #626262;
  --muted-text: #626262;
  --muted-light: #717171;
  --button-radius: 8px;
  --button-focus: #242424;
  --field-focus: rgba(0, 0, 0, .09);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route)::before { display: none; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.ambient) { display: none; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) .landing-view { background: var(--paper); }

body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.site-header, .seo-header) {
  position: sticky;
  top: 0;
  height: 88px;
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr) 288px;
  gap: 24px;
  padding: 0 max(var(--site-gutter), calc((100% - var(--site-width)) / 2));
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.top-nav, .seo-header > nav[aria-label="Main navigation"]) {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--ink-soft);
  font: 600 13px/1.4 var(--sans);
}
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.top-nav, .seo-header > nav[aria-label="Main navigation"]) a { font: inherit; text-decoration: none; color: inherit; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) nav[aria-label="Main navigation"] a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.header-actions, .seo-header-actions) { display: flex; justify-content: flex-end; justify-self: stretch; gap: 12px; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.mobile-nav-toggle, .seo-mobile-nav-toggle) { border: 1px solid var(--border-strong); border-radius: var(--button-radius); background: white; box-shadow: none; }
body:is(.home-route, .create-route, .cover-options-route) .header-projects-link { display: none; }
.seo-route .site-account-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); text-decoration: none; font: 600 12px/1 var(--sans); white-space: nowrap; }
.seo-route .site-account-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(#headerCreate, .seo-header-cta) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--button-radius); background: var(--ink); color: white; font: 600 13px/1 var(--sans); text-decoration: none; transform: none; }

body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.home-masthead, .cover-start-hero.home-hero, .templates-page-browser, .cover-options-view, .home-section) {
  width: min(var(--site-width), calc(100% - var(--site-gutter) * 2));
  max-width: var(--site-width);
  margin-inline: auto;
}
body:is(.home-route, .create-route) :is(.home-masthead, .cover-start-hero.home-hero) { padding: 56px 0 64px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.templates-route .templates-page-browser { padding: 56px 0 64px; }
.cover-options-route .cover-options-view { padding: 44px 0 64px; }
body:is(.home-route, .create-route, .templates-route) :is(.home-masthead h1, .cover-start-hero .create-page-intro #createPageTitle, .template-browser-heading h1) { margin: 0 0 22px; color: var(--ink); font: 450 var(--site-heading)/1.04 var(--serif); letter-spacing: -.03em; }
body:is(.home-route, .create-route, .templates-route) :is(.home-masthead-copy > p:not(.home-free-note), .cover-start-hero .create-page-intro p, .template-browser-heading p) { color: var(--muted-text); font: 400 17px/1.65 var(--sans); margin: 0 0 28px; }
.templates-route .template-browser-heading p { margin-bottom: 0; }
.create-route .cover-start-hero .hero-copy { max-width: none; }
.create-route.auth-pending #landingView { visibility: visible; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.home-primary-link, .generate-button, .journey-primary, .seo-button) { min-height: 52px; border-radius: var(--button-radius); font: 600 15px/1.3 var(--sans); box-shadow: none; }
.templates-route .template-filters label, .create-route .cover-start-hero .idea-card .field-label { font: 600 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; }
.templates-route .template-filters input, .templates-route .template-filters select, .create-route .cover-start-hero .idea-card input, .create-route .cover-start-hero .idea-card select { min-height: 48px; border: 1px solid var(--border-strong); border-radius: var(--button-radius); background: var(--surface); color: var(--ink); font: 400 16px/1.4 var(--sans); padding: 11px 14px; }
.templates-route .template-filters :is(input, select):focus, .create-route .cover-start-hero .idea-card :is(input, select):focus { outline: 0; border-color: #777; box-shadow: 0 0 0 3px var(--field-focus); }
.templates-route .template-gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.templates-route .template-gallery-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.templates-route .template-gallery-card img { border-radius: 2px; box-shadow: 3px 7px 14px #00000020; }
.templates-route .template-gallery-card figcaption { margin-top: 16px; gap: 5px; }
.templates-route .template-gallery-card figcaption strong { font-size: 14px; line-height: 1.35; }
.templates-route .template-gallery-card figcaption span { color: var(--muted-text); font-size: 12px; }
.create-route .cover-start-proof { background: transparent; border: 0; border-radius: 0; padding: 0; }
.create-route .cover-proof-shelf { min-height: 366px; padding: 45px 28px 55px; }
.create-route .cover-proof-shelf .proof-book { max-width: 190px; --book-depth: 23px; }
.create-route .cover-proof-foot { border-top: 1px solid var(--line); padding: 18px 0 0; font-size: 12px; }
body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) .site-footer { background: #f5f5f5; border-top: 1px solid var(--line); }
/* Keep the landing page's example controls clear; support remains in the footer. */
.home-route .feedback-bubble { display: none; }
.home-route #how-it-works { scroll-margin-top: 104px; }

/* Search pages share the public shell while retaining their tools and reading layouts. */
.seo-route :is(.seo-hero, .seo-section, .seo-coverfairy-context) {
  width: min(var(--site-width), calc(100% - var(--site-gutter) * 2));
  max-width: var(--site-width);
  padding-inline: 0;
}
.seo-route .seo-hero { padding-block: 56px 64px; gap: 48px; }
.seo-route .seo-hero > div { min-width: 0; }
.seo-route .seo-hero .seo-kicker { display: none; }
.seo-route .seo-hero h1 { font: 450 var(--site-heading)/1.04 var(--serif); letter-spacing: -.03em; }
.seo-route .seo-hero > div > p { color: var(--muted-text); font: 400 17px/1.65 var(--sans); }
.seo-route .seo-section h2 { font: 450 clamp(33px, 3.5vw, 48px)/1.05 var(--serif); letter-spacing: -.025em; }
.seo-route .article-hero { background: var(--paper); }
.seo-route .article-hero::before, .seo-route .article-hero::after { display: none; }
.seo-route :is(.answer-box, .tool-share-result, .interiors-pricing, .interior-pricing) { background: var(--surface-soft); border-color: var(--line); }
.seo-route :is(.seo-tool, .annotated article, .generator-steps article, .related a) { background: var(--surface); border-color: var(--line); box-shadow: none; }
.seo-route .seo-tool { border-radius: 12px; }
.seo-route .seo-tool :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]) { border-color: var(--border-strong); border-radius: var(--button-radius); color: var(--ink); }
.seo-route .seo-tool :is(input, select, textarea):focus-visible { outline: 2px solid #777; outline-offset: 2px; box-shadow: 0 0 0 3px var(--field-focus); }
.seo-route .seo-tool label { letter-spacing: 0; text-transform: none; }
.seo-route .tool-share-result > div:first-child > span { letter-spacing: 0; text-transform: none; }
.seo-route .interiors-hero-formatter { box-shadow: 0 12px 32px #0000000d; }
.seo-route .interiors-pricing article { border-color: var(--line); }
.seo-route .interiors-pricing article.featured { box-shadow: none; }
.seo-route :is(.interiors-themes, .interiors-story-note) { background: var(--surface-soft); }
.seo-route :is(.interiors-formatter, .interiors-story-spread) { background: var(--ink); }
.seo-route .interiors-formatter header > p:not(.seo-kicker) { color: #d2d2d2; }
.seo-route :is(.interiors-pricing, .interior-pricing, .interiors-themes, .interiors-formatter, .journal-clusters) { padding-inline: 32px; }
.seo-route .journal-clusters { background: var(--ink); }
.seo-route .journal-clusters > header > p:not(.seo-kicker) { color: #d2d2d2; }
.seo-route .blog-hub-card .blog-hub-visual { background: var(--surface-soft); color: var(--ink); }
.seo-route .blog-hub-card .blog-hub-visual::before { background: #c9c9c9; }
.seo-route .blog-hub-card:nth-child(even) .blog-hub-visual { background: var(--ink); color: white; }
.seo-route .blog-hub-card:nth-child(even) .blog-hub-visual::before { background: #555; }

@media (max-width: 1200px) {
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.site-header, .seo-header) { grid-template-columns: 1fr auto; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.top-nav, .seo-header > nav[aria-label="Main navigation"]) { display: none; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.mobile-nav-toggle, .seo-mobile-nav-toggle) { display: grid; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.mobile-nav, .seo-mobile-nav):not([hidden]) { display: grid; }
  body:is(.home-route, .create-route) :is(.home-masthead, .cover-start-hero.home-hero) { gap: 36px; }
  .templates-route .template-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 800px) {
  body:is(.home-route, .create-route) :is(.home-masthead, .cover-start-hero.home-hero) { grid-template-columns: 1fr; gap: 32px; }
  .create-route .cover-start-hero .hero-copy { max-width: 620px; margin-inline: auto; }
  .create-route .cover-start-proof { max-width: 560px; width: 100%; margin-inline: auto; }
  .templates-route .template-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) { --site-heading: 40px; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.site-header, .seo-header) { height: 72px; gap: 12px; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) .brand-primary .brand-logo { display: block; width: 140px; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) .brand-primary .brand-mobile-mark { display: none; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(#headerCreate, .seo-header-cta) { display: none; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.header-actions, .seo-header-actions) { gap: 8px; }
  body:is(.home-route, .create-route, .cover-options-route, .seo-route, .templates-route) :is(.mobile-nav, .seo-mobile-nav) { top: calc(100% + 8px); left: var(--site-gutter); right: var(--site-gutter); grid-template-columns: 1fr; background: white; border-color: var(--line); }
  .seo-route .site-account-link { width: 44px; padding: 0; }
  .seo-route .site-account-link span { display: none; }
  body:is(.home-route, .create-route) :is(.home-masthead, .cover-start-hero.home-hero), .templates-route .templates-page-browser { padding: 32px 0 44px; }
  body:is(.home-route, .create-route, .templates-route) :is(.home-masthead-copy > p:not(.home-free-note), .cover-start-hero .create-page-intro p, .template-browser-heading p) { font-size: 16px; }
  .templates-route .template-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .templates-route .template-gallery-card { padding: 10px; }
  .templates-route .template-browser-heading { gap: 20px; }
  .templates-route .template-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .templates-route .template-filters label:first-child { grid-column: 1 / -1; }
  .create-route .cover-proof-shelf { min-height: 240px; padding: 24px 15px 35px; }
  .create-route .cover-proof-shelf .proof-book { --book-depth: 14px; }
  .seo-route .seo-hero { padding-block: 32px 40px; gap: 28px; }
  .seo-route .seo-hero > div > p { font-size: 16px; }
  .seo-route .seo-section { padding-block: 32px; }
  .seo-route .seo-tool { padding: 20px 16px; }
  .seo-route :is(.interiors-pricing, .interior-pricing, .interiors-themes, .interiors-formatter, .journal-clusters) { padding-inline: 20px; }
}

/* Keep the expanded book brief close to its primary action on desktop. */
@media (min-width:901px) {
  body.create-route .cover-start-hero.home-hero { padding-top:28px; }
  body.create-route .cover-start-hero .create-page-intro #createPageTitle { font-size:48px; margin-bottom:12px; }
  body.create-route .cover-start-hero .create-page-intro p { margin-bottom:20px; }
  body.create-route .book-optional-fields { margin-bottom:14px; }
  body.create-route .cover-start-hero .idea-card > .field-label { margin-top:12px; }
  body.create-route .cover-start-hero .idea-card .brief-help { margin:6px 0 10px; }
  body.create-route .cover-start-hero .idea-card #generateButton { margin-top:0; }
}

/* Real product output gives each part of the landing story a visual proof. */
.home-visual-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:36px; margin-bottom:38px; }
.home-visual-heading>div { max-width:750px; }
.home-visual-heading p, .home-art-copy>p:not(.home-example-note), .home-manuscript-story>div>p { max-width:650px; color:var(--ink-soft); font:17px/1.65 var(--sans); }
.home-visual-heading .home-secondary-link { flex-shrink:0; }
.home-genre-gallery { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:24px; }
.home-genre-gallery figure,.home-type-preview figure,.home-art-transformation figure,.home-launch-gallery figure,.home-manuscript-story figure { margin:0; min-width:0; }
.home-cover-plinth { display:block; padding:16px 8px 21px; background:#f0f0ee; border-radius:10px; perspective:800px; }
.home-cover-plinth img { display:block; width:100%; height:auto; border-radius:1px 4px 4px 1px; transform:rotateY(-9deg); box-shadow:5px 8px 14px #0003,2px 0 0 #fff8; }
.home-genre-gallery figcaption { margin-top:16px; font:600 14px/1.3 var(--sans); }
.home-example-note { font:13px/1.6 var(--sans); color:#666; margin:24px 0 0; }
.home-art-story { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:center; gap:64px; }
.home-art-transformation { display:grid; grid-template-columns:1fr 30px 1fr; align-items:center; gap:18px; padding:28px; background:#efefed; border-radius:16px; }
.home-art-transformation img { display:block; width:100%; height:auto; border-radius:3px; box-shadow:0 13px 23px #0002; }
.home-art-transformation figcaption { margin-top:17px; text-align:center; font:500 12px/1.4 var(--sans); }
.home-art-transformation>span { text-align:center; font:24px/1 var(--sans); }
.home-type-preview { display:grid; grid-template-columns:280px minmax(0,420px); align-items:center; justify-content:center; gap:clamp(32px,6vw,80px); padding:48px 36px; background:radial-gradient(ellipse at 25% 50%,#343a37,#171919 70%); color:#fff; border-radius:16px; }
.home-type-preview img { display:block; width:100%; height:auto; border-radius:3px; box-shadow:0 20px 40px #0009; }
.home-type-preview figcaption { margin-top:18px; text-align:center; font:14px/1.5 var(--sans); color:#bbc0bf; }
.home-type-options { display:grid; gap:12px; }
.home-type-options button { position:relative; display:block; width:100%; padding:20px 42px 20px 22px; border:1px solid #555e59; border-radius:10px; background:transparent; color:inherit; text-align:left; cursor:pointer; font:14px/1.5 var(--sans); }
.home-type-options button strong { display:block; font-size:18px; font-weight:600; }
.home-type-options button span { display:block; margin-top:4px; color:#bbc0bf; }
.home-type-options button::after { content:""; position:absolute; right:20px; top:28px; width:10px; height:10px; border:1px solid #bbc0bf; border-radius:50%; }
.home-type-options button[aria-pressed="true"] { border-color:#e1e6e3; background:#ffffff0c; }
.home-type-options button[aria-pressed="true"]::after { background:#e1e6e3; border-color:#e1e6e3; }
.home-type-options button:hover { background:#ffffff12; }
.home-type-options button:focus-visible { outline:2px solid #fff; outline-offset:4px; }
.home-type-help { margin:24px 0 0; color:#bbc0bf; font:14px/1.7 var(--sans); }
.home-launch-gallery { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.home-launch-gallery img { display:block; width:100%; height:auto; aspect-ratio:8/5; object-fit:cover; border-radius:12px; }
.home-launch-gallery figcaption { margin:14px 0 0; color:#666; font:14px/1.5 var(--sans); }
.home-manuscript-story { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); align-items:center; gap:64px; }
.home-manuscript-story img { display:block; width:100%; height:auto; border:1px solid #ddd; border-radius:9px; box-shadow:0 16px 40px #0001; }
.home-manuscript-story figcaption { margin-top:16px; font:13px/1.5 var(--sans); color:#666; }
@media(max-width:1100px) { .home-genre-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; } .home-art-story,.home-manuscript-story { gap:32px; } .home-visual-heading { align-items:flex-start; flex-direction:column; gap:12px; } }
@media(max-width:760px) { .home-genre-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 18px; } .home-art-story,.home-manuscript-story { grid-template-columns:1fr; gap:28px; } .home-art-transformation { padding:20px 14px; gap:10px; grid-template-columns:1fr 20px 1fr; } .home-type-preview { grid-template-columns:minmax(0,1fr); gap:22px; padding:24px 18px; } .home-type-preview figure { width:min(200px,100%); justify-self:center; } .home-type-options { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; } .home-type-options button { min-height:48px; padding:12px 6px; text-align:center; } .home-type-options button strong { font-size:14px; } .home-type-options button span,.home-type-options button::after { display:none; } .home-type-options button[aria-pressed="true"] { background:#e1e6e3; color:#171919; } .home-type-help { font-size:13px; margin-top:18px; } .home-launch-gallery { grid-template-columns:1fr; gap:26px; } .home-visual-heading p,.home-art-copy>p:not(.home-example-note),.home-manuscript-story>div>p { font-size:16px; } }
.home-art-arrow { width:24px; fill:none; stroke:currentColor; stroke-width:1.3; }
.policy-with-conversion { width:min(1280px,100%); grid-template-columns:150px minmax(0,1fr) 300px; gap:30px; }
.policy-with-conversion>.seo-conversion-rail { padding-top:0; }
.policy-with-conversion .seo-conversion-card h2 { font-size:30px; }
.policy-with-conversion .seo-conversion-card { padding:24px 20px 18px; }
@media(max-width:1100px) { .policy-with-conversion { grid-template-columns:180px minmax(0,1fr); } .policy-with-conversion>.seo-conversion-rail { display:none; } }
@media(max-width:900px) { .policy-with-conversion { grid-template-columns:1fr; gap:28px; } }
/* Reading layouts already supply the desktop gutter; compact layouts need it. */
.seo-route .seo-reading-content>:is(.seo-hero,.seo-section,.seo-coverfairy-context) { width:100%; max-width:none; padding-inline:0; }
@media(max-width:1100px) { .seo-route .seo-reading-content>:is(.seo-hero,.seo-section,.seo-coverfairy-context) { width:calc(100% - var(--site-gutter)*2); margin-inline:auto; padding-inline:0; } }
.home-sample-link { display:inline-block; margin-top:15px; color:#555; font:500 13px/1.5 var(--sans); text-underline-offset:4px; }
.home-genre-gallery figcaption a { display:flex; justify-content:space-between; gap:5px; color:inherit; text-decoration:none; }
.home-genre-gallery figcaption a span { font-size:10px; font-weight:400; }
.home-genre-gallery figcaption a:hover { text-decoration:underline; text-underline-offset:4px; }
