/* kober. Warm plaster white, black ink, one Minoan blue for what the agent is looking at. */
:root {
  --bg: 40 24% 98.2%;
  --ink: 30 10% 6%;
  --muted: 30 4% 38%;
  --soft: 30 4% 60%;
  --line: 36 12% 87%;
  --wash: 36 18% 95%;
  --clay: 34 30% 93.5%;
  --accent: 222 74% 50%;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --la: 'Noto Sans Linear A', 'Noto Sans Linear B', 'Instrument Sans', sans-serif; /* B covers the Aegean word divider and numbers */

  --wrap: 1140px;
  --pad: 32px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; scroll-behavior: smooth; }
body { margin: 0; background: hsl(var(--bg)); color: hsl(var(--ink)); font: 400 17.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: 0 0 18px; text-wrap: pretty; }
.mono { font-family: var(--mono); }
.la { font-family: var(--la); font-weight: 400; }
:focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 3px; }
::selection { background: hsl(var(--accent)); color: #fff; }
.acc { color: hsl(var(--accent)); }
.wrap { max-width: calc(var(--wrap) + 2 * var(--pad)); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 12px var(--pad); background: hsl(var(--bg) / 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid hsl(var(--line)); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: italic 400 25px/1 var(--serif); letter-spacing: -0.01em; }
.brand canvas { display: block; image-rendering: pixelated; }
.top nav { margin-left: auto; display: flex; gap: 26px; align-items: center; font-size: 15px; }
.top nav a { color: hsl(var(--muted)); text-decoration: none; }
.top nav a:hover { color: hsl(var(--ink)); }
.top nav .x { display: inline-flex; color: hsl(var(--ink)); }
.ca { display: inline-flex; gap: 6px; font-size: 12.5px; background: none; border: 0; padding: 0; color: hsl(var(--ink)); cursor: pointer; }
.ca .lab { color: hsl(var(--muted)); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: end; padding-top: 96px; padding-bottom: 56px; }
h1 { font: 400 clamp(40px, 4.7vw, 66px)/1.02 var(--serif); letter-spacing: -0.028em; margin: 0; text-wrap: balance; }
.lede { font-size: 18px; margin-bottom: 26px; }
.cta { display: flex; align-items: center; gap: 24px; margin: 0 0 22px; }
.btn { display: inline-flex; align-items: center; font: 500 15px/1 var(--sans); padding: 13px 18px; border: 1px solid hsl(var(--ink)); border-radius: 0; background: hsl(var(--ink)); color: hsl(var(--bg)); text-decoration: none; cursor: pointer; transition: background 160ms, color 160ms; }
.btn:hover { background: hsl(var(--accent)); border-color: hsl(var(--accent)); }
.btn:disabled { background: transparent; color: hsl(var(--soft)); border-color: hsl(var(--line)); cursor: default; }
.link { font-size: 15px; font-weight: 500; text-decoration: none; }
.link:hover { color: hsl(var(--accent)); }
.status { font: 400 13px/1.6 var(--mono); color: hsl(var(--muted)); margin: 0; }
.status b { color: hsl(var(--ink)); font-weight: 500; }

/* the frieze: real tablets, drifting */
.frieze { margin: 0 0 8px; }
.frieze-box { position: relative; overflow: hidden; border-top: 1px solid hsl(var(--ink)); border-bottom: 1px solid hsl(var(--ink)); padding: 26px 0 22px; }
.frieze-box::before, .frieze-box::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.frieze-box::before { left: 0; background: linear-gradient(90deg, hsl(var(--bg)), hsl(var(--bg) / 0)); }
.frieze-box::after { right: 0; background: linear-gradient(270deg, hsl(var(--bg)), hsl(var(--bg) / 0)); }
.track { display: flex; align-items: flex-start; gap: 22px; width: max-content; will-change: transform; }
.tab { flex: none; display: flex; flex-direction: column; gap: 8px; }
.slab { background: hsl(var(--clay)); border: 1px solid hsl(var(--ink) / 0.75); border-radius: 3px 5px 4px 6px; padding: 12px 14px 10px; font: 400 21px/1.35 var(--la); color: hsl(var(--ink)); transition: border-color 300ms, box-shadow 300ms; }
.slab .r { white-space: nowrap; min-height: 1.35em; }
.slab.long { max-height: calc(11 * 1.35em + 22px); overflow: hidden; position: relative; }
.slab.long::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3.2em; background: linear-gradient(hsl(var(--clay) / 0), hsl(var(--clay))); }
.slab .t { margin-right: 0.35em; }
.slab .t.d { opacity: 0.35; }
.slab .s { transition: color 300ms; }
.slab .s.hot, .slab .t.hot { color: hsl(var(--accent)); }
.slab .r.hot { box-shadow: inset 0 -2px 0 hsl(var(--accent)); }
.tab.hot .slab { border-color: hsl(var(--accent)); box-shadow: 0 0 0 1px hsl(var(--accent)); }
.tab .cap { font: 400 11px var(--mono); color: hsl(var(--muted)); padding-left: 2px; }
.tab.hot .cap { color: hsl(var(--accent)); }
.frieze figcaption { font-size: 12px; line-height: 1.6; color: hsl(var(--muted)); padding-top: 10px; }
.frieze figcaption #now { color: hsl(var(--ink)); }

/* the desk: what it is reading right now */
.desk { padding-top: 64px; }
.desk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid hsl(var(--ink)); }
.desk-head h2 { font: 400 34px/1.08 var(--serif); letter-spacing: -0.02em; margin: 0 0 6px; }
.desk-head p { margin: 0; font-size: 14.5px; color: hsl(var(--muted)); }
.desk-head .desk-meta { font-size: 12.5px; text-align: right; white-space: nowrap; }
.desk-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: start; min-height: 540px; }
.desk-cap { font-size: 12px; color: hsl(var(--muted)); margin-bottom: 10px; min-height: 1.6em; }
.desk-slab { background: hsl(var(--clay)); border: 1px solid hsl(var(--ink) / 0.75); border-radius: 4px 7px 5px 8px; padding: 18px 26px; font: 400 31px/1.45 var(--la); }
.slab-in { max-height: calc(9 * 1.45em); min-height: calc(2 * 1.45em); overflow: hidden; position: relative; }
.slab-in.long { -webkit-mask-image: linear-gradient(transparent 0, #000 1.1em, #000 calc(100% - 1.1em), transparent 100%); mask-image: linear-gradient(transparent 0, #000 1.1em, #000 calc(100% - 1.1em), transparent 100%); }
.desk-slab .r { min-height: 1.45em; }
.desk-slab .t { display: inline-block; margin-right: 0.38em; color: hsl(var(--ink) / 0.2); transition: color 220ms; white-space: nowrap; }
.desk-slab .t.done { color: hsl(var(--ink)); }
.desk-slab .t.d.done, .desk-slab .t.lost.done { color: hsl(var(--ink) / 0.4); }
.desk-slab .t.done.cur { color: hsl(var(--accent)); box-shadow: inset 0 -3px 0 hsl(var(--accent)); }
.desk-slab .t.cur:has(.s) { box-shadow: none; }
.desk-slab .s { transition: color 220ms; }
.desk-slab .s.ahead { color: hsl(var(--ink) / 0.2); }
.desk-slab .s.cur { box-shadow: inset 0 -3px 0 hsl(var(--accent)); }
.desk-slab .r.sum { box-shadow: inset 0 -2px 0 hsl(var(--accent)); }
.desk-tr { font-size: 12.5px; line-height: 1.75; margin-top: 14px; color: hsl(var(--muted)); }
.desk-tr .tt { margin-right: 0.7em; visibility: hidden; }
.desk-tr .tt.on { visibility: visible; }
.desk-tr .tt.cur { color: hsl(var(--accent)); }
.desk-say { margin: 12px 0 0; font-size: 15px; min-height: 1.6em; }
.desk-seals { position: relative; max-height: 470px; overflow: auto; border-top: 1px solid hsl(var(--ink)); scrollbar-width: thin; }
.seal { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 8px 4px 8px 0; border-bottom: 1px solid hsl(var(--line)); color: hsl(var(--muted)); font-size: 14.5px; }
.seal .g { font-size: 26px; text-align: center; color: hsl(var(--ink)); }
.seal .g.small { font-size: 18px; }
.seal .g.small, .notebook .g.small, .claim .glyph.small { word-break: break-all; line-height: 1.25; }
.seal .g .nm { font: 500 11px var(--mono); }
.seal .v { font-size: 12px; }
.seal.cur { color: hsl(var(--ink)); background: hsl(var(--wash)); }
.seal.held .v { color: hsl(var(--ink)); font-weight: 500; }
.seal.miss .v { color: hsl(var(--accent)); }
.desk-rest { font: italic 400 24px/1.3 var(--serif); color: hsl(var(--muted)); padding: 40px 0; }

/* index cards */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.card { background: #fff; border: 1px solid hsl(var(--line)); padding: 11px 16px 10px; transition: opacity 500ms; }
.card-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid hsl(var(--accent) / 0.5); }
.card-h .la { font-size: 26px; line-height: 1; }
.card-h .v { font: 500 13px var(--mono); }
.card-h .gl { font: italic 400 16px var(--serif); color: hsl(var(--muted)); }
.card-h .k { font: 500 12px var(--mono); }
.card-h .where { margin-left: auto; font: 400 11px var(--mono); color: hsl(var(--muted)); white-space: nowrap; }
.card-b { padding-top: 3px; background: repeating-linear-gradient(transparent 0 23px, hsl(var(--accent) / 0.09) 23px 24px) 0 3px; }
.card-b p { font-size: 14.5px; line-height: 24px; margin: 0; }
.card-b p b { font-weight: 500; }
.card-b h4 { font: 400 20px/24px var(--serif); letter-spacing: -0.01em; margin: 3px 0 3px; }
.card.notice { border-color: hsl(var(--accent)); }
.card.notice .k, .card.miss .k { color: hsl(var(--accent)); }
.math { font: 400 12.5px/24px var(--mono); }
.math .ln { display: flex; justify-content: space-between; gap: 12px; }
.math .ln.d, .math .ln.g { color: hsl(var(--soft)); }
.math .ln.sum { color: hsl(var(--muted)); }
.math .ln.tot { font-weight: 500; }
.card.enter { animation: card-in 440ms cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes card-in { from { opacity: 0; transform: translateY(-10px); } }
.card.old1 { opacity: 0.72; }
.card.old2 { opacity: 0.46; }
.card.old3 { opacity: 0.24; }

/* the notebook page */
.hero.page { padding-top: 80px; padding-bottom: 48px; }
.tally-line { font-size: 13px; color: hsl(var(--muted)); margin: 0 0 10px; }
.tally-line b { color: hsl(var(--ink)); font-weight: 500; }
.status a { color: hsl(var(--ink)); }
.more { margin: 22px 0 0; }
.top nav a[aria-current="page"] { color: hsl(var(--ink)); }
.foot a { color: inherit; text-decoration: none; }
.foot .ca-full { overflow-wrap: anywhere; user-select: all; }
.foot a:hover { color: hsl(var(--ink)); }

/* two-column record sections */
.rec { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; padding-top: 72px; padding-bottom: 8px; }
.rec > header { position: sticky; top: 92px; align-self: start; }
.rec > header h2 { font: 400 34px/1.08 var(--serif); letter-spacing: -0.02em; margin: 0 0 10px; }
.rec > header p { font-size: 14.5px; line-height: 1.55; color: hsl(var(--muted)); margin: 0; }
.rec > header p b { color: hsl(var(--ink)); font-weight: 500; }
.rec > header .bad { color: hsl(var(--accent)); }
.rec > div { border-top: 1px solid hsl(var(--ink)); padding-top: 22px; min-width: 0; }
.rec h3 { font: 500 16px/1.3 var(--sans); margin: 40px 0 10px; }
.rec h3 span { font-size: 12px; font-weight: 400; color: hsl(var(--muted)); margin-left: 8px; }

/* the notebook: what has held */
.notebook .group + .group { margin-top: 34px; }
.notebook h3 { font: 500 13px/1.3 var(--mono); color: hsl(var(--muted)); margin: 0 0 6px; letter-spacing: 0.01em; }
.notebook ol { list-style: none; margin: 0; padding: 0; }
.notebook li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid hsl(var(--line)); }
.notebook .reps { font-size: 11.5px; color: hsl(var(--muted)); white-space: nowrap; }
.notebook .reps.acc { color: hsl(var(--accent)); }
.notebook .empty a { color: hsl(var(--ink)); }
.notebook .g { font: 400 30px/1 var(--la); text-align: center; color: hsl(var(--accent)); }
.notebook .g.small { font-size: 22px; letter-spacing: 0.04em; }
.notebook .g .nm, .claim .glyph .nm { display: block; font: 500 12px/1.35 var(--mono); letter-spacing: 0; overflow-wrap: anywhere; }
.notebook .fact { font: 400 22px/1.3 var(--serif); letter-spacing: -0.01em; margin: 0 0 4px; }
.notebook .fact i { color: hsl(var(--muted)); }
.notebook .proof { font: 400 12.5px/1.55 var(--mono); color: hsl(var(--muted)); margin: 0; }
.notebook .proof .la { font-size: 15px; color: hsl(var(--ink)); }
.notebook .proof a { color: hsl(var(--ink)); }
.notebook .tally { font: 400 13px var(--mono); color: hsl(var(--muted)); margin: 0 0 18px; }
.notebook .tally b { color: hsl(var(--ink)); font-weight: 500; }

/* claims */
.claims { list-style: none; margin: 0; padding: 0; }
.claim { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid hsl(var(--line)); }
.claim .glyph { font: 400 38px/1 var(--la); color: hsl(var(--ink)); text-align: center; }
.claim .glyph.small { font-size: 26px; letter-spacing: 0.05em; }
.claim h4 { font: 400 23px/1.2 var(--serif); letter-spacing: -0.015em; margin: 0 0 6px; }
.claim .ev { font-size: 14.5px; color: hsl(var(--muted)); margin: 0; }
.claim .ev b { color: hsl(var(--ink)); font-weight: 500; }
.claim .ex { font: 400 12px var(--mono); color: hsl(var(--muted)); margin: 6px 0 0; }
.claim .ex .la { font-size: 15px; color: hsl(var(--ink)); margin-right: 4px; }
.claim .meta { font: 400 11.5px var(--mono); color: hsl(var(--muted)); margin-bottom: 4px; }
.verdict { font: 500 12px var(--mono); white-space: nowrap; padding: 3px 8px; border: 1px solid currentColor; }
.verdict.held { color: hsl(var(--ink)); }
.verdict.miss { color: hsl(var(--accent)); }
.verdict.none { color: hsl(var(--soft)); }
.empty { color: hsl(var(--muted)); }

/* palette */
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.palette button { font: 400 22px/1 var(--la); width: 52px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fff; border: 1px solid hsl(var(--line)); color: hsl(var(--ink)); cursor: pointer; padding: 0; }
.palette button small { font: 400 9.5px var(--mono); color: hsl(var(--muted)); }
.palette button:hover { border-color: hsl(var(--ink)); }
.palette button[aria-selected="true"] { border-color: hsl(var(--accent)); box-shadow: inset 0 0 0 1px hsl(var(--accent)); color: hsl(var(--accent)); }
.form { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin: 6px 0 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font: 400 12px var(--mono); color: hsl(var(--muted)); }
.form input, .form select { font: 400 15px/1.3 var(--sans); color: hsl(var(--ink)); background: #fff; border: 1px solid hsl(var(--line)); border-radius: 0; padding: 10px 12px; width: 100%; }
.form input:focus, .form select:focus { outline: none; border-color: hsl(var(--ink)); }
.form input::placeholder { color: hsl(var(--soft)); }
.yrow { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 0; }
.yread { font-size: 15px; color: hsl(var(--muted)); }
.yread b { color: hsl(var(--ink)); font-weight: 500; }
.ymsg { min-height: 1.3em; margin: 14px 0 0; font-size: 15px; }
.ymsg.err { color: hsl(var(--accent)); }

/* log */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 9px 0; border-bottom: 1px solid hsl(var(--line)); font-size: 15px; line-height: 1.5; }
.log time { font: 400 12px/1.9 var(--mono); color: hsl(var(--soft)); }
.log .say, .log .none { color: hsl(var(--muted)); }
.log .miss .v { color: hsl(var(--accent)); }
.log .v { font-weight: 500; }
.log .o { font: 500 13px var(--mono); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font: 400 11.5px var(--mono); color: hsl(var(--muted)); padding: 0 12px 8px 0; white-space: nowrap; }
.tbl td { padding: 9px 12px 9px 0; border-top: 1px solid hsl(var(--line)); vertical-align: baseline; }
.tbl tr:first-child td { border-top: 0; }
.tbl thead + tbody tr:first-child td { border-top: 1px solid hsl(var(--line)); }
.tbl .m { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.tbl .g { color: hsl(var(--muted)); }
.tbl .acc { color: hsl(var(--accent)); }
.tbl .r { text-align: right; padding-right: 0; }
.tbl .ok { font-weight: 500; }
.tbl.kv td:first-child { font: 400 12.5px var(--mono); width: 7.5em; padding-top: 11px; }
.tbl.kv td:last-child { color: hsl(var(--muted)); }
.tbl tr.row { cursor: pointer; }
.tbl tr.row:hover td { background: hsl(var(--wash)); }
.tbl .full td { border-top: 0; padding: 2px 0 16px; background: hsl(var(--wash)); }
.tbl .full dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 3px 16px; margin: 0; padding: 10px 12px; font: 400 12px/1.6 var(--mono); }
.tbl .full dt { color: hsl(var(--muted)); }
.tbl .full dd { margin: 0; word-break: break-word; }
.sumrows { padding: 10px 12px; }
.sumrows .line { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 12px; padding: 3px 0; font: 400 13px var(--mono); border-bottom: 1px dotted hsl(var(--line)); }
.sumrows .line .la { font-size: 17px; margin-right: 8px; }
.sumrows .line.tot { border-bottom: 0; border-top: 1px solid hsl(var(--ink)); margin-top: 4px; font-weight: 500; }
.sumrows .line .n { text-align: right; }
.sumrows .line.d { color: hsl(var(--soft)); }
.older { margin-top: 14px; background: none; border: 1px solid hsl(var(--line)); padding: 7px 12px; font: 400 13px var(--sans); color: hsl(var(--ink)); cursor: pointer; }
.older:hover { border-color: hsl(var(--ink)); }

.refs { padding-left: 18px; margin: 0; font-size: 15px; color: hsl(var(--muted)); }
.refs li { margin-bottom: 8px; }
.refs a { color: hsl(var(--ink)); font-family: var(--mono); font-size: 12.5px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 88px; padding-top: 22px; padding-bottom: 48px; border-top: 1px solid hsl(var(--line)); font-size: 13px; color: hsl(var(--muted)); }
.foot .mono { font-size: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; }
  .desk-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .desk-head .desk-meta { text-align: left; white-space: normal; }
  .desk-body { grid-template-columns: 1fr; gap: 28px; min-height: 0; }
  .desk-slab { font-size: 27px; }
  .card.old2, .card.old3 { display: none; }
  .rec { grid-template-columns: 1fr; gap: 18px; }
  .rec > header { position: static; }
}
@media (max-width: 640px) {
  :root { --pad: 18px; }
  body { font-size: 16.5px; }
  .top nav a { display: none; }
  .slab { font-size: 17px; }
  .claim { grid-template-columns: 52px minmax(0, 1fr); }
  .claim .verdict { grid-column: 2; justify-self: start; }
  .claim .glyph { font-size: 30px; }
  .notebook li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; }
  .notebook .reps { grid-column: 2; }
  .desk-slab { font-size: 23px; padding: 16px 16px 12px; }
  .seal { grid-template-columns: 40px minmax(0, 1fr); }
  .seal .v { grid-column: 2; }
  .notebook .g { font-size: 24px; }
  .notebook .fact { font-size: 19px; }
  .form { grid-template-columns: 1fr; }
  .hide-s { display: none; }
  .log li { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
