/* Passive Voice Fixer · N°018 · SM/PVF — product-led surface, Colophon voices.
   StrongMocha House System v2: rules & hairlines, no shadows, no gradients. */

@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; src: url('../fonts/Newsreader-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; src: url('../fonts/Newsreader-400i.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 500; src: url('../fonts/Newsreader-500.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 700; src: url('../fonts/Newsreader-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400; src: url('../fonts/Archivo-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500; src: url('../fonts/Archivo-500.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; src: url('../fonts/Archivo-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; src: url('../fonts/IBMPlexMono-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; src: url('../fonts/IBMPlexMono-500.woff2') format('woff2'); font-display: swap; }

:root {
  --paper: #FBF8EF;
  --card: #FFFDF6;
  --ink: #171512;
  --body: #2C2822;
  --muted: #6E675C;
  --agate: #A89F8C;
  --hair: #E9E3D2;
  --accent: #2456C4;        /* Blue pencil — registered child accent */
  --accent-ink: #FFFFFF;
  --mark: #B2401F;          /* proofing red — functional, passive hit */
  --mark-bg: #F6DED4;
  --maybe: #8A5F14;         /* proofing ochre — functional, possible hit */
  --maybe-bg: #F2E6C6;
  --good: #2F6B2A;          /* functional, clean verdict */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.measure { max-width: 66ch; }

/* ---------- utilities (Law IV) ---------- */
.u-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.u-mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.u-tnum { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- masthead ---------- */
.topbar { border-bottom: 1px solid var(--hair); }
.topbar-in {
  display: flex; justify-content: space-between; gap: 2px 12px; flex-wrap: wrap;
  padding: 8px 0; color: var(--muted);
}
.topbar-in .u-mono { font-size: 10px; }
.masthead { text-align: center; padding: 26px 0 14px; }
.masthead .brand {
  font-family: var(--serif); font-weight: 700; color: var(--ink);
  font-size: clamp(30px, 6vw, 52px); line-height: 1.05; letter-spacing: -0.01em;
  text-decoration: none; display: inline-block;
}
.masthead .brand em { font-style: italic; font-weight: 400; color: var(--accent); }
.masthead .tag { margin-top: 8px; color: var(--muted); }
.masthead-rule { border: 0; border-top: 2.5px solid var(--ink); position: relative; margin: 14px 0 0; }
.masthead-rule::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); opacity: .35; }

nav.mainnav { border-bottom: 1px solid var(--hair); }
.mainnav ul {
  list-style: none; display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(14px, 4vw, 44px); padding: 0;
}
.mainnav a {
  display: inline-block; padding: 12px 2px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 150ms var(--ease);
}
.mainnav a:hover { color: var(--accent); }
.mainnav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: clamp(30px, 6vw, 60px) 0 clamp(20px, 4vw, 36px); text-align: center; }
.kicker { color: var(--accent); display: inline-block; }
.kicker::before, .kicker::after { content: "—"; color: var(--agate); margin: 0 10px; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; color: var(--ink);
  font-size: clamp(30px, 5.4vw, 56px); line-height: 1.08; letter-spacing: -0.01em;
  margin: 14px auto 12px; max-width: 21ch;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.hero .sub { max-width: 58ch; margin: 0 auto; font-size: clamp(16px, 2.2vw, 19px); }
.hero .privacy-line { margin-top: 14px; color: var(--muted); }
.hero .privacy-line strong { color: var(--good); font-weight: 500; }

/* ---------- the desk (tool) ---------- */
.desk { padding-bottom: clamp(36px, 6vw, 64px); }
.desk-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .desk-grid { grid-template-columns: 1fr; } }

.panel { background: var(--card); border: 1px solid var(--hair); border-top: 2px solid var(--ink); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--hair);
}
.panel-head .u-mono { color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 0;
  padding: 0 14px; min-height: 44px; cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { background: var(--card); color: var(--ink); }
.btn-accent:disabled:hover { background: var(--accent); color: var(--accent-ink); }

/* editor: transparent textarea over a marked-up backdrop */
.editor-wrap { position: relative; }
.editor-backdrop, .editor-input {
  font-family: var(--serif); font-size: 17px; line-height: 1.75;
  padding: 18px 18px 26px; width: 100%;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
  letter-spacing: normal; border: 0;
}
.editor-backdrop {
  position: absolute; inset: 0; overflow: hidden;
  color: var(--body); pointer-events: none;
}
.editor-input {
  position: relative; display: block;
  background: transparent; color: transparent;
  caret-color: var(--ink); resize: none;
  min-height: 340px; outline: none;
}
.editor-input::placeholder { color: var(--agate); opacity: 1; }
.editor-input:focus-visible { outline: none; }
.editor-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }

mark.m-passive, mark.m-possible {
  color: inherit; padding: 1px 0; border-radius: 0;
}
mark.m-passive { background: var(--mark-bg); box-shadow: inset 0 -2px 0 var(--mark); }
mark.m-possible { background: var(--maybe-bg); box-shadow: inset 0 -2px 0 var(--maybe); }
mark.m-agent { background: transparent; color: inherit; box-shadow: inset 0 -2px 0 var(--accent); }
mark.flash { outline: 2px solid var(--accent); outline-offset: 1px; }

.editor-foot {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--hair); padding: 8px 14px; color: var(--muted);
}

/* legend */
.legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 2px 0; color: var(--muted); }
.legend .u-mono { font-size: 10px; display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 22px; height: 12px; display: inline-block; }
.swatch.s-passive { background: var(--mark-bg); border-bottom: 2px solid var(--mark); }
.swatch.s-possible { background: var(--maybe-bg); border-bottom: 2px solid var(--maybe); }
.swatch.s-agent { border-bottom: 2px solid var(--accent); }

/* ---------- stats ---------- */
.statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 14px 6px 12px; text-align: center; border-left: 1px solid var(--hair); overflow: hidden; }
.stat:first-child { border-left: 0; }
.stat .u-label { letter-spacing: 0.1em; font-size: 10px; }
@media (max-width: 480px) {
  .statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--hair); }
}
.stat b {
  display: block; font-family: var(--mono); font-weight: 500;
  font-variant-numeric: tabular-nums; font-size: clamp(20px, 3vw, 30px);
  color: var(--ink); line-height: 1.2;
}
.stat span { color: var(--muted); font-size: 10px; }

.verdict {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--hair); padding: 12px 14px;
}
.verdict .chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 2px solid currentColor; padding: 6px 12px; font-weight: 500;
}
.verdict .chip.v-clean { color: var(--good); }
.verdict .chip.v-light { color: var(--maybe); }
.verdict .chip.v-heavy { color: var(--mark); }
.verdict .chip.v-none  { color: var(--agate); }
.verdict p { color: var(--muted); font-size: 14px; font-style: italic; }

/* ---------- findings ---------- */
.findings { display: flex; flex-direction: column; }
.findings-scroll { max-height: 560px; overflow-y: auto; }
@media (max-width: 900px) { .findings-scroll { max-height: none; overflow: visible; } }
.finding { border-bottom: 1px solid var(--hair); padding: 14px; }
.finding:last-child { border-bottom: 0; }
.finding .ref { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); margin-bottom: 6px; }
.finding .ref .t-passive { color: var(--mark); }
.finding .ref .t-possible { color: var(--maybe); }
.finding blockquote { font-style: italic; color: var(--ink); margin: 2px 0 8px; }
.finding blockquote mark { background: transparent; font-style: normal; font-weight: 500; padding: 0; }
.finding blockquote mark.q-passive { box-shadow: inset 0 -2px 0 var(--mark); }
.finding blockquote mark.q-possible { box-shadow: inset 0 -2px 0 var(--maybe); }
.finding .why { font-size: 14px; color: var(--muted); }
.finding .fix {
  margin-top: 8px; padding: 8px 10px;
  background: var(--paper); border-left: 2px solid var(--accent);
  font-size: 15px;
}
.finding .fix .u-mono { color: var(--accent); font-size: 9px; display: block; margin-bottom: 3px; }
.finding .jump {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: underline;
  text-underline-offset: 2px; min-height: 24px;
}
.finding .jump:hover { color: var(--ink); }
.all-clear { padding: 26px 18px; text-align: center; color: var(--muted); }
.all-clear b { font-family: var(--serif); font-weight: 700; color: var(--good); display: block; font-size: 20px; margin-bottom: 4px; }

/* ---------- article / content sections ---------- */
.section { padding: clamp(30px, 5vw, 56px) 0; border-top: 1px solid var(--hair); }
.section-head { text-align: center; margin-bottom: clamp(20px, 4vw, 36px); }
.section-head h2 {
  font-family: var(--serif); font-weight: 700; color: var(--ink);
  font-size: clamp(24px, 3.6vw, 36px); margin-top: 10px;
}
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.cols-3 > div { padding: 6px 26px; border-left: 1px solid var(--hair); }
.cols-3 > div:first-child { border-left: 0; padding-left: 0; }
.cols-3 > div:last-child { padding-right: 0; }
@media (max-width: 820px) {
  .cols-3 { grid-template-columns: 1fr; }
  .cols-3 > div { border-left: 0; border-top: 1px solid var(--hair); padding: 18px 0; }
  .cols-3 > div:first-child { border-top: 0; padding-top: 0; }
}
.cols-3 h3 { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.cols-3 .n { font-family: var(--mono); color: var(--accent); font-size: 13px; display: block; margin-bottom: 8px; }
.cols-3 p { font-size: 15.5px; color: var(--body); }

/* article pages (guide + legal) */
.article { padding: clamp(28px, 5vw, 52px) 0; }
.article-head { text-align: center; margin-bottom: clamp(22px, 4vw, 40px); }
.article-head h1 {
  font-family: var(--serif); font-weight: 700; color: var(--ink);
  font-size: clamp(28px, 5vw, 46px); line-height: 1.1; margin: 12px auto 10px; max-width: 24ch;
}
.article-head .dateline { color: var(--muted); }
.article-rule { border: 0; border-top: 2.5px solid var(--ink); position: relative; margin: 18px auto 0; max-width: 220px; }
.article-rule::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); opacity: .35; }

.prose { max-width: 66ch; margin: 0 auto; }
.prose h2 { font-family: var(--serif); color: var(--ink); font-size: 26px; margin: 2.2em 0 .5em; }
.prose h3 { font-family: var(--serif); color: var(--ink); font-size: 20px; margin: 1.6em 0 .4em; }
.prose p { margin: .7em 0; }
.prose ul, .prose ol { margin: .7em 0 .7em 1.4em; }
.prose li { margin: .35em 0; }
.prose .u-mono { color: var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 2em 0; }
.prose .note {
  background: var(--card); border: 1px solid var(--hair); border-left: 2px solid var(--accent);
  padding: 14px 18px; margin: 1.2em 0; font-size: 15.5px;
}
.prose address { font-style: normal; line-height: 1.8; }
.prose .ex { font-style: italic; }
.prose .ex-bad { box-shadow: inset 0 -2px 0 var(--mark); }
.prose .ex-good { box-shadow: inset 0 -2px 0 var(--good); }

table.ledger { border-collapse: collapse; width: 100%; margin: 1em 0; }
table.ledger th {
  font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); text-align: left;
  border-bottom: 2px solid var(--ink); padding: 8px 10px 6px;
}
table.ledger td { border-bottom: 1px solid var(--hair); padding: 9px 10px; vertical-align: top; font-size: 15.5px; }
table.ledger td:first-child { color: var(--mark); font-style: italic; }
table.ledger td:last-child { color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px;
  align-items: baseline; padding: 16px 2px; font-family: var(--serif); font-weight: 500;
  font-size: 18px; color: var(--ink); min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 2px 18px; color: var(--body); max-width: 60ch; }

/* ---------- footer ---------- */
footer.site {
  margin-top: auto; border-top: 2.5px solid var(--ink);
  background: var(--card);
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 28px;
  padding: 34px 0 26px;
}
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; gap: 22px; } }
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink); }
.foot-brand em { font-style: italic; font-weight: 400; color: var(--accent); }
.foot-grid p { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 34ch; }
.foot-grid h4 { margin-bottom: 10px; color: var(--agate); }
.foot-grid ul { list-style: none; }
.foot-grid li { margin: 0; }
.foot-grid li a {
  color: var(--body); text-decoration: none; font-family: var(--sans); font-size: 13.5px;
  display: inline-block; padding: 5px 0; min-height: 30px;
}
.foot-grid li a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.hallmark {
  display: flex; gap: 12px; align-items: center; margin-top: 4px; text-decoration: none;
}
.hallmark .sq {
  width: 46px; height: 46px; flex-shrink: 0;
  border: 3px solid var(--ink); display: grid; place-items: center; position: relative;
  background: var(--card);
}
.hallmark .sq::after { content: ""; position: absolute; inset: 2px; border: 1.5px solid #C8102E; }
.hallmark .sq b { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--ink); position: relative; z-index: 1; }
.hallmark .hm-meta { color: var(--muted); font-size: 9px; line-height: 1.9; }

.foot-legal {
  border-top: 1px solid var(--hair);
  padding: 14px 0 18px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  color: var(--muted);
}
.foot-legal .u-mono { font-size: 10px; }
.attribution { color: var(--muted); }
.attribution a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--agate); }
.attribution a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- language auto-detect chip ---------- */
.lang-chip {
  display: inline-block; margin: 10px 0 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); padding: 4px 10px;
}
.lang-chip[hidden] { display: none; }

/* ---------- AI panel (BYOK) ---------- */
.ai-panel { margin-top: 16px; }
.ai-panel summary {
  cursor: pointer; list-style: none; padding: 12px 14px; min-height: 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.ai-panel summary::-webkit-details-marker { display: none; }
.ai-panel summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
.ai-panel[open] summary::after { content: "−"; }
.ai-body { border-top: 1px solid var(--hair); padding: 14px; }
.ai-note { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.ai-note strong { color: var(--good); font-weight: 500; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .ai-grid { grid-template-columns: 1fr; } }
.ai-grid label { display: block; }
.ai-grid label span { display: block; margin-bottom: 4px; color: var(--muted); }
.ai-grid select, .ai-grid input {
  width: 100%; min-height: 44px; padding: 0 10px;
  font-family: var(--mono); font-size: 13px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--agate); border-radius: 0;
}
.ai-grid select:focus, .ai-grid input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.ai-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.ai-status { color: var(--muted); font-size: 10px; }
.ai-status.on { color: var(--good); }
.finding-actions { display: flex; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
.ai-go { color: var(--accent); }
.ai-fix { border-left-color: var(--good); }
.ai-fix .u-mono { color: var(--good); }
.ai-err { border-left-color: var(--mark); }
.ai-err .u-mono { color: var(--mark); }

/* ---------- family row / cross-promo ---------- */
.family-row {
  border-top: 1px solid var(--hair);
  padding: 14px 0;
  display: flex; gap: 8px 26px; flex-wrap: wrap; align-items: baseline;
  color: var(--muted);
}
.family-row .u-label { color: var(--agate); }
.family-row a {
  color: var(--body); text-decoration: none; font-family: var(--sans); font-size: 13px;
  display: inline-block; padding: 4px 0;
  border-bottom: 1px solid var(--hair);
}
.family-row a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- topbar language switcher ---------- */
.topbar .lang-switch a { color: var(--muted); text-decoration: none; }
.topbar .lang-switch a:hover { color: var(--accent); }
.topbar .lang-switch .cur { color: var(--ink); }

/* motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
