/* ============================================================
   KBWise — "The Wise Ledger"
   Paper cream + ink teal, Fraunces editorial voice,
   Plex Mono for every number. One marigold accent, actions only.
   Fonts self-hosted (no third-party CDN — privacy by design).
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FBF6EC;
  --paper-deep: #F4ECDC;
  --ink: #143238;
  --ink-soft: #41606A;
  --ink-faint: #7A929A;
  --line: #E3D9C4;
  --card: #FFFFFF;
  --marigold: #E8930C;
  --marigold-deep: #C97A04;
  --green: #1E7F4F;
  --green-soft: #E5F3EB;
  --red: #B3442E;
  --red-soft: #F9ECE8;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(20, 50, 56, 0.05), 0 8px 28px rgba(20, 50, 56, 0.09);
  --shadow-pop: 0 2px 4px rgba(20, 50, 56, 0.08), 0 18px 48px rgba(20, 50, 56, 0.16);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.brand .owl { width: 34px; height: 34px; }

.brand b { font-weight: 700; }
.brand span { color: var(--ink-soft); font-weight: 400; }

.site-nav { display: flex; gap: 26px; }

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover { color: var(--ink); border-bottom-color: var(--marigold); }

/* Mobile: keep the nav — compact and swipeable, never hidden */
@media (max-width: 640px) {
  .site-header .wrap { gap: 10px; }
  .brand { font-size: 1.15rem; flex: none; }
  .brand .owl { width: 28px; height: 28px; }
  .site-nav {
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: 0.82rem; white-space: nowrap; }
}

/* ---------- hero ---------- */

.hero {
  padding: 64px 0 24px;
  position: relative;
  overflow: hidden;
}

.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 99px;
  padding: 7px 16px;
  margin-bottom: 26px;
}

.hero .kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  max-width: 13ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--marigold-deep);
}

.hero .lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 14px;
}

.hero .lede strong { color: var(--ink); }

/* staggered entrance */
.rise { opacity: 0; transform: translateY(18px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise.d1 { animation-delay: 0.05s; }
.rise.d2 { animation-delay: 0.15s; }
.rise.d3 { animation-delay: 0.25s; }
.rise.d4 { animation-delay: 0.38s; }

@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
}

/* ---------- the tool ---------- */

.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px;
  margin: 34px 0 0;
  position: relative;
}

/* corner ticks, like a ledger sheet */
.tool::before, .tool::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--marigold);
  border-style: solid;
  opacity: 0.85;
}
.tool::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: var(--radius-lg) 0 0 0; }
.tool::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 var(--radius-lg) 0; }

.tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.tool-head h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.target-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover { border-color: var(--ink-soft); color: var(--ink); }

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip-custom { width: 110px; text-align: center; }
.chip-custom::placeholder { color: var(--ink-faint); }
.chip-custom:focus { outline: 2px solid var(--marigold); outline-offset: 1px; }

/* custom KB target: input + explicit unit, styled as one chip */
.chip-custom-wrap { display: inline-flex; align-items: center; gap: 5px; cursor: text; }
.chip-custom-wrap input {
  width: 64px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: inherit;
  text-align: right;
  padding: 0;
}
.chip-custom-wrap input:focus { outline: none; }
.chip-custom-wrap input::placeholder { color: var(--ink-faint); }
.chip-custom-wrap:focus-within { outline: 2px solid var(--marigold); outline-offset: 1px; }
.chip-custom-wrap .unit { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.chip-custom-wrap[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.chip-custom-wrap[aria-pressed="true"] input { color: var(--paper); }
.chip-custom-wrap[aria-pressed="true"] .unit { color: var(--marigold); }

.target-hint { font-size: 0.82rem; color: var(--ink-soft); margin: 10px 0 4px; }
.target-hint b { color: var(--ink); }

.format-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.format-row .seg {
  display: inline-flex;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.format-row .seg button {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 14px;
  background: var(--card);
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
}

.format-row .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* drop zone */

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 0%, var(--paper-deep), transparent 70%),
    var(--paper);
  padding: 52px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background-color 0.2s;
}

.dropzone:hover { border-color: var(--marigold); transform: translateY(-2px); }

.dropzone.dragover {
  border-color: var(--marigold);
  background-color: #FFF6E6;
  transform: scale(1.012);
}

.dropzone .owl { width: 54px; height: 54px; margin-bottom: 14px; }

.dropzone .dz-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.dropzone .dz-sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

.dropzone .dz-sub .mono { font-size: 0.85em; background: var(--paper-deep); padding: 2px 7px; border-radius: 6px; }

.dz-privacy {
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dz-privacy svg { width: 14px; height: 14px; flex: none; }

/* working state */

.working { padding: 46px 28px; text-align: center; }

.working .status {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
  min-height: 1.4em;
}

.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--paper-deep);
  overflow: hidden;
  max-width: 380px;
  margin: 0 auto;
}

.progress .bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--marigold), var(--marigold-deep));
  transition: width 0.25s ease;
}

/* result state */

.result { animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); }

@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } }

.verdict {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 22px 16px 18px;
}

.verdict .badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  flex: none;
}

.verdict .badge svg { width: 22px; height: 22px; }

.verdict.warn .badge { background: #FCF1DC; color: var(--marigold-deep); }
.verdict.fail .badge { background: var(--red-soft); color: var(--red); }

.size-math {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.size-math .from { color: var(--ink-faint); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.size-math .arrow { color: var(--marigold-deep); font-size: 0.8em; }
.size-math .to { color: var(--green); }

.verdict-note {
  width: 100%;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 4px 6px 18px;
}

@media (max-width: 560px) { .compare { grid-template-columns: 1fr; } }

.compare figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-deep);
}

.compare img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background:
    conic-gradient(#0000 25%, rgba(20,50,56,0.04) 0 50%, #0000 0 75%, rgba(20,50,56,0.04) 0) 0 0/22px 22px;
}

.compare figcaption {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 9px 13px;
  background: var(--card);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.compare figcaption b { color: var(--ink); font-weight: 600; }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding-bottom: 8px;
}

.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 14px 28px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.btn-primary {
  background: var(--marigold);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 147, 12, 0.35);
}

.btn-primary:hover { background: var(--marigold-deep); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(232, 147, 12, 0.4); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
}

.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

.error-box {
  background: var(--red-soft);
  border: 1px solid #ECCDC4;
  color: var(--red);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.95rem;
  margin: 14px 0 0;
}

/* ---------- ticker ---------- */

.ticker {
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  transform: rotate(-0.6deg) scale(1.01);
}

.ticker-inner {
  display: inline-block;
  animation: scroll 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticker-inner span { margin: 0 28px; opacity: 0.85; }
.ticker-inner em { font-style: normal; color: var(--marigold); }

@keyframes scroll { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) { .ticker-inner { animation: none; } }

/* ---------- sections ---------- */

.section { padding: 78px 0; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-sub { color: var(--ink-soft); max-width: 58ch; margin: 0 0 40px; }

/* steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--marigold-deep);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 12px;
}

.step h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 8px; font-weight: 600; }
.step p { margin: 0; font-size: 0.93rem; color: var(--ink-soft); }

/* tool grid */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: block;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--marigold);
}

.tool-card .tc-kb {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.tool-card .tc-kb small { font-size: 0.6em; color: var(--marigold-deep); }

.tool-card h3 { font-size: 0.97rem; font-weight: 600; margin: 8px 0 4px; }
.tool-card p { font-size: 0.83rem; color: var(--ink-soft); margin: 0; }

.tool-card .soon {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--paper-deep);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 10px;
}

.tool-card[aria-disabled="true"] { opacity: 0.62; }
.tool-card[aria-disabled="true"]:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* privacy panel */

.privacy-panel {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) { .privacy-panel { padding: 40px 26px; } }

.privacy-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 246, 236, 0.12);
}

.privacy-panel::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 147, 12, 0.3);
}

.privacy-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 600;
  margin: 0 0 10px;
  max-width: 22ch;
  letter-spacing: -0.02em;
}

.privacy-panel h2 em { font-style: italic; color: var(--marigold); }

.privacy-panel > p { color: rgba(251, 246, 236, 0.75); max-width: 56ch; margin: 0 0 30px; }

.privacy-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }

@media (max-width: 760px) { .privacy-points { grid-template-columns: 1fr; } }

.privacy-points div {
  border-top: 1.5px solid rgba(232, 147, 12, 0.5);
  padding-top: 14px;
}

.privacy-points h3 { font-size: 0.98rem; margin: 0 0 6px; font-weight: 600; }
.privacy-points p { font-size: 0.86rem; color: rgba(251, 246, 236, 0.66); margin: 0; }

/* FAQ */

.faq { max-width: 760px; }

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

.faq summary {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  padding: 18px 36px 18px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--marigold-deep);
  transition: transform 0.2s;
}

.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq details p { margin: 0 0 20px; color: var(--ink-soft); font-size: 0.96rem; max-width: 62ch; }

/* prose blocks (tool pages) */

.prose { max-width: 720px; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 2.2em 0 0.5em; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-soft); font-size: 0.99rem; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }

/* related tools strip */

.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.related a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 99px;
  padding: 8px 16px;
  transition: all 0.15s;
}

.related a:hover { border-color: var(--marigold); color: var(--ink); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(251, 246, 236, 0.7);
  margin-top: 40px;
  padding: 54px 0 34px;
  font-size: 0.88rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.site-footer .brand { color: var(--paper); font-size: 1.2rem; }

.site-footer .tagline { max-width: 34ch; margin-top: 10px; font-size: 0.85rem; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marigold);
  margin: 0 0 12px;
}

.footer-col a { display: block; text-decoration: none; padding: 3px 0; color: rgba(251, 246, 236, 0.7); }
.footer-col a:hover { color: var(--paper); }

.footer-base {
  border-top: 1px solid rgba(251, 246, 236, 0.14);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: rgba(251, 246, 236, 0.45);
}

/* ad placements — clearly labeled, visually separated from all tool UI */

.ad-frame {
  max-width: var(--maxw);
  margin: 26px auto;
  padding: 0 24px;
  position: relative;
}

.ad-frame .ad-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.ad-frame ins.adsbygoogle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-deep);
  min-height: 0;
}

/* forms (contact / waitlist) */

.kbform { max-width: 560px; margin: 18px 0; position: relative; }

.kbform label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}

.kbform input[type="text"],
.kbform input[type="email"],
.kbform textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.kbform input:focus, .kbform textarea:focus {
  outline: 2px solid var(--marigold);
  outline-offset: 1px;
  border-color: var(--marigold);
}

.kbform textarea { resize: vertical; }

.kbform .kbform-row { display: flex; gap: 10px; flex-wrap: wrap; }
.kbform .kbform-row input { flex: 1 1 220px; }
.kbform button[type="submit"] { margin-top: 14px; }
.kbform .kbform-row button[type="submit"] { margin-top: 0; }

.kbform .kbform-note { font-size: 0.8rem; color: var(--ink-faint); margin: 8px 0 0; }

.form-status { font-size: 0.92rem; min-height: 1.3em; margin: 10px 0 0; }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--red); }

/* tool page hero variant */

.tool-hero { padding: 52px 0 10px; }

.tool-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  max-width: 20ch;
}

.tool-hero h1 .mono { color: var(--marigold-deep); font-weight: 600; font-size: 0.92em; }

.tool-hero .lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 56ch; margin: 0; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

/* ============================================================
   Photos → one PDF (photos2pdf mode) — thumbnail reorder grid
   ============================================================ */
.pdf-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.page-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.page-thumb.dragging { opacity: 0.45; }
.page-thumb.drop-target { border-color: var(--marigold); box-shadow: var(--shadow-pop); }
.page-thumb .pt-num {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--paper); background: var(--ink);
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 7px; display: grid; place-items: center;
}
.page-thumb .pt-grip {
  position: absolute; top: 8px; right: 9px; z-index: 2;
  color: var(--ink-faint); font-size: 0.95rem; line-height: 1; cursor: grab;
}
.page-thumb .pt-img {
  aspect-ratio: 3 / 4;
  display: grid; place-items: center; overflow: hidden;
  background:
    repeating-conic-gradient(#ededed 0% 25%, #f8f8f8 0% 50%) 50% / 18px 18px;
}
.page-thumb .pt-img img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transition: transform 0.2s ease;
}
.page-thumb .pt-actions {
  display: flex; justify-content: center; gap: 4px;
  padding: 7px; background: var(--card); border-top: 1px solid var(--line);
}
.pt-btn {
  font-family: var(--font-mono); font-size: 0.95rem; line-height: 1;
  width: 30px; height: 30px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
  border-radius: 8px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.pt-btn:hover { border-color: var(--marigold); color: var(--marigold-deep); }
.dropzone-compact { padding: 22px 18px; }
.dropzone-compact .dz-title { font-size: 1rem; }
.tool-note { margin: 10px 0 0; font-size: 0.86rem; color: var(--ink-soft); }
.tool-note.err { color: var(--red); }

/* Success-state Pro-waitlist capture — the close at peak certainty */
.tool-capture {
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.tool-capture .tc-pitch { margin: 0 0 10px; font-size: 0.92rem; color: var(--ink-soft); }
.tool-capture .tc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-capture input[type="email"] {
  flex: 1 1 210px; min-width: 0;
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
}
.tool-capture input[type="email"]:focus { outline: none; border-color: var(--marigold); }
.tool-capture .tc-btn { padding: 11px 22px; }
.tool-capture .tc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tool-capture .form-status { margin: 8px 0 0; font-size: 0.85rem; min-height: 1em; }
.tool-capture .form-status.err { color: var(--red); }
.tool-capture .tc-thanks { margin: 0; font-size: 0.95rem; color: var(--green); display: flex; align-items: center; gap: 8px; }
.tool-capture .tc-thanks svg { width: 18px; height: 18px; flex: none; }

/* Dropzone "verify it yourself" trust line (privacy as proof) */
.dz-dare {
  display: block;
  margin: 8px auto 0;
  max-width: 52ch;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-faint);
}
