/* Counterpoint 1 Page · builder + resting page styles · p9x (Nov 19 2026)
   Tokens and parts follow counterpoint/ui/DESIGN.md + counterpoint-ui.css (charcoal, Inter, #E2DED6 text, #6DB1C6 blue).
   Self-contained so it keeps working after Counterpoint's own files are archived. No inline styles in the pages. */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #1B1B19; --surface: #22221F; --raised: #2A2A26; --line: #35352F;
  --tint: #282D2C; --tint-2: #323A39; --tint-line: #404E4D;
  --ink: #F1ECE2; --text: #E2DED6; --ink-2: #BDB8AE; --ink-3: #ABA69C;
  --accent: #6DB1C6; --accent-hover: #82C0D2; --accent-ink: #0F1E24; --accent-soft: rgba(109,177,198,.14);
  --ok: #8FB98A; --bad: #E0645A;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --display: clamp(36px, 5vw, 52px); --h2: 24px; --h3: 18px; --lg: 18px; --md: 16px; --sm: 14px; --xs: 12px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-input: 10px; --r-card: 20px; --r-pill: 999px; --w: 720px; --w-wide: 960px; --t: 150ms ease-out;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--md); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--h2); line-height: 1.2; }
h3 { font-size: var(--h3); line-height: 1.3; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.display { font-size: var(--display); line-height: 1.06; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.lead { font-size: var(--lg); color: var(--ink-2); max-width: 60ch; }
.small { font-size: var(--sm); color: var(--ink-3); }
.eyebrow { font-size: var(--xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.label { display: block; font-size: var(--xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin: 0 0 var(--s2); }

/* shell */
.op-top { border-bottom: 1px solid var(--line); background: var(--surface); }
.op-wrap { max-width: var(--w); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.op-top__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); height: 64px; }
.op-brand { display: inline-flex; align-items: center; gap: var(--s3); color: var(--ink); font-weight: 600; }
.op-brand:hover { text-decoration: none; }
.op-brand svg { width: 28px; height: 28px; fill: var(--ink); flex: none; }
.op-brand i { font-style: normal; color: var(--accent); }
.op-toplink { font-size: var(--sm); color: var(--ink-2); }
.op-page { display: flex; flex-direction: column; gap: var(--s7); padding-top: var(--s8); padding-bottom: var(--s8); }
.op-hero { display: flex; flex-direction: column; gap: var(--s4); }
.op-steps { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.op-steps li { display: flex; align-items: center; gap: var(--s3); background: var(--tint); border: 1px solid var(--line); border-radius: 14px; padding: var(--s3) var(--s4); font-size: var(--sm); color: var(--text); }
.op-steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: var(--sm); }

/* card + fields */
.card { background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s5); }
.field { display: flex; flex-direction: column; gap: var(--s2); }
.field > label, .field > .flabel { font-size: var(--sm); font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.input, .textarea { width: 100%; height: 48px; padding: 0 var(--s4); border-radius: var(--r-input); border: 1px solid var(--tint-line); background: var(--raised); color: var(--ink); font: 400 var(--md)/1.4 var(--font); transition: border-color var(--t); }
.textarea { height: auto; min-height: 120px; padding: var(--s3) var(--s4); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #8E8A82; }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.input.is-bad, .textarea.is-bad { border-color: var(--bad); }
.hint { font-size: var(--sm); color: var(--ink-3); }
.err { font-size: var(--sm); color: var(--bad); }
.op-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1.15fr); gap: var(--s3); }
.op-contact .field > label { font-weight: 500; color: var(--ink-2); }

/* drop zone + thumbs */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1); min-height: 112px; padding: var(--s4); border: 1.5px dashed var(--tint-line); border-radius: 14px; background: var(--raised); color: var(--ink-2); font: 500 var(--md)/1.4 var(--font); cursor: pointer; text-align: center; width: 100%; transition: border-color var(--t), background var(--t); }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--tint-2); }
.drop b { color: var(--ink); font-weight: 600; }
.drop span { font-size: var(--sm); color: var(--ink-3); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.thumbs { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; margin: 0; padding: 0; }
.thumbs li { position: relative; width: 104px; height: 104px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--raised); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .tn { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: var(--xs); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.thumbs .tx { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(27,27,25,.85); color: var(--ink); font: 700 var(--md)/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.thumbs .tx:hover { background: var(--bad); }

/* looks */
.looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); border: 0; margin: 0; padding: 0; }
.looks legend { padding: 0; margin: 0 0 var(--s2); font-size: var(--sm); font-weight: 600; color: var(--ink); }
.look { position: relative; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border: 1px solid var(--tint-line); border-radius: 14px; background: var(--raised); cursor: pointer; transition: border-color var(--t), background var(--t); }
.look:hover { border-color: var(--ink-3); }
.look input { position: absolute; opacity: 0; pointer-events: none; }
.look:has(input:checked) { border-color: var(--accent); background: var(--tint-2); box-shadow: inset 0 0 0 1px var(--accent); }
.look:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.look__n { font-weight: 600; color: var(--ink); }
.look__d { font-size: var(--sm); color: var(--ink-3); line-height: 1.35; }
.sw { display: flex; height: 28px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.25); }
.sw i { flex: 1; }
.sw--warm i:nth-child(1) { background: #FBF3E6; } .sw--warm i:nth-child(2) { background: #C2542D; } .sw--warm i:nth-child(3) { background: #F2B544; }
.sw--clean i:nth-child(1) { background: #FFFFFF; } .sw--clean i:nth-child(2) { background: #1F5FD6; } .sw--clean i:nth-child(3) { background: #14171C; }
.sw--bold i:nth-child(1) { background: #111111; } .sw--bold i:nth-child(2) { background: #FFD23F; } .sw--bold i:nth-child(3) { background: #FF5C39; }
.sw--calm i:nth-child(1) { background: #F1F4EE; } .sw--calm i:nth-child(2) { background: #3F6B57; } .sw--calm i:nth-child(3) { background: #C9DCCF; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 48px; padding: 0 var(--s5); border-radius: var(--r-pill); font: 600 var(--md)/1 var(--font); border: 1px solid transparent; cursor: pointer; transition: background var(--t), border-color var(--t), color var(--t); white-space: nowrap; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--tint-line); }
.btn--secondary:hover { background: var(--raised); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--accent); padding: 0; height: 40px; }
.btn--ghost:hover { text-decoration: underline; }
.btn--sm { height: 40px; padding: 0 var(--s4); font-size: var(--sm); }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.ais { display: flex; flex-wrap: wrap; gap: var(--s2); }
.ais img { width: 20px; height: 20px; }

/* result */
.op-result { display: flex; flex-direction: column; gap: var(--s5); scroll-margin-top: var(--s5); }
.section-head { display: flex; flex-direction: column; gap: var(--s2); }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-pill); align-self: flex-start; }
.seg button { height: 36px; padding: 0 var(--s4); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font: 600 var(--sm)/1 var(--font); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.op-frame { width: 100%; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #FFFFFF; margin: 0 auto; transition: max-width var(--t); }
.op-frame iframe { display: block; width: 100%; height: 680px; border: 0; background: #FFFFFF; }
.op-frame.is-phone { max-width: 390px; }
.op-frame.is-phone iframe { height: 760px; }
.op-next { gap: var(--s4); }
.op-next .note { color: var(--ink-2); }
.op-next ol { margin: 0; padding-left: 1.25em; color: var(--text); display: flex; flex-direction: column; gap: var(--s2); }
details.acc { border-top: 1px solid var(--tint-line); padding-top: var(--s4); }
details.acc summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
details.acc[open] summary::after { content: "\2212"; }
details.acc > div { padding-top: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.op-foot { border-top: 1px solid var(--line); padding-top: var(--s5); font-size: var(--sm); color: var(--ink-3); display: flex; flex-direction: column; gap: var(--s2); }
.op-foot a { color: var(--ink-2); text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--accent-ink); font-weight: 600; font-size: var(--sm); padding: var(--s3) var(--s5); border-radius: var(--r-pill); transition: opacity var(--t), transform var(--t); max-width: calc(100% - 32px); text-align: center; z-index: 9; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.copybox { width: 100%; min-height: 160px; font: 400 var(--sm)/1.45 ui-monospace, Menlo, monospace; }

/* resting page */
.rest { min-height: calc(100vh - 65px); display: flex; flex-direction: column; justify-content: center; gap: var(--s5); padding-top: var(--s8); padding-bottom: var(--s8); }
.rest__mark { width: 56px; height: 56px; color: var(--ink); }
.rest__mark circle { fill: none; stroke: currentColor; stroke-width: 6; }
.rest__links { display: flex; flex-direction: column; gap: var(--s3); }
.rest__link { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); background: var(--tint); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); transition: border-color var(--t); }
.rest__link:hover { border-color: var(--accent); text-decoration: none; }
.rest__link b { display: block; font-weight: 600; }
.rest__link span span { display: block; font-size: var(--sm); color: var(--ink-3); }
.rest__link > i { font-style: normal; color: var(--accent); font-size: 20px; }

@media (max-width: 720px) {
  .op-page { padding-top: var(--s6); gap: var(--s6); }
  .op-steps { grid-template-columns: 1fr; }
  .op-contact { grid-template-columns: 1fr; }
  .looks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: var(--s4); }
  .op-frame iframe { height: 620px; }
  .op-frame.is-phone { max-width: 100%; }
  .row .btn { flex: 1 1 auto; }
}
