/* ============================================================
   The Profit Pilgrim — plain. White background, black text.
   Marked days are bold; everything else stays out of the way.
   ============================================================ */

:root {
  --bg: #fff;
  --ink: #000;
  --faint: #8f8f8f;   /* unmarked days, quiet labels — light but readable */
  --mid: #666;
  --line: #e8e8e8;
  color-scheme: light;
}
/* dark scheme: near-black ground, off-white ink — same starkness, no glow.
   The house rule generalizes: ink on ground, or ground on ink. */
:root[data-theme="dark"] {
  --bg: #111;
  --ink: #f2f2f2;
  --faint: #757575;
  --mid: #9a9a9a;
  --line: #272727;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.1rem 1.2rem;
  -webkit-font-smoothing: antialiased;
}

/* ---------- theme toggle: a little I/O light switch, top right ----------
   I = lights on (light scheme), O = off (dark scheme).
   The active position is filled, like a pressed rocker. */
#theme {
  position: fixed;
  top: 1rem;
  right: 1.1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 2px solid var(--ink);
  padding: 0;
  cursor: pointer;
  width: 30px;
}
#theme span {
  display: block;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  text-align: center;
  padding: 0.42rem 0;
}
:root:not([data-theme="dark"]) #theme .sw-on { background: var(--ink); color: var(--bg); }
:root[data-theme="dark"] #theme .sw-off { background: var(--ink); color: var(--bg); }

/* ---------- masthead ----------
   margin-top:auto here + margin-top:auto on the footer centers the
   title+calendar group vertically in the viewport; on screens shorter
   than the content the margins collapse and it flows normally. */
header { text-align: center; margin-top: auto; margin-bottom: 2.8rem; }
h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
h1 a { color: var(--ink); text-decoration: none; }

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: auto;   /* pairs with header's margin-top:auto to center the group */
}

/* ---------- calendar (home view: this is the whole site) ---------- */
#calendar { width: min(92vw, 84vh, 580px); }

.load {
  display: flex; justify-content: center; align-items: center;
  min-height: 300px;
}
.load span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink);
  animation: breathe 1.1s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.8; }
}

.cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.6rem;
}
.cal-m {
  text-align: center;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-left: 0.18em;
  text-transform: uppercase;
}
.cal-m small {
  font-size: 0.6em;
  font-weight: 800;
  color: var(--faint);
  margin-left: 0.6em;
  letter-spacing: 0.18em;
}
.nav {
  background: none;
  border: none;
  color: var(--faint);
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
}
.nav:hover { color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.wd {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--faint);
  padding-bottom: 1rem;
}
.day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
  font-size: clamp(0.9rem, 3vw, 1.15rem);
  color: var(--faint);
}
.day.today { text-decoration: underline; text-underline-offset: 4px; }

/* marked days: bold black — the only thing that speaks.
   Only two states exist anywhere: black on white, or white on black.
   Hover and reading both invert the box fully. */
button.day {
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
button.day:hover,
button.day.sel {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- the diary page ----------
   Two views: home = calendar only; body.reading = the diary.
   Phones: page only, back link on top. Laptops: calendar docks left. */
#entry { display: none; width: min(92vw, 560px); }
body.reading #entry { display: block; }
body.reading #calendar { display: none; }

.back {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 2rem;
}
.back:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-head { margin-bottom: 2rem; }
.page-dow {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.5rem;
}
.page-head h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.01em; }
.page-head .etitle {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--mid);
  margin-top: 0.45rem;
}

.page-body { font-size: 1.02rem; line-height: 1.8; }
.page-body p { margin-bottom: 1.1rem; }
.page-body ul { margin: 0 0 1.1rem 1.25rem; }
.page-body li { line-height: 1.8; }
.page-body a { color: var(--ink); text-underline-offset: 3px; }
.page-body a:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.page-body a.ext { word-break: break-all; }
/* "> …" quotes — a minimal blockquote: 2px ink rule, indented, set off from the body */
.page-body blockquote {
  margin: 1.7rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--ink);
  color: var(--ink);
}
.page-body blockquote p:last-child { margin-bottom: 0; }   /* tight bottom inside the quote */
/* em: lines — a standalone bold-italic call-out sentence */
.page-body p.em { font-weight: 800; font-style: italic; }
/* financial tables — clean B/W, tabular numerals, horizontal scroll if too wide */
.page-body figure.tbl { margin: 1.6rem 0; overflow-x: auto; }
.page-body table { border-collapse: collapse; width: 100%; font-size: 0.82rem; }
.page-body thead th {
  font-weight: 800; text-align: right; white-space: nowrap;
  padding: 0.32rem 0.6rem; border-bottom: 2px solid var(--ink);
}
.page-body thead th:first-child { text-align: left; }
.page-body tbody th {
  font-weight: 700; text-align: left; white-space: nowrap;
  padding: 0.32rem 0.6rem; border-bottom: 1px solid var(--line);
}
.page-body tbody td {
  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
  padding: 0.32rem 0.6rem; border-bottom: 1px solid var(--line);
}

/* $TICKER links: bold; hover inverts, per the house rule */
a.tick {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
a.tick:hover { background: var(--ink); color: var(--bg); }

/* the tags under the home calendar: $ → ticker index, ? → the game,
   LATEST → the newest entry (#latest resolves to it in main.js) */
.home-tags { display: flex; align-items: center; gap: 0.3rem; margin-top: 2.2rem; }
.home-tags a {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  padding: 0.2rem 0.9rem;
}
.home-tags a:hover { background: var(--ink); color: var(--bg); }
.home-tags a.latest {
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
}
body.reading .home-tags, body.playing .home-tags { display: none; }

/* ticker index: search box */
.ticksearch {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  background: none;
  border: none;
  border-bottom: 2px solid var(--ink);
  padding: 0.4rem 0 0.5rem;
  margin-bottom: 1.8rem;
  outline: none;
  border-radius: 0;
}
.ticksearch::placeholder { color: var(--faint); font-weight: 700; }
/* the browser's own clear button arrives in its own colour — not on this site */
.ticksearch::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ticker page */
.tick-name { font-size: 2rem; font-weight: 900; letter-spacing: 0.01em; }
.ticklist { list-style: none; margin: 0; }
.ticklist li { margin-bottom: 0.9rem; font-size: 1rem; }
.ticklist a {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.ticklist a:hover { background: var(--ink); color: var(--bg); }
.tl-title { color: var(--mid); margin-left: 0.5rem; }
.page-body figure { margin: 1.6rem 0; }
.page-body img { max-width: 100%; height: auto; display: block; }
.page-body figure.chart svg { width: 100%; height: auto; display: block; cursor: crosshair; touch-action: pan-y; }
.page-body figure.chart svg.bars,
.page-body figure.chart svg.diagram { cursor: default; }   /* static chart/diagram, no hover */
/* charts are inlined SVG, so CSS remaps their colors to the active scheme
   (attribute selectors override the generator's presentation attributes) */
figure.chart svg rect[fill="#fff"] { fill: var(--bg); }
figure.chart svg [stroke="#000"] { stroke: var(--ink); }
figure.chart svg [fill="#000"] { fill: var(--ink); }
figure.chart svg [stroke="#eee"] { stroke: var(--line); }
figure.chart svg text[fill="#666"] { fill: var(--mid); }
figure.chart svg [stroke="#666"] { stroke: var(--mid); }
figure.chart svg .tip text[fill="#fff"] { fill: var(--bg); }
.page-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mid);
}
/* pdf/document attachment: a bordered link that fully inverts on hover (house rule) */
.page-body figure.doc { margin: 1.6rem 0; }
.doc-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 2px solid var(--ink);
  padding: 0.6rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.doc-link:hover { background: var(--ink); color: var(--bg); }
.doc-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  border: 1.5px solid currentColor;   /* follows text colour, so it inverts too */
  padding: 0.1rem 0.32rem;
}
.doc-name { flex: 1; }
.doc-go { font-weight: 800; }

/* ---- in-site PDF reader ----
   a fixed panel that slides in from the right; on laptops the page is squeezed
   left so text + source doc sit side by side; on phones it goes full-screen. */
#pdfpanel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  height: 100vh;
  height: 100dvh;
  width: var(--pdfw, 50vw);   /* half the screen by default; drag handle sets --pdfw */
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 2px solid var(--ink);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}
body.pdf-open #pdfpanel { transform: translateX(0); visibility: visible; }
body.pdf-open { padding-right: var(--pdfw, 50vw); }   /* laptops: make room to the left */
/* reader open (desktop): hide the calendar and let the WRITING fill the left
   pane, so the page and the doc are a true half-and-half. The .reading.pdf-open
   compound outranks the reading-grid rules in the media query further down. */
body.reading.pdf-open #calendar { display: none; }
body.reading.pdf-open main { display: block; }
body.reading.pdf-open #entry {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1.3rem, 4vw, 3rem);
}

/* drag handle on the panel's left edge to resize its width */
.pdf-grip {
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 11px;
  z-index: 3;
  cursor: ew-resize;
  touch-action: none;
}
.pdf-grip::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 2px;
  height: 34px;
  transform: translateY(-50%);
  background: var(--faint);
}
.pdf-grip:hover::before { background: var(--ink); height: 52px; }
/* while dragging: kill the iframe's pointer capture so moves keep reaching us */
body.pdf-resizing { cursor: ew-resize; user-select: none; }
body.pdf-resizing .pdf-frame { pointer-events: none; }

.pdf-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.55rem;
  border-bottom: 2px solid var(--ink);
}
.pdf-title {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.pdf-act:hover { background: var(--ink); color: var(--bg); }
.pdf-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }

@media (max-width: 900px) {
  #pdfpanel { width: 100vw; border-left: 0; }
  body.pdf-open { padding-right: 0; }
  .pdf-grip { display: none; }   /* full-screen on phones — nothing to resize */
}
.none { color: var(--mid); line-height: 1.8; }

.enav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}
.enav a { color: var(--ink); text-decoration: none; }
.enav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- reading state ----------
   Title pinned to the top; the WRITING is the centered column of the
   screen. The calendar lives in the left gutter only when it truly fits
   (wide laptops); below that it hides and the back link takes over. */
body.reading header { margin-top: 0; }

@media (min-width: 1150px) {
  body.reading main {
    display: grid;
    grid-template-columns: 1fr min(560px, 92vw) 1fr;
    column-gap: 2.5rem;
    align-items: start;
  }
  body.reading #calendar {
    display: block;
    grid-column: 1;
    justify-self: end;
    width: 270px;
    position: sticky;
    top: 1.6rem;
  }
  body.reading #entry { grid-column: 2; width: 100%; }
  body.reading .back { display: none; }
  body.reading .cal-top { margin-bottom: 1rem; }
  body.reading .cal-m { font-size: 0.95rem; }
  body.reading .nav { font-size: 1rem; padding: 0.2rem 0.5rem; }
  body.reading .wd { font-size: 0.46rem; padding-bottom: 0.5rem; }
  body.reading .day { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .load span { animation: none; opacity: 0.5; }
}

/* ============================================================
   The game (#play) — the world as a dot grid, decks beside it.
   Same grammar as the calendar: little squares, and the only two
   states are ink on ground or ground on ink.
   ============================================================ */
#game { display: none; width: 100%; }
body.playing #game { display: block; }
body.playing #calendar, body.playing #entry { display: none; }
body.playing header { margin-top: 0; margin-bottom: 2rem; }

/* ---- the map ---- */
#gmap svg { width: 100%; height: auto; display: block; }
#gmap rect {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.62);      /* a dot inside its cell */
}
#gmap .land { pointer-events: none; }
#gmap .land rect { fill: var(--faint); }
#gmap g.mk { cursor: pointer; outline: none; }
#gmap g.mk rect { fill: var(--ink); transition: transform 0.18s ease; }
/* a market you're pointing at stops being dots and becomes solid ink */
#gmap g.mk:hover .dots rect,
#gmap g.mk:focus .dots rect,
#gmap g.mk.on .dots rect { transform: scale(1); }
/* the dots are only decoration; the invisible full-cell layer takes the
   pointer, so there are no gaps to fall through */
#gmap g.mk g.dots { pointer-events: none; }
#gmap g.mk g.hit rect { fill: transparent; transform: none; transition: none; }
#gmap g.mk:focus-visible g.hit rect { fill: transparent; stroke: var(--ink); stroke-width: 0.08; }
.gmap-cap {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- panel furniture ---- */
#gpanel { min-width: 0; }
.g-back {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 1.6rem;
}
.g-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.g-head { margin-bottom: 1.6rem; }
.g-kicker {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.5rem;
}
.g-head h2 {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.g-lede { font-size: 0.85rem; line-height: 1.7; color: var(--mid); margin-top: 0.5rem; }

/* ---- deck list: sectors bold, their industries indented under them ---- */
.g-decks { list-style: none; margin: 0; }
.g-decks a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.26rem 0.4rem;
  color: var(--ink);
  text-decoration: none;
}
.g-decks a:hover { background: var(--ink); color: var(--bg); }
.g-sec { display: flex; align-items: stretch; margin-top: 0.7rem; }
.g-sec > a { flex: 1 1 auto; min-width: 0; }
/* the +/- that folds a sector's industries away */
.g-exp {
  flex: 0 0 auto;
  width: 1.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
}
button.g-exp:hover { background: var(--ink); color: var(--bg); }
#gexpand {
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 2px solid var(--ink);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
#gexpand:hover { background: var(--ink); color: var(--bg); }
.g-sec a {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.g-ind a { padding-left: 1.5rem; font-size: 0.85rem; color: var(--mid); }
.g-decks b { font-weight: 800; }
.g-ind b { font-weight: 400; }

/* ---- play / list toggle ---- */
.g-tiers { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.4rem; }
.g-tiers a {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
  padding: 0.3rem 0.7rem;
}
.g-tiers a:hover, .g-tiers a.on { background: var(--ink); color: var(--bg); }

/* ---- playing ---- */
.g-play { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem; }
#ganswer {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  background: none;
  border: none;
  border-bottom: 2px solid var(--ink);
  padding: 0.4rem 0.3rem 0.5rem;
  outline: none;
  border-radius: 0;
}
#ganswer::placeholder {
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
#ganswer.hit { background: var(--ink); color: var(--bg); }   /* flash on a hit */
.g-score {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.g-score span { color: var(--faint); }

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 4px;
}
.g-cell {
  aspect-ratio: 2.4 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 2px;
  border: 1px solid var(--line);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.g-cell.got { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.g-cell.missed { color: var(--faint); }

.g-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
#ggive {
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 2px solid var(--ink);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
#ggive:hover { background: var(--ink); color: var(--bg); }

/* ---- reading the deck instead of playing it ---- */
.g-list { list-style: none; margin: 0; }
.g-list li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.g-sym { flex: 0 0 auto; font-weight: 800; color: var(--ink); text-decoration: none; }
.g-sym:hover { background: var(--ink); color: var(--bg); }
.g-nm { flex: 1 1 auto; min-width: 0; }
.g-note { flex: 0 0 auto; font-size: 0.7rem; font-weight: 700; color: var(--faint); white-space: nowrap; }

/* ---- two columns only when there is honestly room for both ---- */
@media (min-width: 1150px) {
  body.playing #game {
    display: grid;
    grid-template-columns: minmax(320px, 540px) minmax(320px, 560px);
    column-gap: 3rem;
    justify-content: center;
    align-items: start;
  }
  body.playing #gmap { position: sticky; top: 1.6rem; }
  .g-back-map { display: none; }   /* the map is right there */
}
@media (max-width: 1149px) {
  body.playing #game { max-width: 560px; margin: 0 auto; }
  body.playing.g-panel #gmap { display: none; }
  body.playing.g-map #gpanel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #gmap g.mk rect { transition: none; }
}

/* every company in a market: the industry sits right, clipped not wrapped */
.g-all .g-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-all .g-note {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--faint);
  text-decoration: none;
}
.g-all .g-note:hover { background: var(--ink); color: var(--bg); }
.g-count {
  margin-top: 1rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
@media (max-width: 560px) {
  .g-all li { flex-wrap: wrap; }
  .g-all .g-note { flex-basis: 100%; margin-left: 0; }
}
