/* ==========================================================================
   Debates Tournament Organizer — Denning design system
   Light and editorial: Source Serif display over Inter UI, royal purple used
   as a considered accent rather than a heavy slab.
   ========================================================================== */
:root {
  /* brand — taken from the Denning mark (#362E7E) */
  --brand: #362E7E;
  --brand-600: #463C9E;
  --brand-500: #6A5CC4;
  --brand-700: #2A2463;
  --brand-800: #1E1A4A;
  --tint: #F2F1FA;
  --tint-2: #E3E0F3;
  --gold: #B4883B;
  --gold-tint: #FBF4E7;

  /* debating positions — distinct but muted, so a room reads at a glance */
  --og: #1F7A4D; --og-bg: #EAF5EF;
  --oo: #B0661C; --oo-bg: #FBF1E6;
  --cg: #1B6C85; --cg-bg: #E9F3F6;
  --co: #79397F; --co-bg: #F6EDF7;

  /* neutrals */
  --ink: #181826;
  --ink-2: #3D3D52;
  --muted: #6E6E86;
  --line: #E7E6EF;
  --line-2: #D8D6E4;
  --canvas: #FAFAFC;
  --surface: #FFFFFF;

  /* status */
  --ok: #17694C;   --ok-bg: #EBF6F1;
  --warn: #8A6516; --warn-bg: #FBF3E3;
  --bad: #A32A48;  --bad-bg: #FCEDF1;

  --r: 10px;
  --r-sm: 7px;
  --shadow-xs: 0 1px 2px rgba(24, 24, 38, .05);
  --shadow: 0 1px 3px rgba(24, 24, 38, .07), 0 8px 24px -12px rgba(24, 24, 38, .12);
  --shadow-lg: 0 20px 48px -18px rgba(24, 24, 38, .28);

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 600; line-height: 1.22; letter-spacing: -.005em; color: var(--ink); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
::selection { background: var(--tint-2); }

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 60;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
}
.brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand .name { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--ink); letter-spacing: -.01em; }
.brand .name span { color: var(--brand); }
.brand .sub {
  display: block; font-family: var(--sans); font-weight: 500; font-size: 10px;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 1px;
}
.topnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 7px; white-space: nowrap;
}
.topnav a:hover { background: var(--tint); color: var(--brand-700); text-decoration: none; }
.topnav a.on { background: var(--tint); color: var(--brand-700); font-weight: 600; box-shadow: inset 0 0 0 1px var(--tint-2); }
.spacer { flex: 1; }
.pill {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 99px; white-space: nowrap;
}
.pill:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------------------------------------------------------------- layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 24px 90px; }
.wrap.narrow { max-width: 760px; }
.head { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { font-size: 29px; }
.head .sub { color: var(--muted); font-size: 14px; margin-top: 5px; font-family: var(--sans); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  padding: 20px;
}
.card.pad0 { padding: 0; overflow: hidden; }
.card h3 { font-size: 16px; margin-bottom: 12px; }
.card h3.hdr {
  margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.stat .label { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--ink); line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .note { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #FCFCFD;
}
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FCFBFE; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank {
  display: inline-grid; place-items: center; min-width: 27px; height: 25px;
  background: var(--tint); color: var(--brand-700);
  border-radius: 6px; font-weight: 650; font-size: 13px; padding: 0 7px;
  font-variant-numeric: tabular-nums;
}
.rank.gold { background: var(--gold-tint); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(180, 136, 59, .28); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------------------------------------------------------------- tags */
.tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 5px; letter-spacing: .01em;
  background: var(--tint); color: var(--brand-700); vertical-align: middle;
}
.tag.gold { background: var(--gold-tint); color: var(--gold); }
.tag.green { background: var(--ok-bg); color: var(--ok); }
.tag.red { background: var(--bad-bg); color: var(--bad); }
.tag.grey { background: #F2F2F6; color: var(--muted); }
.tag.purple { background: var(--brand); color: #fff; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  font-family: var(--sans); font-weight: 550; font-size: 13.5px;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .13s, border-color .13s, box-shadow .13s;
  box-shadow: var(--shadow-xs);
}
.btn:hover { background: var(--brand-700); border-color: var(--brand-700); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { background: #9C7530; border-color: #9C7530; }
.btn.deep { background: var(--brand-800); border-color: var(--brand-800); }
.btn.deep:hover { background: #2F1060; border-color: #2F1060; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn.ghost:hover { background: #FBFAFE; border-color: var(--brand); color: var(--brand-700); }
.btn.green { background: var(--ok); border-color: var(--ok); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #EFD4DC; }
.btn.danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 13px 0 5px; }
input, select, textarea {
  width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink);
  padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 33, 182, .12);
}
textarea { resize: vertical; min-height: 74px; }
input[type=checkbox] { width: auto; accent-color: var(--brand); }
.field { flex: 1; min-width: 140px; }
.field label { margin-top: 0; }
.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 450; color: var(--ink-2); margin: 8px 0; cursor: pointer; }
.check input { width: 15px; height: 15px; }
.score { width: 78px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.msg { padding: 11px 15px; border-radius: 8px; font-size: 13.5px; font-weight: 500; margin: 12px 0; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.err { background: var(--bad-bg); color: var(--bad); }
.msg.info { background: var(--tint); color: var(--brand-700); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; font-size: 14px; }

/* ---------------------------------------------------------------- icons, avatars, meters */
.ico-s { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico-m { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico-l { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.avatar {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--tint); color: var(--brand);
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 9.5px; }

.meter { height: 6px; border-radius: 99px; background: var(--tint-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .3s ease; }
.meter.ok > span { background: var(--ok); }
.meter.gold > span { background: var(--gold); }

.medal { position: relative; }
.medal::after {
  content: ''; position: absolute; inset: -3px; border-radius: 9px;
  box-shadow: inset 0 0 0 1.5px currentColor; opacity: .28;
}

/* stat card with an icon */
.stat { position: relative; }
.stat .stat-ico {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; background: var(--tint); color: var(--brand);
}

/* richer empty state */
.empty-state { text-align: center; padding: 52px 24px; }
.empty-state .art {
  width: 62px; height: 62px; margin: 0 auto 16px; opacity: .3;
  display: grid; place-items: center;
}
.empty-state .art img { width: 100%; height: 100%; object-fit: contain; }
.empty-state h4 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13.5px; max-width: 380px; margin: 0 auto 16px; }

/* ---------------------------------------------------------------- rooms */
.rooms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(370px, 1fr)); }
.room {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-xs); overflow: hidden;
}
.room .rhead {
  background: #FCFCFD; border-bottom: 1px solid var(--line);
  padding: 12px 18px; display: flex; justify-content: space-between; align-items: baseline;
}
.room .rhead .venue { font-family: var(--serif); font-weight: 600; font-size: 15.5px; color: var(--ink); }
.room .rhead .meta { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.room .sides { padding: 6px 18px; }
.side-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid #F3F2F8;
}
.side-row:last-child { border-bottom: none; }
.side-tag {
  width: 42px; flex-shrink: 0; text-align: center;
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 0; border-radius: 5px;
  background: var(--tint); color: var(--brand);
}
/* position colour-coding, so a room reads at a glance */
.side-tag.s0 { background: var(--og-bg); color: var(--og); }
.side-tag.s1 { background: var(--oo-bg); color: var(--oo); }
.side-tag.s2 { background: var(--cg-bg); color: var(--cg); }
.side-tag.s3 { background: var(--co-bg); color: var(--co); }
.side-row .tname { flex: 1; font-weight: 550; color: var(--ink); }
a.tname:hover { color: var(--brand); }
.side-row .res { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.side-row.win .tname { color: var(--ok); font-weight: 650; }
.room .panel {
  padding: 11px 18px 14px; font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--line); background: #FCFCFD;
}
.room .panel b { color: var(--ink-2); font-weight: 600; }
.room .panel .acts { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; }

/* motion — editorial card with a brand rule, not a dark slab */
.motion {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.motion .lbl { color: var(--brand); font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.motion .txt { font-family: var(--serif); font-size: 20px; font-weight: 500; margin-top: 7px; line-height: 1.4; color: var(--ink); }
.motion .info { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* round chips */
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  font-family: var(--sans); font-size: 13px; font-weight: 550;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  padding: 7px 14px; border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-700); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.dot.draft { background: var(--gold); }
.dot.released { background: var(--ok); }
.dot.done { background: var(--brand); }
.chip.on .dot { background: rgba(255, 255, 255, .75); }

/* ---------------------------------------------------------------- admin shell */
.shell { display: flex; min-height: calc(100vh - 64px); }
.side {
  width: 232px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line); padding: 18px 12px;
}
.side a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 13px; border-radius: 7px; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; margin-bottom: 1px;
}
.side a:hover { background: var(--tint); color: var(--brand-700); text-decoration: none; }
.side a.on { background: var(--tint); color: var(--brand-700); font-weight: 650; box-shadow: inset 2px 0 0 var(--brand); }
.side .sec {
  font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); margin: 20px 13px 8px;
}
.main { flex: 1; min-width: 0; padding: 28px 32px 90px; }

/* drag & drop allocation */
.dnd-pool {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-xs);
}
.dnd-pool h3 { margin-bottom: 12px; font-size: 15px; }
.adjs-list { display: flex; gap: 7px; flex-wrap: wrap; min-height: 44px; }
.adj-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tint); border: 1px solid transparent; color: var(--brand-700);
  border-radius: 7px; padding: 6px 11px; font-size: 12.5px; font-weight: 550;
  cursor: grab; user-select: none;
}
.adj-chip:active { cursor: grabbing; }
.adj-chip .r { font-size: 10.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.adj-chip.chair { background: var(--brand); color: #fff; }
.adj-chip.chair .r { color: rgba(255, 255, 255, .7); }
.adj-chip.trainee { background: #F2F2F6; color: var(--muted); }
.adj-chip.conflict { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.adj-chip.dragging { opacity: .4; }
.drop {
  min-height: 42px; border: 1px dashed var(--line-2); border-radius: 8px;
  padding: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start;
  transition: background .12s, border-color .12s;
}
.drop.over { border-color: var(--brand); background: var(--tint); }
.conflict-note { font-size: 11.5px; color: var(--bad); margin-top: 8px; font-weight: 550; }

/* modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(24, 24, 38, .42);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 18px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--surface); border-radius: 12px; width: 100%; max-width: 660px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal .mhead {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal .mhead h3 { font-size: 18px; }
.modal .mbody { padding: 20px 22px; }
.modal .mfoot {
  padding: 15px 22px; border-top: 1px solid var(--line);
  display: flex; gap: 9px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface);
}
.x { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--ink); }

/* ---------------------------------------------------------------- landing */
.hero {
  background:
    radial-gradient(720px 320px at 50% -10%, var(--tint), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--line);
  padding: 82px 24px 74px; text-align: center;
}
.hero .eyebrow {
  display: inline-block; font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); background: var(--surface); border: 1px solid var(--tint-2);
  padding: 6px 15px; border-radius: 99px; margin-bottom: 24px;
}
.hero h1 { font-size: 50px; font-weight: 600; max-width: 800px; margin: 0 auto; line-height: 1.1; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero p { color: var(--muted); max-width: 600px; margin: 20px auto 30px; font-size: 16.5px; }
.hero .acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.section-title { text-align: center; font-size: 27px; margin: 58px 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 14.5px; }
.feature .ico {
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
  background: var(--tint); color: var(--brand); margin-bottom: 13px; font-size: 18px;
}
.feature h4 { font-size: 16px; }
.feature p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.tcard { display: block; text-decoration: none; color: inherit; transition: border-color .13s, box-shadow .13s, transform .13s; }
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--tint-2); text-decoration: none; }
.tcard .fmt { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.tcard h4 { font-size: 18px; margin: 6px 0 7px; }
.tcard p { color: var(--muted); font-size: 13.5px; }

footer.site {
  background: var(--surface); border-top: 1px solid var(--line);
  color: var(--muted); padding: 34px 24px; margin-top: 64px; font-size: 13px;
}
footer.site .inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
footer.site b { color: var(--ink); font-family: var(--serif); font-weight: 600; display: block; margin-bottom: 6px; font-size: 14px; }
footer.site a { color: var(--brand); }

/* ---------------------------------------------------------------- participant */
.pcard { max-width: 700px; margin: 0 auto; }
.big-check {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 19px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.big-check.in { background: var(--ok-bg); border-color: #CFE7DC; }
.ballot-team {
  border: 1px solid var(--line); border-radius: var(--r); padding: 15px 17px; margin-bottom: 13px; background: var(--surface);
}
.ballot-team .bt-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--ink); margin-bottom: 9px;
}
.ballot-team .bt-head .sd { font-family: var(--sans); font-size: 10.5px; letter-spacing: .08em; color: var(--brand); text-transform: uppercase; font-weight: 700; }
.total-badge { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- print */
@media print {
  .topbar, .side, .btn, .chips, footer.site, .no-print { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .main, .wrap { padding: 0; }
  .card, .room { box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .sheet { page-break-after: always; padding: 16px 0; }
  .sheet:last-child { page-break-after: auto; }
}
.sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px 28px; margin-bottom: 18px;
}
.sheet h2 { font-size: 21px; }
.sheet .rule { border: none; border-top: 1.5px solid var(--ink); margin: 13px 0; }
.sheet .lines td { height: 34px; }
.sheet .blank { border-bottom: 1px solid #999; display: inline-block; min-width: 130px; }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .side { width: 100%; border-right: none; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px; }
  .side .sec { display: none; }
  .side a.on { box-shadow: inset 0 -2px 0 var(--brand); }
  .main { padding: 20px 16px 80px; }
  .hero { padding: 56px 20px 52px; }
  .hero h1 { font-size: 33px; }
  .rooms { grid-template-columns: 1fr; }
  .brand .sub { display: none; }
}
