/* Frankly. Gancho's family: warm paper, white surfaces, dark stage panels, one brand colour (aubergine, shared with the iPhone app), hairlines,
   colour only where it carries meaning. Liquid Glass only on controls that float over content. Tokens: tokens.css. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* The wordmark face, and only the wordmark: Newsreader (optical sizes, close to Apple's New York, which the iPhone app uses). SIL OFL: /fonts/NEWSREADER-OFL.txt */
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: block; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--text); font: 400 var(--fs-md)/1.55 var(--font-sans); font-feature-settings: "cv11", "ss01", "ss03"; letter-spacing: -.008em; overflow-x: clip; }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); color: var(--text); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--border-strong); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--surface-inverse); color: var(--text-on-inverse); padding: 10px 14px; border-radius: var(--r-md); text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--text-muted); }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
kbd { font: 500 var(--fs-xs)/1 var(--font-mono); padding: 2px 5px; border-radius: var(--r-xs); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-secondary); }

/* ---------------------------------------------------------------- wordmark */
.wordmark { font-family: var(--font-brand); font-weight: 600; font-variation-settings: "opsz" 72; font-size: 29px; line-height: 1; letter-spacing: -.035em; text-decoration: none; color: var(--text); white-space: nowrap; }
.wordmark .stop { color: var(--accent); }

/* ---------------------------------------------------------------- controls */
.btn { --h: 40px; font: 500 var(--fs-md)/1 var(--font-sans); letter-spacing: -.01em; height: var(--h); padding: 0 16px; border-radius: 11px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--surface-inverse); color: var(--text-on-inverse); box-shadow: 0 1px 2px rgb(0 0 0 / .14), inset 0 1px 0 rgb(255 255 255 / .1); }
.btn.primary:hover { background: var(--surface-inverse-hover); }
.btn.accent { background: var(--accent); color: var(--text-on-accent); box-shadow: 0 1px 2px rgb(0 0 0 / .12), inset 0 1px 0 rgb(255 255 255 / .16); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--surface-hover); }
.btn.quiet { background: none; color: var(--text-secondary); padding: 0 12px; }
.btn.quiet:hover { background: var(--surface-hover); color: var(--text); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--border-strong); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn.small { --h: 32px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 9px; }
.btn.large { --h: 50px; padding: 0 22px; font-size: var(--fs-lg); border-radius: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(1turn); } }

.field { display: grid; gap: 7px; }
.field + .field { margin-top: 16px; }
.field > span, .label { font-size: var(--fs-sm); font-weight: 550; color: var(--text-secondary); }
.field .hint, .hint { font-size: var(--fs-sm); color: var(--text-muted); }
.field .opt { font-weight: 400; color: var(--text-muted); }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea { font: inherit; font-size: var(--fs-md); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; padding: 10px 13px; width: 100%; min-height: 44px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
textarea { line-height: 1.55; resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a8984' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.err { color: var(--danger); font-size: var(--fs-sm); }
.err:empty { display: none; }

/* ---------------------------------------------------------------- Liquid Glass: controls that float over content */
.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgb(0 0 0 / .02), var(--glass-shadow);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--glass-edge) 35%, transparent), transparent 46%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background-color: var(--glass-fill-solid); } }
@media (prefers-reduced-transparency: reduce) { .glass { background-color: var(--glass-fill-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 10px; z-index: 50; width: min(1200px, 100% - 20px); margin: 10px auto 0; border-radius: 18px; }
.topbar-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 10px 0 20px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 18px; flex: 1; }
.nav-link { font: 500 var(--fs-md)/1 var(--font-sans); color: var(--text-secondary); background: none; border: 0; height: 38px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; text-decoration: none; letter-spacing: -.01em; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: color-mix(in srgb, var(--surface-hover) 80%, transparent); color: var(--text); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-fast); }
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-group { position: relative; }
.menu { position: absolute; top: calc(100% + 12px); left: -10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 560px; padding: 10px; border-radius: 18px; animation: pop var(--dur-base) var(--ease); }
.menu-col { display: grid; align-content: start; gap: 2px; }
.menu-h { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding: 8px 12px 4px; }
.menu a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 11px; text-decoration: none; }
.menu a:hover, .menu a:focus-visible { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.menu a b { font-weight: 550; font-size: var(--fs-md); letter-spacing: -.01em; }
.menu a span { font-size: var(--fs-sm); color: var(--text-muted); }
.auth-slot { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.6px; border-radius: 2px; background: var(--text); transition: transform var(--dur-base) var(--ease); }
.menu-btn span:first-child { top: 18px; } .menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.drawer { display: grid; padding: 4px 12px 14px; border-top: 1px solid var(--glass-line); }
.drawer a { padding: 12px 8px; font-size: var(--fs-lg); font-weight: 500; text-decoration: none; letter-spacing: -.015em; border-radius: 10px; }
.drawer a:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.drawer-auth { display: flex; gap: 8px; padding: 12px 8px 0; flex-wrap: wrap; }
.drawer-auth .btn { flex: 1; }
.me { position: relative; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 6px; border-radius: 12px; border: 0; background: none; cursor: pointer; font: 500 var(--fs-md)/1 var(--font-sans); color: var(--text); }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--surface-hover) 80%, transparent); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-inverse); color: var(--text-on-inverse); display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 600; }
.me-menu { position: absolute; right: 0; top: calc(100% + 12px); width: 260px; padding: 8px; border-radius: 16px; display: grid; gap: 2px; animation: pop var(--dur-base) var(--ease); }
.me-menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--glass-line); margin-bottom: 4px; }
.me-menu .who b { display: block; font-weight: 600; } .me-menu .who span { font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.me-menu a, .me-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px; border-radius: 10px; border: 0; background: none; text-align: left; font: 500 var(--fs-md)/1.2 var(--font-sans); color: var(--text); cursor: pointer; text-decoration: none; }
.me-menu a:hover, .me-menu button:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.plan-tag { font-size: var(--fs-xs); font-weight: 600; color: var(--accent-strong); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.985); } }

/* ---------------------------------------------------------------- page scaffolding */
main { display: block; }
.k-site main, .k-app main { padding-bottom: 40px; }
.page-head { padding: 72px 0 36px; }
.page-head h1 { font-size: clamp(36px, 5.4vw, var(--fs-5xl)); letter-spacing: -.045em; line-height: 1.03; max-width: 20ch; }
.page-head .lede { margin-top: 18px; font-size: var(--fs-xl); color: var(--text-secondary); max-width: 60ch; line-height: 1.5; letter-spacing: -.015em; }
.page-head .meta, .meta { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500; }
.page-head .meta { margin-top: 18px; }
.page-head > .meta:first-child { margin: 0 0 16px; }
.crumb { margin-bottom: 18px; font-size: var(--fs-sm); font-weight: 500; }
.crumb a { color: var(--text-muted); text-decoration: none; } .crumb a::before { content: "← "; }
.crumb a:hover { color: var(--text); }

.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(42px, 7vw, var(--fs-6xl)); letter-spacing: -.052em; line-height: .98; max-width: 15ch; }
.hero .lede { margin-top: 24px; font-size: clamp(17px, 1.7vw, 21px); color: var(--text-secondary); max-width: 54ch; line-height: 1.5; letter-spacing: -.015em; }
.hero > .wrap > .meta:first-child { margin-bottom: 22px; }
.hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.hero ul li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.hero > .wrap > p:not(.lede):not(.meta) { margin-top: 14px; color: var(--text-secondary); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.actions .btn { --h: 48px; padding: 0 22px; font-size: var(--fs-lg); border-radius: 13px; }

.band { padding: clamp(56px, 8vw, 104px) 0; }
.band:not(.inverse):not(.cta) + .band:not(.inverse):not(.cta) { padding-top: 0; }
.section-title { font-size: clamp(30px, 4vw, var(--fs-4xl)); letter-spacing: -.042em; line-height: 1.05; max-width: 22ch; }
.section-lede { margin-top: 14px; font-size: var(--fs-lg); color: var(--text-secondary); max-width: 58ch; }
.section-title + .grid-3, .section-title + .grid-2, .section-lede + .grid-3, .section-lede + .grid-2, .section-title + .steps, .section-lede + .steps, .section-title + .faq, .section-lede + .faq, .section-lede + .card, .section-title + .card { margin-top: 40px; }
.band > .wrap > p:not(.section-lede) { margin-top: 14px; color: var(--text-secondary); max-width: 64ch; }
.band > .wrap > ul { margin: 16px 0 0; padding-left: 20px; color: var(--text-secondary); display: grid; gap: 6px; }

.band.inverse, .band.cta { background: var(--stage); color: var(--stage-text); }
.band.inverse .section-lede, .band.inverse > .wrap p, .band.cta > .wrap p { color: var(--stage-muted); }
.band.inverse .card { background: color-mix(in srgb, var(--stage-text) 4%, transparent); border-color: var(--stage-line); color: var(--stage-text); box-shadow: none; }
.band.inverse .card p { color: var(--stage-muted); }
.band.inverse .btn.primary, .band.cta .btn.primary { background: var(--stage-text); color: var(--stage); }
.band.inverse .btn.ghost, .band.cta .btn.ghost { background: transparent; color: var(--stage-text); border-color: var(--stage-line); box-shadow: none; }
.band.inverse .btn.ghost:hover, .band.cta .btn.ghost:hover { background: color-mix(in srgb, var(--stage-text) 8%, transparent); }
.band.cta { margin: clamp(40px, 6vw, 80px) 10px 10px; border-radius: 28px; text-align: left; }
.band.cta h2 { font-size: clamp(32px, 4.6vw, var(--fs-5xl)); letter-spacing: -.045em; line-height: 1.02; max-width: 18ch; }
.band.cta p { margin-top: 16px; font-size: var(--fs-lg); max-width: 54ch; }
.band.cta > .wrap > .btn { margin-top: 28px; }

.grid-3, .grid-2 { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: var(--fs-xl); letter-spacing: -.025em; }
.card h3 + p, .card p + p { margin-top: 8px; color: var(--text-secondary); }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-secondary); display: grid; gap: 4px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.steps > li { counter-increment: s; padding: 26px 26px 28px; border-top: 1px solid var(--text); }
.steps > li::before { content: counter(s, decimal-leading-zero); display: block; font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--accent); margin-bottom: 30px; }
.steps h3 { font-size: var(--fs-xl); letter-spacing: -.025em; }
.steps p { margin-top: 8px; color: var(--text-secondary); }
.band.inverse .steps > li { border-color: var(--stage-text); }

.faq { border-top: 1px solid var(--border); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; font-size: var(--fs-lg); font-weight: 550; letter-spacing: -.018em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.6px solid var(--text-muted); border-bottom: 1.6px solid var(--text-muted); transform: translateY(-70%) rotate(45deg); transition: transform var(--dur-base) var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 44px 24px 0; color: var(--text-secondary); max-width: 68ch; }

/* ---------------------------------------------------------------- home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.proof { position: relative; display: grid; gap: 12px; }
.proof .card { padding: 22px; }
.proof-tag { position: absolute; top: -12px; right: 18px; z-index: 2; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); background: var(--canvas); padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--border); }
.proof-score { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.ring { --v: 0; width: 132px; aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--surface-sunken); }
.ring .val { stroke: var(--tone, var(--accent)); stroke-linecap: round; stroke-dasharray: calc(var(--v) * 2.827) 282.7; transition: stroke-dasharray var(--dur-slow) var(--ease); }
.ring b { font-size: 44px; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring small { position: absolute; bottom: 30px; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 500; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: var(--fs-sm); }
.bar > span:first-child { color: var(--text-secondary); font-weight: 500; }
.bar > span:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--surface-sunken); overflow: hidden; display: block; }
.bar i::after { content: ""; display: block; height: 100%; width: calc(var(--v, 0) * 1%); background: var(--tone, var(--accent)); border-radius: inherit; transition: width var(--dur-slow) var(--ease); }
.bar small { grid-column: 1 / -1; color: var(--text-muted); font-size: var(--fs-xs); margin-top: -2px; }
.tone-ok { --tone: var(--success); } .tone-mid { --tone: var(--warning); } .tone-low { --tone: var(--danger); }
.rewrite { display: grid; gap: 10px; }
.rewrite .before, .rewrite .after { padding: 12px 14px; border-radius: 12px; font-size: var(--fs-md); line-height: 1.45; }
.rewrite .before { background: var(--surface-sunken); color: var(--text-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 60%, transparent); }
.rewrite .after { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rewrite .lbl { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.placeholder { color: var(--accent-strong); font-weight: 600; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; padding: 0 3px; white-space: nowrap; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--border); margin-top: 48px; }
.features > div { padding: 30px 30px 34px 0; border-bottom: 1px solid var(--border); }
.features > div:not(:nth-child(3n + 1)) { padding-left: 30px; border-left: 1px solid var(--border); }
.features h3 { font-size: var(--fs-xl); letter-spacing: -.025em; }
.features p { margin-top: 10px; color: var(--text-secondary); }

/* ---------------------------------------------------------------- articles */
.prose { font-size: var(--fs-lg); line-height: 1.7; color: var(--text-secondary); padding-bottom: 40px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { color: var(--text); font-size: var(--fs-3xl); letter-spacing: -.035em; margin-top: 2em; line-height: 1.15; }
.prose h3 { color: var(--text); font-size: var(--fs-xl); letter-spacing: -.022em; margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent-strong); text-decoration-color: var(--accent-line); }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li + li { margin-top: .4em; } .prose li::marker { color: var(--text-muted); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--text); font-style: normal; }
.prose blockquote p + p { margin-top: .6em; }
.prose .note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; font-size: var(--fs-md); }
.prose .note > * + * { margin-top: .6em; } .prose .note ul { margin: .6em 0 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--border); min-width: 140px; }
.prose th { color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.k-site .page-head + .prose { padding-top: 0; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.post-card { display: grid; align-content: start; gap: 10px; height: 100%; padding: 30px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.post-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.post-card::before { content: ""; display: block; height: 4px; width: 40px; border-radius: 4px; background: var(--accent); margin-bottom: 26px; }
.post-card h2 { font-size: var(--fs-2xl); letter-spacing: -.03em; line-height: 1.2; }
.post-card p { color: var(--text-secondary); }
.post-card .meta { margin-top: 6px; }

/* ---------------------------------------------------------------- tools (analysis, tailor, letter) */
.tool-head { padding: 56px 0 28px; }
.tool-head h1 { font-size: clamp(34px, 4.6vw, var(--fs-5xl)); letter-spacing: -.045em; line-height: 1.03; }
.tool-head p { margin-top: 12px; color: var(--text-secondary); font-size: var(--fs-lg); max-width: 60ch; }
.tool { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.tool.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.side { position: sticky; top: 90px; display: grid; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 14px; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-h h2 { font-size: var(--fs-2xl); letter-spacing: -.03em; }
.panel-h p { color: var(--text-muted); font-size: var(--fs-sm); width: 100%; }
.panel.score { padding: 24px; }
.panel.score .ring { margin: 6px auto 0; width: 150px; }
.score-h { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); text-align: center; }
.score-issues { text-align: center; margin: 12px 0 20px; font-size: var(--fs-sm); color: var(--text-secondary); font-weight: 500; }
.score-sub { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding-top: 18px; border-top: 1px solid var(--border); margin-bottom: 14px; }
.panel.score.empty .ring b { color: var(--text-faint); }
.plan-card { padding: 20px; border-radius: var(--r-xl); background: var(--stage); color: var(--stage-text); }
.plan-card h3 { font-size: var(--fs-lg); letter-spacing: -.02em; }
.plan-card p { color: var(--stage-muted); font-size: var(--fs-sm); margin-top: 6px; }
.plan-card .btn { margin-top: 14px; width: 100%; background: var(--stage-text); color: var(--stage); }
.plan-card.pro { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.plan-card.pro p { color: var(--text-secondary); }

.drop { position: relative; display: grid; place-items: center; gap: 6px; padding: 28px 18px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--canvas); text-align: center; cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop b { font-weight: 550; } .drop span { font-size: var(--fs-sm); color: var(--text-muted); }
.drop svg { width: 22px; height: 22px; fill: none; stroke: var(--text-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.saved-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.saved-pick select { flex: 1; min-width: 180px; width: auto; }
.sub { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.sub-h { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; }
.sub-h + p { color: var(--text-muted); font-size: var(--fs-sm); margin: 4px 0 12px; }
.go-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.go-row .hint { flex: 1; min-width: 180px; }
.count { font-size: var(--fs-xs); color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* results */
.results { display: grid; gap: 14px; margin-top: 14px; }
.results:empty { display: none; }
.res { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; box-shadow: var(--shadow-sm); scroll-margin-top: 96px; }
.res-h { display: flex; align-items: flex-start; gap: 14px; }
.res-h h2 { font-size: var(--fs-2xl); letter-spacing: -.03em; }
.res-h p { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 3px; }
.res-h .n { margin-left: auto; font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--tone, var(--text)); }
.item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.item-h { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.015em; }
.item-h::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--text-faint)); flex: none; }
.item > p { color: var(--text-secondary); margin-top: 6px; max-width: 70ch; }
.item ul.quotes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.item ul.quotes li { padding: 10px 14px; border-radius: 10px; background: var(--surface-sunken); font-size: var(--fs-md); color: var(--text-secondary); }
.why { margin-top: 16px; font-size: var(--fs-sm); color: var(--text-muted); max-width: 70ch; }
.why b { color: var(--text-secondary); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; list-style: none; padding: 0; }
.chips li { font-size: var(--fs-sm); padding: 5px 10px; border-radius: 8px; background: var(--surface-sunken); color: var(--text-secondary); font-weight: 500; }
.chips.ok li { background: var(--success-soft); color: var(--success-strong); }
.chips.miss li { background: var(--danger-soft); color: var(--danger-strong); }
.chips.acc li { background: var(--accent-soft); color: var(--accent-strong); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.kv h4 { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.words { display: grid; gap: 10px; margin-top: 12px; }
.word { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; background: var(--surface-sunken); border-radius: 12px; }
.word b { font-weight: 600; } .word b span { color: var(--text-muted); font-weight: 500; }
.word .chips { margin-top: 0; } .word .chips li { background: var(--surface); }
.rw { display: grid; gap: 8px; margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--border); }
.rw .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rw .sec { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.rw .reason { font-size: var(--fs-sm); color: var(--text-muted); }
.list { margin: 10px 0 0; padding-left: 20px; color: var(--text-secondary); display: grid; gap: 6px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.notice.warn { background: var(--warning-soft); border-color: transparent; color: var(--warning-strong); }
.notice.bad { background: var(--danger-soft); border-color: transparent; color: var(--danger-strong); }
.notice.acc { background: var(--accent-soft); border-color: var(--accent-line); }
.notice > div { flex: 1; } .notice b { display: block; } .notice p { margin-top: 2px; }
.notice .btn { flex: none; }
.locked { text-align: left; padding: 22px; border-radius: var(--r-lg); background: var(--canvas); border: 1px dashed var(--border-strong); margin-top: 14px; }
.locked h3 { font-size: var(--fs-lg); letter-spacing: -.02em; }
.locked p { color: var(--text-secondary); margin: 6px 0 14px; font-size: var(--fs-md); }
.letter { white-space: pre-wrap; font-size: var(--fs-lg); line-height: 1.7; color: var(--text); padding: 30px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-sheet); font-family: Georgia, "Times New Roman", serif; max-width: 100%; overflow-wrap: anywhere; }
.empty-state { display: grid; justify-items: start; gap: 6px; padding: 30px; border-radius: var(--r-xl); border: 1px dashed var(--border-strong); color: var(--text-muted); }
.empty-state b { color: var(--text); font-size: var(--fs-lg); letter-spacing: -.02em; }
.loading { display: flex; gap: 12px; align-items: center; padding: 26px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); }
.adv summary { cursor: pointer; font-weight: 550; font-size: var(--fs-sm); color: var(--text-secondary); padding: 8px 0; }
.adv[open] summary { margin-bottom: 10px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-fields .field + .field { margin-top: 0; }
.seg-tabs { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-sunken); margin-bottom: 14px; }
.seg-tabs button { height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font: 500 var(--fs-sm)/1 var(--font-sans); color: var(--text-secondary); cursor: pointer; }
.seg-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.plan { display: grid; align-content: start; gap: 6px; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.plan.featured { background: var(--stage); color: var(--stage-text); border-color: transparent; }
.plan h2 { font-size: var(--fs-xl); letter-spacing: -.02em; }
.plan .price { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.plan .price b { font-size: 56px; letter-spacing: -.055em; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .price span { color: var(--text-muted); font-size: var(--fs-md); }
.plan.featured .price span, .plan.featured .terms, .plan.featured li { color: var(--stage-muted); }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; color: var(--text-secondary); }
.plan li::before { content: ""; flex: none; width: 14px; height: 8px; margin-top: 6px; border-left: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent); transform: rotate(-45deg) scale(.85); }
.plan.featured li::before { border-color: var(--stage-text); }
.plan .btn { width: 100%; }
.plan.featured .btn { background: var(--stage-text); color: var(--stage); }
.plan .terms { margin-top: 12px; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }
.plan .terms a { color: inherit; }

/* ---------------------------------------------------------------- account, auth pages, resumes */
.narrow { width: min(560px, 100% - 40px); margin-inline: auto; }
.auth-page { padding: 72px 0 40px; }
.auth-page h1 { font-size: var(--fs-4xl); letter-spacing: -.045em; }
.auth-page > p { margin: 10px 0 26px; color: var(--text-secondary); }
.stack { display: grid; gap: 14px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.acct-row + .acct-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.acct-row .dt { font-size: var(--fs-sm); color: var(--text-muted); } .acct-row .dd { margin: 2px 0 0; font-weight: 550; overflow-wrap: anywhere; } .acct-row > div:first-child { min-width: 0; flex: 1 1 240px; }
.runs { list-style: none; padding: 0; margin: 0; }
.runs li + li { border-top: 1px solid var(--border); }
.runs a, .runs .run { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 4px; text-decoration: none; }
.runs a:hover { background: var(--canvas); }
.runs .kind { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); width: 92px; }
.runs .t { font-weight: 500; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.runs .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.runs .d { flex: none; white-space: nowrap; font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.runs .s { font-weight: 600; font-variant-numeric: tabular-nums; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 56px 0 26px; }
.lib-head h1 { font-size: clamp(34px, 4.6vw, var(--fs-5xl)); letter-spacing: -.045em; }
.lib-head p { color: var(--text-secondary); margin-top: 8px; }
.lib-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.docs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.doc-card { display: grid; gap: 10px; }
.doc-thumb { display: block; aspect-ratio: 8.5 / 11; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sheet); position: relative; text-decoration: none; transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base); }
.doc-thumb:hover { transform: translateY(-2px); }
.doc-thumb .doc-sheet { position: absolute; left: 0; top: 0; width: 816px; padding: 48px 58px; transform-origin: 0 0; pointer-events: none; }
.doc-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.doc-meta a { font-weight: 600; text-decoration: none; letter-spacing: -.015em; overflow-wrap: anywhere; }
.doc-meta span { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.doc-more { position: relative; }
.doc-more > button { width: 34px; height: 34px; border-radius: 9px; border: 0; background: none; cursor: pointer; color: var(--text-muted); display: grid; place-items: center; }
.doc-more > button:hover, .doc-more > button[aria-expanded="true"] { background: var(--surface-hover); color: var(--text); }
.doc-more > button svg { width: 16px; height: 16px; fill: currentColor; }
.pop-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 220px; padding: 6px; border-radius: 14px; display: grid; animation: pop var(--dur-base) var(--ease); }
.pop-menu a, .pop-menu button { display: block; width: 100%; text-align: left; padding: 10px 11px; border-radius: 9px; border: 0; background: none; font: 500 var(--fs-md)/1.2 var(--font-sans); color: var(--text); cursor: pointer; text-decoration: none; }
.pop-menu a:hover, .pop-menu button:hover, .pop-menu a:focus-visible, .pop-menu button:focus-visible { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.pop-menu .bad { color: var(--danger); }
.pop-menu hr { border: 0; border-top: 1px solid var(--glass-line); margin: 4px 0; }

/* ---------------------------------------------------------------- dialogs and sheets (glass) */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgb(14 14 13 / .32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (prefers-reduced-transparency: reduce) { dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(14 14 13 / .5); } }
.sheet { width: 440px; max-width: 100%; border-radius: 24px; padding: 30px; overflow: auto; max-height: calc(100dvh - 24px); }
dialog[open] .sheet { animation: rise var(--dur-slow) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.sheet h2 { font-size: var(--fs-3xl); letter-spacing: -.04em; line-height: 1.08; }
.sheet .sub-copy { color: var(--text-secondary); margin: 8px 0 22px; }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--surface) 60%, transparent); cursor: pointer; display: grid; place-items: center; color: var(--text-secondary); }
.sheet .x:hover { background: var(--surface); color: var(--text); }
.sheet .x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.sheet input:not([type=checkbox]) { background: var(--surface); }
.sheet .btn.full, .btn.full { width: 100%; }
.sheet .switch { margin-top: 18px; text-align: center; font-size: var(--fs-sm); color: var(--text-secondary); }
.sheet form > .btn { margin-top: 20px; }
.sheet .points { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--text-secondary); }
.sheet .points li::before { content: "—"; color: var(--accent); margin-right: 8px; }
.sheet .done { text-align: left; }
.sheet .done p { color: var(--text-secondary); margin-top: 10px; }
.sheet .row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, 100% - 24px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 16px; font-size: var(--fs-md); font-weight: 500; animation: rise var(--dur-slow) var(--ease); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.toast.bad::before { background: var(--danger); } .toast.ok::before { background: var(--success); }
.toast > span { flex: 1; }
.toast .btn { flex: none; }
.k-app .toasts, .has-tabbar .toasts { bottom: max(20px, env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- mobile tab bar (glass) */
.tabbar { display: none; }

/* ---------------------------------------------------------------- footer */
.foot { margin-top: 40px; border-top: 1px solid var(--border); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; padding: 56px 0 36px; }
.foot-brand p { margin-top: 12px; color: var(--text-secondary); max-width: 32ch; }
.foot-brand p.muted { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 8px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot-cols h2 { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.01em; margin-bottom: 12px; }
.foot-cols a { display: block; padding: 4px 0; color: var(--text-secondary); text-decoration: none; font-size: var(--fs-md); }
.foot-cols a:hover { color: var(--text); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0 36px; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-muted); }
.foot-base a { color: inherit; text-decoration: none; margin-left: 18px; } .foot-base a:hover { color: var(--text); }

/* ---------------------------------------------------------------- editor */
.k-editor { background: var(--surface-sunken); }
.ed-bar { position: fixed; top: 10px; left: 10px; right: 10px; z-index: 60; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 6px; border-radius: 18px; }
.ed-back { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px 0 6px; border-radius: 11px; color: var(--text-secondary); text-decoration: none; font-weight: 500; }
.ed-back:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); }
.ed-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ed-name { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 200px; }
.ed-name input { font-weight: 600; font-size: var(--fs-lg) !important; letter-spacing: -.02em; border-color: transparent !important; background: transparent !important; min-height: 38px !important; padding: 6px 8px !important; max-width: 360px; box-shadow: none; }
.ed-name input:hover, .ed-name input:focus { border-color: var(--border-strong) !important; background: var(--surface) !important; }
.ed-status { font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.ed-status.ok::before { content: "✓ "; color: var(--success); } .ed-status.bad { color: var(--danger); }
.tools { display: flex; align-items: center; gap: 1px; }
.tools button, .tools select { height: 38px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--text-secondary); font: 500 var(--fs-sm)/1 var(--font-sans); cursor: pointer; display: inline-grid; place-items: center; }
.tools button:hover { background: color-mix(in srgb, var(--surface) 75%, transparent); color: var(--text); }
.tools button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tools svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tools .sep { width: 1px; height: 20px; background: var(--glass-line); margin: 0 5px; }
.ed-actions { display: flex; gap: 6px; align-items: center; }
.ed-more { position: relative; }
.ed-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 100dvh; }
.ed-canvas { padding: 96px 16px 120px; overflow-x: auto; }
.ed-sheet { box-sizing: border-box; width: 8.5in; min-height: 11in; margin: 0 auto; padding: .5in .6in; background: #fff; color: #111; border-radius: 3px; box-shadow: var(--shadow-sheet); position: relative; }
.ed-sheet .ProseMirror { outline: none; min-height: 9in; }
.ed-sheet .ProseMirror p.is-empty:first-child::before { content: attr(data-placeholder); color: #aaa; float: left; pointer-events: none; height: 0; }
.ed-sheet ::selection { background: #ecd9e6; }
.pg-gap { position: absolute; left: 0; right: 0; height: 28px; background: var(--surface-sunken); box-shadow: inset 0 8px 10px -8px rgb(0 0 0 / .2), inset 0 -8px 10px -8px rgb(0 0 0 / .2); display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; font: 600 var(--fs-2xs)/1 var(--font-sans); color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.ed-design { position: sticky; top: 0; height: 100dvh; overflow: auto; padding: 86px 18px 40px; background: var(--surface); border-left: 1px solid var(--border); }
.ed-design h3 { margin: 22px 0 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); letter-spacing: -.005em; }
.ed-design h3:first-of-type { margin-top: 0; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { display: grid; gap: 7px; padding: 6px 6px 9px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface); cursor: pointer; font: 600 var(--fs-sm)/1.2 var(--font-sans); color: var(--text-secondary); text-align: center; }
.tpl:hover { border-color: var(--border-strong); }
.tpl[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent-strong); }
.tpl-mini { display: block; height: 150px; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); position: relative; pointer-events: none; }
.tpl-mini .doc-sheet { position: absolute; left: 0; top: 0; width: 816px; min-height: 1056px; padding: 56px 64px; transform-origin: 0 0; background: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; }
.swatches button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.hex-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.hex-row input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: 11px; background: none; cursor: pointer; }
.hex-row input#ed-hex { width: 120px; font-family: var(--font-mono); font-size: var(--fs-sm); }
.hex-msg { font-size: var(--fs-xs); color: var(--danger); width: 100%; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-sunken); }
.seg button { height: 34px; border: 0; border-radius: 9px; background: none; font: 500 var(--fs-sm)/1 var(--font-sans); color: var(--text-secondary); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ed-hint { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; margin-top: 10px; }
.ed-send { display: grid; gap: 6px; }
.ed-send a { justify-content: flex-start; }
.ed-design-toggle { display: none; }
.slash { position: fixed; z-index: 90; width: 240px; padding: 6px; border-radius: 15px; display: grid; gap: 1px; }
.slash button { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: none; font: 500 var(--fs-md)/1 var(--font-sans); color: var(--text); cursor: pointer; text-align: left; }
.slash button[aria-selected="true"], .slash button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.slash kbd { background: transparent; }
.ai-pop { position: fixed; z-index: 85; }
.sel-bar { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 15px; flex-wrap: wrap; }
.sel-bar button, .sel-bar select { height: 34px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 9px; background: none; color: var(--text-secondary); font: 500 var(--fs-sm)/1 var(--font-sans); cursor: pointer; }
.sel-bar select { width: auto; min-height: 34px; padding: 0 26px 0 9px; background-position: right 8px center; box-shadow: none; }
.sel-bar button:hover, .sel-bar select:hover { background: color-mix(in srgb, var(--surface) 75%, transparent); color: var(--text); }
.sel-bar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; display: inline-block; vertical-align: -2px; }
.sel-sep { width: 1px; height: 20px; background: var(--glass-line); margin: 0 3px; }
.sel-bar .ai-go { background: var(--accent); color: var(--text-on-accent); display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-weight: 600; }
.sel-bar .ai-go:hover { background: var(--accent-hover); color: var(--text-on-accent); }
.sel-link { display: flex; gap: 6px; padding: 8px; border-radius: 14px; margin-top: 6px; }
.sel-link input { min-height: 36px !important; padding: 6px 10px !important; }
.ai-card { margin-top: 6px; padding: 14px; border-radius: 18px; max-height: min(520px, calc(100dvh - 120px)); overflow: auto; }
.ai-card label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.ai-card textarea { min-height: 70px; font-size: var(--fs-sm); }
.ai-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ai-presets button { height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font: 500 var(--fs-sm)/1 var(--font-sans); color: var(--text-secondary); cursor: pointer; }
.ai-presets button:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.ai-custom { display: flex; gap: 6px; } .ai-custom input { flex: 1; min-width: 0; min-height: 36px !important; padding: 6px 10px !important; font-size: var(--fs-sm) !important; }
.ai-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); margin: 0 0 6px; }
.ai-label.after { color: var(--accent-strong); }
.ai-text { max-height: 200px; overflow: auto; font-size: var(--fs-md); line-height: 1.5; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; background: var(--surface); }
.ai-text.before { color: var(--text-muted); background: var(--surface-sunken); }
.ai-text ul { padding-left: 16px; margin: 0; } .ai-text p { margin: 0 0 4px; } .ai-text h1, .ai-text h2, .ai-text h3 { font-size: inherit; letter-spacing: 0; }
.ai-row { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .ed-design { position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 92vw); z-index: 70; transform: translateX(105%); transition: transform var(--dur-slow) var(--ease); box-shadow: var(--shadow-lg); visibility: hidden; }
  .design-open .ed-design { transform: none; visibility: visible; }
  .ed-design-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
  .nav, .auth-slot { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .topbar-in { padding: 0 6px 0 16px; height: 56px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .grid-3, .steps, .features { grid-template-columns: minmax(0, 1fr); }
  .features > div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .features > div { padding-right: 0; }
        .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-list, .grid-2, .plans, .tool.two { grid-template-columns: minmax(0, 1fr); }
  .tools .hide-sm { display: none; }
}
@media (max-width: 700px) {
  .wrap, .wrap-narrow, .narrow { width: calc(100% - 32px); }
  .side { grid-template-columns: minmax(0, 1fr); }
  .panel, .res, .card { padding: 20px; }
  .two-fields, .kv { grid-template-columns: minmax(0, 1fr); }
  .proof-score { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .proof-score .bars { width: 100%; }
  .band.cta { margin-inline: 0; border-radius: 0; }
  .prose { font-size: var(--fs-md); }
  .prose h2 { font-size: var(--fs-2xl); }
  .letter { padding: 22px 20px; font-size: var(--fs-md); }
  .runs a, .runs .run { grid-template-columns: minmax(0, 1fr) auto; }
  .runs .kind { grid-column: 1 / -1; width: auto; }
  /* the app's tab bar floats at the bottom on phones */
  .has-tabbar .tabbar { position: fixed; z-index: 55; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 22px; }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 16px; text-decoration: none; color: var(--text-muted); font-size: var(--fs-2xs); font-weight: 600; }
  .tabbar a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--surface) 75%, transparent); }
  .tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .has-tabbar { padding-bottom: 92px; }
  .has-tabbar .toasts { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 84px); }
  .has-tabbar .foot { margin-bottom: 0; }
  /* editor: name row on top, formatting in a glass bar at the bottom */
  .ed-bar { height: auto; flex-wrap: wrap; padding: 6px; row-gap: 0; }
  .ed-name { order: 2; flex-basis: 100%; padding: 0 2px 4px; }
  .ed-name input { max-width: none; }
  .ed-bar .tools { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); justify-content: space-between; padding: 5px; border-radius: 20px; overflow-x: auto;
    background: var(--glass-fill-page); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow); }
  .ed-bar .tools button { min-width: 44px; height: 44px; }
  .ed-actions { margin-left: auto; }
  .ed-canvas { padding: 124px 8px 110px; }
  .ed-sheet { width: 100%; min-height: 0; padding: 28px 22px; }
  .pg-gap { display: none; }
  .ed-send-sm { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { @media (max-width: 700px) { .ed-bar .tools { background: var(--glass-fill-solid); } } }
@media (prefers-reduced-transparency: reduce) { @media (max-width: 700px) { .ed-bar .tools { background: var(--glass-fill-solid); backdrop-filter: none; -webkit-backdrop-filter: none; } } }
@media (pointer: coarse) { .btn.small { --h: 40px; } .seg button, .ai-presets button, .tpl { min-height: 44px; } .swatches button { width: 44px; height: 44px; } .sel-bar button, .sel-bar select { height: 44px; min-width: 44px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; } }
@media print { .topbar, .foot, .tabbar, .toasts, .side .plan-card { display: none !important; } body { background: #fff; } }
.cta-meta { margin-top: 22px; } .band.cta .cta-meta { color: var(--stage-muted); }
.terms-line { margin-top: 12px; }
/* page scale on screen (the server applies the same zoom to the PDF) */
.doc-sheet[data-size="s"] { zoom: .92; } .doc-sheet[data-size="l"] { zoom: 1.08; }
.ed-design-close { display: none; float: right; margin: -8px -6px 0 0; }
@media (max-width: 1080px) { .ed-design-close { display: inline-flex; } }
/* phones: the editor bar's glass moves to a pseudo-element, because backdrop-filter on the bar itself would trap the
   fixed bottom toolbar inside it (a filter makes a containing block for fixed children) */
@media (max-width: 700px) {
  .ed-bar.glass { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: transparent; box-shadow: none; }
  .ed-bar::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--glass-fill-page); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow); }
  .ed-bar .tools { z-index: 61; }
}
@media (max-width: 700px) and (prefers-reduced-transparency: reduce) { .ed-bar::before { background: var(--glass-fill-solid); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.tools button, .tools .sep { flex: none; }
@media (max-width: 1080px) {
  .ed-design { padding-top: 22px; border-left: 1px solid var(--glass-line); background: var(--glass-fill-solid); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .ed-design { background: var(--glass-fill); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); } }
}
@media (max-width: 1080px) and (prefers-reduced-transparency: reduce) { .ed-design { background: var(--glass-fill-solid); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.panel.score.empty .ring .val { stroke: none; }
@media (max-width: 1080px) { .panel.score.empty { display: none; } .side { grid-template-columns: minmax(0, 1fr); } }
.band.inverse .steps > li::before { color: var(--stage-accent); }
.tpl-mini { height: 120px; }
.band.cta > .wrap > ul, .band.inverse > .wrap > ul { color: var(--stage-muted); }
.letter-preview { font-size: var(--fs-md); padding: 34px 36px 40px; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* glass that floats over the white resume page (phones): a denser fill, so dark-mode controls stay legible over white */
:root { --glass-fill-page: color-mix(in srgb, var(--glass-fill-solid) 86%, transparent); }
/* the phone toolbar scrolls sideways: fade the edge that has more buttons behind it (editor.js sets more-l / more-r) */
.tools.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.tools.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.tools.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ed-conflict { position: fixed; z-index: 65; top: 76px; left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 20px)); align-items: center; box-shadow: var(--shadow-lg); }
@media (max-width: 700px) { .ed-conflict { top: 112px; } }

/* score moment: the number in the brand serif, the ring in the brand colour, then the three fixes that matter most */
.ring b { font-family: var(--font-brand); font-weight: 500; letter-spacing: -.03em; }
.ring .val { stroke: var(--accent); }
.fixes ol { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: f; }
.fixes li { counter-increment: f; }
.fixes a { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--border); color: var(--text); font-weight: 500; text-decoration: none; }
.fixes a::before { content: counter(f); font: 500 var(--fs-xl)/1 var(--font-brand); color: var(--accent); min-width: 14px; }
.fixes a:hover { color: var(--accent-strong); }

/* /resume on narrow screens: score, then the input and Analyze, then the plan card */
@media (max-width: 1080px) { .side { display: contents; } #plan-card { order: 1; } #plan-card:empty { display: none; } }

/* template picker: a narrower sheet so the thumbnail shows the top of the page at a scale you can read */
.tpl-mini { height: auto; aspect-ratio: 4 / 3; }
.tpl-mini .doc-sheet { width: 400px; min-height: 0; padding: 22px 26px; }
/* the editor's floating controls (top bar, "/" menu, selection bar, AI card) pass over the white page in dark mode too:
   the denser page fill keeps them legible, and their small grey labels use the stronger text colour (4.5:1 over white) */
.k-editor .glass { background-color: var(--glass-fill-page); }
.k-editor .ai-label:not(.after), .k-editor .ai-card label, .k-editor .btn.quiet { color: var(--text-secondary); }
/* jump targets land below the floating top bar (html's scroll-padding-top); the editor's bars are taller,
   and on phones its toolbar sits at the bottom */
html:has(body.k-editor) { scroll-padding: 84px 0 24px; }
@media (max-width: 700px) { html:has(body.k-editor) { scroll-padding: 124px 0 88px; } }
.disclosure { font-size: 1rem; line-height: 1.5; color: inherit; margin: 4px 0 12px; }
.disclosure a { color: inherit; text-decoration: underline; }
[data-checkout], #up-go { white-space: normal; line-height: 1.3; height: auto; min-height: 48px; padding-block: 10px; text-wrap: balance; }
.plans > * { min-width: 0; }
