/* OpenDocket app: the report form, its follow-up pages and header pieces the static design didn't need.
   Built on the tokens in site.css, so light and dark themes come for free. */

/* ---------- Header brand: home link + "by CRYME" back to the main site ---------- */
.brand a { text-decoration: none; color: inherit; }
.brand-mark { display: inline-flex; }
.brand-text a.brand-name:hover { color: var(--heading); }
a.brand-by { color: var(--muted); }
a.brand-by:hover { color: var(--orange-text); text-decoration: underline; text-decoration-color: var(--orange); }
.header-ref { display: none; margin-left: 12px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.header-ref .mono { color: var(--heading); }
@media (min-width: 640px) { .header-ref { display: inline; } }
@media (min-width: 1220px) { .header-ref { margin-left: 16px; } }
.site-header .nav + .header-ref { margin-left: 16px; }
.menu-btn--close { display: inline-flex; }
.foot-blurb { max-width: 44ch; }
.foot-meta a { color: var(--text-2); }

/* ---------- Form page layout ---------- */
.page-hero--form { padding: clamp(36px, 5vw, 64px) 0 clamp(28px, 4vw, 44px); }
.page-hero--form .h1-page { font-size: clamp(2.1rem, 4vw, 3.2rem); max-width: 22ch; }
.page-hero--form .lede { margin-top: 18px; font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.step-label { font-size: .92rem; color: var(--orange-text); margin: 0 0 14px; font-family: var(--mono); }
.step-bar { list-style: none; margin: 26px 0 0; padding: 0; display: flex; gap: 6px; max-width: 640px; }
.step-bar li { height: 4px; flex: 1; border-radius: 4px; background: var(--s3); }
.step-bar li.done { background: var(--orange); opacity: .55; }
.step-bar li.now { background: var(--orange); }
.form-wrap { max-width: 860px; padding-top: clamp(32px, 4vw, 56px); padding-bottom: var(--section); display: grid; gap: 24px; }
.form-wrap > form { display: grid; gap: 22px; }
.form-wrap h2 { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; color: var(--heading); margin: 0 0 14px; }
.panel > :last-child { margin-bottom: 0; }
.panel h2:first-child { margin-top: 0; }

/* ---------- Fields ---------- */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 20px; }
.panel .field + .row, .panel .row + .field, .panel .row + .row, .panel fieldset + fieldset { margin-top: 20px; }
.field label, .field .field-label { font-weight: 600; color: var(--heading); margin: 0; line-height: 1.4; }
.field .opt { font-weight: 400; color: var(--muted); font-size: .92em; }
.field-help { color: var(--muted); font-size: .92rem; margin: 0; }
textarea.input { min-height: 120px; padding: 14px 16px; line-height: 1.55; resize: vertical; font: 400 1rem/1.55 var(--sans); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
input[type="date"].input { padding-right: 12px; }
input[type="file"].input { padding: 14px 16px; min-height: auto; font-size: .95rem; }
input[type="file"].input::file-selector-button { margin-right: 14px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--s2); color: var(--heading); font: 600 .9rem var(--sans); cursor: pointer; }
.input.mono { font-family: var(--mono); font-size: .95rem; letter-spacing: 0; }
.field.has-error .input { border-color: var(--warn); }
.field-error, .secret-warning { margin: 2px 0 0; color: var(--warn); font-size: .94rem; font-weight: 500; }
.secret-warning[hidden] { display: none; }
.row { display: grid; gap: 20px; }
.row .field + .field { margin-top: 0; }
@media (min-width: 640px) { .row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
fieldset { margin: 0; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
fieldset[hidden] { display: none; }
legend { padding: 0 8px; font-size: .92rem; color: var(--muted); }

/* ---------- Choice lists (scam type) ---------- */
.choices { display: grid; gap: 10px; }
@media (min-width: 720px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--tint); cursor: pointer; transition: border-color .2s, background .2s; }
.choice:hover { border-color: var(--line-3); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .dot { width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--control-line); display: grid; place-items: center; }
.choice .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); transform: scale(0); transition: transform .2s; }
.choice strong { display: block; font-weight: 600; color: var(--heading); line-height: 1.35; }
.choice small { display: block; margin-top: 4px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.choice:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.choice:has(input:checked) .dot { border-color: var(--orange); }
.choice:has(input:checked) .dot::after { transform: scale(1); }
.choice:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- Checkbox rows ---------- */
.checkrow { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--text-2); cursor: pointer; }
.checkrow .cb { margin-top: 2px; }
.checkrow--small { font-size: .94rem; color: var(--muted); }
.cb:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.optin-row a { color: var(--heading); }

/* ---------- Added items (payments, people, files) ---------- */
.items { display: grid; gap: 10px; }
.items h2 { margin-bottom: 4px; }
.item { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 18px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); }
.item > div { min-width: 0; }
.item strong { font-weight: 600; }
.item small { color: var(--muted); font-size: .88rem; }
.item .mono { overflow-wrap: anywhere; }
.wrap-any { overflow-wrap: anywhere; }
.item form { flex: none; }

/* ---------- Buttons ---------- */
.btn--block { width: 100%; }
.btn--link { background: none; border: 0; padding: 4px 0; min-height: 0; color: var(--muted); font: 500 .92rem var(--sans); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; cursor: pointer; }
.btn--link:hover { color: var(--heading); text-decoration-color: var(--orange); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.form-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-nav .back { color: var(--muted); font-weight: 500; }
.form-nav .back:hover { color: var(--heading); }
@media (max-width: 559px) { .form-nav .btn { flex: 1 1 100%; order: -1; } }

/* ---------- Messages ---------- */
.alert { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-radius: 12px; font-size: .97rem; }
.alert svg { width: 20px; height: 20px; margin-top: 2px; }
.alert p { margin: 0; }
.alert p + p { margin-top: 8px; }
.alert--error { background: var(--warn-surface); border: 1px solid var(--warn-line); color: var(--warn-text); }
.alert--error svg { color: var(--warn); }
.alert--ok { border: 1px solid rgba(76,195,138,.3); background: rgba(76,195,138,.07); color: var(--verified-text); }
.alert--ok svg { color: var(--verified); }
:root[data-theme="light"] .alert--ok { border-color: rgba(28,122,79,.3); background: rgba(28,122,79,.06); }
.alert--info { background: var(--s1); border: 1px solid var(--line); color: var(--text-2); }
.alert--info svg { color: var(--orange); }

/* ---------- Partner referral ---------- */
.partner-bar { border-bottom: 1px solid var(--line); background: var(--orange-soft); }
.partner-bar .wrap { padding-top: 18px; padding-bottom: 18px; display: grid; gap: 6px; }
.partner-bar p { margin: 0; color: var(--text-2); max-width: 90ch; }
.partner-bar .partner-name { font-weight: 600; color: var(--heading); }

/* ---------- Start page ---------- */
.start-form { display: grid; gap: 18px; }
.start-form .btn { justify-self: start; }
@media (max-width: 559px) { .start-form .btn { justify-self: stretch; } }
.start-more { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.start-more .h3 { font-size: 1.05rem; }
.start-more p { margin: 6px 0 14px; }

/* ---------- Saved / done ---------- */
.refbig { font-family: var(--mono); font-size: 1.15em; color: var(--heading); letter-spacing: .02em; }
.resume { margin: 12px 0 0; padding: 14px 16px; border-radius: 10px; background: var(--inset-bg); border: 1px solid var(--line-2); font-family: var(--mono); font-size: .92rem; color: var(--heading); overflow-wrap: anywhere; user-select: all; }
.next-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--text-2); }
.next-steps li::marker { color: var(--orange-text); font-family: var(--mono); font-size: .9em; }

/* ---------- Blockchain check ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--text-2); }
.status--verified { border-color: rgba(76,195,138,.45); color: var(--verified); }
.status--verified_with_discrepancies { border-color: rgba(232,97,10,.5); color: var(--orange-text); }
.status--not_found, .status--failed_tx, .status--invalid_address { border-color: var(--warn-line); color: var(--warn); }
.chain-fact { margin: 8px 0 0; font-family: var(--mono); font-size: .84rem; color: var(--text-2); overflow-wrap: anywhere; }
.discrepancy { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--orange); background: var(--orange-soft); border-radius: 0 10px 10px 0; color: var(--text-2); font-size: .94rem; }
.discrepancy small { display: block; margin-top: 4px; color: var(--muted); }

/* ---------- Draft review ---------- */
.para { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.para .pnum { font-family: var(--mono); color: var(--orange-text); font-size: .9rem; padding-top: 12px; }
.para .pbody { display: grid; gap: 10px; }
.para .paper { background: var(--paper); color: var(--paper-ink); border-radius: 10px; padding: 14px 16px; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.6; margin: 0; }
.para textarea.input { background: var(--paper); color: var(--paper-ink); border-color: var(--line-2); font-family: Georgia, "Times New Roman", serif; }
.para.kind-template .paper { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); font-family: var(--sans); font-size: .95rem; }
.start-h { font-size: 1.4rem; }
.start-sub { margin: 8px 0 0; }
.panel > .alert:first-child { margin-bottom: 22px; }
.panel-actions { margin-top: 22px; }
.panel-foot { margin: 18px 0 0; }
.panel h2 + .alert, .panel h2 + p { margin-top: 0; }
.panel .optin { margin-top: 0; }
.panel .optin + .panel-actions, .optin .panel-actions { margin-top: 8px; }
fieldset.choices-set { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ---------- Enhance with AI (review step) ---------- */
.ai-suggest { display: grid; gap: 10px; padding: 14px 16px; border-left: 3px solid var(--orange); background: var(--orange-soft); border-radius: 0 12px 12px 0; }
.ai-suggest-h { margin: 0; color: var(--heading); font-weight: 600; font-size: .95rem; }
.ai-suggest .field-help { margin: 0; }
.ai-suggest .btn-row { align-items: center; }
.ai-panel { display: grid; gap: 12px; padding: 18px 0 22px; }
.ai-panel-text { margin: 0; color: var(--text-2); }
.ai-panel .ai-suggest .paper { margin: 0; }

/* Cookie banner (only on public pages when Google Analytics is switched on; see analytics.js) */
.cookie-banner { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; padding: 0 16px 16px; pointer-events: none; }
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { pointer-events: auto; max-width: 760px; margin: 0 auto; display: grid; gap: 14px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-top); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.cookie-banner p { margin: 0; color: var(--text-2); font-size: .95rem; line-height: 1.5; }
.cookie-banner strong { color: var(--heading); }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn[hidden] { display: none; }
.link-btn:hover { color: var(--heading); }
