:root {
  --green: #1d5c3c; --green-dark: #144a2f; --green-soft: #e7f1ea; --green-tint: #f1f7f2; --green-line: #cfe2d5; --mint: #d7e9dc;
  --ink: #161c19; --ink-2: #3f4944; --ink-3: #6f7a74; --line: #e3e7e4; --line-2: #d4dad6; --bg: #fafbfa; --card: #fff; --panel: #f4f6f4;
  --amber: #7a5100; --amber-soft: #fff5dc; --red: #a3302a; --red-soft: #fdeceb;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 36, 26, .05);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); font-size: 15px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 2rem; font-weight: 750; } h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .6rem; }
.muted { color: var(--ink-3); } .small { font-size: .85rem; }
[hidden] { display: none !important; }
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 0 1.75rem; height: 64px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; white-space: nowrap; min-width: 0; }
.wordmark { font-weight: 800; font-size: 1.45rem; color: var(--green); letter-spacing: -.02em; }
.brand-divider { width: 1px; height: 1.4rem; background: var(--line-2); }
.brand-name { font-size: 1.15rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.mainnav { display: flex; gap: 2rem; height: 100%; }
.mainnav a { display: flex; align-items: center; height: 100%; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 1.02rem; border-bottom: 3px solid transparent; padding-top: 3px; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); }
.mainnav a.active { color: var(--green); font-weight: 700; border-bottom-color: var(--green); }
.people { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; }
.team-avatars { display: flex; gap: .35rem; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-size: .78rem; font-weight: 700; flex: none; list-style: none; user-select: none; }
.avatar.dark { background: var(--green); color: #fff; }
.avatar.sm { width: 28px; height: 28px; font-size: .68rem; }
.avatar.lg { width: 44px; height: 44px; font-size: .85rem; }
.avatar-me { cursor: pointer; background: var(--green); color: #fff; outline: 2px solid #fff; box-shadow: 0 0 0 3px var(--green-line); }
.avatar-me::-webkit-details-marker { display: none; }
.me-menu { position: relative; }
.me-menu .menu { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.1); white-space: nowrap; display: grid; gap: .35rem; }
.menu-name { font-weight: 600; }

main { max-width: 1320px; margin: 0 auto; padding: 1.75rem 1.75rem 5rem; }

/* ---------- buttons & forms ---------- */
button, .btn { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); padding: .5rem .9rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 38px; }
button:hover, .btn:hover { background: var(--green-tint); border-color: var(--green-line); }
.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.primary.big { white-space: nowrap; font-size: 1.05rem; padding: .7rem 1.2rem; min-height: 46px; border-radius: 9px; }
.ghost { border-color: transparent; background: transparent; color: var(--green); padding: .3rem .55rem; min-height: 32px; }
.ghost:hover { background: var(--green-soft); border-color: transparent; }
.link { border: 0; background: none; color: var(--green); padding: 0; min-height: 0; text-decoration: underline; }
.link:hover { background: none; }
.danger { color: var(--red); }
.icon-btn { padding: .25rem .5rem; min-height: 30px; font-size: .85rem; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .75rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], textarea, select { width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; color: var(--ink); }
textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 16rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green-line); border-color: var(--green); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161c19' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 1.1rem; padding-right: 2.4rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: .35rem 0; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--green); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.error { color: var(--red); background: var(--red-soft); padding: .55rem .75rem; border-radius: 8px; margin-top: .6rem; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; }
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 7px; background: #eef1ef; color: var(--ink-2); white-space: nowrap; }
.pill.idea { background: #e9edea; color: #2c3530; }
.pill.discussion { background: var(--green-soft); color: var(--green-dark); }
.pill.decided { background: var(--mint); color: var(--green-dark); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.demo { background: #fff1cc; color: #6d4700; }
.pill.big { font-size: .95rem; padding: .3rem .8rem; border-radius: 8px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 2.6rem; margin-bottom: .35rem; }
.objective { font-size: 1.15rem; color: var(--ink-2); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: 0; }
.objective strong { color: var(--ink); font-weight: 500; }
.crumbs { font-size: .95rem; color: var(--ink-3); margin-bottom: .6rem; display: flex; gap: .45rem; flex-wrap: wrap; }
.crumbs a { color: var(--green); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.empty { color: var(--ink-3); font-size: .92rem; padding: .3rem 0; }
.demo-note { background: #fff8e5; border: 1px solid #f0d48c; border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; font-size: .92rem; }

/* ---------- board (landing) ---------- */
.needs-input { display: grid; gap: .5rem; margin-bottom: 1.4rem; }
.needs-input a { display: flex; align-items: center; gap: .9rem; background: var(--green-tint); border: 1px solid var(--green-soft); border-radius: 12px; padding: .75rem 1.1rem; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.needs-input a:hover { border-color: var(--green-line); }
.needs-input .pill { background: var(--mint); color: var(--green-dark); font-size: .92rem; padding: .3rem .8rem; }
.filter-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filter-row label { margin: 0; font-size: 1rem; }
.filter-row select { width: 22rem; max-width: 100%; }
.status-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.lane { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 14rem; }
.lane-head { display: flex; align-items: center; gap: .7rem; background: var(--panel); padding: .95rem 1.25rem; }
.lane-head h2 { margin: 0; font-size: 1.25rem; }
.lane-head .count { margin-left: auto; color: var(--ink-3); font-size: .9rem; }
.lane-head svg.i { width: 1.5rem; height: 1.5rem; color: var(--green); }
.lane-body { padding: 1rem; display: grid; gap: .9rem; }
.tcard { position: relative; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 1rem 1.1rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tcard:hover { border-color: #b9c9bf; box-shadow: 0 2px 10px rgba(16, 36, 26, .06); }
.tcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.tcard h3 { font-size: 1.12rem; margin: 0 0 .35rem; }
.tcard h3 a { color: var(--ink); text-decoration: none; }
.tcard h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.tcard .summary { color: var(--ink-2); margin: 0 0 .5rem; }
.tcard .stage { font-size: .8rem; color: var(--ink-3); margin-bottom: .35rem; }
.chips { list-style: none; margin: .4rem 0 .6rem .45rem; padding: 0 0 0 1.05rem; border-left: 1.5px solid #9aa79f; display: grid; gap: .45rem; }
.chips li { position: relative; }
.chips li::before { content: ""; position: absolute; left: -1.05rem; top: 50%; width: .8rem; border-top: 1.5px solid #9aa79f; }
.chips a { position: relative; z-index: 1; display: flex; align-items: center; gap: .55rem; background: var(--green-tint); border-radius: 8px; padding: .4rem .75rem; color: var(--green-dark); font-weight: 600; text-decoration: none; }
.chips a:hover { background: var(--green-soft); }
.tcard-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; margin-top: .4rem; }
.comments { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-2); font-size: .95rem; }
.stack-avatars { display: flex; gap: .3rem; }
.add-in-lane { border-style: dashed; color: var(--ink-3); background: transparent; width: 100%; }

.catchup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.catchup .card h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: .6rem; }
.catchup ul { list-style: none; margin: 0; padding: 0; }
.catchup li { padding: .45rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
.catchup li:first-child { border-top: 0; padding-top: 0; }
.catchup li a { text-decoration: none; color: var(--ink); font-weight: 600; }
.catchup li a:hover { color: var(--green); text-decoration: underline; }

/* ---------- three-pane editor ---------- */
.editor { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(0, .8fr); gap: 1.1rem; align-items: start; }
.editor > * { min-width: 0; }
.sidebar { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem .75rem 1rem; position: sticky; top: 84px; }
.sidebar h2 { padding: 0 .65rem; font-size: 1.25rem; margin-bottom: .9rem; }
.sidebar ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.sidebar a { display: flex; align-items: center; gap: .9rem; padding: .75rem .8rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 1.02rem; border-left: 4px solid transparent; }
.sidebar a:hover { background: #ebefec; }
.sidebar a.active { background: var(--mint); font-weight: 700; border-left-color: var(--green); }
.sidebar a svg.i { width: 1.35rem; height: 1.35rem; color: var(--ink-2); }
.sidebar .side-foot { margin-top: 1rem; padding: 0 .65rem; }
.brief { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.75rem 1.75rem; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; }
.title-row h1 { font-size: 1.95rem; margin: 0; }
.subtitle { color: var(--ink-2); margin: .1rem 0 .9rem; font-size: 1.02rem; }
.status-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; margin-bottom: .6rem; }
.status-switch button { border: 0; border-radius: 0; min-height: 32px; font-size: .85rem; padding: .25rem .8rem; background: #fff; color: var(--ink-2); }
.status-switch button + button { border-left: 1px solid var(--line-2); }
.status-switch button.on { background: var(--green); color: #fff; font-weight: 600; }
.brief h2 { font-size: 1.3rem; margin: 1.6rem 0 .7rem; }
.brief h2:first-of-type { margin-top: 1.1rem; }
.kv { width: 100%; border-collapse: collapse; font-size: 1.04rem; }
.kv th { text-align: left; font-weight: 700; width: 34%; padding: .7rem 1rem .7rem 0; vertical-align: top; }
.kv td { padding: .7rem 0; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.kv tr { border-bottom: 1px solid var(--line); }
.wording { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }
.source-line { font-size: .84rem; color: var(--ink-3); margin-top: .6rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.rows { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.rows a, .rows .row-item { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; text-decoration: none; color: var(--ink); background: #fff; }
.rows > * + * { border-top: 1px solid var(--line-2); }
.rows a:hover { background: var(--green-tint); }
.rows a .label { color: var(--green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; flex: 1; }
.rows a svg.i { color: var(--green); width: 1.3rem; height: 1.3rem; }
.rows a .chev { color: var(--ink-3); }
.next-action { display: flex; align-items: center; gap: .9rem; background: var(--green-tint); border-radius: 10px; padding: .95rem 1.1rem; font-size: 1.04rem; }
.next-action input[type=checkbox] { width: 1.35rem; height: 1.35rem; accent-color: var(--green); flex: none; }
.next-action.done span { text-decoration: line-through; color: var(--ink-3); }
.next-action span { flex: 1; }
.origin { background: var(--green-tint); border: 1px solid var(--green-soft); border-radius: 10px; padding: .65rem .85rem; font-size: .93rem; margin-bottom: .8rem; }
.origin blockquote { margin: .35rem 0 0; padding-left: .65rem; border-left: 3px solid var(--green-line); color: var(--ink-2); white-space: pre-wrap; }
.banner { border-radius: 10px; padding: .7rem .9rem; font-size: .95rem; margin-bottom: .8rem; }
.banner.warn { background: var(--amber-soft); border: 1px solid #f1dca8; }
.toolbar { display: flex; gap: .2rem; flex-wrap: wrap; margin-top: 1.4rem; padding-top: .9rem; border-top: 1px solid var(--line); }

/* ---------- discussion ---------- */
.discussion { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; position: sticky; top: 84px; max-height: calc(100vh - 104px); }
.discussion-head { padding: 1.4rem 1.5rem .9rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.discussion-head h2 { margin: 0; font-size: 1.35rem; }
.messages { overflow-y: auto; padding: 0 1.5rem; flex: 1; min-height: 8rem; }
.msg { padding: 1.1rem 0; display: grid; grid-template-columns: auto 1fr; gap: .9rem; }
.messages > .msg + .msg { border-top: 1px solid var(--line); }
.msg.highlight { background: var(--green-tint); margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.msg-head strong { font-size: 1.04rem; }
.msg-head time { color: var(--ink-3); font-size: .88rem; white-space: nowrap; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .2rem 0 .1rem; color: var(--ink-2); font-size: 1.02rem; }
.msg.recommendation .text { background: var(--green-tint); border-left: 3px solid var(--green); padding: .45rem .7rem; border-radius: 0 8px 8px 0; color: var(--ink); }
.msg .refs { font-size: .86rem; color: var(--ink-3); }
.msg-tools { display: flex; gap: .1rem; flex-wrap: wrap; margin-left: -.55rem; opacity: .75; }
.msg:hover > div > .msg-tools, .msg:focus-within > div > .msg-tools { opacity: 1; }
.replies { margin-top: .4rem; }
.replies .msg { padding: .8rem 0 0; }
.composer { border-top: 1px solid var(--line); padding: 1rem 1.5rem 1.25rem; }
.composer-row { display: flex; gap: .6rem; align-items: flex-end; }
.composer textarea { min-height: 48px; height: 48px; max-height: 12rem; resize: none; padding: .7rem .85rem; }
.send { width: 52px; min-width: 52px; height: 48px; padding: 0; }
.send svg.i { width: 1.4rem; height: 1.4rem; }
.replying { font-size: .85rem; background: var(--panel); border-radius: 6px; padding: .3rem .55rem; margin-bottom: .45rem; display: flex; justify-content: space-between; }
.pane-tabs { display: none; }

/* ---------- plan, decisions, versions ---------- */
.plan-list { display: grid; gap: .9rem; }
.plan-section .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; flex-wrap: wrap; }
.sec-tools { display: flex; gap: .3rem; flex-wrap: wrap; }
.byline { font-size: .85rem; color: var(--ink-3); margin: .15rem 0 .6rem; }
.stack { display: grid; gap: .9rem; }
.decision { border-left: 4px solid var(--green); }
.decision.superseded { border-left-color: #b7c2bc; background: #fafbfa; }
.decision.superseded h3 { text-decoration: line-through; text-decoration-color: #9aa59f; }
.decision.proposed { border-left-color: #d9a520; }
.decision h3 { margin: 0; }
.dl { display: grid; grid-template-columns: 8.5rem 1fr; gap: .3rem .75rem; font-size: .93rem; margin: .6rem 0 0; }
.dl dt { color: var(--ink-3); } .dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.versions { list-style: none; padding: 0; margin: 0; }
.versions li { padding: .55rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.compare .card { padding: .75rem; box-shadow: none; }
.compare pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .88rem; margin: .3rem 0 0; max-height: 14rem; overflow: auto; }

/* ---------- modal, auth, toast ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(640px, calc(100vw - 1.5rem)); box-shadow: 0 24px 60px rgba(0,0,0,.25); max-height: calc(100vh - 2rem); }
dialog.wide { width: min(980px, calc(100vw - 1.5rem)); }
dialog::backdrop { background: rgba(12, 28, 20, .45); }
#modal-form { padding: 1.3rem 1.4rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.modal-head h2 { margin: 0; }
.stage-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.stage-list li { display: flex; align-items: center; gap: .3rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.stage-list li span { flex: 1; font-weight: 500; }
.auth { max-width: 440px; margin: 9vh auto 0; }
.auth .card { padding: 1.6rem; }
.auth .brand { margin-bottom: 1.2rem; }
.auth h1 { font-size: 1.5rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .65rem 1.05rem; border-radius: 9px; z-index: 50; max-width: calc(100vw - 2rem); }
.refresh-pill { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 30; }
.refresh-pill button { background: var(--green); color: #fff; border: 0; box-shadow: 0 4px 14px rgba(0,0,0,.15); border-radius: 99px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .editor { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); }
  .editor > .sidebar { display: none; }
  .stage-tag { display: inline-flex !important; }
}
.stage-tag { display: none !important; }
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; padding: .6rem 1rem 0; row-gap: .2rem; }
  .mainnav { grid-column: 1 / -1; grid-row: 2; gap: 1.4rem; height: 44px; overflow-x: auto; }
  .team-avatars { display: none; }
  .wordmark { font-size: 1.25rem; } .brand-name { font-size: 1rem; }
  main { padding: 1.1rem 1rem 5rem; }
  .page-head h1 { font-size: 2rem; }
  .status-board, .catchup { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .discussion { position: static; max-height: none; }
  .pane-tabs { display: flex; position: sticky; top: 91px; z-index: 15; background: var(--bg); padding: .5rem 0; gap: .5rem; margin-bottom: .2rem; }
  .pane-tabs button { flex: 1; }
  .pane-tabs button.active { background: var(--green); color: #fff; border-color: var(--green); }
  .editor[data-pane="brief"] > .discussion { display: none; }
  .editor[data-pane="discussion"] > .brief { display: none; }
  .brief { padding: 1.1rem 1.1rem 1.3rem; }
  .title-row { flex-direction: column; }
  .title-row h1 { font-size: 1.6rem; }
  .messages, .composer, .discussion-head { padding-left: 1.1rem; padding-right: 1.1rem; }
  .composer { position: sticky; bottom: 0; background: #fff; border-radius: 0 0 14px 14px; }
  .compare { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; } .dl dt { margin-top: .3rem; }
  .kv th { width: 40%; }
  .filter-row select { width: 100%; flex: 1; }
}

/* ---------- hub (pick a room) and PIN pad ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub { max-width: 760px; margin: 2rem auto 0; }
.hub-wrap { max-width: 760px; margin: 7vh auto 0; }
.hub-wrap .brand { margin-bottom: 1.4rem; }
.hub-head h1 { font-size: 1.9rem; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.room-tile { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); min-height: 104px; }
a.room-tile:hover { border-color: var(--green-line); background: var(--green-tint); }
.room-tile.soon { opacity: .7; background: var(--panel); }
.room-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 1.4rem; flex: none; }
.room-text { display: grid; gap: .15rem; flex: 1; min-width: 0; }
.room-text strong { font-size: 1.12rem; }
.room-tile .chev { color: var(--ink-3); }
.pad-wrap { max-width: 400px; }
.pad h1 { font-size: 1.45rem; }
.people-pick { display: grid; gap: .5rem; margin-top: .6rem; }
.people-pick button { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.05rem; font-weight: 600; text-align: left; cursor: pointer; }
.people-pick button:hover { border-color: var(--green-line); background: var(--green-tint); }
.pad-who { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.pad-who strong { font-size: 1.15rem; }
.pin-input { width: 100%; text-align: center; font-size: 1.6rem; letter-spacing: .45em; padding: .6rem; border-radius: 12px; }
.pin-input::placeholder { font-size: 1rem; letter-spacing: normal; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-top: .9rem; }
.keypad button { height: 62px; font-size: 1.45rem; font-weight: 600; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; }
.keypad button:active { background: var(--mint); }
.keypad button.primary { background: var(--green); color: #fff; border-color: var(--green); }
.room-checks { flex-wrap: wrap; gap: .2rem 1.1rem; margin-top: .4rem; }
.people-list li { display: block; }
.link-out { width: 100%; margin-top: .4rem; }
.new-here { margin: 1rem 0 0; text-align: center; }
.card.attention { border-color: #f1dca8; background: #fffdf6; }
.topbar.hub-mode { grid-template-columns: 1fr auto; }
@media (max-width: 900px) {
  .rooms { grid-template-columns: 1fr; }
  .hub { margin-top: .6rem; } .hub-wrap { margin-top: 1.2rem; }
  .hub-head h1 { font-size: 1.55rem; }
  .auth { margin: 1.2rem auto 0; }
}
