/* Problems we solve: each problem opens its fix in place, running in the browser */
.p-hero { padding: clamp(28px, 6vw, 64px) 0 24px; }
.p-kick { margin: 0 0 12px; font: 600 .78rem var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.p-hero h1 { font-size: clamp(1.75rem, 6.6vw, 4.6rem); white-space: nowrap; }
.p-hero h1 em { font-style: normal; }
.p-lede { font-size: 1.12rem; max-width: 58ch; margin: 18px 0 0; }
.p-filter { display: block; margin-top: 26px; max-width: 520px; }
.p-filter input, .tool textarea, .tool input[type="text"], .tool select {
  width: 100%; font: 500 1rem/1.45 var(--body); color: var(--ink); background: var(--surface);
  border: 0; border-radius: 16px; padding: 14px 16px; box-shadow: inset 0 0 0 1.5px var(--rule); outline: none;
  transition: box-shadow .25s var(--ease);
}
.p-filter input { border-radius: 999px; padding: 15px 22px; }
.p-filter input:focus, .tool textarea:focus, .tool input[type="text"]:focus, .tool select:focus { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 5px color-mix(in srgb, var(--gold) 18%, transparent); }

.p-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.pb { border-bottom: 1px solid var(--rule); }
.pb-h {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr 40px; gap: 4px 18px; width: 100%;
  padding: 22px 4px; position: relative; text-decoration: none; color: var(--ink);
}
.p-list { counter-reset: pb; }
.pb { counter-increment: pb; }
.pb-h b::before { content: counter(pb, decimal-leading-zero); display: inline-block; min-width: 2.1em; font: 600 .8rem/1 var(--body); letter-spacing: .08em; color: var(--gold-ink); vertical-align: .35em; }
.pb-h span { padding-left: 0; }
.pb-h b { font-family: var(--display); font-weight: 500; font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.15; letter-spacing: -.01em; }
.pb-h span { grid-column: 1; color: var(--muted); font-size: .98rem; }
.pb-h i { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 40px; height: 40px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1.5px var(--rule); transition: background .3s var(--ease), box-shadow .3s, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.pb-h i::before, .pb-h i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: var(--ink); border-radius: 2px; transform: translate(-50%, -50%); transition: transform .35s var(--ease), background .3s; }
.pb-h i::after { transform: translate(-50%, -50%) rotate(90deg); }
.pb-h:hover i { background: var(--gold); box-shadow: none; transform: scale(1.08); }
.pb-h:hover i::before, .pb-h:hover i::after { background: #060D20; }
.pb-h[aria-expanded="true"] i { background: var(--gold); box-shadow: none; }
.pb-h[aria-expanded="true"] i::before, .pb-h[aria-expanded="true"] i::after { background: #060D20; }
.pb-h[aria-expanded="true"] i::after { transform: translate(-50%, -50%) rotate(0deg); }
.pb-learn .pb-h i::before { width: 12px; height: 12px; background: none; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); border-radius: 0; transform: translate(-65%, -50%) rotate(45deg); }
.pb-learn .pb-h i::after { display: none; }
.pb-learn .pb-h:hover i::before { border-color: #060D20; }
.pb-h:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 12px; }
.pb-set .pb-h b::after { content: "Set up for you"; display: inline-block; vertical-align: middle; margin-left: 10px; font: 600 .72rem/1 var(--body); color: var(--gold-ink); padding: 6px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor; }

.pb-x { padding: 4px 4px 30px; animation: pbx .45s var(--ease); }
@keyframes pbx { from { transform: translateY(-8px); } to { transform: none; } }
.tool { background: var(--ice); border-radius: 24px; padding: clamp(18px, 3vw, 28px); display: grid; gap: 16px; }
:root[data-theme="dark"] .tool { background: rgba(220, 235, 255, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tool { background: rgba(220, 235, 255, .06); } }
.tool label { display: grid; gap: 8px; font-weight: 600; font-size: .92rem; }
.tool textarea { resize: vertical; min-height: 120px; }
.tool p { margin: 0; }
.tool .btn { justify-self: start; }
.tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tool-note { font-size: .88rem; color: var(--muted); }
.tool-note a, .tool a:not(.btn) { color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sel { display: inline-grid !important; grid-auto-flow: column; align-items: center; gap: 10px !important; }
.sel select { width: auto; padding: 10px 12px; }
.chk { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 8px; font-weight: 500 !important; }
.chk input { width: 18px; height: 18px; accent-color: #D4A24C; }
.steps { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }

/* CV match */
.cv-out:empty { display: none; }
.cv-score { display: flex; align-items: center; gap: 18px; }
.cv-ring { --v: 0; width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(#D4A24C calc(var(--v) * 1%), color-mix(in srgb, var(--ink) 12%, transparent) 0); transition: --v 1s; }
.cv-ring b { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ice); font: 600 1.3rem var(--display); }
:root[data-theme="dark"] .cv-ring b { background: #111C3B; }
.cv-words { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; }
.cv-words li { font-size: .86rem; padding: 5px 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.cv-words.miss li { box-shadow: inset 0 0 0 1.5px #D4A24C; }
.cv-h { font-weight: 600; margin-top: 10px !important; }

/* Week */
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wk-days label { font-size: .82rem; }
.wk-days textarea { min-height: 140px; font-size: .9rem; padding: 10px; border-radius: 12px; }
@media (max-width: 900px) { .wk-days { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .wk-days { grid-template-columns: 1fr; } .wk-days textarea { min-height: 70px; } }

/* Board */
.kb-add { display: flex; gap: 10px; }
.kb-add input { flex: 1; }
.kb-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kb-col { background: var(--surface); border-radius: 18px; padding: 12px; min-height: 160px; box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .2s; }
.kb-col.over { box-shadow: inset 0 0 0 2px var(--gold); }
.kb-col h3 { font-size: 1.05rem; margin: 2px 4px 10px; }
.kb-col h3 small { font: 500 .8rem var(--body); color: var(--muted); margin-left: 6px; }
.kb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kb-card { background: var(--bg); border-radius: 12px; padding: 10px 10px 8px 12px; box-shadow: 0 1px 0 var(--rule), inset 0 0 0 1px var(--rule); cursor: grab; animation: kbin .35s var(--ease); }
@keyframes kbin { from { transform: scale(.96); } to { transform: none; } }
.kb-card p { margin: 0 0 6px; font-size: .94rem; overflow-wrap: anywhere; }
.kb-card .kb-b { display: flex; gap: 4px; justify-content: flex-end; }
.kb-card button { all: unset; cursor: pointer; font-size: .78rem; font-weight: 600; padding: 4px 8px; border-radius: 8px; color: var(--muted); }
.kb-card button:hover { background: var(--gold); color: #060D20; }
.kb-card button:focus-visible { outline: 2px solid var(--gold); }
.kb-col[data-c="2"] .kb-card p { text-decoration: line-through; text-decoration-color: var(--gold); color: var(--muted); }
@media (max-width: 720px) { .kb-cols { grid-template-columns: 1fr; } .kb-col { min-height: 0; } }

/* Recorder */
.rc video { width: 100%; max-height: 60vh; border-radius: 16px; background: #060D20; }
.rc-state:empty { display: none; }
.rc-state { font-weight: 600; }
.rc-state.live::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #D4A24C; margin-right: 8px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* SEO check */
.sc-out { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sc-out:empty { display: none; }
.sc-out li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .95rem; }
.sc-out li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; background: #2FBF8A; }
.sc-out li.bad::before { background: #D9534F; }
.sc-out li.meh::before { background: #F2B544; }

.p-none { margin-top: 18px; }
.p-rule { padding: 64px 0 0; }
.p-rule h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.p-rule p { max-width: 62ch; }
.brief-use { font-family: var(--display); font-size: 1.3rem; margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .pb-x, .kb-card { animation: none; } }
@media print {
  .top, .foot, .p-hero, .pb:not(#week), .p-rule, .float-tools, canvas, .pb-h i, .tool-row, .tool-note { display: none !important; }
  .tool { background: none; padding: 0; }
}
.pb { scroll-margin-top: 112px; }
