:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  --ink: #172a37;
  --muted: #445968;
  --navy: #102430;
  --red: #a52c21;
  --paper: #f3f5f6;
  --line: #d7dfe3;
  --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
header { background: var(--navy); color: var(--white); border-top: 5px solid #c84938; }
.top, main, footer { width: min(100% - 2rem, 64rem); margin-inline: auto; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; font-size: 1.12rem; font-weight: 750; }
.brand small { display: block; font-size: .78rem; color: #d5e0e5; font-weight: 550; }
.mark { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; background: #be3b2b; border-radius: .55rem; }
nav, .actions, .card-top { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
nav { gap: .35rem .7rem; }
nav a, nav button { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem; }
nav a { text-decoration: none; }
nav a:hover, nav button:hover { text-decoration: underline; }
main { padding: clamp(1.3rem, 4vw, 3rem) 0 2rem; }
footer { color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); padding: 1rem 0 2rem; }
h1, h2, p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 5vw, 2.65rem); line-height: 1.13; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; line-height: 1.3; }
p { color: var(--muted); }
.heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.heading > * { margin-bottom: 0; }
.section-title { margin: 1.5rem 0 .75rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: .85rem; }
.panel, .card { padding: clamp(1rem, 4vw, 1.6rem); background: var(--white); border: 1px solid var(--line); border-radius: .8rem; }
.panel + .panel { margin-top: 1rem; }
.panel > :last-child, .card > :last-child { margin-bottom: 0; }
.narrow, .watch { max-width: 46rem; }
.card-top { margin-bottom: .85rem; }
.category, .chip { display: inline-block; font-size: .85rem; font-weight: 700; border-radius: .35rem; padding: .3rem .6rem; }
.category { background: var(--navy); color: var(--white); }
.chip { background: #e8edf0; color: #344c5a; }
.chip.good, .signed { background: #def1e5; color: #165532; }
.chip.open { background: #fff0d4; color: #6b4400; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }
.watch-time { color: var(--ink); font-size: 1.2rem; font-weight: 700; }
.signed { padding: .7rem 1rem; border-radius: .45rem; font-weight: 750; }
.watch form, .watch .button, .watch .actions { margin-top: .75rem; }
.notice { margin-bottom: 1rem; padding: .85rem 1rem; color: #184a32; background: #e0f0e5; border-radius: .5rem; border-left: .3rem solid #45875e; }
.notice.warning { background: #fff0d4; color: #6b4400; border-color: #af7717; }
.notice.demo { color: #203d53; background: #e3edf8; border-color: #587d9b; }
button, .button, .secondary { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1.05rem; min-height: 48px; border: 1px solid transparent; border-radius: .5rem; background: var(--red); color: var(--white); font: inherit; font-weight: 700; text-decoration: none; text-align: center; }
button:hover, .button:hover { background: #822218; }
.secondary { background: var(--white); border-color: #adbac4; color: var(--ink); }
.secondary:hover { background: #e9eff2; }
.secondary.danger { color: var(--red); }
.small { min-height: 44px; padding: .45rem .7rem; font-size: .875rem; }
button.text { background: transparent; padding: .4rem; border: 0; }
:focus-visible { outline: 3px solid #236fb0; outline-offset: 3px; }
header :focus-visible { outline-color: #b6e2fc; }
form { margin: 0; }
label { display: block; margin: .9rem 0; font-weight: 650; }
input, select, textarea { display: block; width: 100%; min-height: 48px; margin-top: .3rem; padding: .55rem; border: 1px solid #9faeba; border-radius: .45rem; color: var(--ink); background: var(--white); font: inherit; font-weight: 400; }
textarea { resize: vertical; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.check { display: flex; align-items: center; gap: .65rem; min-height: 44px; margin: .25rem 0; }
.check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; flex: none; accent-color: var(--red); }
.line, .message { padding: .75rem 0; border-top: 1px solid var(--line); }
.line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.line p { margin: 0; }
.copy-status:not(:empty) { white-space: pre-wrap; margin-top: .6rem; }
.narrow form + a, .narrow form + p { margin-top: .65rem; }
@media (max-width: 34rem) {
  .top { gap: .4rem; }
  nav { width: 100%; }
  .columns { grid-template-columns: 1fr; }
  .columns > label + label { margin-top: 0; }
  main .watch button, main .narrow form > button { width: 100%; }
}
