/* Treetop (/blog), a Koalaa product, as a market terminal: amber on black,
 * IBM Plex Mono for every label and figure, Plex Sans for reading, square
 * panels, a ticker tape and the world's clocks along the top. Always dark.
 * Charts and chips are drawn by the briefing's own styles (styles.css), on
 * these colours. */

@font-face { font-family: "Plex Mono"; src: url(/static/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/static/fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/static/fonts/plex-mono-600.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/static/fonts/plex-sans.woff2) format("woff2"); font-weight: 100 700; font-display: swap; }

body.blog {
  --page: #0a0a0a; --page-glow: none; --surface: #111111; --ink: #efe9dc; --ink-2: #bdb6a6; --muted: #7f786b;
  --grid: #1b1b1b; --baseline: #333; --border: #262626; --accent: #ffab1a; --accent2: #ffab1a; --accent-ink: #0a0a0a;
  --amber: #ffab1a; --amber-dim: #a06a0c; --cyan: #5ec8ff;
  --up: #2fd17a; --down: #ff5a4f; --other: #6b655a;
  --s1: #ffab1a; --s2: #2fd17a; --s3: #5ec8ff; --s4: #9ad14b; --s5: #c792ea; --s6: #ff5a4f; --s7: #f07fb0; --s8: #ff8a3d;
  --card-top: transparent; --shadow: none; --shadow-1: none;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
  display: block; margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--sans); font-size: 15.5px; line-height: 1.6;
}
.blog a { color: inherit; }
.blog ::selection { background: var(--amber); color: #000; }

/* ---------------------------------------------------------------- the top */
.bl-tape { height: 30px; overflow: hidden; border-bottom: 1px solid var(--border); background: #050505;
  font-family: var(--mono); font-size: 12.5px; white-space: nowrap; position: relative; }
.bl-tape-in { display: inline-flex; gap: 28px; padding-left: 16px; line-height: 30px; animation: bl-tape 60s linear infinite; }
.bl-tape:hover .bl-tape-in { animation-play-state: paused; }
.bl-tape span { color: var(--ink-2); } .bl-tape b { font-weight: 500; margin-left: 6px; }
.bl-tape .pos b { color: var(--up); } .bl-tape .neg b { color: var(--down); }
@keyframes bl-tape { to { transform: translateX(-50%); } }

.bl-mast { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bl-mast-in { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.bl-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
/* the mark: a price line whose peaks are pine tops, each higher than the
 * last. On arrival the line draws left to right, the top peak lights and
 * the trunk sets; then the name types in after the prompt (blog.js). */
.bl-logo { width: 36px; height: 36px; flex: none; border-radius: 7px; box-shadow: 0 0 0 1px var(--border); }
.bl-logo .bl-line { stroke-dasharray: 100; stroke-dashoffset: 0; }
.bl-logo .bl-trunk, .bl-logo .bl-peak { transform-box: fill-box; transform-origin: 50% 100%; }
.bl-logo.drawing .bl-line { animation: bl-draw 1.4s cubic-bezier(.65, 0, .35, 1) both; }
.bl-logo.drawing .bl-trunk { animation: bl-set .45s cubic-bezier(.22, .7, .24, 1) 1.15s both; }
.bl-logo.drawing .bl-peak { transform-origin: 50% 50%; animation: bl-light .6s ease-out 1.35s both; }
@keyframes bl-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes bl-set { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bl-light { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.5); opacity: 1; } 100% { transform: none; opacity: 1; } }

/* the name, typed after a prompt, the cursor blinking after it */
.bl-type { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink); white-space: nowrap; line-height: 1;
  min-width: 6.4em; }                  /* the typed name's full room from the start: nothing beside it moves */
.bl-pr { color: var(--amber); font-weight: 600; margin-right: .45em; }
.bl-word { min-width: 0; }
.bl-cursor { display: inline-block; width: .5em; height: 1.05em; margin-left: .12em; background: var(--amber); }
.bl-cursor.blink { animation: bl-blink 1.1s steps(1) infinite; }
@keyframes bl-blink { 50% { opacity: 0; } }
.bl-tag { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.bl-tag b { color: var(--amber); font-weight: 600; letter-spacing: 0; }
.bl-tag.waiting { opacity: 0; }
.bl-tag .scr { color: var(--amber); }
.bl-clocks { margin-left: auto; display: flex; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bl-clocks span b { color: var(--ink); font-weight: 500; margin-left: 6px; }
.bl-clocks .on b { color: var(--amber); }
.bl-live { display: inline-flex; align-items: center; gap: 6px; color: var(--up); }
.bl-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: nc-pulse 2.4s ease-in-out infinite; }

/* ----------------------------------------------------------------- layout */
.bl-wrap { max-width: 1240px; margin: 0 auto; padding: 26px 20px 10px; display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px; align-items: start; }
.bl-main { min-width: 0; }

/* a function-key label: amber on black, like a terminal's keys */
.fk { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 3px; background: var(--amber); color: #0a0a0a; }
.fk.ghost { background: transparent; color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-dim); }

/* ------------------------------------------------------------- the newscast */
.nc-top { margin-bottom: 20px; }
.nc-kick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.nc-air i { width: 7px; height: 7px; border-radius: 50%; background: #c0160c; animation: nc-pulse 2.4s ease-in-out infinite; }
@keyframes nc-pulse { 50% { opacity: .35; } }
.nc-h { font-family: var(--sans); font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.02em; font-weight: 600; margin: 0 0 16px; text-wrap: balance; }
.nc-open { font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.62; color: var(--ink-2); margin: 0; max-width: 66ch;
  padding: 2px 0 2px 16px; border-left: 2px solid var(--amber); }
.nc-pills { margin: 22px 0 28px; }

.nc-run { margin-bottom: 30px; border-top: 1px solid var(--border); }
.nc-seg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.nc-seg-n { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--amber); padding-top: 2px; }
.nc-seg-k { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.nc-seg.tone-negative .nc-seg-k::before, .nc-seg.tone-positive .nc-seg-k::before, .nc-seg.tone-mixed .nc-seg-k::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; background: var(--muted); }
.nc-seg.tone-negative .nc-seg-k::before { background: var(--down); } .nc-seg.tone-positive .nc-seg-k::before { background: var(--up); }
.nc-seg.tone-mixed .nc-seg-k::before { background: var(--amber); }
.nc-seg h2 { font-family: var(--sans); font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 6px; }
.nc-seg p { margin: 0; color: var(--ink-2); max-width: 72ch; }
.nc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.nc-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; border-radius: 3px; font-family: var(--mono); font-size: 12px;
  background: var(--grid); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--border); }
.nc-chip b { font-weight: 500; color: var(--ink); } .nc-chip.pos b { color: var(--up); } .nc-chip.neg b { color: var(--down); }
.nc-chip em { font-style: normal; font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.nc-close { font-size: 17px; color: var(--ink-2); margin: 26px 0 8px; padding-left: 16px; border-left: 2px solid var(--amber-dim); }
.nc-src { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin: 16px 0 0; }
.nc-empty { font-family: var(--mono); color: var(--muted); padding: 40px 0; }

/* the briefing's pieces, squared off and in the terminal's type */
.blog .bf-pill { border-radius: 4px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.blog .bf-pill-l { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.blog .bf-pill b { font-family: var(--mono); font-weight: 500; font-size: 17px; }
.blog .bf-pill-n { font-size: 12px; }
.blog .bf-cod { margin-bottom: 26px; padding: 20px; border-radius: 4px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.blog .bf-cod h3 { font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.blog .bf-kicker, .blog .bf-chart-t, .blog .bf-news h3, .blog .bf-watch h3, .blog .bf-hist h3 {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.blog .bf-news h3, .blog .bf-watch h3, .blog .bf-hist h3 { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.blog .bf-charts { margin-bottom: 26px; }
.blog .bf-chart { border-radius: 4px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.blog .bf-hist { border-radius: 4px; background: var(--surface); }
.blog .bf-yax, .blog .bf-xax, .blog .bf-legend, .blog .bf-axis-note, .blog .bf-bar, .blog .bf-grp, .blog .bf-hist-t, .blog .bf-hist-chips { font-family: var(--mono); }
.blog .bf-story { border-top-color: var(--border); }
.blog .bf-story a { font-weight: 600; }
.blog .bf-kind { font-family: var(--mono); border-radius: 3px; }
.blog .bf-watch ol { border-left-color: var(--amber-dim); }
.blog .bf-watch li b { font-family: var(--mono); font-weight: 500; color: var(--amber); }

/* an earnings call */
.nc-co { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nc-co .tlogo { width: 40px; height: 40px; border-radius: 6px; }
.nc-co > div { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
.nc-co > div b { font-size: 17px; } .nc-co > div span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.nc-co .cl-eps { font-family: var(--mono); }
.nc-verdict { font-family: var(--mono); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px;
  border-radius: 3px; background: var(--grid); }
.nc-verdict.v-good { color: var(--up); } .nc-verdict.v-bad { color: var(--down); } .nc-verdict.v-mixed { color: var(--amber); }
.nc-call .nc-h { font-size: clamp(26px, 3vw, 36px); }
.nc-call .cl-body { padding: 0; border: 0; }
.blog .cl-tabs button { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.blog .cl-tbl { font-family: var(--mono); font-size: 13px; }

/* ----------------------------------------------------------- the archive */
.bl-side { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; }
.bl-side-t { margin: 2px 0 12px; }
.bl-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.bl-tabs button { font: inherit; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px;
  border-radius: 3px; border: 1px solid var(--border); background: transparent; color: var(--ink-2); cursor: pointer; }
.bl-tabs button.active { background: var(--amber); border-color: var(--amber); color: #0a0a0a; font-weight: 600; }
.bl-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.bl-items li { border-bottom: 1px solid var(--border); }
.bl-items a { display: flex; flex-direction: column; gap: 3px; padding: 10px 8px 10px 10px; text-decoration: none; border-left: 2px solid transparent; }
.bl-items a:hover { background: var(--surface); }
.bl-items a.active { background: var(--surface); border-left-color: var(--amber); }
.bl-items b { font-size: 13.5px; line-height: 1.38; font-weight: 600; }
.bl-items time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.bl-k { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--amber);
  text-transform: uppercase; letter-spacing: .06em; }
.bl-k .tlogo { width: 16px; height: 16px; border-radius: 3px; font-size: 9px; }
.bl-dot { width: 6px; height: 6px; background: var(--amber); }

/* -------------------------------------------------------------- the foot */
.bl-foot { max-width: 1240px; margin: 34px auto 0; padding: 22px 20px 44px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.bl-by { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; }
.bl-by .koalaa { color: var(--ink); }
.koalaa { display: inline-block; height: 38px; aspect-ratio: 1016 / 442; background: currentColor;
  -webkit-mask: url(/static/brand/koalaa-technologies.png) center / contain no-repeat; mask: url(/static/brand/koalaa-technologies.png) center / contain no-repeat; }
.bl-foot p { margin: 0 0 6px; max-width: 74ch; }
.bl-foot .bl-copy { font-family: var(--mono); font-size: 11.5px; }

@media (max-width: 900px) {
  .bl-wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 18px; }
  .bl-side { position: static; max-height: none; }
  .blog .bf-cod { grid-template-columns: minmax(0, 1fr); }
  .bl-clocks { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 520px) {
  .bl-mast-in, .bl-wrap, .bl-foot { padding-left: 16px; padding-right: 16px; }
  .bl-mast { position: static; }
  .bl-tag { flex-basis: 100%; margin-top: -6px; font-size: 11px; }
  .bl-clocks { gap: 12px; font-size: 11.5px; }
  .nc-seg { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .blog .bf-story { grid-template-columns: minmax(0, 1fr); }
  .blog .bf-cod { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-tape-in, .bl-cursor.blink, .bl-live i, .nc-air i, .bl-logo.drawing * { animation: none; }
}
