/* CoGS Web - the browser's pages on a2cogs.com.
   Same bones as the Flatline pages, in the CoGS site's colors (matte
   black board, gold edge, cream silkscreen) with the GS desktop's blue
   for links. The screenshots are black on white, so the page stays dark
   around them. */
@font-face {
  font-family: "PrintChar21";
  src: url("/assets/fonts/PrintChar21.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #0c0b0a;
  --bg-2: #121110;
  --panel: #17150f;
  --panel-2: #1d1a13;
  --line: #2a261c;
  --line-2: #38311f;
  --text: #f3ecdd;
  --text-dim: #cabfa8;
  --muted: #8c8270;
  --gold: #e7b850;
  --gold-2: #f2cd6f;
  --gold-deep: #b8893a;
  --blue: #7aa7ff;
  --blue-2: #a9c5ff;
  --pixel: "PrintChar21", "Courier New", monospace;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --r: 10px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: .4rem 0 .9rem; }
.dim { color: var(--text-dim); }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin: 0 auto; }
.narrow { max-width: 70ch; }
code { font-family: var(--mono); font-size: .9em; color: var(--gold-2); background: var(--panel-2); padding: .05em .35em; border-radius: 4px; }

/* The bar: back to a2cogs, the browser, its pages. */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 11, 10, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 1.2rem; height: 56px; }
.top .home { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.top .home:hover { color: var(--text); text-decoration: none; }
.top .name { font-family: var(--pixel); font-size: .85rem; letter-spacing: .04em; color: var(--gold); white-space: nowrap; }
.top .name:hover { color: var(--gold-2); text-decoration: none; }
.top .pages { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; margin-left: .4rem; }
.top .pages a { font-size: .82rem; padding: .3rem .7rem; color: var(--text-dim); white-space: nowrap; }
.top .pages a + a { border-left: 1px solid var(--line-2); }
.top .pages a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.top .pages a.on { color: var(--gold); background: rgba(231,184,80,.08); }
.top nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { font-size: .9rem; color: var(--text-dim); white-space: nowrap; }
.top nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 900px) { .top nav { display: none; } }
@media (max-width: 520px) { .top .home { display: none; } }

/* Hero. */
.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(231,184,80,.12), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(122,167,255,.08), transparent 60%),
    var(--bg);
}
.hero .wrap { padding: 3.5rem 0 3rem; display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero .shot { border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(231,184,80,.10); }
.kicker { font-family: var(--pixel); font-size: .7rem; letter-spacing: .12em; color: var(--gold); margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 .6rem; }
.hero h1 small { display: block; font-size: .42em; color: var(--text-dim); font-weight: 500; letter-spacing: .01em; margin-top: .4rem; line-height: 1.3; }
.hero .lede { font-size: 1.1rem; color: var(--text-dim); max-width: 54ch; }
.btns { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn {
  display: inline-block; padding: .65rem 1.1rem; border-radius: 6px;
  font-family: var(--pixel); font-size: .72rem; letter-spacing: .06em;
  border: 1px solid var(--gold); color: var(--gold); background: rgba(231,184,80,.06);
}
.btn:hover { background: rgba(231,184,80,.16); color: var(--gold-2); text-decoration: none; }
.btn.alt { border-color: var(--blue); color: var(--blue); background: rgba(122,167,255,.06); }
.btn.alt:hover { background: rgba(122,167,255,.14); color: var(--blue-2); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding: 2.4rem 0 2rem; } }

/* Sections. */
section { padding: 3.6rem 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.sec-head { margin-bottom: 1.4rem; }
.sec-head .num { font-family: var(--pixel); font-size: .72rem; color: var(--gold); letter-spacing: .1em; margin-right: 1rem; }
.sec-head h2 { display: inline-block; }
.sec-head p { margin: .2rem 0 0; color: var(--text-dim); max-width: 80ch; }

/* Screenshot grids. */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.shots.two { grid-template-columns: repeat(2, 1fr); }
.shots.four { grid-template-columns: repeat(4, 1fr); }
figure { margin: 0; }
figure img { width: 100%; border: 1px solid var(--line-2); border-radius: 6px; background: #000; }
figcaption { font-size: .82rem; color: var(--muted); margin-top: .45rem; line-height: 1.45; }
figure.big img { box-shadow: 0 20px 60px rgba(0,0,0,.5); }
/* A set of pictures inside a section (the IIe's two monitors). */
h3.set { margin: 2.2rem 0 .3rem; color: var(--gold-2); }
.sec-head + h3.set { margin-top: .4rem; }
h3.set + p { margin: 0 0 1rem; }
@media (max-width: 860px) { .shots, .shots.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shots, .shots.two, .shots.four { grid-template-columns: 1fr; } }

/* What is new: a grid of plain cards. */
.firsts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.first { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem 1.2rem; }
.first h3 { font-size: 1.02rem; color: var(--text); margin: 0 0 .4rem; }
.first p { font-size: .92rem; color: var(--text-dim); margin: 0; }
@media (max-width: 860px) { .firsts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .firsts { grid-template-columns: 1fr; } }

/* Who does what: the card and the GS side by side. */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.duo .side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; }
.duo .side h3 { font-family: var(--pixel); font-size: .78rem; letter-spacing: .08em; color: var(--gold); margin-bottom: .8rem; }
.duo .side.gs h3 { color: var(--blue); }
.duo ul { margin: 0; padding-left: 1.1rem; color: var(--text-dim); font-size: .95rem; }
.duo li { margin: .3rem 0; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

/* Numbers. */
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.nums div { border-top: 2px solid var(--gold-deep); padding-top: .7rem; }
.nums b { display: block; font-size: 1.7rem; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.nums span { font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .nums { grid-template-columns: repeat(2, 1fr); } }

/* Two-column text + picture. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.split.rev > :first-child { order: 2; }
.split p, .split li { color: var(--text-dim); }
.split ul { padding-left: 1.1rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }

/* Tables. */
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td:first-child { color: var(--text); }
td { color: var(--text-dim); }
tr:last-child td { border-bottom: 0; }
.tbl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .4rem .6rem; overflow-x: auto; margin: 1rem 0 1.4rem; }

kbd {
  display: inline-block; min-width: 1.7em; padding: .1em .45em; text-align: center;
  font-family: var(--mono); font-size: .82em; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  line-height: 1.5; margin: 0 .05em;
}

.note { padding: .9rem 1.1rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font-size: .95rem; color: var(--text-dim); margin: 1rem 0; }
.note b { color: var(--gold); font-weight: 600; }

/* Docs links at the foot of the overview. */
.docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.docs a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; color: var(--text-dim); }
.docs a:hover { border-color: var(--gold-deep); text-decoration: none; }
.docs a b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: .2rem; }
@media (max-width: 620px) { .docs { grid-template-columns: 1fr; } }

footer { padding: 2.5rem 0 3.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
footer a { color: var(--text-dim); }
footer .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }

/* ---- The guide and how-it-works pages ---- */
.manual { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding: 2.5rem 0 4rem; }
.toc { position: sticky; top: 76px; align-self: start; font-size: .88rem; }
.toc .t { font-family: var(--pixel); font-size: .68rem; color: var(--gold); letter-spacing: .1em; margin-bottom: .8rem; }
.toc a { display: block; color: var(--text-dim); padding: .22rem 0; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.back { font-size: .82rem; color: var(--blue); margin-bottom: .9rem; }
.manual article { max-width: 76ch; min-width: 0; }
.manual h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: .8rem; }
.manual h2 { font-size: 1.5rem; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.manual h3 { margin-top: 1.6rem; color: var(--gold-2); font-size: 1.05rem; }
.manual p, .manual li { color: var(--text-dim); }
.manual li { margin: .3rem 0; }
.manual strong { color: var(--text); font-weight: 600; }
.manual table { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin: 1rem 0 1.4rem; display: block; overflow-x: auto; padding: .3rem .5rem; }
.manual figure { margin: 1.2rem 0 1.6rem; }
@media (max-width: 860px) { .manual { grid-template-columns: 1fr; gap: 1.5rem; } .toc { position: static; display: none; } }

/* Lightbox: any picture opens large. cogsweb.js builds the markup. */
img[data-lb] { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; flex-direction: column; gap: .8rem; padding: 2.5rem 1.5rem 1.5rem; background: rgba(12,11,10,.95); backdrop-filter: blur(6px); }
.lb.on { display: flex; }
.lb img { max-width: min(96vw, 1280px); max-height: calc(100vh - 7rem); width: auto; height: auto; border: 1px solid var(--line-2); border-radius: 6px; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.7); cursor: default; }
.lb .cap { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-align: center; max-width: 70ch; }
.lb .x { position: absolute; top: .9rem; right: 1rem; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(12,11,10,.8); color: #fff; font: 1.3rem/1 var(--mono); cursor: pointer; }
.lb .x:hover { border-color: var(--gold); color: var(--gold); }
