
:root {
  --ground: #e2e4d6; --panel: #d6d9c6; --ink: #2e2c24; --moss: #6b6e5b; --rule: #c3c7ae; --rule-strong: #a9ad96;
  --ember: #b0521a; --slate: #55677a;
  --dusk: #242c35; --dusk-panel: #2c3641; --dusk-ink: #eae1cd; --dusk-moss: #96a1ac; --dusk-rule: #3a4552; --dusk-chip: #7e93a8; --ember-glow: #d67c3c;
  --serif: 'Libertinus Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Fragment Mono', Menlo, Consolas, monospace;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --pad-x: clamp(20px, 6.6vw, 96px);
}
* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--ground); color: var(--ink); font-family: var(--serif); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; min-width: 0; }
.page > *, .grid-3 > *, .grid-2 > *, .grid-4 > *, .row > *, .gen > *, .stack > *, .chat > *, .work-hero > *, .diary > *, .card, .hero > * { min-width: 0; }
p, li, div { text-wrap: pretty; }
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }

.page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 44px var(--pad-x) 56px; flex: 1; display: flex; flex-direction: column; }
.hdr { display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px solid var(--slate); }
.brand { display: flex; align-items: center; gap: 14px; font-size: 21px; font-weight: 600; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--slate); }
.nav { display: flex; align-items: center; gap: 22px 34px; flex-wrap: wrap; }
.caps { font-size: 13.5px; letter-spacing: 0.2em; font-weight: 600; text-transform: uppercase; }
.nav a.on { border-bottom: 2px solid var(--slate); padding-bottom: 3px; }
.nav a.ember { color: var(--ember); }
.nav .divider { width: 1px; height: 16px; background: var(--slate); margin: 0 -8px; }
.eyebrow { font-size: 13.5px; letter-spacing: 0.24em; font-weight: 600; color: var(--moss); text-transform: uppercase; }
.crumbs { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 60px; }
.crumbs .sep { font-size: 13.5px; color: var(--rule-strong); }
.crumbs .here { color: var(--ink); }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--moss); }
.title { font-size: clamp(32px, 3.2vw, 40px); line-height: 1.15; margin-top: 14px; }
.intro { font-size: 18px; line-height: 1.7; max-width: 62ch; margin-top: 16px; }
.lede { font-size: 18px; line-height: 1.7; max-width: 58ch; margin-top: 24px; }
.body { font-size: 16px; line-height: 1.65; }
.small { font-size: 15px; line-height: 1.6; color: var(--moss); }
.mt-60 { margin-top: 60px; } .mt-52 { margin-top: 52px; } .mt-48 { margin-top: 48px; } .mt-44 { margin-top: 44px; } .mt-40 { margin-top: 40px; }
.rule-top { border-top: 1px solid var(--rule); }
.footer { border-top: 1px solid var(--rule); margin-top: 72px; padding-top: 22px; display: flex; justify-content: flex-end; gap: 12px; color: var(--moss); }
.footer a { color: var(--moss); }

/* home */
.hero { margin-top: 76px; display: flex; justify-content: center; align-items: center; gap: 60px; flex-wrap: wrap; }
.hero .text { max-width: 720px; min-width: 0; flex: 1 1 320px; }
.hero h1 { font-size: clamp(36px, 4.2vw, 50px); line-height: 1.14; margin-top: 16px; }
.portrait { border: 1px solid var(--slate); border-radius: 50%; padding: 10px; flex-shrink: 0; }
.portrait img { width: clamp(200px, 22vw, 300px); height: clamp(200px, 22vw, 300px); border-radius: 50%; object-fit: cover; }

/* card grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.plate { border: 1px solid var(--slate); padding: 10px; }
.plate img { width: 100%; height: 260px; object-fit: cover; }
.plate .well { background: var(--panel); height: 260px; display: flex; align-items: center; justify-content: center; }
.card h2 { font-size: 22px; } .card h2 a { text-decoration: none; }
.card.big h2 { font-size: 24px; }
.card .desc { font-size: 15px; line-height: 1.55; color: var(--moss); }
.card.big .desc { font-size: 16px; line-height: 1.65; color: var(--ink); margin-top: 8px; }
.card .status { border-top: 1px solid var(--rule); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card .status a { font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-align: right; }
.icon { width: 128px; height: 128px; }

/* ledgers */
.ledger { margin-top: 8px; display: flex; flex-direction: column; }
.row { border-top: 1px solid var(--rule); padding: 24px 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: baseline; }
.row h2 { font-size: 22px; } .row h2 span { color: var(--moss); }
.row .body { max-width: 70ch; margin-top: 8px; }
.gen { border-top: 1px solid var(--rule); padding: 16px 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: baseline; }
.gen h3 { font-size: 18px; } .gen .small { margin-top: 4px; }
.list { margin-top: 10px; display: flex; flex-direction: column; }
.list .item { border-top: 1px solid var(--rule); padding: 16px 0; font-size: 16px; line-height: 1.6; }
.stack { border-top: 1px solid var(--rule); padding: 14px 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: baseline; }
.stack .v { font-size: 15.5px; line-height: 1.65; }

/* work */
.work-hero { margin-top: 60px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: end; }
.work-hero h1 { font-size: clamp(34px, 3.6vw, 46px); line-height: 1.14; margin-top: 14px; max-width: 18ch; }
.index { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.6; }
.index a { border-top: 1px solid var(--rule); padding-top: 10px; }
.band { margin: 56px calc(-1 * var(--pad-x)) 0; padding: 48px var(--pad-x); background: var(--panel); }
.band.dusk { background: var(--dusk); color: var(--dusk-ink); padding: 40px var(--pad-x) 44px; border-top: 2px solid var(--slate); border-bottom: 2px solid var(--slate); }
.dusk .eyebrow { font-size: 12.5px; letter-spacing: 0.22em; color: var(--dusk-moss); }
.dusk .ital { font-size: 14px; font-style: italic; color: var(--dusk-moss); }
.opener { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; margin-top: 18px; max-width: 60ch; }
.chat { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.chat .q { font-size: 17px; line-height: 1.6; margin-top: 8px; }
.chat .a { font-size: 17px; line-height: 1.7; max-width: 66ch; margin-top: 8px; border-left: 2px solid var(--dusk-rule); padding-left: 18px; }
.chat .follow { font-size: 16px; font-style: italic; color: var(--dusk-moss); margin-top: 14px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; } .chips.col { flex-direction: column; }
.chip { font-size: 15px; border: 1px solid var(--dusk-chip); color: var(--dusk-ink); padding: 9px 16px; }
.askbar { display: flex; gap: 14px; align-items: stretch; margin-top: 24px; }
.askbar .in { flex: 1; border: 1px solid var(--dusk-rule); background: var(--dusk-panel); padding: 12px 16px; font-size: 16px; font-style: italic; color: var(--dusk-moss); }
.btn { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; letter-spacing: 0.2em; font-weight: 600; text-transform: uppercase; padding: 14px 30px; }
.btn.ember { background: var(--ember); color: var(--ground); } .btn.glow { background: var(--ember-glow); color: var(--dusk); padding: 0 26px; }
.btn:hover { text-decoration: none; opacity: 0.94; }
.facet .n { font-size: clamp(36px, 3.2vw, 44px); line-height: 1.1; margin-top: 12px; }
.facet .t { font-size: 15.5px; line-height: 1.6; color: var(--moss); margin-top: 10px; }
.build { border-top: 1px solid var(--rule-strong); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.build h3 { font-size: 20px; } .build .b { font-size: 15.5px; line-height: 1.6; }
.how { border-top: 1px solid var(--rule); padding-top: 16px; } .how h3 { font-size: 20px; } .how .b { font-size: 15.5px; line-height: 1.65; margin-top: 10px; }
.close { margin-top: 52px; display: flex; justify-content: space-between; align-items: center; gap: 24px 40px; flex-wrap: wrap; }
.close .small { max-width: 60ch; font-size: 16px; line-height: 1.65; } .close .small a { text-decoration: underline; text-underline-offset: 3px; }
.close .acts { display: flex; align-items: center; gap: 24px; }

/* gate */
.gate-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.gate { width: 100%; max-width: 560px; border: 1px solid var(--slate); background: var(--panel); padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px); }
.gate h1 { font-size: 32px; line-height: 1.2; margin-top: 12px; }
.gate p { font-size: 16px; line-height: 1.65; margin: 16px 0 0; max-width: 48ch; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; letter-spacing: 0.2em; font-weight: 600; color: var(--moss); text-transform: uppercase; }
.field input { font-family: var(--serif); font-size: 16px; border: 1px solid var(--rule-strong); background: var(--ground); color: var(--ink); padding: 12px 14px; border-radius: 0; }
.check { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 15.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--slate); margin: 0; }
.gate .acts { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gate .note { font-size: 14px; font-style: italic; color: var(--moss); }

/* diary */
.diary { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 48px; align-items: start; }
.diary .plate img { height: 380px; }
.caption { font-size: 14px; line-height: 1.6; color: var(--moss); font-style: italic; margin-top: 12px; }
.quote { font-size: 21px; line-height: 1.65; font-style: italic; margin-top: 14px; max-width: 52ch; }
.gur-note { font-size: 15px; color: var(--moss); margin-top: 16px; }

/* login */
.login { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; font-family: var(--sans); }
.login .left { background: var(--dusk); color: var(--dusk-ink); padding: 56px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; border-right: 2px solid var(--slate); }
.login .brand { font-family: var(--serif); } .login .brand img { border-color: var(--dusk-moss); }
.login h1 { font-family: var(--serif); font-size: clamp(34px, 3.2vw, 44px); line-height: 1.15; max-width: 24ch; }
.login .sub { font-size: 16px; line-height: 1.65; color: var(--dusk-moss); margin-top: 18px; max-width: 40ch; }
.login .fine { font-size: 13px; color: var(--dusk-moss); line-height: 1.6; }
.login .right { background: var(--ground); display: flex; align-items: center; justify-content: center; padding: 56px clamp(20px, 4vw, 56px); }
.lcard { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 40px 40px 36px; display: flex; flex-direction: column; gap: 22px; }
.lcard h2 { font-family: var(--sans); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.lcard .hint { font-size: 14.5px; color: var(--moss); margin-top: 6px; }
.lf { display: flex; flex-direction: column; gap: 8px; }
.lf .lab { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.lf .lab a { color: var(--slate); font-weight: 400; }
.lf input { font-family: var(--sans); font-size: 16px; border: 1px solid var(--rule-strong); background: var(--ground); color: var(--ink); border-radius: 10px; padding: 14px 16px; }
.lcard .check { margin-top: 0; font-size: 14px; } .lcard .check input { border-radius: 5px; }
.lbtn { background: var(--ember); color: var(--ground); font-size: 15px; font-weight: 600; text-align: center; padding: 15px; border-radius: 10px; border: 0; font-family: var(--sans); cursor: pointer; box-shadow: 0 1px 2px rgba(46,44,36,0.18); }
.lcard .fine { font-size: 13px; color: var(--moss); text-align: center; line-height: 1.6; }

/* contact */
.contact { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: start; }
.cform { display: flex; flex-direction: column; gap: 6px; }
.cform textarea { font-family: var(--serif); font-size: 16px; line-height: 1.6; border: 1px solid var(--rule-strong); background: var(--panel); color: var(--ink); padding: 12px 14px; border-radius: 0; min-height: 180px; resize: vertical; }
.cform input { background: var(--panel); }
.cform .acts { margin-top: 24px; display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.cform .btn { border: 0; cursor: pointer; font-family: var(--serif); }
.cform .msg { font-size: 15px; color: var(--moss); }
.aside { border-top: 1px solid var(--rule); padding-top: 16px; }
.aside .addr { font-size: 19px; margin-top: 10px; word-break: break-all; }
.copy { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; border: 1px solid var(--slate); padding: 8px 14px; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--serif); }
.copy:hover { text-decoration: none; background: var(--panel); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.print-only { display: none; }
@media print {
  @page { size: Letter; margin: 0.6in 0.55in; }
  html, body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .hdr .nav, .index, .band.dusk, .close .acts, .footer, .no-print { display: none !important; }
  .hdr { border-bottom-color: #2e2c24; }
  .band { background: #f1f2ea; margin: 32px 0 0; padding: 24px 28px; break-inside: avoid; }
  .row, .build, .how, .facet, .stack { break-inside: avoid; }
  .work-hero { grid-template-columns: 1fr; }
  .print-only { display: block; }
  a { text-decoration: none; }
}
@media (max-width: 1000px) {
  .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-hero { grid-template-columns: minmax(0, 1fr); }
  .work-hero { gap: 32px; align-items: start; }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .diary { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .login .left { border-right: 0; border-bottom: 2px solid var(--slate); gap: 40px; padding-top: 40px; padding-bottom: 40px; }
}
@media (max-width: 760px) {
  .page { padding-top: 28px; }
  .hdr { gap: 16px 24px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .row, .stack, .gen { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero { margin-top: 48px; gap: 36px; }
  .crumbs { margin-top: 40px; }
  .band { margin-top: 44px; }
  .lcard { padding: 28px 24px; }
}
/* print overrides come last so they beat the phone rules at paper width */
@media print {
  body { font-size: 15px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
  .row { grid-template-columns: 100px minmax(0, 1fr); gap: 6px 20px; padding: 14px 0; }
  .stack { grid-template-columns: 120px minmax(0, 1fr); gap: 6px 20px; padding: 10px 0; }
  .band { margin-top: 24px; padding: 20px 24px; break-inside: auto; }
  .band .eyebrow + .grid-4 { margin-top: 14px !important; }
  .intro, .row .body, .work-hero h1 { max-width: none; }
  .work-hero { margin-top: 28px; }
  .mt-52 { margin-top: 28px; }
  .facet .n { font-size: 30px; }
  .row h2 { font-size: 19px; } .row .body { font-size: 14.5px; line-height: 1.55; }
  .build .b, .how .b, .stack .v { font-size: 14px; line-height: 1.5; }
  .row, .build, .how, .facet, .stack { break-inside: avoid; }
}
