/* Capture & Keep · Control Centre — structural pattern borrowed from
   guavas-rebuild-v2 (site-index sidebar, v2-surface rows, group headers),
   retthemed to the existing Kept Words board palette (bottle green / brass
   on warm paper) so this hub reads as the same family, not as Guavas. */

:root {
  --paper: #F7F4EE; --paper-sunken: #EFEAE0; --paper-raised: #FFFFFF;
  --ink: #24221E; --ink-soft: #5E5A51; --ink-faint: #5E5A51;
  --line: #E2DCD0; --line-strong: #CFC7B4;
  --accent: #3F5943; --accent-soft: #E9EFE8; --accent-line: #C3D4C7;
  --brass: #8A6A1C; --brass-soft: #F5EEDB; --brass-line: #E3D2A0;
  --ok: #2E7D32; --ok-bg: #E7F1E7; --ok-line: #B9D8BA;
  --warn: #B26A00; --warn-bg: #F7EDDA; --warn-line: #E3C88A;
  --risk: #B3372E; --risk-bg: #F8E7E5; --risk-line: #E3B7AC;
  --shadow: 0 1px 2px rgba(36,34,30,.06), 0 6px 20px rgba(36,34,30,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1A1917; --paper-sunken: #201F1B; --paper-raised: #232220;
    --ink: #EAE7DF; --ink-soft: #A9A79C; --ink-faint: #8B8A7E;
    --line: #383630; --line-strong: #4A473E;
    --accent: #8FB395; --accent-soft: #23301F; --accent-line: #3A4E3E;
    --brass: #CBA84E; --brass-soft: #312B1A; --brass-line: #4A3E20;
    --ok: #7FC383; --ok-bg: #24312426; --ok-line: #3a4a3a;
    --warn: #E0A64F; --warn-bg: #3a2f1a66; --warn-line: #4a3d22;
    --risk: #E08078; --risk-bg: #3b232166; --risk-line: #4a2d2a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --paper: #1A1917; --paper-sunken: #201F1B; --paper-raised: #232220;
  --ink: #EAE7DF; --ink-soft: #A9A79C; --ink-faint: #8B8A7E;
  --line: #383630; --line-strong: #4A473E;
  --accent: #8FB395; --accent-soft: #23301F; --accent-line: #3A4E3E;
  --brass: #CBA84E; --brass-soft: #312B1A; --brass-line: #4A3E20;
  --ok: #7FC383; --ok-bg: #24312426; --ok-line: #3a4a3a;
  --warn: #E0A64F; --warn-bg: #3a2f1a66; --warn-line: #4a3d22;
  --risk: #E08078; --risk-bg: #3b232166; --risk-line: #4a2d2a;
  --shadow: none;
}
:root[data-theme="light"] {
  --paper: #F7F4EE; --paper-sunken: #EFEAE0; --paper-raised: #FFFFFF;
  --ink: #24221E; --ink-soft: #5E5A51; --ink-faint: #5E5A51;
  --line: #E2DCD0; --line-strong: #CFC7B4;
  --accent: #3F5943; --accent-soft: #E9EFE8; --accent-line: #C3D4C7;
  --brass: #8A6A1C; --brass-soft: #F5EEDB; --brass-line: #E3D2A0;
  --ok: #2E7D32; --ok-bg: #E7F1E7; --ok-line: #B9D8BA;
  --warn: #B26A00; --warn-bg: #F7EDDA; --warn-line: #E3C88A;
  --risk: #B3372E; --risk-bg: #F8E7E5; --risk-line: #E3B7AC;
  --shadow: 0 1px 2px rgba(36,34,30,.06), 0 6px 20px rgba(36,34,30,.05);
}

* { box-sizing: border-box; }
body {
  margin: 0; padding: 36px 20px 100px 360px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; text-wrap: balance; }
@media (max-width: 1040px) { body { padding-left: 20px; } }
.wrap { max-width: 1100px; margin: 0 auto; }
a { color: var(--accent); }

/* ---- left sidebar: index of tiles ---- */
.site-index { position: fixed; left: 0; top: 0; bottom: 0; width: 340px; background: var(--paper-sunken);
  border-right: 1px solid var(--line); overflow-y: auto; padding: 18px 16px 40px; z-index: 20; font-size: 12.5px; }
.site-index::-webkit-scrollbar { width: 6px; }
.site-index::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
@media (max-width: 1040px) { .site-index { position: relative; width: 100%; margin-bottom: 24px; max-height: 520px; border-right: none; border-bottom: 1px solid var(--line); } }
.si-head { color: var(--accent); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 800;
  padding: 4px 6px 6px; display: flex; justify-content: space-between; align-items: baseline; }
.si-head .si-count { color: var(--ink-faint); font-size: 10px; letter-spacing: .8px; font-weight: 700; }
.si-group { margin-bottom: 12px; }
.si-group-title { font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-faint);
  font-weight: 800; margin-bottom: 4px; padding: 6px 6px 3px; border-top: 1px dashed var(--line); }
.si-group:first-of-type .si-group-title { border-top: none; padding-top: 3px; }
.si-item { display: block; padding: 7px 8px; border-radius: 5px; color: var(--ink-soft); text-decoration: none;
  line-height: 1.3; transition: background .1s; border-left: 2px solid transparent; }
.si-item:hover { background: var(--paper-raised); color: var(--ink); }
.si-item.cur { background: var(--accent-soft); border-left-color: var(--accent); color: var(--ink); }
.si-item-title { font-size: 12px; font-weight: 600; word-break: break-word; }

.back { position: fixed; top: 16px; left: 354px; color: var(--ink-soft); font-size: 13px; text-decoration: none;
  z-index: 10; background: var(--paper-raised); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.back:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 1040px) { .back { left: 20px; } }

.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); margin: 0.4rem 0 0.5rem; }
h1 span { color: var(--accent); }
.domain { font-size: 12px; color: var(--ink-soft); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; margin-top: 4px; }
.lede { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin: 14px 0 24px; max-width: 800px; }
.lede strong { color: var(--ink); font-weight: 600; }
.v2-oneliner { font-size: 14px; color: var(--ink); margin: 4px 0 16px; line-height: 1.5; }
.v2-oneliner strong { color: var(--accent); }
.v2-oneliner .sep { color: var(--line-strong); margin: 0 6px; }

.v2-grp-hd { font-size: 11px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .5px;
  margin: 24px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }

.v2-surface { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 6px; }
.v2-surface + .v2-surface { margin-top: 10px; }
.v2-rows { display: flex; flex-direction: column; }
.v2-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.v2-row:last-child { border-bottom: none; }
.v2-row:hover .v2-row-title { color: var(--accent); }
.v2-row-title { font-size: 13.5px; font-weight: 600; color: var(--ink); min-width: 220px; }
.v2-row-desc { font-size: 12.5px; color: var(--ink-soft); flex: 1; line-height: 1.45; }

.v2-note { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0;
  background: var(--paper-raised); padding: 10px 14px; margin: 14px 0; font-size: 12.5px; color: var(--ink-soft); }
.v2-note.flag { border-left-color: var(--risk); }
.v2-note strong { color: var(--ink); }

.footer { margin-top: 48px; color: var(--ink-faint); font-size: 12px; text-align: center; }

/* ---- site tree diagram (site-tree.html) ---- */
.tree-diagram { margin: 8px 0 34px; }
.td-root-row { display: flex; justify-content: center; }
.td-root { background: var(--accent); color: #fff; font-weight: 700; font-family: "Iowan Old Style", Palatino, Georgia, serif;
  padding: 9px 24px; border-radius: 999px; font-size: 14.5px; }
.td-hubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; padding-top: 22px; }
.td-hubs::before { content: ''; position: absolute; top: 0; left: 12.5%; right: 12.5%; height: 1px; background: var(--line-strong); }
.td-hub { position: relative; padding-top: 22px; }
.td-hub::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 22px; background: var(--line-strong); transform: translateX(-50%); }
.td-hub-head { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); border-radius: 6px;
  padding: 8px 10px; text-align: center; font-weight: 700; font-size: 12.5px; margin-bottom: 12px; }
.td-hub-head .count { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-faint); margin-top: 3px; }
.td-pages { border-left: 1px solid var(--line-strong); margin-left: 9px; padding-left: 13px; display: flex; flex-direction: column; gap: 9px; }
.td-page { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; font-size: 11.5px; box-shadow: var(--shadow); }
.td-page.demoted { background: transparent; border-style: dashed; box-shadow: none; opacity: .85; }
.td-page.new { border-color: var(--accent-line); border-left: 3px solid var(--accent); }
.td-page.new .td-page-name::after { content: 'NEW'; margin-left: 7px; font-size: 8px; font-weight: 800; letter-spacing: .5px; color: var(--accent); background: var(--accent-soft); border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
.td-page-name { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.td-page-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: var(--brass); margin-left: 6px; }
.td-page-row { font-size: 10.8px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }
.td-page-row b { color: var(--ink-faint); font-weight: 800; text-transform: uppercase; font-size: 8.7px; letter-spacing: .4px; margin-right: 4px; }
@media (max-width: 900px) { .td-hubs { grid-template-columns: 1fr; } .td-hubs::before, .td-hub::before { display: none; } .td-hub { padding-top: 0; margin-bottom: 22px; } }

/* ---- journey steppers (journeys.html) ---- */
.journey-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px 18px; margin: 0 0 22px; }
.journey-card.j-gift { border-top: 4px solid var(--brass); }
.journey-card.j-urgent { border-top: 4px solid var(--risk); }
.journey-card.j-bereaved { border-top: 4px solid var(--accent); }
.journey-card.j-own { border-top: 4px solid var(--warn); }
.journey-card.j-post { border-top: 4px solid var(--ok); }
.journey-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.journey-title { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 18px; font-weight: 700; color: var(--ink); }
.journey-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; font-weight: 800; color: var(--ink-faint); }
.journey-dead { background: var(--risk-bg); border: 1px dashed var(--risk-line); color: var(--risk); font-size: 11.5px;
  padding: 6px 10px; border-radius: 5px; margin: 8px 0 16px; }
.journey-dead b { text-transform: uppercase; font-size: 9px; letter-spacing: .5px; margin-right: 5px; }
.journey-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.journey-steps.steps-6 { grid-template-columns: repeat(6, 1fr); }
.journey-step { padding: 0 12px; position: relative; }
.journey-step:not(:last-child)::after { content: '\2192'; position: absolute; right: -3px; top: 12px; color: var(--line-strong); font-size: 14px; }
.js-label { font-size: 9px; text-transform: uppercase; letter-spacing: .6px; font-weight: 800; color: var(--ink-faint); margin-bottom: 5px; }
.js-body { font-size: 11.5px; color: var(--ink); line-height: 1.42; min-height: 54px; }
.js-served { margin-top: 7px; font-size: 10px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 900px) {
  .journey-steps { grid-template-columns: 1fr; }
  .journey-step { padding: 0 0 20px 16px; border-left: 1px dashed var(--line); margin-left: 4px; }
  .journey-step:not(:last-child)::after { content: '\2193'; right: auto; left: -6px; top: auto; bottom: 4px; }
}

/* ---- page blueprints (blueprints.html) ---- */
.bp-toc { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 14px 0 26px; padding: 12px 14px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px; }
.bp-toc a { font-size: 12px; color: var(--ink-soft); text-decoration: none; border-bottom: 1px dashed var(--line-strong); padding-bottom: 1px; }
.bp-toc a:hover { color: var(--accent); }
.sec2 { margin: 40px 0; }
.sec2-hd { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 7px; margin-bottom: 14px; }
.sec2-hd .idx { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-faint); }
.sec2-hd h2 { margin: 0; font-size: 19px; }
.bp { border: 1px solid var(--line); background: var(--paper-raised); border-radius: 8px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.bp > summary { cursor: pointer; list-style: none; padding: 12px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp > summary::-webkit-details-marker { display: none; }
.bp > summary::before { content: '+'; font-family: ui-monospace, monospace; font-size: 13px; color: var(--ink-faint); width: 12px; }
.bp[open] > summary::before { content: '\2212'; }
.bp > summary .bpn { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 15.5px; font-weight: 700; flex: 1 1 200px; color: var(--ink); }
.bp > summary .bpu { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--brass); }
.bp-body { padding: 0 16px 15px; border-top: 1px solid var(--line); }
.bpf { margin-top: 11px; }
.bpf-l { font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-weight: 800; margin-bottom: 4px; }
.bpf p, .bpf li { font-size: 12.8px; color: var(--ink-soft); margin: 0 0 4px; line-height: 1.55; }
.bpf ol, .bpf ul { margin: 2px 0; padding-left: 19px; }
.bpst { font-family: ui-monospace, monospace; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.bpst.LAUNCH { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.bpst.OPEN { color: var(--risk); background: var(--risk-bg); border: 1px solid var(--risk-line); }
.bpst.NEW { color: #6E5314; background: var(--brass-soft); border: 1px solid var(--brass-line); }

/* ---- banked assets (banked-assets.html) ---- */
.v2-nums { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 20px; }
.v2-num { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; min-width: 120px; }
.v2-num .n { font-size: 24px; font-weight: 700; color: var(--accent); font-family: "Iowan Old Style", Palatino, Georgia, serif; }
.v2-num .l { font-size: 11px; color: var(--ink-soft); line-height: 1.3; margin-top: 2px; }
.v2-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.v2-tbl th { text-align: left; font-size: 9.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--line-strong); padding: 7px 8px; white-space: nowrap; }
.v2-tbl td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; line-height: 1.5; color: var(--ink-soft); }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 22px; background: var(--paper-raised); }
.tw .v2-tbl { margin: 0; }
.state, .action { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.state.live, .state.ready { color: #276B2B; background: var(--ok-bg); border: 1px solid var(--ok-line); }
.state.partial { color: #8A5300; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.state.notbuilt { color: var(--ink-faint); background: var(--paper-sunken); border: 1px dashed var(--line-strong); }
.action.build, .action.new { color: #6E5314; background: var(--brass-soft); border: 1px solid var(--brass-line); }
.action.confirm { color: var(--risk); background: var(--risk-bg); border: 1px solid var(--risk-line); }

/* ---- release plan / phases (release-plan.html) ---- */
.v2-scan { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 22px; }
.v2-scan-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; }
.v2-scan-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.v2-scan-sub { font-size: 11.8px; color: var(--ink-soft); line-height: 1.45; margin-bottom: 8px; }
.v2-scan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-scan-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; }
.v2-scan-name { color: var(--ink-faint); font-weight: 600; }
.rel-phase { border: 1px solid var(--line); background: var(--paper-raised); border-radius: 8px; padding: 15px 18px; margin-bottom: 14px; }
.rel-phase h3 { margin: 0 0 4px; font-size: 16px; }
.rel-phase .rp-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.5; }
.stepbox { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 6px; display: flex; gap: 12px; background: var(--paper); }
.stepbox .num { font-family: ui-monospace, monospace; font-size: 11px; color: var(--ink-faint); flex: 0 0 20px; }
.stepbox .body p { margin: 2px 0; font-size: 12.2px; color: var(--ink-soft); line-height: 1.5; }
.stepbox .body b { color: var(--ink); }
