/* Complexity Chronicles — web edition. Mirrors template/gazette.cls. */
:root {
  --ink: #121710; --paper: #F4EEDB; --deep: #070A07; --deeper: #030503;
  --amber: #D9790C; --green: #22C032; --greendark: #0F6B1C; --yellow: #F4C724; --orange: #E08A12;
  --dusk: #1C4D26; --mute: #6B6B5C; --tint: #DCE9D0; --tintline: #6F9A62;
  --serif: "Merriweather", Georgia, serif;
  --head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --serifhead: "Playfair Display", Georgia, serif;
  --cond: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  --mono: "Fira Mono", Menlo, Consolas, monospace;
  --title: "Baloo 2", "Arial Rounded MT Bold", sans-serif;
}
* { box-sizing: border-box; }
html { background: #E7E0C8; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--serif); font-weight: 300; font-size: 15.5px; line-height: 1.55; }
.page { max-width: 1080px; margin: 0 auto; padding: 0 28px 40px; background: var(--paper); box-shadow: 0 0 40px rgba(0,0,0,.12); }
a { color: var(--greendark); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .7em; text-align: justify; hyphens: auto; }
strong { font-weight: 700; }
code { font-family: var(--mono); font-size: .9em; }
.katex { font-size: 1.02em; }

/* ---------------------------------------------------------------- top nav */
.topnav { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 6px; font-family: var(--cond); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.topnav .brand { font-family: var(--title); font-weight: 800; text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--amber); }
.topnav .links a { color: var(--mute); margin-left: 18px; }
.topnav .links a:hover { color: var(--amber); }

/* ---------------------------------------------------------------- masthead */
.masthead { margin: 4px 0 14px; }
.crt { position: relative; background: var(--deeper); overflow: hidden; height: 230px; border: 1px solid #1a2a1a; }
.crt::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.28) 2px 3px); }
.hex { margin: 0; padding: 10px 14px; color: var(--green); font-family: var(--mono); font-size: 12.5px; line-height: 1.12; letter-spacing: .04em; white-space: pre; opacity: .9; text-shadow: 0 0 6px rgba(34,192,50,.6); }
.hex::selection { background: transparent; }
.title { position: absolute; left: 36px; top: 26px; display: flex; flex-direction: column; font-family: var(--title); font-weight: 800; font-size: 46px; line-height: .92; color: var(--yellow); letter-spacing: -.01em;
  text-shadow: 2px 2px 0 var(--orange), 4px 4px 0 var(--deeper), 0 0 18px rgba(0,0,0,.9); }
.title::before { content: ""; position: absolute; inset: -14px -24px -14px -22px; background: radial-gradient(ellipse at 40% 50%, rgba(3,5,3,.92) 40%, rgba(3,5,3,0) 75%); z-index: -1; }
.crt .title { z-index: 1; }
.ears { position: absolute; right: 16px; top: 12px; text-align: right; font-family: var(--mono); font-size: 11px; line-height: 1.35; color: var(--yellow); }
.ears .ear { background: rgba(3,5,3,.85); padding: 3px 6px; margin-bottom: 6px; display: inline-block; }
.tagline { position: absolute; right: 16px; bottom: 34px; font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .3em; color: var(--green); background: rgba(3,5,3,.85); padding: 2px 6px; }
.motto { position: absolute; right: 16px; bottom: 10px; font-family: var(--cond); font-style: italic; font-size: 13px; color: #E8E8E0; background: rgba(3,5,3,.85); padding: 2px 6px; }
.datebar { background: linear-gradient(90deg, var(--yellow), var(--orange)); color: var(--deep); font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- common pieces */
.rule { height: 2px; background: linear-gradient(90deg, var(--amber), var(--green)); margin: 12px 0; }
.kicker { font-family: var(--cond); font-weight: 700; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--amber); margin: 0 0 4px; }
.standfirst { font-family: var(--cond); font-size: 19px; line-height: 1.3; color: var(--dusk); text-align: left; hyphens: none; margin: 4px 0 10px; }
.standfirst.small { font-size: 16px; }
h1, h2, h3 { margin: 0; line-height: 1.02; hyphens: none; text-align: left; }
.lead h1 { font-family: var(--head); font-weight: 900; font-size: 50px; letter-spacing: -.02em; margin: 2px 0 10px; }
.story h2 { font-family: var(--serifhead); font-weight: 900; font-size: 24px; margin: 0 0 6px; }
.feature h2 { font-family: var(--serifhead); font-weight: 900; font-size: 34px; margin: 0 0 8px; }
h3.subhead { font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--greendark); margin: 10px 0 4px; break-after: avoid; }
.cols { column-gap: 26px; column-rule: 1px solid #E2C9A0; }
.cols-3 { column-count: 3; }
.cols-2 { column-count: 2; }
.cols p { break-inside: auto; orphans: 2; widows: 2; }
.dc { float: left; font-family: var(--head); font-weight: 900; font-size: 3.4em; line-height: .82; padding: .06em .08em 0 0; color: var(--amber); }
.items { margin: 0 0 .7em; padding-left: 1.2em; list-style: none; }
.items li { margin: 0 0 3px; position: relative; }
.items li::before { content: "■"; color: var(--amber); font-size: .55em; position: absolute; left: -1.2em; top: .55em; }
.sources { font-family: var(--cond); font-size: 13px; color: var(--mute); text-align: left; hyphens: none; margin-top: 6px; }
.sources .who { color: var(--mute); }
a.ref, .ref { font-family: var(--mono); font-size: .78em; color: var(--greendark); white-space: nowrap; }
.pagehead { display: flex; justify-content: space-between; align-items: center; background: var(--deep); color: #fff; margin: 26px 0 14px; padding: 6px 12px 6px 0; font-family: var(--head); font-weight: 900; font-size: 20px; letter-spacing: .04em; text-transform: uppercase;
  border-left: 10px solid var(--amber); box-shadow: inset 10px 0 0 var(--green); }
.pagehead > span:first-child { padding-left: 22px; }
.pagehead .right { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .04em; text-transform: none; color: var(--green); }
.boxtitle { font-family: var(--cond); font-weight: 700; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; padding: 5px 12px; }

/* ---------------------------------------------------------------- front page */
.teasers { background: var(--tint); border: 1px solid var(--tintline); margin: 0 0 18px; }
.teasers .boxtitle { background: #C7DDB8; color: var(--ink); }
.teasers p { font-family: var(--cond); font-size: 14.5px; line-height: 1.4; padding: 8px 12px 6px; margin: 0; text-align: left; hyphens: none; }
.teaser { display: inline; }
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 26px; }
.story { border-left: 1px solid #E2C9A0; padding-left: 20px; }
.story:first-child { border-left: 0; padding-left: 0; }

/* ---------------------------------------------------------------- boxes */
.pull { position: relative; break-inside: avoid; background: var(--deep); color: #fff; font-family: var(--cond); font-style: italic; font-size: 17px; line-height: 1.3; margin: 10px 0 14px; padding: 14px 16px 12px 36px; }
.pull::before { content: "“"; position: absolute; left: 8px; top: 2px; font-family: var(--serifhead); font-size: 44px; color: var(--amber); line-height: 1; }
.pull::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.25) 2px 3px); }
.technique { background: var(--deep); color: #EDEDE4; margin: 16px 0 12px; }
.technique .boxtitle { background: var(--yellow); color: var(--deep); }
.technique .inner { padding: 12px 16px 8px; font-family: var(--cond); font-size: 16px; line-height: 1.45; }
.technique .inner p { text-align: left; }
.technique .katex { color: #fff; }
.technique .items li::before { color: var(--green); }
.technique .dc { color: var(--yellow); }
.technique h3.subhead { color: var(--green); }
.timeline { background: var(--tint); border: 1px solid var(--tintline); margin: 0 0 12px; padding-bottom: 8px; }
.timeline .boxtitle { background: #C7DDB8; }
.milestone { display: grid; grid-template-columns: minmax(64px, max-content) 1fr; gap: 8px; padding: 3px 12px; font-family: var(--cond); font-size: 14.5px; line-height: 1.35; }
.milestone .year { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--amber); }
.srcs .label { font-family: var(--cond); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin: 6px 0 2px; }
.srcs ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 26px; font-size: 12.5px; line-height: 1.4; }
.srcs li { break-inside: avoid; padding-left: 2.6em; text-indent: -2.6em; margin-bottom: 2px; }
.srcs .num { font-family: var(--mono); font-size: 11px; color: var(--greendark); }

/* ---------------------------------------------------------------- column */
.columnhead { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; background: var(--deep); color: #fff; padding: 14px 16px; margin-bottom: 14px; position: relative; }
.columnhead::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.22) 2px 3px); }
.avatar { width: 84px; height: 84px; }
.avatar .bg { fill: var(--deeper); stroke: var(--amber); stroke-width: .18; }
.avatar .px { fill: var(--green); }
.columnhead .who { font-family: var(--cond); font-weight: 700; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--green); }
.columnhead h2 { font-family: var(--serifhead); font-weight: 900; font-size: 30px; color: #fff; margin: 4px 0 6px; }
.columnhead .bio { font-family: var(--cond); font-size: 13px; color: #B9BDB0; }
.signoff { font-family: var(--cond); font-style: italic; color: var(--dusk); text-align: left; }

/* ---------------------------------------------------------------- briefs */
.briefs .brief { break-inside: avoid; margin: 0 0 9px; font-size: 13.5px; line-height: 1.45; text-align: left; hyphens: none; }
.brief .t { font-family: var(--cond); font-weight: 700; font-size: 15px; }
.brief .who { font-family: var(--cond); font-size: 13px; color: var(--mute); }
.repo { margin: 0 0 18px; }
.repohead { font-family: var(--cond); font-weight: 700; font-size: 19px; border-top: 2px solid var(--amber); padding-top: 6px; margin: 10px 0 2px; }
.repohead .n { font-family: var(--mono); font-size: 12px; color: var(--mute); font-weight: 400; margin-left: 8px; }
.repodesc { font-family: var(--cond); font-size: 13.5px; color: var(--mute); text-align: left; margin: 0 0 8px; }
.repostats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; background: var(--tint); border: 1px solid var(--tintline); padding: 8px 12px 6px; margin: 0 0 10px; }
.repostats .stat .value { font-size: 21px; color: var(--amber); line-height: 1.15; }
.repostats .stat .label { color: var(--ink); font-size: 10.5px; }
.repodigest { border-left: 3px solid var(--greendark); padding: 2px 0 2px 12px; margin: 0 0 12px; font-family: var(--cond); font-size: 15px; line-height: 1.4; }
.repodigest p { text-align: left; margin: 0 0 6px; }
.repodigest .kv .k { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: var(--greendark); margin-right: 6px; }

/* ---------------------------------------------------------------- back page */
.numbers { background: var(--deep); color: #fff; border-top: 3px solid var(--amber); margin-bottom: 12px; }
.numbers .boxtitle { color: #fff; }
.numbers .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 14px; padding: 4px 14px 14px; }
.stat { text-align: center; }
.stat .value { font-family: var(--head); font-weight: 900; font-size: 30px; color: var(--amber); line-height: 1.1; overflow-wrap: anywhere; }
.stat .value .katex { font-size: .95em; color: var(--amber); }
.stat .label { font-family: var(--cond); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #D8DBCF; margin-top: 4px; line-height: 1.25; }
.forecast { border: 1px solid var(--orange); margin-bottom: 12px; background: #FBF4D8; }
.forecast .boxtitle { background: var(--yellow); color: var(--deep); }
.forecast .inner { padding: 10px 14px 4px; font-family: var(--cond); font-size: 16px; line-height: 1.4; }
.forecast .inner p { text-align: left; }
.classifieds { border: 1px solid var(--greendark); border-bottom: 3px solid var(--amber); margin-bottom: 18px; }
.classifieds .boxtitle { background: var(--greendark); color: #fff; }
.classifieds .cols { padding: 10px 14px 4px; column-rule: 0; }
.ad { font-family: var(--mono); font-size: 12.5px; line-height: 1.4; text-align: left; hyphens: none; break-inside: avoid; padding-left: 1.2em; text-indent: -1.2em; }
.colophon { border: 1px solid var(--mute); padding: 8px 12px; font-family: var(--cond); font-size: 12px; color: var(--mute); line-height: 1.4; }
.colophon a { color: var(--greendark); }

/* ---------------------------------------------------------------- archive */
.archive .entry { padding: 10px 0 14px; border-bottom: 1px solid #E2C9A0; }
.archive h2 { font-family: var(--serifhead); font-weight: 900; font-size: 28px; margin: 2px 0 6px; }
.archive h2 a { color: var(--ink); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .cols-3 { column-count: 2; }
  .stories { grid-template-columns: 1fr 1fr; }
  .story:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid #E2C9A0; padding-top: 12px; }
  .lead h1 { font-size: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  p { text-align: left; }
  .page { padding: 0 14px 30px; }
  .cols-3, .cols-2, .srcs ol { column-count: 1; columns: 1; }
  .stories { grid-template-columns: 1fr; }
  .story { border-left: 0; padding-left: 0; border-top: 1px solid #E2C9A0; padding-top: 12px; }
  .lead h1 { font-size: 32px; }
  .feature h2 { font-size: 27px; }
  .crt { height: 190px; }
  .title { font-size: 34px; left: 18px; top: 22px; }
  .hex { font-size: 10px; }
  .ears { display: none; }
  .tagline { letter-spacing: .18em; font-size: 11px; bottom: 30px; }
  .motto { bottom: 8px; }
  .datebar { white-space: normal; font-size: 11.5px; }
  .columnhead { grid-template-columns: 64px 1fr; }
  .avatar { width: 64px; height: 64px; }
  .topnav .links a { margin-left: 10px; }
}
@media print {
  html { background: #fff; }
  .page { box-shadow: none; max-width: none; }
  .topnav { display: none; }
}
