/* Helm, the Plymouth Harbor board portal.

   "Chart room": a dark ink rail for finding your way, cool porcelain and white
   paper for reading, one claret accent for what needs you. Source Serif 4 at
   display sizes carries the formality (dates, titles, minutes); Hanken
   Grotesk does the work of the interface. Structure comes from hairline rules
   and alignment, not from boxes and shadows. */

@font-face { font-family: "Source Serif 4"; src: url(/assets/fonts/source-serif-4-latin-opsz-normal.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/assets/fonts/source-serif-4-latin-opsz-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(/assets/fonts/hanken-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ink: #141a2e;          /* rail, primary text */
  --ink-2: #283150;
  --porcelain: #f3f4f7;    /* page */
  --paper: #ffffff;        /* panels */
  --text: #1c2233;
  --slate: #5b6478;        /* secondary text */
  --mist: #8b93a6;
  --rule: #e2e5ec;
  --rule-strong: #c9ceda;
  --claret: #8a1c2c;       /* the one accent: actions, attention */
  --claret-soft: #f7eaec;
  --green: #2f6b4e;
  --green-soft: #e6f1eb;
  --amber: #8a5a00;
  --amber-soft: #fbf2de;
  --focus: #2f5fd0;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0c1020;
    --ink-2: #1b2340;
    --porcelain: #10141f;
    --paper: #171c2a;
    --text: #e7e9ef;
    --slate: #a2a9ba;
    --mist: #7c849a;
    --rule: #262d40;
    --rule-strong: #353e57;
    --claret: #e0707f;
    --claret-soft: #3a1c22;
    --green: #74c29a;
    --green-soft: #17301f;
    --amber: #e5b65a;
    --amber-soft: #2f2612;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--porcelain); color: var(--text); font: 16px/1.55 var(--sans); font-feature-settings: "ss01", "tnum" 0; }
h1, h2, h3 { font-family: var(--serif); font-optical-sizing: auto; color: var(--text); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; margin: 0 0 .35rem; font-weight: 560; }
h2 { font-size: 1.32rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.06rem; margin: 1.3rem 0 .4rem; }
p { margin: 0 0 .9rem; }
a { color: var(--ink-2); text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { color: var(--claret); text-decoration-color: currentColor; }
@media (prefers-color-scheme: dark) { a { color: #b9c3e6; } }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.6rem 0; }
code { font-size: .92em; }
.muted { color: var(--slate); }
.small { font-size: .875rem; }
.inline { display: inline; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 50; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- shell: rail + content ---------- */
.shell { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--ink); color: #c8cede; display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.side a { color: inherit; text-decoration: none; }
.mark { display: flex; align-items: center; gap: 12px; padding: 22px 22px 20px; color: #fff; }
.mark img { width: 34px; height: 34px; }
.mark b { font: 600 1.45rem/1 var(--serif); letter-spacing: .01em; color: #fff; }
.mark span { display: block; font-size: .78rem; color: #8e97b0; margin-top: 3px; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 6px; font-size: .95rem; color: #c8cede; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.09); color: #fff; box-shadow: inset 3px 0 0 #d6475b; }
.nav a[aria-current="page"] svg { opacity: 1; }
.navhead { padding: 18px 24px 6px; font-size: .78rem; color: #7e88a3; }
.nav.committees a { padding: 6px 12px; font-size: .88rem; color: #a9b1c6; }
.side .me { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #2c3656; color: #fff; display: grid; place-items: center; font: 600 .85rem var(--sans); flex: none; }
.me .who { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.3; }
.me .who a { color: #fff; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { color: #7e88a3; font-size: .8rem; }
.me .linkbtn { color: #a9b1c6; font-size: .82rem; padding: 4px 6px; }
.main { margin-left: var(--rail); min-width: 0; }
.envbar { background: #8a5a00; color: #fff; text-align: center; font-size: .82rem; padding: 4px 8px; }
.topbar { display: none; }

@media (max-width: 960px) {
  .side { position: static; width: auto; }
  .side .nav, .side .navhead, .side .me { display: none; }
  .side.open .nav, .side.open .navhead { display: flex; }
  .side.open .navhead { display: block; }
  .side.open .me { display: flex; }
  .mark { padding: 14px 16px; }
  .main { margin-left: 0; }
  .navtoggle { display: block !important; margin-left: auto; }
}
.navtoggle { display: none; background: none; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 6px 12px; font: 500 .9rem var(--sans); cursor: pointer; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.page { padding-top: 34px; padding-bottom: 64px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } .page { padding-top: 22px; } h1 { font-size: 1.7rem; } }

.flash { background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--green); padding: 11px 16px; border-radius: 6px; margin-top: 18px; }
.alert { padding: 12px 16px; border-radius: 6px; margin: 0 0 1.1rem; border: 1px solid var(--rule); border-left-width: 3px; background: var(--paper); }
.alert.error { border-left-color: var(--claret); }
.alert.warn { border-left-color: var(--amber); }
.alert.info { border-left-color: var(--ink-2); }

/* ---------- page heading ---------- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
.pagehead p { margin: 0; }
.eyebrow { font-size: .88rem; color: var(--slate); margin-bottom: 4px; }
.eyebrow a { color: inherit; }

/* ---------- buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 6px;
  background: var(--ink); color: #fff !important; border: 1px solid var(--ink); font: 600 .92rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--ink-2); }
@media (prefers-color-scheme: dark) { .btn { background: #34406a; border-color: #34406a; } }
.btn-brass { background: var(--claret); border-color: var(--claret); }
.btn-brass:hover { background: #a3263a; }
.btn-secondary { background: var(--paper); color: var(--text) !important; border-color: var(--rule-strong); }
.btn-secondary:hover { background: var(--porcelain); }
.btn-danger { background: var(--paper); color: var(--claret) !important; border-color: var(--claret); }
.btn-danger:hover { background: var(--claret-soft); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: .84rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 1.1rem; }
.linkbtn { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; color: inherit; }

.field { margin-bottom: 1.05rem; }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--text); }
.hint { color: var(--slate); font-size: .84rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=tel],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--paper);
  color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(47,95,208,.15); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 460px; font: 1.04rem/1.75 var(--serif); padding: 18px 20px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: 4px; accent-color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---------- panels ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 22px 24px; margin-bottom: 22px; }
.card > h2:first-child, .card > h3:first-child, .card > .cardhead:first-child h2 { margin-top: 0; }
aside .card { background: transparent; border: 0; border-top: 1px solid var(--rule-strong); border-radius: 0; padding: 16px 0 6px; }
aside .card h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cardhead h2 { margin: 0 0 .8rem; }
.empty { color: var(--slate); padding: 4px 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); margin-bottom: 30px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 16px 20px; text-decoration: none; color: var(--text); border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 500 2rem/1.1 var(--serif); }
.stat span { color: var(--slate); font-size: .86rem; }
.stat:hover b { color: var(--claret); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 13px 0; border-top: 1px solid var(--rule); display: flex; gap: 14px; align-items: center; }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--text); text-decoration: none; }
.list .title:hover { color: var(--claret); }
.datebox { flex: none; width: 52px; text-align: center; line-height: 1.1; }
.datebox .m { font-size: .74rem; color: var(--claret); font-weight: 700; }
.datebox .d { font: 500 1.6rem/1.1 var(--serif); color: var(--text); }
.fileicon { flex: none; width: 34px; height: 42px; border: 1px solid var(--rule-strong); border-radius: 3px 10px 3px 3px; background: var(--paper);
  display: flex; align-items: flex-end; justify-content: center; font: 700 .58rem var(--sans); letter-spacing: .04em; color: var(--slate); padding-bottom: 5px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--porcelain); color: var(--slate); border: 1px solid var(--rule); vertical-align: middle; white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.badge.bad { background: var(--claret-soft); color: var(--claret); border-color: transparent; }
.badge.brass { background: var(--paper); color: var(--ink-2); border-color: var(--rule-strong); }

table.data { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .94rem; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data th { font-size: .82rem; font-weight: 600; color: var(--slate); background: var(--porcelain); }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; }
.tablewrap table.data tr:last-child td { border-bottom: 0; }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--rule); margin: -8px 0 26px; flex-wrap: wrap; }
.tabs a { padding: 10px 0; text-decoration: none; color: var(--slate); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--claret); }

/* ---------- home: the meeting briefing ---------- */
.briefing { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin-bottom: 40px; }
@media (max-width: 900px) { .briefing { grid-template-columns: 1fr; } }
.briefing .when { padding: 34px 36px 30px; border-right: 1px solid var(--rule); }
@media (max-width: 900px) { .briefing .when { border-right: 0; border-bottom: 1px solid var(--rule); padding: 26px 22px; } }
.briefing .committee { font-size: .92rem; color: var(--slate); }
.briefing .day { font: 400 3.4rem/1 var(--serif); letter-spacing: -.02em; margin: 14px 0 4px; color: var(--text); }
.briefing .date { font: 500 1.5rem/1.2 var(--serif); color: var(--text); }
.briefing .meta { color: var(--slate); margin-top: 10px; }
.briefing h2 { font-size: 1.12rem; margin: 22px 0 0; font-weight: 600; }
.briefing .prep { padding: 30px 32px; background: linear-gradient(var(--paper), var(--paper)); }
@media (max-width: 900px) { .briefing .day { font-size: 2.6rem; } .briefing .prep { padding: 24px 22px; } }
.prep h3 { margin: 0 0 14px; font: 600 1rem var(--sans); }
.steps { list-style: none; margin: 0 0 22px; padding: 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top: 0; }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong); display: grid; place-items: center; }
.steps li.done .tick { background: var(--green); border-color: var(--green); }
.steps li.done .tick::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.steps li.todo .tick { border-color: var(--claret); }
.steps .meter { grid-column: 2 / 4; height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; margin-top: -4px; }
.steps .meter i { display: block; height: 100%; background: var(--green); }
.steps a { font-size: .88rem; }

.section { margin-bottom: 38px; }
.sectionhead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule-strong); padding-bottom: 8px; margin-bottom: 4px; }
.sectionhead h2 { margin: 0; font-size: 1.2rem; }
.sectionhead a { font-size: .88rem; }
.attention > li { border-left: 3px solid var(--claret); padding-left: 14px !important; margin: 8px 0; border-top: 0 !important; background: var(--paper); border-radius: 0 6px 6px 0; padding-right: 14px; }

/* ---------- agenda ---------- */
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda > li { border-top: 1px solid var(--rule); padding: 18px 0; }
.agenda > li:first-child { border-top: 0; padding-top: 4px; }
.agenda .row { display: flex; gap: 16px; align-items: baseline; }
.agenda .num { flex: none; width: 2.4rem; font: 500 1.2rem var(--serif); color: var(--claret); }
.agenda .what { flex: 1; min-width: 0; }
.agenda .what strong { font: 600 1.12rem/1.35 var(--serif); }
.agenda .meta { color: var(--slate); font-size: .88rem; margin-top: 2px; }
.agenda .sub { list-style: none; margin: 10px 0 0; padding: 0; }
.agenda .sub li { padding: 10px 0; border-top: 1px dotted var(--rule-strong); }
.agenda .sub .num { font-size: 1rem; color: var(--slate); }
.agenda .sub .what strong { font-size: 1rem; }
.agenda .papers { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.agenda .papers a { display: inline-flex; gap: 8px; align-items: center; font-size: .94rem; text-decoration: none; font-weight: 500; }
.agenda .papers .badge { font-size: .66rem; letter-spacing: .04em; padding: 1px 6px; border-radius: 3px; }
.agenda .desc { margin: 6px 0 0; color: var(--text); font-size: .96rem; }

.builder { list-style: none; padding: 0; margin: 0; }
.builder li.bi { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; margin-bottom: 6px; }
.builder li.bi.child { margin-left: 38px; }
.builder li.bi.dragging { opacity: .45; }
.builder li.bi.over { box-shadow: 0 -2px 0 var(--claret); }
.handle { cursor: grab; color: var(--mist); user-select: none; }
.builder .grow { flex: 1; min-width: 0; }

/* ---------- votes ---------- */
.bar { height: 8px; background: var(--rule); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink-2); }
.tally { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.choice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--rule-strong); border-radius: 6px; margin-bottom: 8px; cursor: pointer; background: var(--paper); font-weight: 500; }
.choice input { accent-color: var(--claret); width: 18px; height: 18px; }
.choice:has(input:checked) { border-color: var(--claret); box-shadow: inset 0 0 0 1px var(--claret); }

.minutes { font: 1.06rem/1.8 var(--serif); max-width: 72ch; }

/* ---------- board book / pdf ---------- */
.bookbar { position: sticky; top: 0; z-index: 5; background: var(--porcelain); padding: 12px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.booktoc .list > li { align-items: baseline; }
.booksection { margin: 44px 0 14px; }
.booksection h2 { margin: 0 0 10px; }
.pdfdoc { min-height: 120px; }
.pdfsheet { margin: 0 auto 22px; max-width: 900px; }
.pdfpage { position: relative; background: #fff; box-shadow: 0 1px 2px rgba(20,26,46,.08), 0 8px 24px rgba(20,26,46,.08); width: 100%; }
.pdfpage canvas { display: block; width: 100%; height: 100%; }
.pdfnum { text-align: center; color: var(--mist); font-size: .78rem; margin-top: 6px; }

/* ---------- sign in ---------- */
.authpage { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; background: var(--paper); }
.authside { background: var(--ink); color: #c8cede; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.authside .mark { padding: 0; }
.authside blockquote { margin: 0; font: 400 2rem/1.25 var(--serif); color: #fff; max-width: 15em; letter-spacing: -.01em; }
.authside p { color: #8e97b0; font-size: .9rem; margin: 18px 0 0; }
.authcard { align-self: center; justify-self: center; width: 100%; max-width: 420px; padding: 40px 28px; }
.authcard h1 { font-size: 1.9rem; }
.authbrand { display: none; }
@media (max-width: 860px) {
  .authpage { grid-template-columns: 1fr; }
  .authside { padding: 22px 20px; }
  .authside blockquote, .authside p { display: none; }
  .authcard { padding: 28px 16px 40px; }
}
.codeinput { font: 500 1.7rem var(--serif) !important; letter-spacing: .35em; text-align: center; }

.foot { color: var(--mist); font-size: .8rem; padding: 0 0 30px; }

/* ---------- iOS app (html.in-app is set by native.js) ---------- */
.lockscreen { position: fixed; inset: 0; z-index: 1000; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lockscreen .lock-box { text-align: center; max-width: 320px; }
.lockscreen h1 { color: #fff; font-size: 1.7rem; margin: 18px 0 6px; }
.lockscreen p { color: #a9b1c6; }
.lockscreen .btn { background: var(--claret); border-color: var(--claret); margin: 12px 0 18px; min-width: 160px; }
.lockscreen .linkbtn { color: #a9b1c6; text-decoration: underline; }
.in-app #bookdl, .in-app a[href^="/meetings/ics.php"] { display: none !important; }

@media print {
  .side, .foot, .envbar, .bookbar, .noprint, .actions { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; color: #000; }
  .card { border: 0; padding: 0; }
}
.adminbar { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; padding: 10px 16px; margin-bottom: 24px; background: var(--paper); border: 1px dashed var(--rule-strong); border-radius: 6px; font-size: .9rem; }
[hidden] { display: none !important; }
.booksection h3 a { font: 500 .84rem var(--sans); margin-left: 10px; color: var(--slate); }

/* ---------- menu counts ---------- */
.nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #d6475b; color: #fff; font: 700 .72rem/20px var(--sans); text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- action items and forms ---------- */
.list .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong); display: grid; place-items: center; }
.list .tick.done { background: var(--green); border-color: var(--green); }
.list .tick.done::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.list .tick.late { border-color: var(--claret); background: var(--claret-soft); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
.facts dt { color: var(--slate); font-size: .9rem; }
.facts dd { margin: 0; }
.formtext .minutes { max-width: 68ch; }
.signinput { font: italic 500 1.5rem var(--serif) !important; }
.sigline { font: italic 500 1.9rem/1.2 var(--serif); margin: 1.4rem 0 .4rem; padding-bottom: 6px; border-bottom: 1px solid var(--text); max-width: 26rem; }

/* ---------- directory ---------- */
.searchform input { min-width: 260px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 28px; }
.people li { border-top: 1px solid var(--rule); }
.person { display: flex; gap: 14px; align-items: center; padding: 14px 0; text-decoration: none; color: var(--text); }
.person:hover strong { color: var(--claret); }
.person .who { display: flex; flex-direction: column; min-width: 0; }
.person .committees { color: var(--slate); margin-top: 2px; }
.portrait { flex: none; border-radius: 50%; object-fit: cover; background: var(--ink-2); color: #fff; display: inline-grid; place-items: center; font-family: var(--serif); font-weight: 500; letter-spacing: .02em; }
.profile { display: flex; gap: 28px; align-items: center; margin: 8px 0 30px; }
.profile h1 { margin-bottom: 4px; }
@media (max-width: 600px) { .profile { flex-direction: column; align-items: flex-start; gap: 16px; } }

/* ---------- calendar ---------- */
.calhead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.calhead h2 { margin: 0; min-width: 11rem; text-align: center; }
.calendar { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--paper); }
.calrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calnames div { padding: 8px 10px; font-size: .8rem; font-weight: 600; color: var(--slate); background: var(--porcelain); border-bottom: 1px solid var(--rule); }
.calday { min-height: 112px; padding: 6px 6px 8px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calrow .calday:first-child { border-left: 0; }
.calrow:nth-child(2) .calday { border-top: 0; }
.calday.other { background: var(--porcelain); }
.calday.other .calnum { color: var(--mist); }
.calnum { font: 500 .95rem var(--serif); padding: 2px 4px; }
.calday.today .calnum span[aria-hidden] { background: var(--claret); color: #fff; border-radius: 50%; display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -2px 0 0 -4px; }
.calevent { display: block; font-size: .78rem; line-height: 1.3; padding: 3px 6px; border-radius: 4px; text-decoration: none; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--ink-2); background: var(--porcelain); }
.calevent b { font-weight: 600; }
.calevent.due { border-left-color: var(--claret); background: var(--claret-soft); }
.calevent.draft { border-left-color: var(--amber); background: var(--amber-soft); }
.calevent.cancelled { text-decoration: line-through; color: var(--mist); }
.calevent:hover { color: var(--claret); }
.calkey .calevent { display: inline-block; margin-right: 8px; }
.calkey { margin-top: 12px; }
@media (max-width: 760px) {
  /* A phone shows the month as a list of the days that have something on. */
  .calnames { display: none; }
  .calrow { display: block; }
  .calday { min-height: 0; border-left: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; padding: 10px 12px; }
  .calday.empty { display: none; }
  .calday .calnum { width: 100%; }
  .calday .calnum .sr { position: static; width: auto; height: auto; clip: auto; font-family: var(--sans); font-size: .9rem; font-weight: 600; }
  .calday .calnum span[aria-hidden] { display: none; }
  .calevent { white-space: normal; width: 100%; font-size: .9rem; padding: 6px 8px; }
}

/* ---------- notes and highlights on papers ---------- */
#annstatus { order: -1; text-align: right; }
.annbar { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.annbar [aria-pressed="true"] { background: var(--ink); color: #fff !important; border-color: var(--ink); }
.annlayer { position: absolute; inset: 0; pointer-events: none; }
.annotating .annlayer { pointer-events: auto; cursor: crosshair; }
[data-annmode="highlight"] .annlayer { touch-action: none; user-select: none; -webkit-user-select: none; }
.annotating .ann { pointer-events: none; }
.annhidden .annlayer { display: none; }
.ann { position: absolute; pointer-events: auto; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; }
.ann-highlight { background: rgba(255, 214, 10, .38); mix-blend-mode: multiply; border-radius: 2px; }
.ann-highlight.has-body { box-shadow: inset 0 -2px 0 rgba(176, 130, 0, .9); }
.ann-highlight.ann-shared { background: rgba(80, 160, 255, .28); }
.ann-ghost { pointer-events: none; outline: 1px dashed rgba(176, 130, 0, .9); }
.ann-note { width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50% 50% 50% 4px; background: #f5c518; color: #4a3800; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ann-note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ann-note.ann-shared, .ann-note.is-shared { background: #2f5fd0; color: #fff; }
.ann:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.annpop { position: absolute; z-index: 60; width: min(340px, calc(100vw - 16px)); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 14px; box-shadow: 0 10px 30px rgba(20,26,46,.18); }
.annpop label { display: block; font-weight: 600; margin-bottom: 6px; }
.annpop label.check { display: flex; font-weight: 400; margin-top: 8px; }
.annpop textarea { min-height: 90px; }
.annpop .annbody { white-space: pre-wrap; }
.annpop p { margin: 6px 0; }
.annbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.booknotes summary { cursor: pointer; }
.booknotes .list { margin-top: 10px; }
@media print { .annlayer { display: none; } }

/* Help: a contents rail beside a single reading column. */
.guide .lede { color: var(--slate); font-size: 1.1rem; max-width: 40rem; margin: 0 0 28px; }
.guidecols { display: grid; grid-template-columns: 220px minmax(0, 42rem); gap: 48px; align-items: start; }
.guidetoc { position: sticky; top: 24px; font-size: .92rem; }
.guidetoc h2 { font-size: 1rem; margin: 0 0 8px; }
.guidetoc ol { margin: 0; padding-left: 1.3rem; color: var(--mist); }
.guidetoc li { margin: 0 0 5px; }
.guidetoc a { color: var(--text); text-decoration: none; }
.guidetoc a:hover { color: var(--claret); text-decoration: underline; }
.prose { font-size: 1.02rem; line-height: 1.65; }
.prose section { border-top: 1px solid var(--rule); padding-top: 22px; margin-bottom: 30px; scroll-margin-top: 20px; }
.prose section:first-child { border-top: 0; padding-top: 0; }
.prose h2 { font-size: 1.45rem; margin: 0 0 12px; }
.prose p, .prose li { margin: 0 0 10px; }
.prose ol, .prose ul { padding-left: 1.35rem; margin: 0 0 12px; }
.prose dl { margin: 0; }
.prose dt { font-weight: 600; margin-top: 14px; }
.prose dd { margin: 3px 0 0; color: var(--slate); }
.prose em { font-style: normal; font-weight: 600; }
@media (max-width: 960px) {
  .guidecols { grid-template-columns: 1fr; gap: 20px; }
  .guidetoc { position: static; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 16px 18px; }
}
@media print { .guidetoc { display: none; } .guidecols { display: block; } .prose section { break-inside: avoid-page; } }

/* Search: a field in the rail, and a page of grouped results. */
.railsearch { padding: 0 16px 8px; }
.railsearch input { width: 100%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #fff; padding: 8px 11px; font: 400 .9rem var(--sans); }
.railsearch input::placeholder { color: #8e97b0; }
.railsearch input:focus { outline: 2px solid var(--focus); outline-offset: 1px; background: rgba(255,255,255,.12); }
@media (max-width: 960px) { .side .railsearch { display: none; } .side.open .railsearch { display: block; } }
.searchbar { display: flex; gap: 8px; max-width: 44rem; margin: 6px 0 6px; }
.searchbar input { flex: 1; min-width: 0; font-size: 1.05rem; }
.searchgroup h2 { font-size: 1.2rem; }
.snippet { margin: 6px 0 0; color: var(--slate); font-size: .9rem; line-height: 1.5; }
mark { background: var(--amber-soft); color: inherit; padding: 0 1px; border-radius: 2px; }

/* Signatures */
.alert.ok { border-left-color: var(--green); }
code.hash { font-size: .78rem; word-break: break-all; }
.signedby { margin-top: 1.5rem; }
.signedby .sigline { font-size: 1.6rem; margin-top: .6rem; }

/* Discussions */
.narrow { max-width: 860px; }
.thread { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0; }
.post { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 16px 20px; margin-bottom: 12px; scroll-margin-top: 20px; }
.post:target { border-color: var(--rule-strong); box-shadow: inset 3px 0 0 var(--claret); }
.posthead { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.postbody { line-height: 1.6; overflow-wrap: anywhere; }
.postactions { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.post textarea { width: 100%; }

/* Engagement */
.meter { display: inline-block; vertical-align: middle; width: 90px; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; margin-right: 8px; }
.meter span { display: block; height: 100%; background: var(--green); }
table.data tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
