/* /try page: extends ../style.css with the app frame and controls. */

.try-hero { padding-bottom: 56px; max-width: none; }
.try-hero .lead { max-width: 680px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; max-width: 900px; }
.choice { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.choice.recommended { border: 2px solid var(--seal); }
.choice h3 { margin: 0 0 8px; font-size: 1.3rem; }
.choice p { margin: 0 0 18px; color: var(--ink-2); }
.choice .tag { position: absolute; top: -12px; left: 24px; margin: 0; padding: 2px 12px; border-radius: 999px; background: var(--seal); color: var(--seal-ink); font-size: 0.78rem; font-weight: 700; letter-spacing: .04em; }
.choice .fine { margin: 14px 0 0; font-size: 0.88rem; color: var(--muted); }

.btn {
  display: inline-block; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--ink-2); background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2;
}
.btn-primary { background: var(--seal); border-color: var(--seal); color: var(--seal-ink); }
.btn-small { padding: 7px 14px; font-size: 0.85rem; }
.link { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }

.state-label { margin: 28px 0 10px; font-size: 0.85rem; color: var(--muted); }
.state-label:first-of-type { margin-top: 0; }

/* overflow: clip (not hidden) still rounds the corners but lets the key-file progress bar stick while scrolling. */
.appframe { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; overflow: clip; }
.apptop { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; color: var(--muted); }
.step { display: inline-flex; align-items: center; gap: 8px; }
.sn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 0.78rem; font-weight: 700; }
.step.is-current { color: var(--ink); font-weight: 600; }
.step.is-current .sn { background: var(--seal); border-color: var(--seal); color: var(--seal-ink); }
.step.is-done .sn { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.step-store { color: var(--ink-2); }

.panel { padding: 28px 32px 32px; background: var(--bg); }
.testbanner { margin: 0 0 22px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--seal) 12%, transparent); color: var(--seal); font-size: 0.9rem; font-weight: 600; }
.field-label { display: block; margin: 0 0 8px; font-weight: 600; }
.textarea { min-height: 220px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-family: var(--serif); font-size: 1.05rem; }
.meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; font-size: 0.88rem; color: var(--muted); }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.panel-title { margin: 0 0 8px; font-size: 1.5rem; }
.panel-lead { margin: 0 0 22px; color: var(--ink-2); max-width: 720px; }
.store-option { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.store-option h4 { margin: 0 0 6px; font-family: var(--serif); font-size: 1.15rem; }
.store-option p { margin: 0; color: var(--ink-2); font-size: 0.95rem; max-width: 640px; }
.store-option .btn { flex: none; }
.skip { margin: 18px 0 0; color: var(--muted); font-size: 0.92rem; max-width: 720px; }

@media (max-width: 760px) {
  .choices { grid-template-columns: 1fr; }
  .apptop { flex-direction: column; align-items: flex-start; }
  .panel { padding: 22px 18px 24px; }
  .store-option { flex-direction: column; align-items: flex-start; }
}

/* ---- Working app (app.js) ---- */
.apptitle { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
button.btn { -webkit-appearance: none; appearance: none; }
a.btn { text-decoration: none; }
.btn:hover { opacity: .9; }
.btn[disabled] { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.actions.left { justify-content: flex-start; flex-wrap: wrap; margin-top: 16px; }
.report { display: block; width: 100%; min-height: 260px; resize: vertical; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; }
.report:focus { outline: 3px solid var(--seal); outline-offset: 2px; }
.error { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--no) 12%, transparent); color: var(--no); font-weight: 600; }
.notice { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); }
.notice p { margin: 0; }
.fine { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.option { padding: 16px 18px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.option.is-selected { border: 2px solid var(--seal); }
.option.is-off { opacity: .6; }
.option.choice { cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.option.choice { border-width: 2px; }
.option.choice:not(.is-selected) { border-color: var(--line); }
.fields { transition: opacity .2s ease; }
.fields.is-off { opacity: .45; }
.fields.is-off input { cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .option.choice, .fields { transition: none; } }
.choice-head { display: flex; align-items: center; gap: 10px; }
.choice-head input { width: 18px; height: 18px; margin: 0; accent-color: var(--seal); }
.choice-head label { cursor: pointer; }
.choice-head h4 { margin: 0; }
.option.choice > p, .option.choice > .fields { margin-left: 28px; }
.option.choice > p { margin-top: 6px; }
.done-line { color: var(--ok) !important; font-weight: 600; }
.more { margin: 6px 0 0; }
.more summary { cursor: pointer; color: var(--ink-2); font-size: 0.95rem; }
.more .field-check { margin-top: 10px; }
.notice.warn { border: 2px solid var(--seal); }
/* Stays in view below the site header (about 70 px; 60 px on phones) while the step scrolls. */
.req-tag { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 9px; vertical-align: middle; font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); }
.req-tag.req-recommended { border-color: color-mix(in srgb, var(--seal) 45%, var(--line)); color: var(--seal); }
.req-tag.req-needed { background: var(--seal); border-color: var(--seal); color: var(--bg); }
.close-line { margin: 18px 0 0; color: var(--ink); font-weight: 600; }
.store-option .keep-safe { margin-top: 10px; color: var(--ink); }
.keep-safe strong { color: var(--seal); }
.keybar { position: sticky; top: 69px; z-index: 5; margin: -8px -32px 20px; padding: 10px 32px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .keybar { top: 59px; margin: -8px -18px 18px; padding: 10px 18px; } }
.keybar-title { margin: 0 0 6px; font-size: 0.85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--seal); }
.keybar ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keybar .seg { padding: 8px 2px 0; border-top: 6px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.keybar .seg b { display: block; color: var(--ink); font-size: 0.95rem; }
.keybar .seg.done { border-top-color: var(--ok); color: var(--ok); }
.keybar .seg.current, .keybar .seg.busy { border-top-color: var(--seal); color: var(--seal); font-weight: 600; }
.keybar .seg.open { border-top-color: color-mix(in srgb, var(--seal) 35%, var(--line)); }
.keybar .seg.skipped, .keybar .seg.failed { border-top-style: dashed; border-top-color: var(--muted); }
.notice.urgent { margin: 0 0 18px; border: 2px solid var(--seal); border-left-width: 8px; background: color-mix(in srgb, var(--seal) 9%, var(--surface)); color: var(--ink); }
.notice.urgent p + p { margin-top: 8px; }
.notice.urgent .urgent-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--seal); }
.notice.urgent .actions { margin-top: 14px; }
.panel > div.drop-over { outline: 2px dashed var(--seal); outline-offset: 6px; border-radius: 12px; }
.store-option.drop-over { outline: 2px dashed var(--seal); outline-offset: 2px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10; padding: 10px 18px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 0.95rem; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice.warn .actions { margin-top: 12px; }
.option h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.1rem; }
.option p { margin: 0; color: var(--ink-2); }
.preview { margin: 0 0 8px; padding: 16px 18px; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-family: var(--serif); font-size: 1rem; line-height: 1.6; }
.points { margin: 20px 0 0; padding-left: 20px; color: var(--ink-2); }
.points li { margin: 0 0 8px; }
.points strong { color: var(--ink); }
.must { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--seal); background: var(--surface); border-radius: 0 10px 10px 0; }
.field-check { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; }
.field-check input { width: 18px; height: 18px; accent-color: var(--seal); }
.fields { display: grid; gap: 6px; max-width: 460px; margin: 12px 0 0; }
.fields label { font-weight: 600; font-size: 0.92rem; margin-top: 6px; }
.fields input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.checklist, .checks { list-style: none; margin: 18px 0 0; padding: 0; }
.checklist li, .checks li { display: flex; gap: 10px; padding: 6px 0; color: var(--ink-2); }
.checklist li.done { color: var(--ok); }
.tick { flex: none; width: 1.2em; text-align: center; font-weight: 700; }
.checks li.ok { color: var(--ok); }
.checks li.no { color: var(--no); font-weight: 600; }
.checks li.na { color: var(--muted); }
.summary { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--surface); color: var(--ink); }
.simulated { margin-top: 8px !important; color: var(--muted) !important; font-style: italic; }
.points.compact { margin: 8px 0 0; font-size: 0.95rem; }
.points.compact li { margin: 0 0 2px; }
.store-option .fine, .store-option .must, .store-option .error { margin-top: 8px; }
.store-option .actions { flex: none; margin: 0; }
.notice.storage p + p { margin-top: 8px; }
.notice.storage .ladder { margin-top: 8px; }
.notice.storage .ladder li { padding: 3px 0; }
.gateways { margin: 8px 0 0; padding-left: 20px; word-break: break-word; }
.donemark { flex: none; color: var(--ok); font-weight: 600; }
.donemark.off { color: var(--muted); font-weight: 500; }
.sealed-h, .not-sealed-h { margin: 22px 0 8px; font-family: var(--serif); font-size: 1.2rem; }
.not-sealed-h { color: var(--no); }
.plain { margin: 0 0 12px; color: var(--ink-2); max-width: 760px; }
.fingerprint code { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--surface); word-break: break-all; font-size: 0.85rem; }

@media (max-width: 480px) {
  .bar { gap: 8px; }
  .brand { font-size: 1rem; gap: 6px; }
  .seal { width: 22px; height: 22px; }
  .exit { padding: 7px 12px; font-size: 0.82rem; }
}

/* Statement shown after a record verifies */
.statement { margin: 18px 0 0; padding: 18px 20px; border: 2px solid var(--ok); border-radius: 14px; background: color-mix(in srgb, var(--ok) 8%, var(--bg)); }
.statement-main { margin: 0 0 10px; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.statement-date { margin: 0 0 10px; color: var(--ink-2); }
.statement-fine { margin: 0; font-size: 0.9rem; color: var(--muted); }
.howlink { margin-top: 20px; font-size: 0.95rem; }

/* Seal screen: collapsible protection mode (replaces the separate Protection step). */
.actions.has-mode { flex-wrap: wrap; align-items: center; }
.modebtn { margin-right: auto; display: inline-flex; flex-direction: column; align-items: flex-start; min-height: 44px; padding: 4px 8px 4px 0; border: 0; background: none; color: var(--ink); font: inherit; line-height: 1.3; text-align: left; cursor: pointer; -webkit-appearance: none; appearance: none; }
.modebtn-k { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.modebtn-k::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.modebtn[aria-expanded="true"] .modebtn-k::after { margin-top: 3px; transform: rotate(-135deg); }
.modebtn-v { font-size: 0.92rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.modes { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; max-width: 720px; }
.modes[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .modebtn-k::after { transition: none; } }
.actions .push-left { margin-right: auto; }
