/* the tab — white paper, black ink, one green.
 *
 * Nothing is fetched from anywhere. No font host, no CSS import, no analytics.
 * The page promises it is not calling anyone; a webfont would break that
 * promise on the way in, so the type is what the machine already has.
 */

:root {
  --paper:      #ffffff;
  --card:       #f7f7f1;   /* warm off-white, biased a touch toward the green */
  --card-2:     #f1f1e8;
  --ink:        #101010;
  --ink-2:      #6d6d61;   /* olive-grey. a neutral that was chosen, not inherited */
  --ink-3:      #9a9a8c;
  --rule:       #e3e3d7;
  --rule-2:     #cfcfc0;

  --green:      #cff605;   /* fills only. 1.3:1 on white — never text */
  --green-soft: #f0fbad;
  --green-ink:  #55670a;   /* the same green, as something you can read */
  --green-deep: #a8c904;

  --closed:     #1d7a41;
  --dormant:    #a8431f;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
          "DejaVu Sans Mono", "Liberation Mono", monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, ui-serif, serif;

  --col: 63rem;
  --tape: 44rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--mono);
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
a:hover { border-bottom-color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green-deep); outline-offset: 3px;
}

/* ------------------------------------------------------------------ scaffold */
.wrap { width: min(100% - 2.5rem, var(--col)); margin-inline: auto; }
.tape { width: min(100% - 2.5rem, var(--tape)); margin-inline: auto; }

section { padding: 4.5rem 0; }
section + section { border-top: 1px dashed var(--rule); }

.eyebrow {
  font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: .75rem;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

h1, h2, h3 { font-weight: 600; text-wrap: balance; margin: 0 0 .75rem; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 5.4vw, 3.1rem); line-height: 1.08; }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.9rem); line-height: 1.15; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; max-width: 62ch; }
.prose { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.62; color: #1c1c1c; }
.prose p { max-width: 60ch; }
.lede { font-size: clamp(1rem, 2.2vw, 1.1875rem); color: var(--ink-2); max-width: 54ch; }

.mark { background: var(--green); padding: 0 .18em; border-radius: 1px;
        box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.dim { color: var(--ink-2); }
.tiny { font-size: .75rem; line-height: 1.5; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------- nav */
header.top {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule);
}
.top .wrap { display: flex; align-items: center; gap: 1rem; height: 3.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; border: 0; }
.brand svg { display: block; }
.brand b { font-size: .9375rem; letter-spacing: .04em; }
.top nav { margin-left: auto; display: flex; gap: 1.25rem; font-size: .8125rem; }
.top nav a { border: 0; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }
.top nav a.x-link {
  display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem;
  border: 1px solid var(--ink); color: var(--ink); font-size: .7rem;
  font-weight: 700; line-height: 1; text-decoration: none;
}
.top nav a.x-link:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .top nav a.opt { display: none; } }

/* -------------------------------------------------------------------- hero */
.hero {
  padding: 3.5rem 0 4.5rem; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, #fbfde4 0%, rgba(251,253,228,0) 62%),
    var(--paper);
}
.hero .lede { margin-inline: auto; }
.receipt {
  font-family: var(--mono); font-size: clamp(.62rem, 2.05vw, .875rem);
  line-height: 1.42; white-space: pre; margin: 0 auto 2.25rem;
  display: block; width: max-content; max-width: 100%;
  color: var(--ink); letter-spacing: .02em;
  overflow: hidden;
  background: var(--paper); padding: 1.15rem 1.5rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 18px 34px -24px rgba(30,30,10,.5);
}

/* alternating ground, so the page has a rhythm instead of one long sheet */
section.tint { background: var(--card); }
section.tint .fallWrap, section.tint .scroller,
section.tint .defs, section.tint .stats { background: var(--paper); }
section.tint .def, section.tint .stat { background: var(--paper); }
.receipt .lo { color: var(--ink-3); }
.receipt .hi { background: var(--green); }
.receipt .cur { background: var(--ink); color: var(--paper); }

.cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }
.btn {
  font: inherit; font-size: .875rem; border: 1px solid var(--ink); background: var(--ink);
  color: var(--paper); padding: .6rem 1.15rem; cursor: pointer; border-radius: 2px;
  display: inline-block; text-decoration: none;
}
.btn:hover { background: #2a2a2a; }
.btn:disabled, .chip:disabled { cursor: wait; opacity: .55; }
.btn.alt { background: var(--green); color: var(--ink); border-color: var(--green-deep); }
.btn.alt:hover { background: var(--green-deep); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--card); }

/* ------------------------------------------------------------- definitions */
.defs { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule);
        grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .defs { grid-template-columns: 1fr; } }
.def { background: var(--paper); padding: 1.35rem 1.25rem; }
.def b { display: block; font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase;
         color: var(--ink-2); margin-bottom: .5rem; }
.def .v { font-size: 1.5rem; letter-spacing: -.02em; }
.def p { font-size: .8125rem; color: var(--ink-2); margin: .5rem 0 0; }

/* -------------------------------------------------------------------- tool */
.lookup { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.lookup input {
  flex: 1 1 22rem; min-width: 0; font: inherit; font-size: .875rem;
  padding: .65rem .8rem; border: 1px solid var(--rule-2); border-radius: 2px;
  background: var(--paper); color: var(--ink);
}
.lookup input::placeholder { color: var(--ink-3); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chip {
  font: inherit; font-size: .75rem; cursor: pointer; border: 1px dashed var(--rule-2);
  background: transparent; color: var(--ink-2); padding: .28rem .6rem; border-radius: 2px;
}
.chip:hover { border-style: solid; border-color: var(--ink); color: var(--ink); }

.slip {
  border: 1px solid var(--ink); background: var(--card); padding: 1.5rem 1.4rem;
  position: relative;
}
.slip::before, .slip::after {
  content: ""; position: absolute; left: -1px; right: -1px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--paper) 0 5px, transparent 5px 10px);
}
.slip::before { top: -1px; } .slip::after { bottom: -1px; }

.slipHead { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
            margin-bottom: 1.25rem; }
.slipHead code { font-size: .8125rem; word-break: break-all; }
.badge { font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase;
         padding: .15rem .5rem; border: 1px solid currentColor; border-radius: 2px; }
.badge.ok { color: var(--closed); }
.badge.warn { color: var(--dormant); }
.badge.live { color: var(--green-ink); background: var(--green-soft); border-color: var(--green-deep); }

.lines { display: grid; gap: .3rem; font-size: .875rem; }
.line { display: flex; align-items: baseline; gap: .6rem; }
.line .k { color: var(--ink-2); white-space: nowrap; }
.line .fill { flex: 1; border-bottom: 1px dotted var(--rule-2); transform: translateY(-.25em); }
.line .v { white-space: nowrap; }
.line.total { font-size: 1rem; padding-top: .45rem; margin-top: .35rem;
              border-top: 1px solid var(--rule-2); }
.line.total .k { color: var(--ink); }

.meter { margin-top: 1.25rem; }
.meter pre { margin: 0; font-family: var(--mono); font-size: .8125rem; line-height: 1.3;
             white-space: pre; overflow-x: auto; }
.meter .on { color: var(--green-deep); }
.meter .off { color: var(--rule-2); }

/* ------------------------------------------------------------- the waterfall */
.fallWrap { background: var(--card); border: 1px solid var(--rule); padding: 1.5rem 1.25rem; }
.fall { margin: 0; font-family: var(--mono); font-size: clamp(.6rem, 1.5vw, .8125rem);
        line-height: 1.35; white-space: pre; overflow-x: auto; }
.fallNote { margin: 1rem 0 0; }
.fall .b { color: var(--ink); }
.fall .c { color: var(--green-deep); }
.fall .g { color: var(--ink-3); }
.fallKey { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .75rem;
           color: var(--ink-2); margin-top: 1rem; }
.fallKey span::before { content: "\25A0"; margin-right: .4rem; }
.fallKey .k1::before { color: var(--ink); }
.fallKey .k2::before { color: var(--green-deep); }
.fallKey .k3::before { color: var(--ink-3); }

/* ------------------------------------------------------------------- tables */
.scroller { overflow-x: auto; border: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; font-size: .8125rem; min-width: 46rem; }
th, td { text-align: right; padding: .5rem .7rem; white-space: nowrap;
         border-bottom: 1px solid var(--rule); }
th { font-weight: 500; font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase;
     color: var(--ink-2); background: var(--card); position: sticky; top: 0; }
th:first-child, td:first-child { text-align: left; }
tbody tr:hover td { background: var(--card-2); }
tbody tr.me td { background: var(--green-soft); }
td.w { font-size: .78125rem; }
.pill { display: inline-block; font-size: .6875rem; padding: .05rem .4rem; border-radius: 2px; }
.pill.hold { background: var(--green); color: var(--ink); }
.pill.part { background: var(--card-2); color: var(--ink-2); border: 1px solid var(--rule); }
.pill.gone { background: transparent; color: var(--dormant); border: 1px solid currentColor; }

/* --------------------------------------------------------------------- grid */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; gap: 1.75rem; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
         gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.stat { background: var(--paper); padding: 1rem 1rem 1.1rem; }
.stat b { display: block; font-size: .625rem; letter-spacing: .14em; text-transform: uppercase;
          color: var(--ink-2); margin-bottom: .4rem; }
.stat .v { font-size: 1.1875rem; letter-spacing: -.015em; }
.stat .s { font-size: .75rem; color: var(--ink-2); }

.note { border-left: 3px solid var(--green); background: var(--card);
        padding: .9rem 1.1rem; font-size: .8125rem; color: var(--ink-2); }
.note b { color: var(--ink); }
section.tint .note { background: var(--paper); }

/* the one number the whole mechanism rests on */
.thesis { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
          border: 1px solid var(--ink); padding: 1.75rem 1.75rem; margin-bottom: 2rem;
          background: var(--paper); }
@media (max-width: 720px) { .thesis { grid-template-columns: 1fr; gap: 1rem; } }
.thesis .big { font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: .95; letter-spacing: -.04em;
               background: var(--green); padding: .1em .18em; display: inline-block; }
.thesis .cap { font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase;
               color: var(--ink-2); margin-bottom: .6rem; }
.thesis p { margin: 0; font-size: .9375rem; color: var(--ink-2); max-width: 52ch; }
.thesis p b { color: var(--ink); }

.claims { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.claims li { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--rule);
             align-items: baseline; }
.claims code { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis;
               white-space: nowrap; flex: 1; min-width: 0; }

.chart { width: 100%; height: 160px; display: block; }

.attacks { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.attack { background: var(--paper); padding: 1.2rem 1.25rem; }
.attack h3 { margin-bottom: .35rem; }
.attack p { font-size: .875rem; color: var(--ink-2); margin: 0; max-width: 68ch; }
.attack .verdict { display: inline-block; margin-top: .6rem; font-size: .75rem;
                   background: var(--green-soft); color: var(--green-ink);
                   padding: .1rem .5rem; border: 1px solid var(--green-deep); border-radius: 2px; }

footer { padding: 3rem 0 4rem; border-top: 1px solid var(--rule); font-size: .8125rem;
         color: var(--ink-2); }
footer .row { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; }

.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
