/* Super Ant Investor: the sheet.
   Built to art/ref/poster.jpg, measured: ground #0A0E0F, ink #F2F2F2, cell outline #222627,
   a column that is 77% of the frame with a registration cross at each of its corners, one square
   grid of cells carrying all of the state, a legend under it, then the reading block, flat print,
   no surface, no shadow, no radius, no gradient. The two accents are the Korean market's own:
   red is a buy and a gain, blue is a sell and a loss. They touch numbers and nothing else. */

@font-face { font-family: "Orbitron"; src: url("/assets/fonts/orbitron-var.woff2") format("woff2-variations"), url("/assets/fonts/orbitron-var.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra"; src: url("/assets/fonts/chakra-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra"; src: url("/assets/fonts/chakra-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "ShareMono"; src: url("/assets/fonts/sharetechmono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "HanDisplay"; src: url("/assets/fonts/blackhansans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "HanText"; src: url("/assets/fonts/gothica1-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "HanText"; src: url("/assets/fonts/gothica1-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ground: #0A0E0F;
  --ink: #F2F2F2;
  --ink-mid: #9BA3A3;
  --ink-low: #7C8484;
  --edge: #252A2B;
  --edge-lit: #3A4142;
  --up: #FF5A63;
  --down: #4A93FF;

  --display: "Orbitron", "HanDisplay", system-ui, sans-serif;
  --text: "Chakra", "HanText", system-ui, sans-serif;
  --mono: "ShareMono", "HanText", ui-monospace, monospace;

  --t-display: clamp(40px, 5.8vw, 76px);
  --t-head: 26px;
  --t-value: 22px;
  --t-lede: 17px;
  --t-body: 15px;
  --t-label: 14px;
  --t-mono: 15px;

  --gutter: clamp(18px, 3.4vw, 34px);
  --page: min(1200px, calc(100% - var(--gutter) * 2));
  --plate: 812px;        /* the chart block: his grid is 77% of the column, this is 68% of 1200 */
  --cellgap: 6px;
  --key: 52px;           /* one grid cell, which is also the size of a link key */
  --tag: 104px;
  --val: 92px;
  --air: 64px;
  --rule: #1B2021;
}

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

html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:lang(ko) { font-family: "HanText", "Chakra", system-ui, sans-serif; }

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ---- the sheet and its registration crosses ------------------------------------------------ */

.sheet {
  width: var(--page);
  margin: 0 auto;
  padding: 44px 0 96px;
  position: relative;
}

.marks { position: absolute; inset: 0; pointer-events: none; }
.marks i {
  position: absolute;
  width: 22px; height: 22px;
  background: url("/assets/img/cross-01.png") center / contain no-repeat;
  opacity: .85;
}
.marks i.tl { top: 10px; left: -26px; }
.marks i.tr { top: 10px; right: -26px; }
.marks i.bl { bottom: 56px; left: -26px; }
.marks i.br { bottom: 56px; right: -26px; }

/* ---- the eyebrow: his publisher line, our masthead ------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.eyebrow .mark {
  width: 26px; height: 26px;
  background: url("/assets/img/mark-ant-01.png") center / contain no-repeat;
  flex: none;
}
.eyebrow .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .05em;
  color: var(--ink);
  white-space: nowrap;
}
.eyebrow .issue {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  color: var(--ink-mid);
  text-transform: uppercase;
}
.eyebrow .lang { margin-left: auto; display: flex; gap: 6px; }
@media (max-width: 680px) {
  .eyebrow { gap: 12px 14px; }
  .eyebrow .issue { order: 2; flex-basis: 100%; }
  .eyebrow .lang { order: 3; margin-left: 0; }
}

.langkey {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  color: var(--ink-mid);
  background: none;
  border: 2px solid var(--edge);
  padding: 9px 16px;
  min-height: 42px;
  cursor: pointer;
  transition: color .12s, border-color .12s, background-color .12s;
}
.langkey[aria-pressed="true"] { color: var(--ground); background: var(--ink); border-color: var(--ink); }
.langkey:hover { border-color: var(--edge-lit); }
.langkey[aria-pressed="true"]:hover { border-color: var(--ink); }

/* ---- the two columns: the grid left, the reading right (one column under 1120) --------------- */

/* His sheet reads top to bottom: the chart, its legend, then the display line and the body under
   it. That order is kept at every width. The window is filled by giving the chart a second column
   of the treasury's own figures, not by moving the reading block up beside it. */
.body2 {
  display: grid;
  grid-template-columns: var(--plate) minmax(260px, 1fr);
  grid-template-areas: "plate figs";
  column-gap: 52px;
  row-gap: 40px;
  align-items: start;
}
.body2 > .plate { grid-area: plate; }
.body2 > .figs-col { grid-area: figs; min-width: 0; }
@media (max-width: 1180px) {
  .body2 { grid-template-columns: 1fr; grid-template-areas: "plate" "figs"; row-gap: 30px; }
  .read { margin-top: 44px; }
}

/* ---- the plate: ten rows of ten cells --------------------------------------------------------- */

.plate { min-width: 0; max-width: var(--plate); }

.rows { display: grid; row-gap: var(--cellgap); }

.row {
  display: grid;
  grid-template-columns: var(--tag) minmax(0, 1fr) var(--val);
  column-gap: 20px;
  align-items: center;
  min-width: 0;
}
/* The ticker and its weight live in one element so a phone can set them on one line, and
   `display: contents` lets the wide layout place them in the row's own columns. */
.rowhead { display: contents; }
.row > .rowhead > .tag { grid-column: 1; grid-row: 1; }
.row > .rowhead > .val { grid-column: 3; grid-row: 1; }
.row > .cells { grid-column: 2; grid-row: 1; }

.row .tag {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .03em;
  color: var(--ink);
  line-height: 1.15;
  white-space: nowrap;
  min-width: 0;
}
.row .tag .sub {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--t-label);
  color: var(--ink-low);
  letter-spacing: .04em;
  margin-top: 2px;
}

.cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--cellgap); min-width: 0; }

.cell {
  aspect-ratio: 1;
  border: 2px solid var(--edge);
  background: transparent;
  min-width: 0;
}
.cell.on { background: var(--ink); border-color: var(--ink); }

.row .val {
  font-family: var(--mono);
  font-size: var(--t-value);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
  white-space: nowrap;
}
.row .val .u { color: var(--ink-low); font-size: 14px; }

/* a row that has no data yet keeps its shape and says so in words, never by fading the art */
.rows[data-state="empty"] .cell { border-color: var(--rule); }

/* ---- the legend: his swatch row, our navigation ----------------------------------------------- */

.legend {
  margin-top: 26px;
  padding-left: calc(var(--tag) + 20px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
}
@media (max-width: 1119px) { .legend { padding-left: 0; } }

.legend a, .legend .note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-mid);
  min-height: 44px;
  transition: color .12s;
}
.legend a:hover { color: var(--ink); }
.legend a::before, .legend .note::before {
  content: "";
  width: 16px; height: 16px;
  border: 2px solid var(--edge);
  flex: none;
}
.legend a[aria-current="page"] { color: var(--ink); }
.legend a[aria-current="page"]::before { background: var(--ink); border-color: var(--ink); }
.legend .note { color: var(--ink-low); }
.legend .note::before { border-style: dashed; }

/* ---- the reading block ------------------------------------------------------------------------- */

.read { min-width: 0; margin-top: 56px; }

/* the figures standing beside the chart: one under the other, hung off the chart's top line */
.figs-col .fig + .fig { margin-top: 30px; }
.figs-col .fig .v { font-size: 30px; }
@media (max-width: 1180px) {
  .figs-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 26px 32px; }
  .figs-col .fig + .fig { margin-top: 0; }
}

.kicker {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin: 0 0 20px;
}

h1, .display {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-display);
  line-height: 1.02;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0 0 34px;
}
h1 .lit { color: var(--up); }

/* His body is three lines run across the sheet, so ours is three paragraphs run across it. */
.ledes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
@media (max-width: 1020px) { .ledes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .ledes { grid-template-columns: 1fr; gap: 22px; } }

.lede {
  font-size: var(--t-lede);
  line-height: 1.74;
  color: var(--ink-mid);
  margin: 0;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ---- sections below the fold -------------------------------------------------------------------- */

.band { margin-top: var(--air); }
.band > h2, h2.head {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t-head);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.band .sub { color: var(--ink-mid); margin: 0 0 26px; max-width: 70ch; }

.rule { height: 2px; background: var(--rule); border: 0; margin: 0 0 26px; }

/* a plain data table, set like the sheet: hairlines, no fill, real padding */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 2px solid var(--rule);
  vertical-align: baseline;
}
.tbl th {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-low);
  font-weight: 400;
  white-space: nowrap;
}
.tbl td { font-size: var(--t-body); color: var(--ink-mid); }
.tbl td.k { color: var(--ink); font-family: var(--display); font-weight: 700; font-size: var(--t-label); letter-spacing: .04em; white-space: nowrap; }
.tbl td.n, .tbl th.n { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; text-align: right; }
.tbl th.n { color: var(--ink-low); }
.tbl td.n.up { color: var(--up); }
.tbl td.n.down { color: var(--down); }
/* "DIREXION DAILY SEMICONDUCTORS" has no break point, so at 320 it ran out of its own cell and
   finished 6 px from the row's edge. A name column breaks anywhere rather than spilling. */
.tbl .wrap { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.tbl tr:last-child td { border-bottom: 0; }

/* figures: one value with its label under it, on one baseline */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px 36px; }
.fig { min-width: 0; }
.fig .v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}
.fig .v.up { color: var(--up); }
.fig .v.down { color: var(--down); }
.fig .v .u { font-family: var(--mono); font-size: 16px; color: var(--ink-low); margin-left: 6px; }
.fig .l {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin-top: 8px;
}

/* ---- the token row: the links as cells of the sheet ---------------------------------------------- */

.tokenrow { margin-top: var(--air); }
.tokenrow .bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border: 2px solid var(--edge);
  padding: 24px;
}
.tokenrow .mintbox { min-width: 0; }
.tokenrow .mintlab {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin-bottom: 10px;
}
.tokenrow .mint {
  font-family: var(--mono);
  font-size: var(--t-mono);
  color: var(--ink);
  letter-spacing: .02em;
  overflow-wrap: anywhere;
  user-select: all;
  line-height: 1.5;
}
.tokenrow .mint.none { color: var(--ink-mid); user-select: none; letter-spacing: .08em; text-transform: uppercase; }

.keys { display: flex; gap: var(--cellgap); flex: none; }
.key {
  width: var(--key);
  height: var(--key);
  border: 2px solid var(--edge);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: transform .08s, border-color .12s, background-color .12s;
}
.key:hover { border-color: var(--edge-lit); }
.key:active { transform: translateY(2px); }
.key[aria-disabled="true"] { opacity: .74; cursor: default; }
.key[aria-disabled="true"]:active { transform: none; }
.key .m { width: 22px; height: 22px; object-fit: contain; }
.key .t { font-family: var(--mono); font-size: var(--t-label); letter-spacing: .04em; }
.key.done { background: var(--ink); border-color: var(--ink); color: var(--ground); }
/* the key fills with ink on a press, and our own white mark would vanish into it. Inverting a
   raster we drew ourselves is allowed; a platform's mark is never touched, and none of them
   is ever in this state. */
.key.done .m { filter: invert(1); }

.keynote {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin-top: 14px;
  min-height: 22px;
}

/* ---- forms (Yours) -------------------------------------------------------------------------------- */

.field { display: flex; gap: var(--cellgap); flex-wrap: wrap; max-width: 680px; }
.field input {
  flex: 1 1 320px;
  min-width: 0;
  background: transparent;
  border: 2px solid var(--edge);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--t-mono);
  padding: 14px 20px;
  min-height: var(--key);
}
.field input::placeholder { color: var(--ink-low); }
.field input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.field button {
  min-height: var(--key);
  padding: 0 26px;
  border: 2px solid var(--edge);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .08s, border-color .12s;
}
.field button:hover { border-color: var(--edge-lit); }
.field button:active { transform: translateY(2px); }

/* ---- states ---------------------------------------------------------------------------------------- */

.plate > .state { padding-left: calc(var(--tag) + 20px); }
@media (max-width: 1180px) { .plate > .state { padding-left: 0; } }

.state {
  min-height: 1.7em;        /* the line is in the layout from the first paint, so a message that
                               arrives later moves nothing */
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-low);
}
.state.bad { color: var(--up); }

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

[hidden] { display: none !important; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---- the one piece of motion: the sheet inks in, like a chart being printed ------------------------- */

@keyframes ink { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
.cell.on { animation: ink .22s ease-out both; animation-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- phone ------------------------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  /* the tag column holds a ticker over a date ("26 Oct 2026" measures 89 px), so it keeps the
     room for it: a narrower column cut the year off at 768 */
  :root { --plate: 100%; --tag: 118px; --val: 84px; }
}

@media (max-width: 860px) {
  :root { --cellgap: 5px; --tag: 112px; --val: 76px; --air: 52px; --t-head: 22px; }
  .row { column-gap: 14px; }
  .row .val { font-size: 18px; }
  .fig .v, .figs-col .fig .v { font-size: 26px; }
}

/* A phone is its own composition: the ticker and its weight sit on one line ABOVE the row's
   squares, so the squares keep the whole width and stay chunky instead of shrinking to crumbs. */
@media (max-width: 680px) {
  :root { --cellgap: 4px; --key: 48px; }
  .sheet { padding-top: 30px; padding-bottom: 72px; }
  .marks i.tl, .marks i.bl { left: -12px; }
  .marks i.tr, .marks i.br { right: -12px; }
  .marks i { width: 16px; height: 16px; }
  .rows { row-gap: 18px; }
  .row { grid-template-columns: 1fr; row-gap: 7px; }
  .rowhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; grid-column: 1; grid-row: 1; }
  .row > .cells { grid-column: 1; grid-row: 2; }
  .row .tag { font-size: 15px; }
  .row .tag .sub { display: inline; margin-left: 10px; }
  .row .val { font-size: 16px; }
  .legend { margin-top: 22px; }
  .tokenrow .bar { grid-template-columns: 1fr; padding: 20px; }
  .keys { flex-wrap: wrap; }
  .tbl th, .tbl td { padding: 13px 18px; }
}

@media (max-width: 420px) {
  :root { --cellgap: 3px; --key: 46px; }
  .row .val { font-size: 15px; }
}

.memo {
  font-family: var(--mono);
  font-size: var(--t-mono);
  color: var(--ink-mid);
  letter-spacing: .02em;
  overflow-wrap: anywhere;
  margin: 0;
  line-height: 1.7;
}

/* the four steps of How it works, set as numbered blocks across the sheet */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 36px 40px; }
.step { min-width: 0; }
.step .n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  color: var(--up);
  line-height: 1;
  margin-bottom: 14px;
}
.step .t {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.step .b { margin: 0; color: var(--ink-mid); font-size: var(--t-body); line-height: 1.72; }

/* A phone is its own composition for a table too. Below 760 the columns stop being columns: each
   row becomes a block and each cell carries its own column name, so nothing is cut off the edge
   and nothing needs a sideways scroll box. */
@media (max-width: 880px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { border-bottom: 2px solid var(--rule); padding: 12px 0; }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td {
    display: grid;
    grid-template-columns: minmax(0, 116px) minmax(0, 1fr);
    gap: 14px;
    align-items: baseline;
    border: 0;
    padding: 7px 18px;
    text-align: left;
  }
  .tbl td::before {
    content: attr(data-l);
    font-family: var(--mono);
    font-size: var(--t-label);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-low);
  }
  .tbl td.n { text-align: left; }
  .tbl td:empty { display: none; }
}
