/* surajpk.in — shared stylesheet
   Design system per build brief §4. Trading terminal: dark, dense,
   monospace-inflected, quiet. No gradients, no shadows, no glow,
   no border-radius. Teal is the only saturated colour. */

/* ---------------------------------------------------------------- tokens */

:root {
  --void:      #07090c;
  --panel:     #0b1015;
  --well:      #070a0e;
  --rule:      rgba(190, 205, 215, .11);
  --rule-lit:  rgba(190, 205, 215, .20);
  --ink:       #dde5ec;
  --muted:     #8b98a5;
  --dim:       #616e7a;
  --faint:     #3f4952;
  --teal:      #4e9490;
  --teal-dim:  rgba(78, 148, 144, .40);
  --amber:     #a8823f;
  --max:       1080px;

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--teal); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 26px;
}

/* Sections are separated by hairlines, never by a background change. */
section { padding: 86px 0; border-top: 1px solid var(--rule); }

/* Visually hidden, still reachable by assistive tech. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--panel);
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-decoration: none;
}
.skip:focus { left: 26px; top: 12px; }

/* ------------------------------------------------------------ typography */

h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 14px 0 20px;
}

/* Section header — mono, uppercase, tracked, hairline beneath. */
h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 34px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -.008em;
  margin: 0 0 9px;
}

p { margin: 0 0 14px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

/* Anything that is a number, a code, a label or a status is mono. */
.num {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--teal);
  letter-spacing: .02em;
}

.dense { font-size: 14.5px; line-height: 1.6; }

/* ------------------------------------------------------------ components */

/* Panel — raised surface for forms and data. */
.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 21px;
}

/* Ledger row — the primary key/value pattern. Mono label left,
   prose value right, hairline beneath each row. */
.ledger { border-top: 1px solid var(--rule); }

.ledger-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.ledger-row dt,
.ledger-row .k {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

.ledger-row dd,
.ledger-row .v {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 62ch;
}

.ledger-row dd strong { color: var(--ink); font-weight: 400; }

/* Chip — square, mono, bordered. Primary tier takes the teal border. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.chip {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
  border: 1px solid var(--rule-lit);
  padding: 4px 11px;
  white-space: nowrap;
}

.chip--primary { border-color: var(--teal-dim); color: var(--teal); }

/* Data table — mono throughout, right-aligned numerics. */
.data { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }

.data th {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
  padding: 11px 18px 8px;
  border-bottom: 1px solid var(--rule);
}
.data th:first-child { text-align: left; }

.data td {
  padding: 8px 18px;
  text-align: right;
  color: var(--muted);
  border-bottom: 1px solid rgba(190, 205, 215, .05);
}
.data td:first-child {
  text-align: left;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
}

.data tr.is-subtotal td { border-top: 1px solid var(--rule-lit); color: var(--ink); }
.data tr.is-total td {
  border-top: 1px solid var(--rule-lit);
  border-bottom: none;
  padding: 12px 18px 13px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 500;
}
.data tr.is-total td:first-child { color: var(--ink); font-weight: 500; font-size: 14px; }

/* Provenance tag — marks where a figure came from. Core to the site's
   credibility: use anywhere a figure's source matters. */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
  border: 1px solid var(--rule-lit);
  color: var(--dim);
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.tag--exempt { color: var(--amber); border-color: rgba(168, 130, 63, .35); }

/* Segmented control — real buttons, aria-pressed toggled. */
.seg { display: flex; flex-wrap: wrap; border: 1px solid var(--rule-lit); }

.seg button {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 11px 6px;
  cursor: pointer;
}
.seg button:last-child { border-right: none; }
.seg button[aria-pressed="true"] { background: rgba(78, 148, 144, .16); color: var(--teal); }

/* Tab strip — wide enough that five asset classes stay legible, and wrap
   to a second row rather than compressing on narrow screens. */
.seg--tabs { margin-bottom: 28px; }
.seg--tabs button { min-width: 118px; }

/* Bordered mono link — used for contact and downloads. */
.blink {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid var(--teal-dim);
  padding: 10px 16px;
}
.blink:hover { background: rgba(78, 148, 144, .09); }

/* ------------------------------------------------------------------- nav */

.nav { border-bottom: 1px solid var(--rule); }

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 22px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav-links { display: flex; flex-wrap: wrap; gap: 22px; }

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--teal); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 78px 0 82px; border-top: none; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 52px;
  align-items: start;
}

/* Interior page header — the homepage uses the hero grid instead. */
.page-head { padding: 58px 0 4px; }
.page-head h1 { margin: 13px 0 16px; }

.lede { font-size: 16.5px; color: var(--muted); max-width: 62ch; margin: 0; }

/* Row of bordered mono links inside a ledger value or a page section. */
.linkset { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.lede + .linkset { margin-top: 22px; }

/* Question block — everything visible, no accordions. */
.qa-item { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.qa-item:first-child { border-top: 1px solid var(--rule); }
.qa-item h3 { margin: 0 0 11px; }
.qa-item p { font-size: 15px; color: var(--muted); max-width: 72ch; margin: 0 0 12px; }
.qa-item p:last-child { margin-bottom: 0; }

.note { margin-top: 36px; }
.note h3 { margin: 0 0 10px; }
.note p { font-size: 14.5px; color: var(--muted); max-width: 72ch; margin: 0; }

.thesis {
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 28px;
}
.thesis strong { color: var(--ink); font-weight: 400; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--dim);
}
.meta span { display: flex; align-items: center; gap: 14px; }
.meta span + span::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--teal);
  flex: none;
}

/* ------------------------------------------------------------ order book */

.book { border: 1px solid var(--rule); background: var(--panel); }

.book-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 15px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
}
.book-clock { color: var(--muted); letter-spacing: .06em; }

.book-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 15px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.book-cols span:last-child { text-align: right; }

.book-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px 15px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--muted);
}
.book-row .qty { text-align: right; position: relative; }
.book-row .px { position: relative; }

/* Depth fill: bids tint teal, asks stay neutral grey. */
.book-fill {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  background: rgba(190, 205, 215, .07);
}
.book-row.bid .book-fill { background: rgba(78, 148, 144, .16); }
.book-row.bid .px { color: var(--teal); }

.book-mid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 15px;
  margin: 5px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--well);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}
.book-mid .spread { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

.book-note {
  margin: 0;
  padding: 10px 15px 12px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --------------------------------------------------------- what I own */

.owns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.own { background: var(--void); padding: 26px 26px 28px; }

.own-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 12px;
}

.own h3 { margin: 0 0 10px; }
.own p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ----------------------------------------------------------------- track */

.track-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.track-row:first-child { border-top: 1px solid var(--rule); }

.track-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--dim);
  padding-top: 2px;
}

.track-role { font-size: 16px; font-weight: 500; color: var(--ink); margin: 0 0 3px; }
.track-org {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--teal);
  margin: 0 0 9px;
}
.track-body { margin: 0; font-size: 14.5px; color: var(--muted); max-width: 68ch; }

/* ----------------------------------------------------------------- stack */

.tier {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.tier:first-of-type { border-top: 1px solid var(--rule); }

.tier-name { font-size: 15px; font-weight: 500; color: var(--ink); margin: 0 0 3px; }
.tier-qual {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

/* ----------------------------------------------------------------- tools */

/* Tools index — a list with hairline separators, not cards. */
.tool-item { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.tool-item:first-of-type { border-top: 1px solid var(--rule); }
.tool-item h3 { margin: 0 0 7px; }
.tool-item h3 a { text-decoration: none; }
.tool-item p { font-size: 14.5px; color: var(--muted); max-width: 72ch; margin: 0 0 8px; }
.tool-item .proves {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--dim);
  margin: 0;
}

/* Tool page — input column left, output right (§4.3). */
.tool-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 50px;
}

/* Form fields */
.field { margin-bottom: 15px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.field input[type="number"] {
  width: 100%;
  background: var(--well);
  border: 1px solid var(--rule-lit);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  padding: 9px 11px;
}
.field input[type="number"]:focus { outline: none; border-color: var(--teal); }
.field .hint { font-size: 11px; color: var(--dim); margin: 5px 0 0; line-height: 1.45; }

.chk { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chk input { width: auto; }

/* Panel-scoped section header — tighter than the page-level h2. */
.panel > h2 {
  font-size: 11px;
  letter-spacing: .15em;
  margin: 0 0 18px;
  padding-bottom: 10px;
}

/* Output block */
.out { border: 1px solid var(--rule); }
.out-head {
  display: flex;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.out-head span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.bps {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 13px 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
}
.bps b { color: var(--teal); font-weight: 500; }

.warn {
  display: none;
  margin: 0;
  padding: 11px 18px;
  background: rgba(168, 130, 63, .09);
  border-top: 1px solid rgba(168, 130, 63, .3);
  color: #c9a45f;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}
.warn.on { display: block; }

.settle {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 18px;
  background: var(--panel);
  border-top: 1px solid var(--rule);
}
.settle .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.settle .v { font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--ink); }

/* Spec block — key/value pairs under the output. */
.spec { margin-top: 20px; border: 1px solid var(--rule); padding: 16px 18px; }
.spec h3 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.spec dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 22px; margin: 0; font-size: 13px; }
.spec dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dim);
}
.spec dd { margin: 0 0 6px; color: var(--ink); font-size: 13.5px; }
.spec .mg-warn { margin: 14px 0 0; font-size: 12px; color: #c9a45f; line-height: 1.5; }

/* Method & sources */
.notes h3 { font-size: 15px; font-weight: 500; margin: 24px 0 7px; }
.notes p, .notes ul { font-size: 14.5px; color: var(--muted); max-width: 72ch; }
.notes p { margin: 0 0 10px; }
.notes ul { margin: 0 0 10px; padding-left: 19px; }
.notes li { margin-bottom: 5px; }

.src {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--dim);
  border: 1px solid var(--rule);
  padding: 14px 17px;
  margin-top: 24px;
  max-width: 72ch;
  line-height: 1.7;
}
.src b { color: var(--muted); font-weight: 500; }
.src + .src { margin-top: 14px; }

.hide { display: none; }

/* --------------------------------------------------------------- contact */

.contact-body { font-size: 15.5px; color: var(--muted); max-width: 62ch; margin: 0 0 26px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- footer */

/* --faint (#3f4952) fails WCAG AA on --void; footer content text uses
   --muted so the Lighthouse accessibility gate in §9 holds. See plan. */
footer { border-top: 1px solid var(--rule); padding: 24px 0 48px; }
footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 880px) {
  section { padding: 66px 0; }
  .hero { padding: 52px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .owns { grid-template-columns: 1fr; }
  .ledger-row,
  .track-row,
  .tier { grid-template-columns: 1fr; gap: 10px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 11px; }
  .tool-grid { grid-template-columns: 1fr; gap: 24px; }
  .spec dl { grid-template-columns: 1fr; }
  .data th, .data td,
  .settle, .bps, .warn, .out-head { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 460px) {
  .wrap { padding: 0 18px; }
  .own { padding: 22px 20px 24px; }
}

/* ------------------------------------------------------- reduced motion */

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