/* Styles for the "What Can My AI See?" guide and the Clank Safely page. Colours come from the tokens in site.css. */

/* Sections sit further from the section above (4rem) than from their own heading (1.1rem, .sect in site.css)
   or a sub-heading from its block (3.4rem with the rule), so each heading reads as the start of what follows. */
.g { gap: 4rem; }
.g-content, .g-app { display: flex; flex-direction: column; gap: 4rem; min-width: 0; }
.g [hidden] { display: none !important; }
.g p, .g li, .g dd { max-width: 44rem; }
.g .card { gap: 1.75rem; }
.g-sec { scroll-margin-top: 1rem; }

/* hero */
.g-hero { display: flex; flex-direction: column; gap: .8rem; }
.g-hero h1 { font-size: clamp(2.3rem, 8vw, 3.8rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.g-hero h1 mark { background: var(--accent); color: var(--accent-ink); padding: 0 .1em; border-radius: .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.g-hero .by { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--mute); }
.g-hero .lede { font-size: 1.15rem; color: var(--mute); max-width: 40rem; }

/* picker */
.picker { display: none; gap: 1.25rem; }
.js .picker { display: grid; }
.nojs-note { display: block; }
.js .nojs-note { display: none; }
.picker .privacy { font-weight: 600; max-width: 40rem; }
.picker fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.picker legend { padding: 0; margin-bottom: .6rem; font-family: var(--display); font-weight: 800; font-size: 1.15rem; max-width: 40rem; }
.picker legend .hint { display: block; font-family: var(--body); font-weight: 400; font-size: .95rem; color: var(--mute); margin-top: .2rem; }
.opts { display: flex; flex-wrap: wrap; gap: .6rem; }
.opt { position: relative; display: inline-flex; min-width: 0; max-width: 100%; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; line-height: 1.25; }
.opt:hover span { background: var(--well); }
.opt input:checked + span { background: var(--accent); color: var(--accent-ink); }
.opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.g-statusrow { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.g-statusrow .status { font-weight: 600; }
.g-statusrow .status:empty { display: none; }
.btn { font-family: var(--body); font-weight: 700; font-size: .95rem; min-height: 44px; padding: .45rem 1.1rem; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
.btn:hover { background: var(--well); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.g-prompt { color: var(--mute); display: none; }
.js .g-prompt { display: block; }
.js .g-prompt.is-off { display: none; }

/* content visibility */
.js .g-content:not(.is-on) { display: none; }
.back-wrap { margin-top: .4rem; }

/* blocks */
.g-block { display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.g-block + .g-block { border-top: 2px solid var(--shade); padding-top: 1.5rem; }
.g .card h3 { font-size: 1.3rem; }
.answer { font-weight: 600; font-size: 1.12rem; }

/* sources and pills */
.src { display: inline-block; font-size: .8rem; color: var(--mute); padding: .75rem .25rem; margin: -.75rem 0; white-space: nowrap; }
.src:hover { color: var(--ink); }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; line-height: 1.2; padding: .15rem .5rem; border: 2px solid var(--line); border-radius: 999px; background: var(--well); color: var(--ink); vertical-align: .08em; margin-right: .2rem; }
.pill.unv, .pill.dis { background: var(--hl); }
.pill.ours { background: var(--surface); border-style: dashed; }
.pill.old { background: var(--surface); }
.pill.plan { background: var(--well); }

.notice { border: 2px solid var(--line); border-radius: 10px; padding: .9rem 1rem; background: var(--well); display: flex; flex-direction: column; gap: .6rem; }
.notice.dis, .notice.unv { background: var(--hl); }
.notice.work { background: var(--surface); border-style: dashed; }
.card .notice h3 { font-size: 1.1rem; }
.notice p { max-width: 44rem; }

/* definition list */
.see { margin: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.see-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; padding-top: 1.1rem; border-top: 2px solid var(--shade); min-width: 0; }
.see-row:first-child { border-top: 0; padding-top: 0; }
.see dt { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.see dd { margin: 0; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.see dd > div[data-plan] { display: flex; flex-direction: column; gap: .6rem; }
@media (min-width: 46rem) {
  .see-row { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.25rem; }
}

/* paths */
.path { font-family: var(--mono); font-size: .88em; font-weight: 600; background: var(--well); padding: .05rem .35rem; border-radius: 5px; overflow-wrap: anywhere; }

/* numbered steps */
.card ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: .6rem; }
.card ol.steps li { counter-increment: step; position: relative; padding-left: 2.4rem; }
.card ol.steps li::before { content: counter(step); position: absolute; left: 0; top: .05em; width: 1.7rem; height: 1.7rem; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--line); border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; }

/* checklist */
.g-count { font-weight: 700; color: var(--mute); }
.card ul.checklist { gap: .35rem; }
.card ul.checklist li { padding-left: 0; }
.card ul.checklist li::before { display: none; }
.chk { display: flex; align-items: flex-start; gap: .75rem; min-height: 44px; padding: .45rem 0; cursor: pointer; }
.chk input { flex: none; width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; accent-color: var(--ink); cursor: pointer; }
.chk input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.chk .ct { min-width: 0; }
.checklist li > .src { margin-left: 2.25rem; }

@media (max-width: 30rem) {
  .g .card { padding: 1rem; }
  .src { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .g *, .g *::before, .g *::after { animation: none !important; transition: none !important; }
}
