/* Solvane — site styles
 * The page wears the time of day: sections carry data-tone (day, noon, golden, dusk, night)
 * and site.js sets the tone of the one in the middle of the screen on <body>.
 */

@property --paper { syntax: "<color>"; inherits: true; initial-value: #f1ece2; }
@property --paper-2 { syntax: "<color>"; inherits: true; initial-value: #e9e2d4; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #14201a; }
@property --ink-2 { syntax: "<color>"; inherits: true; initial-value: #48544d; }
@property --ink-3 { syntax: "<color>"; inherits: true; initial-value: #69716a; }
@property --line { syntax: "<color>"; inherits: true; initial-value: rgba(20, 32, 26, 0.13); }
@property --line-strong { syntax: "<color>"; inherits: true; initial-value: rgba(20, 32, 26, 0.24); }

:root {
  --paper: #f1ece2;
  --paper-2: #e9e2d4;
  --paper-3: #ddd4c2;
  --ink: #14201a;
  --ink-2: #48544d;
  --ink-3: #69716a;
  --line: rgba(20, 32, 26, 0.13);
  --line-strong: rgba(20, 32, 26, 0.24);
  --accent: #e0532a;
  --accent-ink: #b8401b;
  --sage: #5f9150;
  --night: #0f1612;

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 10px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(80px, 11vw, 150px);
}

/* ---------- tones ---------- */
body[data-tone="noon"] { --paper: #f5f1e8; --paper-2: #ece6d9; }
body[data-tone="golden"] { --paper: #efe1c9; --paper-2: #e6d3b5; --ink-2: #4f4a3d; --ink-3: #75695a; --line: rgba(70, 48, 20, 0.15); --line-strong: rgba(70, 48, 20, 0.28); }
body[data-tone="dusk"], body[data-tone="night"] {
  --paper: #1b201c; --paper-2: #242a25; --ink: #ece6da; --ink-2: rgba(236, 230, 218, 0.74); --ink-3: rgba(236, 230, 218, 0.52);
  --line: rgba(236, 230, 218, 0.13); --line-strong: rgba(236, 230, 218, 0.28);
}
body[data-tone="night"] { --paper: #0e1512; --paper-2: #16201b; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; background: #f1ece2; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: --paper 0.9s ease, --paper-2 0.9s ease, --ink 0.9s ease, --ink-2 0.9s ease, --ink-3 0.9s ease, --line 0.9s ease, --line-strong 0.9s ease;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: 1296px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.sm { display: none; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px; text-decoration: none; }
.skip:focus { left: 16px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-head.is-scrolled { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; height: 68px; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 21px; letter-spacing: -0.025em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .nav-cta { display: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 10px 0 10px 12px; cursor: pointer; font-size: 15px; color: var(--ink); }
.menu-btn span { display: inline-block; width: 18px; height: 10px; margin-left: 8px; vertical-align: -1px; background: linear-gradient(var(--ink), var(--ink)) top / 100% 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) bottom / 100% 1.5px no-repeat; transition: transform .2s; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 6px;
  font: 500 15px/1 var(--sans); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; transition: opacity .2s, border-color .2s;
}
.btn:hover { opacity: .88; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { opacity: 1; border-color: var(--ink); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.arrow { display: inline-block; transition: transform .2s ease; }
a:hover > .arrow, button:hover > .arrow { transform: translateX(3px); }
.link { text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; transition: border-color .2s; }
.link:hover { border-color: var(--ink); }

/* ---------- type ---------- */
.display {
  font-size: clamp(46px, 7.4vw, 108px);
  line-height: 0.97;
  letter-spacing: -0.042em;
  font-weight: 500;
  font-variation-settings: "wdth" 92;
}
.h2 {
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 94;
}
.h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.12; letter-spacing: -0.025em; }
.lede { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-2); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8.5vw, 124px); padding-bottom: clamp(36px, 4.5vw, 60px); }
.hero .display { max-width: 11.5ch; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; margin-top: clamp(28px, 3.5vw, 44px); flex-wrap: wrap; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- the grid demo (always drawn in daylight colors) ---------- */
.vpp {
  --paper: #f1ece2; --paper-2: #e9e2d4; --ink: #14201a; --ink-2: #48544d; --ink-3: #69716a;
  --line: rgba(20, 32, 26, 0.13); --line-strong: rgba(20, 32, 26, 0.24);
  color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--night); isolation: isolate;
}
.vpp-stage { position: relative; height: clamp(440px, 45vw, 640px); background: var(--paper-2); }
.vpp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.vpp-card {
  position: absolute; z-index: 2;
  background: rgba(241, 236, 226, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 1px 0 rgba(20, 32, 26, .04), 0 12px 32px -18px rgba(20, 32, 26, .35);
}
.vpp-readout { top: 18px; left: 18px; width: 272px; padding: 16px 18px 14px; }
.vpp-time { font-family: var(--mono); font-size: 30px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.vpp-phase { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; line-height: 1.35; min-height: 38px; }
.vpp-phase i { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--ink-3); transition: background .3s; }
.vpp-phase[data-phase="discharge"] i { background: var(--accent); }
.vpp-phase[data-phase="charge"] i { background: var(--sage); }
.vpp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.vpp-stats dt { font-size: 12px; color: var(--ink-3); }
.vpp-stats dd { margin: 2px 0 0; font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.vpp-legend { left: 18px; bottom: 18px; padding: 10px 14px; display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); max-width: calc(100% - 36px); }
.vpp-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.vpp-legend i { width: 7px; height: 7px; border-radius: 1.5px; }
.vpp-legend .per { display: inline; color: var(--ink-3); }
.vpp-legend .per b { font-weight: 500; color: var(--ink-2); }
.vpp-meta { top: 18px; right: 18px; padding: 8px 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

.vpp-chart { position: relative; background: var(--paper); border-top: 1px solid var(--line); padding: 14px 18px 6px; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.vpp-chart:focus-visible { outline-offset: -4px; }
.vpp-chart-head { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--ink-2); }
.vpp-chart-head .key { display: inline-flex; align-items: center; gap: 8px; }
.vpp-chart-head .key svg { width: 22px; height: 6px; }
.vpp-chart-head .hint { margin-left: auto; color: var(--ink-3); }
.vpp-play { background: none; border: 1px solid var(--line-strong); border-radius: 5px; height: 28px; padding: 0 10px 0 9px; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.vpp-play:hover { border-color: var(--ink); }
.vpp-play svg { width: 9px; height: 10px; }
.vpp-chart svg.plot { width: 100%; height: 168px; margin-top: 6px; overflow: visible; }
.plot text { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); }

.vpp-caption { display: flex; justify-content: space-between; gap: 8px 24px; margin-top: 16px; font-size: 14px; color: var(--ink-3); flex-wrap: wrap; }

/* ---------- the day, hour by hour ---------- */
.hour { padding-block: clamp(96px, 12vw, 176px); }
.hour + .hour { padding-top: 0; }
.hour-grid { display: grid; grid-template-columns: 3fr 9fr; gap: 28px clamp(40px, 6vw, 96px); align-items: start; }
.hour-stamp { position: sticky; top: 108px; }
.clock { display: block; font-family: var(--mono); font-size: clamp(30px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.hour-stamp span { display: block; margin-top: 12px; font-size: 15px; color: var(--ink-3); }
.hour-body { max-width: 820px; }
.hour-body > .h2 { max-width: 17ch; }
.hour-body > .lede { margin-top: 24px; max-width: 52ch; }
.hour-figure { margin-top: clamp(40px, 5vw, 64px); }

/* 6 AM: the gap */
.gap { display: grid; gap: 14px; }
.gap-row { display: grid; grid-template-columns: 140px 1fr 96px; gap: 16px; align-items: center; font-size: 14px; color: var(--ink-2); }
.gap-row b { font-family: var(--mono); font-weight: 400; font-size: 14px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.gap-bar { position: relative; height: 12px; border-radius: 2px; background: var(--paper-2); overflow: hidden; }
.gap-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 2px; }
.gap-bar .over { left: auto; background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, rgba(224, 83, 42, .35) 3px 6px); border-radius: 0 2px 2px 0; }
.gap-note { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.gap-note b { color: var(--accent-ink); font-weight: 500; }

/* 12:30 PM: charge */
.soc { display: grid; gap: 0; max-width: 640px; }
.soc li { display: grid; grid-template-columns: 96px 1fr 56px; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.soc li:last-child { border-bottom: 1px solid var(--line); }
.soc time, .soc b { font-family: var(--mono); font-weight: 400; font-variant-numeric: tabular-nums; }
.soc time { color: var(--ink-3); }
.soc b { text-align: right; }
.soc .bar { height: 8px; border-radius: 4px; background: var(--paper-2); position: relative; overflow: hidden; }
.soc .bar i { position: absolute; inset: 0 auto 0 0; background: var(--sage); border-radius: 4px; }
.soc .bar s { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--ink); text-decoration: none; }
.soc-key { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }

/* notifications */
.notes { display: grid; gap: 12px; max-width: 440px; }
.note { display: grid; grid-template-columns: 38px 1fr auto; gap: 4px 14px; align-items: start; padding: 14px 16px; background: color-mix(in srgb, #fffdf8 70%, var(--paper)); color: #14201a; border: 1px solid rgba(20, 32, 26, .12); border-radius: 14px; box-shadow: 0 16px 40px -28px rgba(20, 32, 26, .5); }
.note .ico { grid-row: span 2; width: 38px; height: 38px; border-radius: 9px; background: #14201a; display: grid; place-items: center; }
.note .ico svg { width: 22px; height: 22px; }
.note b { font-weight: 600; font-size: 14px; }
.note time { font-size: 12.5px; color: #69716a; }
.note p { grid-column: 2 / 4; font-size: 14.5px; line-height: 1.4; color: #48544d; }
.hour-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(32px, 5vw, 72px); align-items: start; }
.hour-pair.wide { grid-template-columns: 1.5fr 1fr; }
body[data-tone="dusk"] .note, body[data-tone="night"] .note { background: rgba(236, 230, 218, 0.07); color: #ece6da; border-color: rgba(236, 230, 218, 0.14); box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body[data-tone="dusk"] .note p, body[data-tone="night"] .note p { color: rgba(236, 230, 218, .74); }
body[data-tone="dusk"] .note time, body[data-tone="night"] .note time { color: rgba(236, 230, 218, .5); }
body[data-tone="dusk"] .note .ico, body[data-tone="night"] .note .ico { background: #1e2a24; box-shadow: inset 0 0 0 1px rgba(236, 230, 218, .12); }
.note { transition: background-color .9s ease, color .9s ease, border-color .9s ease; }

.checks li { position: relative; padding: 14px 0 14px 30px; border-top: 1px solid var(--line); color: var(--ink-2); }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 12px; height: 7px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }
.checks b { color: var(--ink); font-weight: 500; }

/* 7 PM: quote and tonight's log */
.quote { margin: 0; }
* + .quote { margin-top: clamp(40px, 5vw, 64px); }
.quote blockquote { margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.18; letter-spacing: -0.03em; font-variation-settings: "wdth" 95; text-indent: -0.42em; max-width: 24em; }
.quote figcaption { margin-top: 28px; display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--ink-2); }
.quote figcaption b { color: var(--ink); font-weight: 500; }
.quote .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); font-size: 13px; font-weight: 600; flex: none; }

.tonight { margin-top: clamp(56px, 7vw, 96px); }
.tonight h3 { font-size: 15px; font-weight: 400; color: var(--ink-3); margin-bottom: 14px; }
.log { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.log th { text-align: left; font-weight: 400; font-size: 13px; color: var(--ink-3); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.log td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.log td.m { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.log th:last-child, .log td:last-child { text-align: right; padding-right: 0; }
.log .u { font-size: 17px; letter-spacing: -0.01em; }
.log .where { color: var(--ink-3); }
.log .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 10px rgba(255, 116, 68, .8); }
.log-foot { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }

/* 9:30 PM: the ledger of the whole fleet */
.tally { display: grid; max-width: 640px; }
.tally li { display: grid; grid-template-columns: minmax(150px, 190px) 1fr; gap: 20px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); }
.tally li:last-child { border-bottom: 1px solid var(--line); }
.tally b { font-weight: 500; font-size: clamp(30px, 3vw, 42px); letter-spacing: -0.045em; line-height: 1; font-variation-settings: "wdth" 90; font-variant-numeric: tabular-nums; }
.tally span { color: var(--ink-2); }

/* 2 AM: the settlement slip */
.slip { max-width: 560px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 22px 24px 20px; font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.slip-head { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-3); padding-bottom: 14px; border-bottom: 1px dashed var(--line-strong); }
.slip dl { margin: 0; }
.slip dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; }
.slip dt { color: var(--ink-2); }
.slip dd { margin: 0; color: var(--ink); text-align: right; }
.slip .total { border-top: 1px dashed var(--line-strong); margin-top: 6px; padding-top: 14px; }
.slip .total dd { color: var(--ink); font-size: 15px; }
.slip .ok { color: #8fb57a; }
.slip-foot { margin-top: 12px; color: var(--ink-3); font-size: 12.5px; }

/* the end of the day */
.close { padding-block: clamp(72px, 10vw, 150px) clamp(96px, 12vw, 176px); border-top: 1px solid var(--line); }
.close .display { font-size: clamp(42px, 6.6vw, 96px); max-width: 13ch; }
.close-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px 48px; flex-wrap: wrap; margin-top: clamp(28px, 3.5vw, 44px); }

/* ---------- product: the console ---------- */
.page-hero { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(40px, 5vw, 72px); }
.page-hero .display { font-size: clamp(42px, 6.4vw, 92px); max-width: 13ch; }
.page-hero .lede { margin-top: 28px; }

.console { background: #fbf9f4; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: 0 60px 100px -70px rgba(20, 32, 26, .55), 0 2px 0 rgba(20, 32, 26, .03); font-size: 13px; }
.console-bar { display: flex; align-items: center; gap: 18px; height: 54px; padding: 0 16px 0 18px; border-bottom: 1px solid var(--line); background: #f6f2ea; }
.console-bar .mk { width: 20px; height: 20px; flex: none; }
.console-bar .org { white-space: nowrap; color: var(--ink-2); }
.console-bar .org b { color: var(--ink); font-weight: 500; }
.tabs { display: flex; gap: 2px; margin-left: 10px; height: 100%; }
.tab { position: relative; background: none; border: 0; padding: 0 14px; height: 100%; font-size: 14px; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--accent); }
.console-bar .clock-sm { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.panel { padding: 22px; min-height: 470px; }
.panel[hidden] { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--ink-3); flex-wrap: wrap; }
.panel-head b { color: var(--ink); font-weight: 500; font-size: 15px; }

.console-note { display: grid; grid-template-columns: 5fr 7fr; gap: 24px clamp(40px, 6vw, 96px); padding-top: clamp(36px, 4.5vw, 56px); }
.console-note[hidden] { display: none; }
.console-note .h3 { max-width: 18ch; }
.console-note p { color: var(--ink-2); max-width: 56ch; }
.console-note ul { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; font-size: 15px; color: var(--ink-2); }
.console-note li b { color: var(--ink); font-weight: 500; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg span { padding: 4px 9px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.seg span + span { border-left: 1px solid var(--line); }
.seg .on { background: var(--ink); color: var(--paper); }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--accent-ink); padding: 3px 8px; border: 1px solid rgba(224, 83, 42, .35); border-radius: 5px; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.app-grid { display: grid; grid-template-columns: 1fr 210px; gap: 22px; }
.app-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 8px; margin: 0; }
.app-stats div { padding: 12px 14px; }
.app-stats div + div { border-left: 1px solid var(--line); }
.app-stats dt, .side-stat dt { font-size: 11.5px; color: var(--ink-3); }
.app-stats dd, .side-stat dd { margin: 4px 0 0; font-family: var(--mono); font-size: 17px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.side { margin: 0; }
.side-stat { padding: 12px 0; border-top: 1px solid var(--line); }
.side-stat:first-child { border-top: 0; padding-top: 0; }
.side-stat dd small { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0; }
.console svg.chart { width: 100%; height: auto; overflow: visible; }
.console svg.chart text { font-family: var(--mono); font-size: 8.5px; fill: var(--ink-3); }
.chart-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { width: 10px; height: 10px; border-radius: 2px; }

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 400; font-size: 11.5px; color: var(--ink-3); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td.m { font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.02em; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; text-align: right; }
.bar-s { display: inline-block; width: 64px; height: 5px; border-radius: 3px; background: var(--paper-3); position: relative; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar-s i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.ok { color: #4e6b3c; }
.table-scroll { overflow-x: auto; }
.month { margin-top: 22px; }
.panel-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--ink-3); font-size: 12px; flex-wrap: wrap; }
.panel-foot .exports { display: flex; gap: 6px; flex-wrap: wrap; }
.panel-foot .exports span { font-family: var(--mono); font-size: 11px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink-2); }

/* phone inside the Homes panel */
.homes-view { display: grid; grid-template-columns: auto minmax(0, 400px); gap: clamp(32px, 6vw, 96px); align-items: center; justify-content: center; padding: 8px 0; }
.phone { width: 280px; aspect-ratio: 300 / 620; border-radius: 44px; background: #0c120f; padding: 10px; box-shadow: 0 50px 80px -50px rgba(20, 32, 26, .7); }
.phone-screen { position: relative; height: 100%; border-radius: 35px; background: #faf7f1; overflow: hidden; padding: 16px 20px 20px; display: flex; flex-direction: column; }
.phone-status { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; padding: 2px 8px 0; }
.phone-island { position: absolute; top: 10px; left: 50%; width: 88px; height: 25px; border-radius: 14px; background: #0c120f; transform: translateX(-50%); }
.phone-app-head { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.phone-app-head .brand { font-size: 16px; gap: 7px; }
.phone-app-head .brand svg { width: 19px; height: 19px; }
.phone h4 { margin-top: 20px; font-size: 21px; letter-spacing: -0.03em; line-height: 1.1; font-weight: 500; }
.phone .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.ring { position: relative; width: 156px; height: 156px; margin: 20px auto 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-family: var(--mono); font-weight: 400; font-size: 32px; letter-spacing: -0.05em; line-height: 1; }
.ring-label span { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.phone-rows { margin-top: auto; }
.phone-rows div { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.phone-rows div span:last-child { font-family: var(--mono); letter-spacing: -0.02em; }
.phone-btn { margin-top: 12px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 14px; font-weight: 500; }
.homes-aside { display: grid; gap: 22px; max-width: 380px; }
.homes-aside dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; }
.homes-aside dl div { padding: 12px 14px; }
.homes-aside dl div:nth-child(even) { border-left: 1px solid var(--line); }
.homes-aside dl div:nth-child(n+3) { border-top: 1px solid var(--line); }
.homes-aside dt { font-size: 11.5px; color: var(--ink-3); }
.homes-aside dd { margin: 4px 0 0; font-family: var(--mono); font-size: 16px; letter-spacing: -0.02em; }

/* datasheet */
.sheet { margin-top: clamp(96px, 12vw, 168px); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 40px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--ink); }
.sheet-head .lede { max-width: 44ch; }
.sheet dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(40px, 6vw, 96px); }
.sheet dl div { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.sheet dt { color: var(--ink-3); font-size: 15px; }
.sheet dd { margin: 0; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; flex-wrap: wrap; margin-block: clamp(96px, 12vw, 168px) clamp(64px, 8vw, 112px); padding-block: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next .h2 { font-size: clamp(28px, 3.4vw, 46px); }

/* ---------- company: the log ---------- */
.banner { margin: 0 auto; }
.banner img { width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: cover; border-radius: var(--radius); background: var(--night); }
.banner figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

.log-book { padding-top: clamp(80px, 10vw, 140px); }
.entry { display: grid; grid-template-columns: 3fr 9fr; gap: 16px clamp(40px, 6vw, 96px); position: relative; }
.entry + .entry { margin-top: 0; }
.entry-date { position: relative; padding: 4px 0 0 30px; font-family: var(--mono); font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.4; }
.entry-date::before { content: ""; position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border: 1.4px solid var(--ink); border-radius: 1px; background: var(--paper); }
.entry-date::after { content: ""; position: absolute; left: 4.6px; top: 10.6px; width: 3.8px; height: 3.8px; background: var(--ink); }
.entry::before { content: ""; position: absolute; left: 6.5px; top: 22px; bottom: -6px; width: 1px; background: var(--line-strong); }
.entry:last-child::before { display: none; }
.entry-body { padding-bottom: clamp(56px, 7vw, 96px); max-width: 760px; }
.entry-body h2 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -0.03em; font-variation-settings: "wdth" 94; max-width: 22ch; }
.entry-body p { margin-top: 18px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.entry-body .rule-born { margin-top: 22px; padding: 14px 0 0 18px; border-left: 2px solid var(--accent); padding-top: 0; color: var(--ink); font-size: 16px; }
.entry-body .rule-born span { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 2px; }
.entry.is-big .entry-body h2 { font-size: clamp(34px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -0.038em; max-width: 16ch; }
.figs { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 26px; }
.figs div b { display: block; font-weight: 500; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.figs div span { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-3); }

.people { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.people li { display: grid; grid-template-columns: 36px 1fr; gap: 0 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.people .av { width: 36px; height: 36px; grid-row: span 2; }
.people b { font-weight: 500; font-size: 16px; }
.people span { font-size: 14px; color: var(--ink-3); }
.rules { margin-top: 30px; }
.rules li { padding: 16px 0; border-top: 1px solid var(--line); }
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules b { display: block; font-weight: 500; font-size: 18px; letter-spacing: -0.015em; }
.rules span { display: block; margin-top: 4px; color: var(--ink-2); font-size: 15.5px; }
.roles { margin-top: 30px; }
.roles a { display: grid; grid-template-columns: 1fr 200px 24px; gap: 20px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; transition: padding .25s ease; }
.roles li:last-child a { border-bottom: 1px solid var(--line); }
.roles a:hover { padding-left: 8px; }
.roles b { font-weight: 500; font-size: 18px; letter-spacing: -0.015em; }
.roles .team-name { display: block; font-size: 14px; color: var(--ink-3); margin-top: 2px; font-weight: 400; letter-spacing: 0; }
.roles .loc { color: var(--ink-2); font-size: 15px; }
.roles .arrow { justify-self: end; color: var(--ink-3); }
.roles a:hover .arrow { color: var(--accent); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 7fr 4fr; gap: 56px clamp(40px, 7vw, 120px); align-items: start; padding-bottom: var(--section); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; color: var(--ink-2); }
.field label small { color: var(--ink-3); font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: rgba(255, 253, 248, .55); border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 12px 14px; transition: border-color .15s, background .15s; appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2314201a' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(20, 32, 26, .4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fffdf8; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.form-foot p { font-size: 13.5px; color: var(--ink-3); max-width: 44ch; }
.form-status { grid-column: 1 / -1; font-size: 15px; color: var(--ink-2); min-height: 1.5em; }
.aside-list { margin: 0; }
.aside-list > div { padding: 20px 0; border-top: 1px solid var(--line); }
.aside-list dt { font-size: 14px; color: var(--ink-3); }
.aside-list dd { margin: 6px 0 0; }

/* ---------- footer ---------- */
.site-foot { padding: 64px 0 40px; border-top: 1px solid var(--line); }
.foot-top { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.foot-top p { color: var(--ink-2); max-width: 44ch; margin-top: 16px; font-size: 15px; }
.foot-nav { display: flex; gap: 28px; font-size: 15px; }
.foot-nav a { text-decoration: none; color: var(--ink-2); }
.foot-nav a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; font-size: 13px; color: var(--ink-3); }
.foot-bottom a { text-decoration: none; color: var(--ink-2); }
.foot-bottom a:hover { color: var(--ink); }

/* ---------- 404 ---------- */
.nf { min-height: 62vh; display: grid; align-content: center; padding-block: 96px; }
.nf .mono { color: var(--ink-3); font-size: 14px; margin-bottom: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-grid .side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .side-stat, .side-stat:first-child { border-top: 1px solid var(--line); padding-top: 12px; }
  .hour-pair, .hour-pair.wide { grid-template-columns: 1fr; }
  .console-bar .clock-sm { display: none; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .head-cta { display: none; }
  .site-head.open { background: var(--paper); border-bottom-color: var(--line); }
  .site-head.open .nav { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 4px var(--gutter) 28px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-head.open .nav a { font-size: 26px; letter-spacing: -0.025em; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-head.open .nav .nav-cta { display: flex; margin-top: 22px; border: 0; font-size: 16px; color: var(--paper); padding: 0; }
  .site-head.open .menu-btn span { transform: scaleY(.15); }

  .hour-grid, .entry, .contact-grid, .console-note { grid-template-columns: 1fr; }
  .hour-stamp { position: static; display: flex; align-items: baseline; gap: 14px; }
  .hour-stamp span { margin-top: 0; }
  .entry { gap: 10px; }
  .entry-body { padding-left: 30px; }
  .entry::before { bottom: 0; }
  .homes-view { grid-template-columns: 1fr; justify-items: center; }
  .homes-aside { width: 100%; }
  .sheet dl { grid-template-columns: 1fr; }
  .roles a { grid-template-columns: 1fr 24px; }
  .roles .loc { grid-column: 1; grid-row: 2; margin-top: -10px; }
  .roles .arrow { grid-row: 1 / span 2; align-self: center; }
  .foot-top { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .lg { display: none; }
  .sm { display: inline; }
  .vpp-stage { height: 560px; }
  .vpp-readout { top: 10px; left: 10px; right: 10px; width: auto; padding: 12px 14px 10px; display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: center; }
  .vpp-time { font-size: 24px; }
  .vpp-phase { margin-top: 0; min-height: 0; font-size: 13px; }
  .vpp-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; padding-top: 10px; }
  .vpp-stats dt { font-size: 11px; }
  .vpp-stats dd { font-size: 13.5px; }
  .vpp-meta { display: none; }
  .vpp-legend { left: 10px; bottom: 10px; right: 10px; max-width: none; padding: 8px 12px; gap: 6px 14px; font-size: 11.5px; }
  .vpp-chart { padding: 12px 12px 4px; }
  .vpp-chart-head { gap: 14px; font-size: 12px; flex-wrap: nowrap; }
  .vpp-chart-head .hint { display: none; }
  .vpp-chart-head .vpp-play { margin-left: auto; }
  .vpp-chart svg.plot { height: 150px; }

  .gap-row { grid-template-columns: 1fr 78px; gap: 6px 12px; }
  .gap-row > span { grid-column: 1 / -1; }
  .gap-row .gap-bar { grid-column: 1; }
  .soc li { grid-template-columns: 76px 1fr 44px; gap: 12px; }
  .tally li { grid-template-columns: 1fr; gap: 6px; }
  .log .where { display: none; }
  .log .u { font-size: 15.5px; }
  .people { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }

  .console { border-radius: 12px; }
  .console-bar { height: auto; flex-wrap: wrap; gap: 0; padding: 12px 14px 0; }
  .console-bar .org { flex: 1; }
  .tabs { order: 3; width: calc(100% + 28px); margin: 10px -14px 0; padding: 0 4px; overflow-x: auto; height: 46px; border-top: 1px solid var(--line); scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 0 10px; font-size: 13.5px; }
  .tab[aria-selected="true"]::after { left: 10px; right: 10px; }
  .panel { padding: 14px; min-height: 0; }
  .app-stats { grid-template-columns: 1fr 1fr; }
  .app-stats div:nth-child(3) { border-left: 0; }
  .app-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .app-grid .side { grid-template-columns: 1fr; gap: 0; }
  .console svg.chart text { font-size: 19px; }
  .console svg.chart .opt { display: none; }
  .hide-sm { display: none; }
  .phone { width: 260px; }
  .sheet dl div { grid-template-columns: 1fr; gap: 6px; }
  .banner img { aspect-ratio: 5 / 4; }
  .foot-nav { flex-wrap: wrap; gap: 14px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
