:root {
  color-scheme: dark;
  --bg-void: #070603;
  --bg-root: #0a0906;
  --bg-ledger: #100d08;
  --bg-surface: #16130b;
  --bg-mesh: #1c1810;
  --bg-border: #251f13;
  --hairline: #352d1b;
  --text: #eee7d8;
  --text-secondary: #a99e86;
  --text-faint: #6e6450;
  --brand: #e3b341;
  --green: #5fae8c;
  --amber: #d98b3a;
  --red: #d7604a;
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --radius: 12px;
  --control: 8px;
  --canvas: 1312px;
}

:root[data-theme="daylit"] {
  color-scheme: light;
  --bg-void: #efece5;
  --bg-root: #f7f5f0;
  --bg-ledger: #f2efe8;
  --bg-surface: #fff;
  --bg-mesh: #fbfaf7;
  --bg-border: #ded8cc;
  --hairline: #c9c1b3;
  --text: #17140e;
  --text-secondary: #625e55;
  --text-faint: #80796d;
  --brand: #986605;
  --green: #28775c;
  --amber: #9b590c;
  --red: #b33b2b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg-root);
  scroll-behavior: smooth;
}

body {
  background: var(--bg-root);
  color: var(--text);
  font-family: var(--body);
  margin: 0;
  min-width: 320px;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.shell {
  margin: 0 auto;
  max-width: var(--canvas);
  width: calc(100% - 64px);
}

.nav {
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  height: 72px;
  justify-content: space-between;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  gap: 10px;
  letter-spacing: -0.02em;
}

.brand-dot,
.signal-dot {
  background: var(--brand);
  border-radius: 999px;
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.signal-dot {
  background: var(--green);
  height: 8px;
  width: 8px;
}

.nav-center,
.nav-actions {
  align-items: center;
  display: flex;
  gap: 30px;
}

.nav-center a,
.text-button {
  color: var(--text-secondary);
  font-size: 13px;
}

.button,
.nav-button {
  align-items: center;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: var(--control);
  color: var(--bg-root);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.button.secondary,
.nav-button.secondary {
  background: transparent;
  border-color: var(--hairline);
  color: var(--text);
}

.nav-button {
  min-height: 40px;
  padding: 0 18px;
}

.theme-toggle {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 8px 0;
  text-transform: uppercase;
}

.hero {
  display: flex;
  gap: 64px;
  min-height: 828px;
  padding: 88px 0 72px;
}

.hero-copy {
  display: flex;
  flex: 0 1 480px;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: var(--display);
  font-size: clamp(58px, 6.3vw, 92px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.93;
  margin-top: 22px;
}

.hero-copy > p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 25px;
  margin-top: 26px;
  max-width: 450px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 60px;
}

.hero-stat {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 18px;
  white-space: pre-line;
}

.hero-stat strong {
  color: var(--text);
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
}

.product-frame {
  align-self: center;
  background: var(--bg-ledger);
  border: 1px solid var(--bg-border);
  border-radius: 18px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
  flex: 1 1 650px;
  max-width: 700px;
  min-width: 0;
  overflow: hidden;
}

.product-head {
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  justify-content: space-between;
  padding: 24px 26px;
}

.eyebrow {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-head h2 {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  margin-top: 8px;
}

.status {
  align-items: center;
  color: var(--green);
  display: flex;
  font-family: var(--mono);
  font-size: 10px;
  gap: 8px;
  text-transform: uppercase;
}

.day-ledger {
  padding: 20px 26px 28px;
}

.ledger-row {
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  gap: 18px;
  min-height: 84px;
}

.ledger-row:last-child {
  border-bottom: 0;
}

.ledger-time {
  color: var(--brand);
  flex: 0 0 52px;
  font-family: var(--mono);
  font-size: 10px;
}

.ledger-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.ledger-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.ledger-copy span {
  color: var(--text-secondary);
  display: block;
  font-size: 12px;
  line-height: 18px;
  margin-top: 5px;
}

.ledger-state {
  color: var(--text-faint);
  flex: 0 0 84px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.section {
  border-top: 1px solid var(--bg-border);
}

.evidence {
  display: flex;
  min-height: 620px;
}

.section-statement {
  display: flex;
  flex: 0 0 42%;
  flex-direction: column;
  justify-content: center;
  padding-right: 70px;
}

.section-statement h2,
.portfolio-intro h2,
.authority-copy h2,
.closing h2 {
  font-family: var(--display);
  font-size: clamp(42px, 4.5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin-top: 24px;
}

.section-statement p,
.authority-copy p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 24px;
  margin-top: 28px;
  max-width: 410px;
}

.evidence-stream {
  align-self: center;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  flex: 1 1 auto;
  padding: 28px 34px;
}

.stream-heading,
.portfolio-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.stream-heading {
  border-bottom: 1px solid var(--bg-border);
  padding-bottom: 22px;
}

.stream-heading span:first-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio {
  min-height: 760px;
  padding: 76px 0;
}

.portfolio-intro {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  padding-bottom: 52px;
}

.portfolio-counts {
  display: flex;
  gap: 36px;
}

.portfolio-counts span {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 18px;
  white-space: pre-line;
}

.portfolio-counts strong {
  color: var(--text);
  display: block;
  font-family: var(--display);
  font-size: 24px;
}

.portfolio-ledger {
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.portfolio-row {
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  min-height: 58px;
  padding: 0 20px;
}

.portfolio-row:last-child {
  border-bottom: 0;
}

.portfolio-row.header {
  background: var(--bg-ledger);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  min-height: 52px;
  text-transform: uppercase;
}

.portfolio-row > span:nth-child(1) {
  color: var(--brand);
  flex: 0 0 54px;
  font-family: var(--mono);
  font-size: 10px;
}

.portfolio-row > span:nth-child(2) {
  flex: 0 0 26%;
}

.portfolio-row > span:nth-child(3) {
  color: var(--text-secondary);
  flex: 0 0 17%;
  font-family: var(--mono);
  font-size: 10px;
}

.portfolio-row > span:nth-child(4) {
  flex: 1 1 auto;
}

.portfolio-row > span:nth-child(5) {
  color: var(--text-secondary);
  flex: 0 0 20%;
  text-align: right;
}

.portfolio-row.header > span {
  color: inherit;
}

.authority {
  display: flex;
  min-height: 700px;
}

.authority-copy {
  display: flex;
  flex: 0 0 40%;
  flex-direction: column;
  justify-content: center;
  padding-right: 70px;
}

.trace {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  font-family: var(--mono);
  font-size: 10px;
  gap: 9px;
  margin-top: 42px;
}

.authority-lanes {
  align-self: center;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  flex: 1 1 auto;
  overflow: hidden;
}

.authority-header,
.authority-lane {
  align-items: center;
  display: flex;
}

.authority-header {
  background: var(--bg-ledger);
  border-bottom: 1px solid var(--bg-border);
  justify-content: space-between;
  min-height: 72px;
  padding: 0 26px;
}

.authority-header span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.authority-lane {
  border-bottom: 1px solid var(--bg-border);
  min-height: 150px;
  padding: 24px 26px;
}

.authority-lane:last-child {
  border-bottom: 0;
}

.lane-name {
  align-items: center;
  display: flex;
  flex: 0 0 24%;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  gap: 10px;
}

.lane-copy {
  flex: 1 1 auto;
}

.lane-copy strong,
.lane-copy span {
  display: block;
}

.lane-copy strong {
  font-size: 14px;
  font-weight: 500;
}

.lane-copy span {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 7px;
}

.lane-state {
  color: var(--text-secondary);
  flex: 0 0 120px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: right;
}

.closing {
  display: flex;
  min-height: 520px;
}

.closing-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
}

.closing-actions {
  align-items: stretch;
  display: flex;
  flex: 0 0 38%;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.closing-note {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.footer {
  align-items: center;
  border-top: 1px solid var(--bg-border);
  display: flex;
  height: 136px;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 26px;
}

.footer-links a,
.copyright {
  color: var(--text-secondary);
  font-size: 11px;
}

.copyright {
  font-family: var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.entry {
  display: flex;
  min-height: 100vh;
}

.entry-preview,
.entry-form-wrap {
  min-height: 100vh;
}

.entry-preview {
  background: var(--bg-root);
  display: flex;
  flex: 0 0 52%;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px 58px 52px;
}

.prepared {
  max-width: 633px;
}

.prepared h1 {
  font-size: 50px;
  line-height: 52px;
  margin-top: 28px;
  max-width: 570px;
}

.prepared-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  margin-top: 28px;
  padding: 18px 20px;
}

.prepared-head {
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
}

.prepared-head span {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prepared-row {
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  gap: 16px;
  min-height: 49px;
}

.prepared-row:last-child {
  border-bottom: 0;
}

.prepared-row span:first-child {
  color: var(--brand);
  flex: 0 0 28px;
  font-family: var(--mono);
  font-size: 10px;
}

.prepared-row strong {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 400;
}

.prepared-row span:last-child {
  color: var(--text-secondary);
  flex: 0 0 64px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: right;
}

.entry-footnote {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 10px;
}

.entry-form-wrap {
  align-items: center;
  background: var(--bg-root);
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  padding: 48px;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 430px;
  width: 100%;
}

.pilot-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.entry-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.entry-meta a {
  color: var(--text-secondary);
  font-size: 13px;
}

.entry-form h1 {
  font-size: 42px;
  line-height: 45px;
  margin: 18px 0 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
}

.field input {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--control);
  color: var(--text);
  height: 52px;
  padding: 0 15px;
  width: 100%;
}

.field input::placeholder {
  color: var(--text-faint);
}

.button.full {
  border: 0;
  height: 52px;
  width: 100%;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.legal,
.form-message {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 19px;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-message {
  min-height: 19px;
}

.form-message[data-state="error"] {
  color: var(--red);
}

.form-message[data-state="success"] {
  color: var(--green);
}

.turnstile-shell {
  min-height: 65px;
}

.receipt {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  display: none;
  padding: 22px;
}

.receipt[data-visible="true"] {
  display: block;
}

.receipt h2 {
  font-family: var(--display);
  font-size: 24px;
}

.receipt p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 21px;
  margin-top: 12px;
}

.receipt a {
  color: var(--brand);
  display: inline-block;
  font-size: 13px;
  margin-top: 18px;
}

.document {
  margin: 0 auto;
  max-width: 760px;
  min-height: calc(100vh - 208px);
  padding: 90px 32px;
}

.document h1 {
  font-size: clamp(46px, 7vw, 72px);
}

.document h2 {
  font-family: var(--display);
  font-size: 24px;
  margin-top: 44px;
}

.document p,
.document li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 25px;
}

.document p {
  margin-top: 18px;
}

.document ul {
  padding-left: 22px;
}

.withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 34px;
}

.mobile-only {
  display: none;
}

@media (max-width: 1000px) {
  .shell {
    width: calc(100% - 40px);
  }

  .nav-center {
    display: none;
  }

  .hero {
    flex-direction: column;
    padding-top: 70px;
  }

  .hero-copy {
    flex-basis: auto;
  }

  .product-frame {
    align-self: stretch;
    max-width: none;
  }

  .evidence,
  .authority,
  .closing {
    flex-direction: column;
    padding: 70px 0;
  }

  .section-statement,
  .authority-copy {
    flex-basis: auto;
    padding: 0 0 46px;
  }

  .portfolio-row > span:nth-child(4) {
    display: none;
  }

  .portfolio-row > span:nth-child(2) {
    flex-basis: 38%;
  }

  .portfolio-row > span:nth-child(3) {
    flex-basis: 24%;
  }

  .portfolio-row > span:nth-child(5) {
    flex-basis: auto;
    flex-grow: 1;
  }

  .closing-actions {
    flex-basis: auto;
    margin-top: 46px;
  }

  .entry-preview {
    flex-basis: 46%;
    padding: 38px;
  }

  .prepared h1 {
    font-size: 42px;
    line-height: 44px;
  }

  .entry-form-wrap {
    padding: 38px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 40px);
  }

  .nav-actions .text-button,
  .nav-actions .theme-toggle {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 56px 0 70px;
  }

  h1 {
    font-size: 58px;
  }

  .hero-copy > p {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-stats {
    gap: 20px;
    justify-content: space-between;
  }

  .hero-stat strong {
    font-size: 20px;
  }

  .product-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .day-ledger,
  .product-head {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ledger-row {
    gap: 12px;
  }

  .ledger-state {
    display: none;
  }

  .evidence-stream {
    padding: 22px 18px;
  }

  .portfolio-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 34px;
  }

  .portfolio-counts {
    gap: 22px;
  }

  .portfolio-row {
    gap: 10px;
    padding: 0 14px;
  }

  .portfolio-row > span:nth-child(1) {
    flex-basis: 30px;
  }

  .portfolio-row > span:nth-child(2) {
    flex: 1 1 auto;
  }

  .portfolio-row > span:nth-child(3) {
    flex: 0 0 86px;
    text-align: right;
  }

  .portfolio-row > span:nth-child(5) {
    display: none;
  }

  .authority-lane {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .lane-name,
  .lane-state {
    flex-basis: auto;
  }

  .lane-state {
    text-align: left;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding: 36px 0;
  }

  .footer-links {
    margin-top: 30px;
  }

  .copyright {
    margin-top: 24px;
  }

  .entry {
    min-height: 100svh;
  }

  .entry-preview {
    display: none;
  }

  .entry-form-wrap {
    align-items: flex-start;
    min-height: 100svh;
    padding: 62px 22px 24px;
  }

  .entry-form {
    min-height: calc(100svh - 86px);
  }

  .entry-form::before {
    content: "●  observerflow";
    color: var(--text);
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .entry-form h1 {
    font-size: 30px;
    line-height: 36px;
    margin-top: 0;
  }

  .entry-meta a {
    display: none;
  }

  .entry-meta .kicker {
    color: var(--text-faint);
  }

  .mobile-only {
    display: inline-block;
  }
}
