/* Shared styles for the text pages (contact, terms, privacy, choices). Builds on styles.css tokens. */
.doc { max-width: 1100px; margin: 0 auto; padding: calc(110px + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 40px) 96px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.doc-head { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.doc-head h1 { font-size: clamp(40px, 6vw, 72px); }
.doc-head .lede { max-width: 60ch; }
.updated { font-size: 13px; color: var(--ink-3); }
.toc { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.toc a { color: var(--ink-3); padding: 7px 0 7px 14px; border-left: 2px solid var(--line); transition: color .2s ease, border-color .2s ease; }
.toc a.is-active { color: var(--ink); border-left-color: var(--red); font-weight: 600; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 14px; color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.prose h2 { font-size: 26px; color: var(--ink); margin-top: 28px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--ink); font-size: 18px; margin-top: 8px; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.todo { background: rgba(255, 214, 10, 0.16); color: var(--yellow); border-radius: 6px; padding: 0 5px; }
.callout-box { border-radius: 20px; padding: 18px 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.callout-box strong { display: block; margin-bottom: 4px; }
.table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { color: var(--ink-3); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.table-wrap td:first-child { color: var(--ink); font-weight: 600; }
.table-wrap tr:last-child td { border-bottom: 0; }

/* Contact */
.ct { max-width: 1160px; margin: 0 auto; padding: calc(116px + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 40px) 110px; display: flex; flex-direction: column; gap: 40px; }
.ct-hero { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.ct-hero h1 { font-size: clamp(42px, 7vw, 88px); line-height: 0.98; }
.ct-topics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ct-topic { appearance: none; border: 0; cursor: pointer; font: inherit; text-align: left; color: var(--ink-2); background: var(--surface); border-radius: 22px; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; min-height: 150px; }
.ct-topic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; color: var(--ink); }
.ct-topic b { color: var(--ink); font-size: 16px; letter-spacing: -0.01em; }
.ct-topic span { font-size: 13px; line-height: 1.4; }
.ct-topic:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22); }
.ct-topic[aria-checked="true"] { background: var(--ink); color: #3a3a3c; box-shadow: none; }
.ct-topic[aria-checked="true"] b, .ct-topic[aria-checked="true"] svg { color: #000; }
.ct-topic:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ct-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(20px, 4vw, 48px); align-items: start; }
.ct-form, .ct-sent { grid-column: 1; display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 3.4vw, 36px); border-radius: 30px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ct-form-head { display: flex; flex-direction: column; gap: 6px; }
.ct-form-head h2 { font-size: clamp(26px, 3vw, 34px); }
.ct-form-head p { color: var(--ink-2); max-width: 62ch; }
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ct-extra { display: flex; flex-direction: column; gap: 14px; }
.ct-extra[hidden] { display: none; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ct-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ct-seg label { cursor: pointer; display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.ct-seg input:checked + label { background: var(--ink); color: #000; box-shadow: none; }
.ct-seg input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.ct-tip { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,0.04); border-radius: 16px; padding: 12px 14px; }
.ct-tip svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: var(--yellow); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.ct-tip b { color: var(--ink); }
.ct-tip a, .ct-card a, .form-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.ct-count { align-self: flex-end; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ct-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ct-actions .pill { border: 0; cursor: pointer; font-family: var(--f-sans); height: 50px; padding: 0 28px; }
.ct-actions .pill[disabled] { opacity: 0.5; cursor: progress; }
.ct-sent { align-items: flex-start; outline: none; }
.ct-sent[hidden] { display: none; }
.ct-sent h2 { font-size: clamp(30px, 4vw, 44px); }
.ct-check { width: 64px; height: 64px; border-radius: 50%; background: #30d158; display: grid; place-items: center; animation: pop .5s cubic-bezier(.34,1.56,.64,1); }
.ct-check svg { width: 32px; height: 32px; fill: none; stroke: #000; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .5s .25s ease forwards; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ct-next { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: n; width: 100%; }
.ct-next li { counter-increment: n; background: rgba(255,255,255,0.04); border-radius: 18px; padding: 14px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.ct-next li::before { content: counter(n); font-family: var(--f-serif); font-style: italic; font-size: 26px; color: var(--red); line-height: 1; }
.ct-next b { color: var(--ink); }
.ct-side { grid-column: 2; grid-row: 1; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.ct-side h3 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.ct-answers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ct-answers li + li { border-top: 1px solid var(--line); }
.ct-answers a { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px; color: var(--ink); font-size: 15px; min-height: 48px; }
.ct-answers a span { color: var(--ink-3); transition: transform .2s ease; }
.ct-answers a:hover span { transform: translateX(3px); color: var(--ink); }
.ct-card { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 14px; }
.ct-card b { color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select { font: 16px/1.4 var(--f-sans); color: var(--ink); background: #0a0a0c; border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 12px 14px; min-height: 48px; outline: none; transition: border-color .2s ease; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics input { position: absolute; opacity: 0; pointer-events: none; }
.topics label { cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); transition: background .2s ease, color .2s ease; }
.topics input:checked + label { background: var(--ink); color: #000; box-shadow: none; }
.topics input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 13px; color: var(--ink-3); }
.form-status { font-size: 15px; border-radius: 14px; padding: 12px 14px; }
.form-status.ok { background: rgba(48, 209, 88, 0.12); color: #30d158; }
.form-status.err { background: rgba(255, 59, 48, 0.12); color: #ff6961; }

@media (min-width: 861px) and (max-width: 1100px) { .ct-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: sticky; top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 20; flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); padding: 10px clamp(16px, 4vw, 40px); background: rgba(0,0,0,0.78); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); box-shadow: 0 1px 0 var(--line); scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: 0 0 auto; padding: 0 14px; min-height: 36px; display: inline-flex; align-items: center; border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
  .toc a.is-active { background: var(--ink); color: #000; box-shadow: none; }
  .ct-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-topic { min-height: 0; padding: 14px; border-radius: 18px; }
  .ct-topic span { display: none; }
  .ct-main { grid-template-columns: minmax(0, 1fr); }
  .ct-side { grid-column: 1; grid-row: auto; position: static; }
  .ct-row { grid-template-columns: 1fr; }
  .ct-next { grid-template-columns: 1fr; }
  .ct-actions .pill { width: 100%; }
}
