/* App screens for the demo. Uses the tokens from site.css. */
:root {
  --wait: #7a4b00; --wait-bg: #fff2d6;
  --no: #8f1d14;   --no-bg: #fde4e1;
  --yes: #145c32;  --yes-bg: #dff3e6;
  --banner: #f9e7d5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wait: #ffd48a; --wait-bg: #3a2c10;
    --no: #ffb1a8;   --no-bg: #43201c;
    --yes: #9fe3b8;  --yes-bg: #173a26;
    --banner: #3a2b20;
  }
}

.demo-banner { margin: 0; padding: .6rem 16px; background: var(--banner); text-align: center; font-size: .9rem; font-weight: 700; }
.app-head { display: flex; justify-content: space-between; align-items: center; }
.app-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; }
.app-nav a { padding: .55rem .8rem; border-radius: 999px; border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 700; min-height: 2.75rem; display: inline-flex; align-items: center; }
.app-nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.pill { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.pill-wait { color: var(--wait); background: var(--wait-bg); }
.pill-no { color: var(--no); background: var(--no-bg); }
.pill-yes { color: var(--yes); background: var(--yes-bg); }

.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.tile { display: grid; gap: .35rem; padding: 1.1rem; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile-title { font-size: 1.2rem; }
.tile .more { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }
.tile .pill { justify-self: start; }

.glance { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.glance a { display: block; padding: .8rem 1rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }

.med-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.med { padding: 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.med-top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.med-name { margin: 0; font-size: 1.25rem; }
.med-generic { margin: .2rem 0 .6rem; color: var(--muted); }
.facts { margin: 0; display: grid; gap: .35rem; }
.facts div { display: flex; flex-wrap: wrap; gap: .4rem; }
.facts dt { font-weight: 700; }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; }

.panel { margin: 1rem 0; padding: 1.2rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.panel p { margin: .4rem 0; }
.big { font-size: 1.2rem; font-weight: 700; }
.deadline { font-size: 1.1rem; }
.steps { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: .75rem; align-items: center; color: var(--muted); }
.steps li::before { content: counter(s); width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { content: "\2713"; background: var(--yes-bg); color: var(--yes); border-color: var(--yes); }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now::before { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.script { margin: .5rem 0 1rem; padding: 1rem 1.2rem; border-left: 5px solid var(--accent); background: var(--surface); font-size: 1.05rem; }
.source { color: var(--muted); font-size: .9rem; margin-top: 2rem; }

.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.sheet-head { margin-top: 0; }
.questions li { margin-bottom: .75rem; }
.questions li.blank { list-style: none; margin-left: -1.2rem; }
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th, .sheet-table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }

button[disabled], input[disabled] { opacity: .6; cursor: not-allowed; }

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #777; }  /* dark mode too */
  html { font-size: 100%; }
  body { font-size: 14pt; }
  .demo-banner, .app-nav, .skip, .no-print, footer, .app-head { display: none; }
  .sheet { border: 0; padding: 0; }
}

.src { display: block; color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.tile .src { margin-top: 0; }
.sheet-note { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
@media print { .sheet-note { color: #000; } }

.test-banner { margin: 0; padding: .6rem 16px; background: var(--wait-bg); color: var(--wait); text-align: center; font-size: .9rem; font-weight: 700; }
.inline-form { display: inline; }
.link-button { background: none; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; width: auto; min-height: 2.75rem; padding: .4rem 0; font-weight: 700; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.25rem; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.danger { background: var(--error); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-top: .6rem; }
.when { display: grid; gap: 1.25rem; }
@media print { .test-banner, .actions { display: none; } }
.view-note { margin: 1rem 0 0; padding: .9rem 1rem; border-radius: 12px; border-left: 5px solid var(--accent); background: var(--surface); }
.view-note p { margin: 0 0 .25rem; }
.invite-link input { width: 100%; font: inherit; padding: .6rem .8rem; border: 2px solid var(--field-line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.invite-url { margin: .25rem 0 .5rem; padding: .75rem .9rem; border: 2px solid var(--field-line); border-radius: 8px; background: var(--bg); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
