/* Layout: the Crypt of Echoes record page (obsidian masthead, paper reading surface, source trail), with a shelf of fourteen glasses as the data view. Single light theme, as on the site. */
:root {
  --ce-obsidian: #0B0B0D;
  --ce-parchment: #E6DFD3;
  --ce-deep-teal: #2D5154;
  --ce-echo-teal: #5E7F82;
  --ce-mist: #8EB6B8;
  --ce-candlelight: #C8B28A;
  --paper: #FAF8F4;
  --panel: #F3EFE7;
  --text: #202829;
  --muted: #596161;
  --line: #D8D2C7;
  --pill-bg: #E5EBE5;
  /* data marks */
  --ink: #0B0B0D;
  --surface: #FAF8F4;
  --water: #2D5154;
  --water-soft: #8EB6B8;
  --limit: #9A6B2F;
  --flag: #8A6A35;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --editorial: "EB Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --max: 1240px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--paper); color: var(--text); font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ce-deep-teal); text-underline-offset: 4px; }
a:hover { color: #183A3D; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ce-deep-teal); outline-offset: 3px; }
.site-header a:focus-visible, .site-footer a:focus-visible { outline-color: var(--ce-candlelight); }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; letter-spacing: -0.035em; line-height: 1.13; margin: 0; text-wrap: balance; }
.eyebrow { font-size: .63rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; color: var(--ce-deep-teal); line-height: 1.65; margin: 0; }
.mono { font-variant-numeric: tabular-nums; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: var(--max); margin: 0 auto; }

/* Header */
.site-header { background: var(--ce-obsidian); color: var(--ce-parchment); }
.topline { display: flex; justify-content: space-between; gap: 16px; padding-block: 13px 11px; border-bottom: 1px solid #292E2C; color: #A2ADA9; font-size: .59rem; letter-spacing: .17em; text-transform: uppercase; }
.topline a { font: italic .76rem var(--serif); letter-spacing: .025em; color: #BFB7A8; text-decoration: none; text-transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px 22px; }
.brand img { width: 322px; max-width: 54vw; height: auto; display: block; }
.header-search { color: var(--ce-parchment); text-decoration: none; font-size: .8rem; display: inline-flex; gap: 10px; align-items: center; }
.header-search svg { width: 18px; height: 18px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0 30px; border-top: 1px solid #303634; }
.main-nav a { font-size: .73rem; letter-spacing: .025em; color: #D7D3C9; padding: 15px 0 14px; text-decoration: none; position: relative; }
.main-nav a:hover { color: var(--ce-mist); }
.main-nav a[aria-current="page"] { color: var(--ce-mist); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ce-mist); }
@media (max-width: 640px) {
  .topline { justify-content: center; font-size: .5rem; }
  .topline a, .header-search span { display: none; }
  .main-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 17px; }
  .main-nav a { border-bottom: 1px solid #26372F; padding: 11px 4px; }
}

/* Intro */
main { padding-block: 0 72px; }
.breadcrumb { display: flex; justify-content: space-between; gap: 12px; font-size: .69rem; margin: 26px 0 40px; color: #586C67; }
.breadcrumb a { text-decoration: none; }
.record-intro { border-bottom: 1px solid var(--ce-echo-teal); padding-bottom: 28px; }
.record-intro h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); max-width: 980px; margin: 14px 0 17px; letter-spacing: -.04em; }
.lede { font-size: .95rem; max-width: 850px; line-height: 1.9; color: #596662; margin: 0 0 14px; }
.small { font-size: .77rem; color: var(--muted); line-height: 1.75; margin: 0; }

.content-section { padding: 44px 0 8px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { font-size: 1.95rem; }
.section-heading > span { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; }

/* Buttons, as on the site */
.button { display: inline-flex; align-items: center; gap: 8px; background: var(--ce-deep-teal); border: 1px solid var(--ce-deep-teal); border-radius: 2px; color: var(--paper); font: 500 .78rem/1.45 var(--sans); min-height: 44px; padding: 11px 16px; text-decoration: none; cursor: pointer; }
.button:hover { background: #1D3F41; border-color: #1D3F41; color: #fff; }
.button.secondary { background: transparent; color: var(--ce-deep-teal); border-color: #9DA89E; }
.button.secondary:hover { background: #E8ECE4; border-color: var(--ce-deep-teal); color: var(--ce-deep-teal); }

/* Shelf */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { font: 500 .74rem/1 var(--sans); min-height: 36px; padding: 9px 13px; border-radius: 2px; border: 1px solid #9DA89E; background: transparent; color: var(--ce-deep-teal); cursor: pointer; }
.tabs button:hover { background: #E8ECE4; }
.tabs button[aria-pressed="true"] { background: var(--ce-deep-teal); color: var(--paper); border-color: var(--ce-deep-teal); }
.metric-note { margin: 0; color: var(--muted); max-width: 850px; font-size: .91rem; line-height: 1.85; }
.metric-note b { color: var(--text); font-weight: 600; }
.shelf { margin-top: 28px; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
@media (max-width: 720px) { .shelf { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 18px; } }
.glass { appearance: none; border: 0; background: none; padding: 6px 0 4px; color: var(--ink); cursor: pointer; display: grid; justify-items: center; gap: 4px; border-radius: 2px; }
.glass svg { width: 100%; max-width: 64px; height: auto; display: block; overflow: visible; }
.glass .v { font: 500 .7rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); min-height: 1em; }
.glass .y { font: 500 1.05rem/1 var(--serif); }
.glass:hover { background: #F0EBE2; }
.glass[aria-current="true"] { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.glass[aria-current="true"] .y { color: var(--ce-deep-teal); font-weight: 500; }
.legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .7rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 1px; display: inline-block; }
.sw.new { background: var(--water); }
.sw.rep { background: repeating-linear-gradient(135deg, var(--water-soft) 0 3px, transparent 3px 6px); border: 1px solid var(--ce-echo-teal); }
.sw.lim { height: 0; border-top: 2px dashed var(--limit); border-radius: 0; }

/* Ledger: styled like the site's "Read this source here" panel */
.ledger { margin-top: 36px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 24px; }
.ledger-top { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: flex-end; }
.ledger-top h2 { font-size: clamp(2rem, 4vw, 2.6rem); margin-top: 6px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.ledger-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; }
@media (max-width: 760px) { .ledger-body { grid-template-columns: minmax(0, 1fr); } }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .58rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ce-deep-teal); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; background: var(--pill-bg); color: #294C47; border: 1px solid #C9D5CC; font-size: .56rem; letter-spacing: .07em; padding: 3px 7px; font-weight: 600; text-transform: uppercase; white-space: nowrap; border-radius: 2px; }
.pill.rep { background: transparent; border-style: dashed; color: var(--muted); border-color: #A9B0AA; }
.pill.none { background: #F1E8D8; border-color: #D9C6A0; color: #6E5226; }
.notes { display: grid; gap: 12px; align-content: start; }
.notes h3 { font-size: 1.35rem; }
.note { border-left: 2px solid var(--ce-candlelight); padding: 2px 0 2px 14px; margin: 0; font: 1.02rem/1.6 var(--editorial); }
.note.ok { border-left-color: var(--line); color: var(--muted); }

/* Log */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.log li:last-child { border-bottom: 1px solid var(--line); }
.log li b { font: 400 1.5rem/1.1 var(--serif); color: var(--ink); }
.log li p { margin: 0; max-width: 68ch; font: 1.05rem/1.65 var(--editorial); }
.log li button { font: 600 .67rem/1 var(--sans); color: var(--ce-deep-teal); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; white-space: nowrap; }
.log li button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Source trail: the site's record cards */
.record-card { display: flex; gap: 22px; padding: 25px 0; border-top: 1px solid var(--line); }
.record-card:last-child { border-bottom: 1px solid var(--line); }
.record-icon { width: 50px; height: 61px; flex: 0 0 50px; background: #E9E6DA; color: var(--ce-deep-teal); border: 1px solid #D4CDBF; border-radius: 2px; display: grid; place-items: center; }
.record-icon svg { width: 23px; height: 23px; }
.record-card-body { min-width: 0; flex: 1; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; font-size: .64rem; margin-bottom: 10px; color: #586664; }
.record-card h3 { font: 400 1.51rem/1.25 var(--serif); letter-spacing: -.025em; }
.record-card h3 a { color: var(--ink); text-decoration: none; }
.record-card h3 a:hover { color: var(--ce-deep-teal); }
.record-card p { font-size: .79rem; line-height: 1.8; margin: 9px 0 0; color: var(--muted); }
.record-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px 20px; font-size: .65rem; margin-top: 14px; color: var(--muted); }
.record-bottom div { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.record-bottom a { font-size: .67rem; font-weight: 600; text-decoration: none; }
@media (max-width: 520px) { .record-icon { display: none; } .record-card h3 { font-size: 1.37rem; } }

/* Method + footer */
.method { margin-top: 44px; max-width: 850px; display: grid; gap: 10px; }
.method p { margin: 0; font-size: .77rem; color: var(--muted); line-height: 1.75; }
.site-footer { background: var(--ce-obsidian); color: #AAB5B1; padding-block: 52px 22px; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; }
@media (max-width: 820px) { .footer-main { grid-template-columns: minmax(0, 1fr); } }
.footer-main img { width: 240px; max-width: 100%; height: auto; display: block; }
.footer-motto { font: 400 1.3rem/1.3 var(--serif); color: var(--ce-parchment); margin: 14px 0 0; }
.footer-motto em { color: var(--ce-mist); }
.footer-main .eyebrow { color: var(--ce-candlelight); font-size: .54rem; letter-spacing: .12em; margin: 14px 0 17px; }
.footer-main p { font-size: .8rem; }
.footer-note { color: #8A958F; font-size: .72rem !important; }
.footer-links a { color: #C3CCC5; display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #2F3631; text-decoration: none; font-size: .72rem; }
.footer-links a:hover { color: var(--ce-mist); }
.footer-links a span { color: var(--ce-candlelight); }
.footer-bottom { margin-top: 40px; padding-top: 18px; border-top: 1px solid #2F3631; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: .6rem; letter-spacing: .12em; }
.footer-bottom a { color: var(--ce-parchment); text-decoration: none; letter-spacing: 0; font-size: .64rem; }
@media (prefers-reduced-motion: no-preference) { .fill { transition: y 500ms ease, height 500ms ease; } }

.text-link{font:600 .67rem/1 var(--sans);color:var(--ce-deep-teal);background:none;border:0;padding:0;cursor:pointer}.text-link:hover{text-decoration:underline;text-underline-offset:4px}