/* Windward house style (same tokens as the original portal): green #123621, gold #b49a54, paper #faf8f3, DM Serif Display + Outfit.
   index.html pins the dark-green theme for everyone (data-theme="dark"); the light tokens are kept but unused. Older class names below read these through aliases. */
@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Regular-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/Outfit-Variable-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --ww-green: #123621; --ww-gold: #b49a54; --paper: #faf8f3;
  --bg: var(--paper); --surface: #ffffff; --surface-2: #f2ede0;
  --fg: #1a1a17; --fg-muted: #6e6c60; --border: rgba(18, 54, 33, .15);
  --accent: var(--ww-green); --accent-gold: var(--ww-gold);
  --good: #2f7d4f; --good-bg: #e7f2ea; --bad: #b5442e; --bad-bg: #fbe9e4; --warn: #9c7a2f; --warn-bg: #f6efdd;
  --btn-bg: #123621; --btn-fg: #f3f0e6; --shadow: rgba(18, 54, 33, .18);
  --sheet-prev-bg: #f1e3c2;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
  /* aliases used by the screens */
  --green: var(--accent); --green-deep: var(--accent); --green-tint: var(--surface-2); --gold: var(--accent-gold);
  --white: var(--surface); --ink: var(--fg); --muted: var(--fg-muted); --rule: var(--border); --line: var(--border);
  --danger: var(--bad); --serif: var(--font-display); --sans: var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1e14; --surface: #16301f; --surface-2: #1b3a26;
    --fg: #f3f0e6; --fg-muted: #aab3a3; --border: rgba(212, 189, 127, .2);
    --accent: #d9c68a; --accent-gold: #e0cd97;
    --good: #6cc794; --good-bg: #1c3a28; --bad: #e58a6f; --bad-bg: #3a231d; --warn: #dfc177; --warn-bg: #3a3220;
    --btn-bg: #d9c68a; --btn-fg: #12240f; --shadow: rgba(0, 0, 0, .45); --sheet-prev-bg: #2c2a1d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1e14; --surface: #16301f; --surface-2: #1b3a26;
  --fg: #f3f0e6; --fg-muted: #aab3a3; --border: rgba(212, 189, 127, .2);
  --accent: #d9c68a; --accent-gold: #e0cd97;
  --good: #6cc794; --good-bg: #1c3a28; --bad: #e58a6f; --bad-bg: #3a231d; --warn: #dfc177; --warn-bg: #3a3220;
  --btn-bg: #d9c68a; --btn-fg: #12240f; --shadow: rgba(0, 0, 0, .45); --sheet-prev-bg: #2c2a1d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--green); }
.booting { padding: 48px; color: var(--muted); }

/* top bar */
.top { background: var(--green); color: #fff; border-bottom: 3px solid var(--gold); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 12px; }
.wordmark { font-family: var(--serif); font-size: 24px; letter-spacing: 0.01em; }
.brand-sub { font-size: 14px; opacity: 0.85; }
.who { text-align: right; font-size: 14px; }
.who-name { font-weight: 600; }
.wrist { display: block; height: 4px; width: 100%; max-width: 72px; border-radius: 2px; margin: 4px 0 4px auto; }
.who-band { opacity: 0.9; }
.who-band a { color: #fff; }

/* frame */
.frame { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100% - 64px); }
.side { padding: 24px 0 24px 16px; border-right: 1px solid var(--rule); }
.navlink { display: block; padding: 8px 12px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; }
.navlink:hover { background: var(--green-tint); }
.navlink.current { border-left-color: var(--green); font-weight: 600; }
main { padding: 32px 40px 64px; max-width: 1140px; min-width: 0; }
.foot { grid-column: 1 / -1; padding: 16px 24px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }

h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: var(--green); margin: 0 0 8px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--green); margin: 32px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: 8px 0 0; }
.ok { color: var(--green); margin: 8px 0 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }

.btn { display: inline-block; background: var(--btn-bg); color: var(--btn-fg); border: 0; padding: 10px 16px; border-radius: 4px; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible, .link:focus-visible, .navlink:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.link { background: none; border: 0; color: var(--green); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }
.link.danger { color: var(--danger); }

/* tables */
.tablewrap { overflow-x: auto; background: var(--white); border: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font-weight: 600; font-size: 13px; color: var(--muted); background: var(--paper); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
tbody tr[data-href] { cursor: pointer; }
tbody tr[data-href]:hover { background: var(--green-tint); }
.refused { color: var(--danger); }

/* forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; max-width: 840px; background: var(--white); border: 1px solid var(--rule); padding: 24px; }
.field { display: grid; gap: 6px; align-content: start; }
.field.wide { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); width: 100%; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--green); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.actions { grid-column: 1 / -1; display: flex; gap: 20px; align-items: center; padding-top: 8px; flex-wrap: wrap; }
.actions .spacer { flex: 1; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }

.detail { display: grid; grid-template-columns: 200px 1fr; gap: 12px 24px; background: var(--white); border: 1px solid var(--rule); padding: 24px; max-width: 840px; margin: 0; }
.detail dt { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.detail dd { margin: 0; white-space: pre-wrap; }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 24px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 0; margin: 16px 0 8px; }
.stats div { padding: 8px 0; }
.big { display: block; font-family: var(--serif); font-size: 34px; color: var(--green); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span + span { color: var(--muted); font-size: 14px; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--green); padding: 32px; }
.login-card .wordmark { color: var(--green); display: block; margin-bottom: 4px; }
.login-card h1 { font-size: 22px; margin-bottom: 24px; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.login-card .muted { margin-top: 20px; font-size: 14px; }

.notice { background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--gold); padding: 16px 20px; max-width: 840px; margin: 0 0 24px; }

@media (max-width: 760px) {
  .top { padding: 12px 16px; }
  .who { text-align: left; }
  .wrist { margin-left: 0; }
  .frame { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--rule); padding: 8px 16px; display: flex; overflow-x: auto; gap: 4px; }
  .navlink { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 8px 10px; }
  .navlink.current { border-bottom-color: var(--green); }
  main { padding: 24px 16px 48px; }
  .form, .detail { grid-template-columns: 1fr; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- added 2026-09-23: inbox, projects, cards, meetings, ask ---- */
.who-band a.bell { font-weight: 600; }
.subnav { display: flex; gap: 20px; flex-wrap: wrap; margin: 0 0 20px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.subnav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.subnav a.current { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.filters input, .filters select { width: auto; min-width: 180px; }
.summary { display: flex; gap: 28px; flex-wrap: wrap; margin: 0 0 20px; color: var(--muted); }
.summary strong { color: var(--ink); font-weight: 600; }
.section { background: var(--white); border: 1px solid var(--rule); padding: 20px 24px; margin: 0 0 20px; max-width: 980px; }
.section h2 { margin: 0 0 12px; }
.section .detail { border: 0; padding: 0; }
.rowline { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.rowline:last-child { border-bottom: 0; }
.rowline .grow { flex: 1; min-width: 200px; }
.rowline .meta { color: var(--muted); font-size: 14px; white-space: nowrap; }
.status-note { color: var(--muted); font-size: 14px; }
.state-good { color: var(--green); font-weight: 600; }
.state-warn { color: var(--danger); }

/* notifications */
.notif { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.notif:last-child { border-bottom: 0; }
.notif.unread .notif-title { font-weight: 600; }
.notif-title { display: block; }
.notif-body { display: block; color: var(--muted); font-size: 14px; }
.notif-when { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* grade picker and yes/no */
.grades { display: flex; gap: 8px; flex-wrap: wrap; }
.grade { width: 48px; height: 44px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 600 17px var(--sans); border-radius: 4px; cursor: pointer; }
.grade:hover { border-color: var(--green); }
.grade.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.grade:disabled { cursor: default; opacity: 0.7; }
.grade.yesno { width: auto; padding: 0 18px; }
.question { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.question:last-child { border-bottom: 0; }
.qtext { margin: 0 0 10px; font-weight: 500; }
.qnum { color: var(--muted); font-weight: 400; margin-right: 8px; }
.anchors { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.cardwrap { max-width: 760px; }
.cardwrap .section { padding: 24px 28px; }
.result-line { font-family: var(--serif); font-size: 22px; color: var(--green); }

/* follow-up list */
.owner-block { margin: 0 0 24px; }
.owner-block h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--gold); }
.owner-block h2 .meta { font: 14px var(--sans); color: var(--muted); }
.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.item:last-child { border-bottom: 0; }
.item .num { font-weight: 600; color: var(--ink); padding-top: 8px; }
.item .text { padding-top: 8px; }
.item .text .carried { color: var(--danger); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; margin-right: 8px; }
.item .due { color: var(--muted); font-size: 14px; display: block; }
.yn { display: flex; gap: 6px; }
.yn button { min-width: 52px; height: 36px; border: 1px solid var(--line); background: var(--white); border-radius: 4px; font: 500 14px var(--sans); cursor: pointer; color: var(--ink); }
.yn button.yes.on { background: var(--good); border-color: var(--good); color: #fff; }
.yn button.no.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.yn button:disabled { cursor: default; }
.item .edit-item { grid-column: 2 / -1; }
.item.done .text { color: var(--muted); }
.addrow { display: grid; grid-template-columns: 180px 1fr 160px auto; gap: 10px; align-items: end; margin-top: 12px; }
.proposed { background: var(--green-tint); border: 1px solid var(--rule); padding: 16px 20px; margin: 16px 0; }
.proposed .item { border-bottom-color: var(--border); }
.dictate.on { background: var(--danger); }

/* ask */
.chat { max-width: 860px; }
.chat-log { background: var(--white); border: 1px solid var(--rule); padding: 8px 24px; min-height: 240px; max-height: 60vh; overflow-y: auto; }
.msg { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.msg:last-child { border-bottom: 0; }
.msg .from { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.msg.assistant .from { color: var(--green); }
.msg .body { white-space: pre-wrap; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; align-items: end; }
.chat-form textarea { min-height: 56px; }
.chat-status { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; margin: 0 0 12px; }

/* project page */
.proj-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.quick { display: grid; grid-template-columns: 200px 1fr 170px auto; gap: 10px; align-items: end; }

/* public card page */
.public { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
.public .top { margin: -32px -16px 24px; }
@media (max-width: 760px) {
  .addrow, .quick { grid-template-columns: 1fr; }
  .item { grid-template-columns: 44px 1fr; }
  .item .yn { grid-column: 1 / -1; }
  .chat-form { grid-template-columns: 1fr; }
  .proj-head { grid-template-columns: 1fr; }
}

/* ---- screens that came over from the original portal ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 0 0 24px; }
.tile { background: var(--white); border: 1px solid var(--rule); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .label { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.tile .big { font: 40px/1.1 var(--serif); color: var(--green); }
.tile .sub { font-size: 14px; color: var(--muted); }
.state-bad { color: var(--danger); font-weight: 600; }
.monthbar { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbtn { border: 1px solid var(--line); background: var(--white); color: var(--ink); padding: 6px 12px; border-radius: 4px; font: 500 14px var(--sans); cursor: pointer; }
.chipbtn.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
table.sheet { min-width: 980px; }
table.sheet th, table.sheet td { padding: 8px 10px; text-align: right; white-space: nowrap; }
table.sheet th:first-child, table.sheet thead th { text-align: left; }
table.sheet thead th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; text-align: right; }
table.sheet thead th:first-child { text-align: left; }
table.sheet td.tan { background: var(--sheet-prev-bg); }
table.sheet td.strong { font-weight: 600; }
/* Monthly goal then Month actual, same width; the actual column is the logo's green with gold numbers, top to bottom. */
table.sheet .c-goal, table.sheet .c-actual { width: 140px; min-width: 140px; max-width: 140px; }
table.sheet .c-actual { background: #2ea05c; color: #fff1bf; font-weight: 700; border-left: 1px solid var(--ww-gold); border-right: 1px solid var(--ww-gold); }
table.sheet thead th.c-actual { background: #2ea05c; color: #fff1bf; }
table.sheet tfoot td.c-actual { border-top: 2px solid var(--gold); }
table.sheet tfoot th, table.sheet tfoot td { border-top: 2px solid var(--gold); font-weight: 600; }
input.money { width: 112px; text-align: right; padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; font: inherit; background: var(--white); }
input.money.bad { border-color: var(--danger); }
td.pct { min-width: 130px; }
.bar { display: inline-block; width: 60px; height: 8px; background: var(--surface-2); border-radius: 4px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--danger); }
.bar.warn i { background: var(--warn); }
.bar.good i { background: var(--good); }
.ok { color: var(--green); }
.brain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.brain-card { background: var(--white); border: 1px solid var(--rule); }
.brain-card summary { cursor: pointer; padding: 14px 18px; font: 20px var(--serif); color: var(--green); }
.brain-body { padding: 0 18px 16px; }
table.roster { width: 100%; border-collapse: collapse; }
table.roster td { padding: 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.roster td.who { font-weight: 600; padding-right: 14px; white-space: nowrap; }
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.tagchip { display: inline-block; border: 1px solid var(--line); padding: 2px 10px; border-radius: 99px; font-size: 13px; margin: 0 6px 6px 0; }
dl.gloss { margin: 0; } dl.gloss dt { font-weight: 600; margin-top: 8px; } dl.gloss dd { margin: 0; color: var(--muted); }

/* follow-up list additions */
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; padding: 1px 8px; border-radius: 99px; margin-right: 6px; }
.chip.carried { background: var(--surface-2); color: var(--accent); }
.chip.pastdue { background: var(--bad-bg); color: var(--bad); }
.chip.new { background: var(--warn-bg); color: var(--warn); }
.chip.no { background: var(--bad-bg); color: var(--bad); }
.chip.done { background: var(--good-bg); color: var(--good); }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.item.removed .text .itemtext { text-decoration: line-through; color: var(--muted); }
.finalize-bar { position: sticky; bottom: 0; background: var(--white); border-top: 3px solid var(--gold); padding: 12px 16px; margin: 24px -8px 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.finalize-bar .spacer { flex: 1; }
.banner { background: var(--good-bg); border: 1px solid var(--border); border-left: 4px solid var(--good); padding: 14px 18px; margin: 0 0 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.banner .spacer { flex: 1; }
table.roster td { text-align: left; }
table.sheet tfoot th { text-align: left; }


/* ---- app frame: green rail + top bar + content (the original portal's layout) ---- */
html, body { height: auto; }
.app { display: flex; min-height: 100vh; }
.rail { width: 236px; flex: 0 0 236px; background: var(--ww-green); color: #f3f0e6; display: flex; flex-direction: column; padding: 20px 14px; gap: 22px; position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
.rail-brand { display: block; padding: 4px 8px; }
.rail-brand img { width: 184px; max-width: 100%; height: auto; display: block; }
.rail-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.rail .navlink { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; border: 1px solid transparent; border-left-width: 1px; color: #d9dfd7; text-decoration: none; font-size: 14px; transition: background .12s, color .12s; }
.rail .navlink svg { flex: 0 0 auto; opacity: .85; }
.rail .navlink:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.rail .navlink[aria-current="true"] { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(212, 189, 127, .35); font-weight: 500; }
.rail .navlink[aria-current="true"] svg { opacity: 1; color: var(--ww-gold); }
.rail-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .12); }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 30px; height: 30px; border-radius: 99px; background: var(--ww-gold); color: var(--ww-green); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.user-meta { line-height: 1.25; min-width: 0; }
.user-meta .name { font-size: 12.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.user-meta .role { font-size: 11px; color: #a9b3a5; }
.rail-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 12px; }
.rail-links a { color: #cfd8cb; }
.rail-links a:hover { color: #fff; }
.rail-note { font-size: 10.5px; color: #93a290; margin-top: 10px; line-height: 1.5; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { padding: 20px 32px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar .kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-gold); font-weight: 600; }
.topbar h1 { font-size: 27px; color: var(--fg); margin: 2px 0 0; }
.content { padding: 26px 32px 60px; max-width: 1180px; width: 100%; margin: 0 auto; min-width: 0; }
.main-col .foot { padding: 16px 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.content h1.in-topbar { display: none; }
.content .page-head:has(> h1.in-topbar:only-child) { display: none; }
.content > p.muted:first-of-type, .content .page-head + p.muted { max-width: 760px; }


/* cards: rounded surfaces like the original portal */
.section, .tile, .tablewrap, .form, .detail, .notice, .brain-card, .login-card, .chat-log, .proposed { background: var(--surface); border-color: var(--border); border-radius: 12px; }
.section, .tile, .form, .detail, .notice, .brain-card, .chat-log { max-width: none; }
.tablewrap { overflow-x: auto; }
th { background: var(--surface-2); }
tbody tr[data-href]:hover { background: var(--surface-2); }
.notice { border-left: 4px solid var(--accent-gold); }
.btn { border-radius: 8px; }
input, select, textarea { background: var(--surface); color: var(--fg); border-color: var(--border); border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-gold); border-color: var(--accent); }
.item .text .carried { color: var(--bad); }

/* sign-in page */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { padding: 0; overflow: hidden; border-top: 0; box-shadow: 0 10px 30px var(--shadow); }
.login-head { background: var(--ww-green); padding: 26px 28px; border-bottom: 3px solid var(--ww-gold); }
.login-head img { width: 100%; max-width: 280px; height: auto; display: block; }
.login-body { padding: 28px 32px 32px; }
.login-body h1 { font-size: 22px; margin: 0 0 18px; color: var(--fg); }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .rail { width: auto; flex: none; position: static; height: auto; padding: 12px 14px; gap: 10px; flex-direction: column; }
  .rail-brand img { width: 150px; }
  .rail-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .rail .navlink { white-space: nowrap; padding: 8px 10px; }
  .rail-foot { margin-top: 0; padding-top: 10px; }
  .rail-note { display: none; }
  .topbar, main#main, .main-col .foot { padding-left: 16px; padding-right: 16px; }
}
