/* Diaspora website. Every value here is one of the game's tokens (specs/03-direction-b.md):
   nine colours, four strengths, six type sizes, two trackings, whole-pixel lines, an 8 px grid. */
:root {
  --deepspace: #0B1C15; --nightglow: #163A30; --moldavite: #0B4D3A;
  --earthshine: #93A69C; --pearl: #EFE4C6;
  --neon: #E0773A; --argon: #8A7BE6; --helium: #E9B04A; --oxygen: #45B3AD;
  --pearl-secondary: rgb(239 228 198 / 0.76); --pearl-muted: rgb(239 228 198 / 0.6);
  --earthshine-faint: rgb(147 166 156 / 0.45); --earthshine-trace: rgb(147 166 156 / 0.3);
}
.pg, .pg * { box-sizing: border-box; }
.pg { background: var(--deepspace); color: var(--pearl); font-family: Jost, sans-serif; font-weight: 300; font-size: 18px; line-height: 24px; }
.pg p, .pg h1, .pg h2, .pg h3, .pg figure, .pg ul, .pg ol, .pg dl, .pg dd { margin: 0; padding: 0; }
.pg ul, .pg ol { list-style: none; }
.pg a { color: var(--pearl); }
.pg a:focus-visible, .pg button:focus-visible, .pg input:focus-visible { outline: 2px solid var(--pearl); outline-offset: 2px; }
.pg img { display: block; max-width: 100%; }

/* Type: the six sizes and two trackings */
.t1 { font-weight: 500; font-size: 11px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; }
.mono { font-family: 'IBM Plex Mono', monospace; font-weight: 400; font-size: 11px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--earthshine); }
.t2 { font-weight: 500; font-size: 14px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; }
.t4 { font-weight: 300; font-size: 32px; line-height: 48px; }
.print-h { font-weight: 300; font-size: 56px; line-height: 64px; }
.n1 { font-family: 'Major Mono Display', monospace; font-size: 16px; line-height: 24px; }
.n2 { font-family: 'Major Mono Display', monospace; font-size: 24px; line-height: 24px; }
.sec { color: var(--pearl-secondary); }
.helium { color: var(--helium); }

/* The sheet at the top: the start menu's Moldavite sheet, its name, the mark, its tip */
.top { background: var(--moldavite); border-bottom: 1px solid var(--earthshine-faint); position: relative; }
.top::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -8px; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid var(--moldavite); }
.top-in { max-width: 1088px; margin: 0 auto; padding: 16px 32px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 32px; row-gap: 0; }
.name { font-weight: 500; font-size: 14px; line-height: 16px; letter-spacing: 0.34em; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
.nav { display: flex; flex-wrap: wrap; column-gap: 24px; flex: 1 1 480px; }
.nav a { font-weight: 500; font-size: 14px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--pearl-secondary); display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; }
.nav a:hover { color: var(--pearl); }
.nav a.on { color: var(--pearl); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.bars { display: block; width: 48px; height: 16px; margin-left: auto; fill: var(--pearl); }

/* Layout: columns that are whole grid steps wide */
.col { max-width: 1088px; margin: 0 auto; padding: 64px 32px; }
.read { max-width: 640px; }
.row { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.stack { display: flex; flex-direction: column; }
.g8 { gap: 8px; } .g16 { gap: 16px; } .g24 { gap: 24px; } .g32 { gap: 32px; } .g48 { gap: 48px; } .g64 { gap: 64px; }

/* A section's head: the rule book's. A Helium word, a counter, a dotted rule */
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 16px; border-bottom: 1px dotted var(--earthshine); }
.head .t2 { color: var(--helium); }
.dot { border: 0; border-bottom: 1px dotted var(--earthshine); margin: 0; }
.rule { border: 0; border-bottom: 1px solid var(--nightglow); margin: 0; }

/* Keys. Secondary: a 1 px Earthshine frame. Primary: 2 px Pearl. START: the one filled key */
.key { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--earthshine); background: none; color: var(--pearl); font-family: Jost, sans-serif; font-weight: 500; font-size: 14px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.key.primary { border: 2px solid var(--pearl); }
.key.cannot { border: 1px dashed var(--earthshine); color: var(--pearl-secondary); }
.key.start { min-height: 64px; min-width: 240px; background: var(--earthshine); color: var(--deepspace); border: 2px solid var(--pearl); outline: 2px solid var(--pearl); outline-offset: 2px; }
.pg a.key.start { color: var(--deepspace); }
.link { text-decoration: underline dotted 1px; text-underline-offset: 4px; }

/* A record: the end print's frame and its bracket corners */
.rec { position: relative; border: 1px solid var(--earthshine-faint); padding: 32px; }
.rec > .c { position: absolute; width: 16px; height: 16px; border: 0 solid var(--helium); }
.rec > .c.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.rec > .c.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.rec > .c.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.rec > .c.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* Figures: a picture in a 1 px frame with a Plex Mono caption */
.fig img { border: 1px solid var(--earthshine-faint); }
.fig figcaption { margin-top: 8px; }
.shot { width: 312px; height: 672px; object-fit: cover; object-position: top; }
.shot.s { width: 232px; height: 504px; }

/* Rows: the menu's two columns, a sign column then every word on one line */
.rows > li { border-bottom: 1px dotted var(--earthshine); }
.rows a { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; padding: 16px 0; min-height: 80px; text-decoration: none; }
.rows .mono:first-child { flex: 0 0 64px; }
.rows .t4 { flex: 1 1 240px; }

/* Numbered rules, as the rule book sets them */
.num { display: grid; grid-template-columns: 48px minmax(0, 1fr); row-gap: 24px; }
.num > .mono { padding-top: 4px; }
.sub, .pg .sub { border-left: 1px solid var(--earthshine-faint); padding-left: 16px; margin-top: 8px; }

/* The dated margin: when a thing was decided, beside the thing */
.dated { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px 32px; padding: 32px 0; border-bottom: 1px dotted var(--earthshine); }
.dated > .when { display: flex; flex-direction: column; gap: 8px; }
.quote, .pg .quote { border-left: 2px solid var(--pearl); padding-left: 16px; }

/* Style guide parts */
.sw { display: flex; flex-direction: column; gap: 8px; flex: 1 1 160px; }
.sw > i { display: block; height: 64px; border: 1px solid var(--earthshine-faint); }
.spec { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px dotted var(--earthshine); }
.sheet { background: var(--moldavite); }
.sheet .mono { color: var(--pearl-secondary); }
.panel { background: var(--nightglow); }
.field { display: block; width: 100%; min-height: 48px; padding: 0 16px; background: var(--deepspace); border: 1px solid var(--earthshine); color: var(--pearl); font-family: 'IBM Plex Mono', monospace; font-size: 18px; line-height: 24px; letter-spacing: 0.16em; }
.foot { border-top: 1px solid var(--nightglow); }
.foot-in { max-width: 1088px; margin: 0 auto; padding: 24px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 32px; }
.foot a { display: inline-flex; align-items: center; min-height: 48px; text-decoration: underline dotted 1px; text-underline-offset: 4px; color: var(--pearl-secondary); }

/* The passage: the field of streaks behind a page, and the worlds it parts around.
   A world is never drawn. It is only where the passage stops. */
.fab { position: relative; isolation: isolate; }
.fab > svg.passage { position: absolute; top: 0; left: 0; z-index: -1; pointer-events: none; }
.fab .when { align-self: start; }
.world { border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.world.big { width: min(720px, 100%); aspect-ratio: 1; padding: 104px; gap: 24px; }
.world.sm { width: 160px; height: 160px; padding: 16px; gap: 8px; text-decoration: none; }
.chart { display: flex; flex-wrap: wrap; justify-content: space-between; row-gap: 32px; padding-bottom: 112px; }
.chart > li:nth-child(2n) { margin-top: 112px; }
.chart > li:nth-child(3n) { margin-top: 56px; }
@media (max-width: 760px) {
  .world.big { aspect-ratio: auto; border-radius: 0; padding: 48px 0; }
  .chart { justify-content: space-around; }
}

@media (max-width: 640px) {
  .print-h { font-size: 32px; line-height: 40px; }
  .top-in, .col, .foot-in { padding-left: 16px; padding-right: 16px; }
  .col { padding-top: 48px; padding-bottom: 48px; }
  .rec { padding: 24px 16px; }
  .dated, .spec { grid-template-columns: minmax(0, 1fr); }
  .nav { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .pg * { transition: none !important; animation: none !important; } }

/* An original design board, shown whole and unchanged inside a page */
.orig { max-width: 1088px; margin: 0 auto; padding: 0 32px 32px; overflow-x: auto; background: var(--deepspace); }
/* The transmissions' frame: two nested hairlines */
.txframe { position: relative; }
.txframe::before, .txframe::after { content: ''; position: absolute; inset: 16px; border: 1px solid rgb(69 179 173 / 0.45); pointer-events: none; }
.txframe::after { inset: 24px; }
.chart.seven > li > .world.sm { width: 136px; height: 136px; padding: 8px; }

/* The specification: converted text, set in the site's type */
.sp { max-width: 800px; display: flex; flex-direction: column; gap: 16px; }
.sp h2 { font-weight: 300; font-size: 32px; line-height: 48px; margin-top: 32px; }
.sp h3 { font-weight: 500; font-size: 14px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--helium); margin-top: 32px; padding-bottom: 16px; border-bottom: 1px dotted var(--earthshine); }
.sp ul, .sp ol { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.pg .sp ul { list-style: square; } .pg .sp ol { list-style: decimal; }
.pg .sp ul ul, .pg .sp ol ul, .pg .sp ul ol { margin-top: 8px; }
.sp li::marker { color: var(--earthshine); }
.sp em { font-style: normal; color: var(--helium); }
.sp strong { font-weight: 500; }
.sp code { font-family: 'IBM Plex Mono', monospace; font-size: 16px; color: var(--pearl-secondary); overflow-wrap: anywhere; }
.sp blockquote { margin: 0; border-left: 2px solid var(--pearl); padding-left: 16px; }
.sp .tw, .sp table { display: block; overflow-x: auto; }
.sp table { border-collapse: collapse; width: 100%; }
.sp th { font-weight: 500; font-size: 11px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--nightglow); vertical-align: bottom; }
.sp td { padding: 16px 16px 16px 0; border-bottom: 1px dotted var(--earthshine); vertical-align: top; }

/* The design guide: rows of marks, each over its word */
.mks { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.mk { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.mk svg { display: block; }
.gd .spec { grid-template-columns: 176px minmax(0, 1fr); row-gap: 4px; }
.gd .spec > .mono { grid-column: 2; }
.gd .spec > .mono:empty { display: none; }
.gd figure { max-width: 100%; }
.gd figure svg { max-width: 100%; }
.swb { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.swb > b { display: block; height: 2px; }
.swb:focus-visible, .pad:focus-visible, .cardb:focus-visible { outline: 2px solid var(--pearl); outline-offset: 2px; }
.pad { position: relative; display: block; width: 320px; max-width: 100%; height: 160px; padding: 0; background: none; border: 0; cursor: pointer; overflow: hidden; touch-action: manipulation; }
.pad svg { display: block; }
.cardb { display: block; padding: 0; background: none; border: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cardb svg { display: block; }
/* The panel is drawn at the game's own width; on a phone it runs to the screen's edges rather than squeeze. */
.bleed { max-width: 100%; }
@media (max-width: 440px) { .gd .bleed { margin-left: -16px; margin-right: -16px; max-width: calc(100% + 32px); } }
/* A key drawn smaller than a target still takes a 48 px touch. */
.hit48 { position: relative; }
.hit48::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 48px; transform: translateY(-50%); }
/* A button that is a 48 px target around a smaller key, its child: the key keeps its place and its ring. */
.key48 { display: inline-flex; align-items: center; height: 48px; margin: -8px 0; padding: 0; border: 0; background: none; cursor: pointer; }
.pg .key48:focus-visible { outline: none; }
.key48:focus-visible > span { outline: 2px solid var(--pearl); outline-offset: 2px; }
@media (max-width: 640px) { .gd .spec { grid-template-columns: minmax(0, 1fr); } .gd .spec > .mono { grid-column: 1; } }

/* The landing page: the key art inside the passage. Markers tell the passage where the art's worlds are. */
.art { position: relative; }
.art > svg { display: block; width: 100%; height: auto; overflow: visible; }
.world.pin { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
/* Motion, only where the device allows it: the passage drifts 6 px a second along its angle, in held
   steps, and the layers shift a few pixels with the pointer and the scroll. */
@keyframes passage-drift { to { transform: translate(-504.33px, 394.02px); } }
.fab.moving .drift { animation: passage-drift 106.667s steps(1280) infinite; }
.fab.moving .par1 { transform: translate(calc(var(--px, 0) * 12px), calc(var(--py, 0) * 12px + var(--sy, 0) * 0.12px)); }
.fab.moving .par2 { transform: translate(calc(var(--px, 0) * 5px), calc(var(--py, 0) * 5px)); }
.fab.moving .par3 { transform: translate(calc(var(--px, 0) * -3px), calc(var(--py, 0) * -3px)); }

/* the folios you can operate */
.mkb { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; min-height: 48px; padding: 0; background: none; border: 0; color: var(--pearl); cursor: pointer; font-family: inherit; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.mkb svg { display: block; }
.opt { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; background: none; color: var(--pearl); cursor: pointer; }
.rowb { align-items: center; gap: 16px; width: 100%; min-height: 48px; padding: 0; background: none; border: 0; color: var(--pearl); cursor: pointer; font-family: inherit; text-align: left; }
.tabb { flex: 1; min-height: 48px; border: 0; cursor: pointer; font-family: inherit; text-underline-offset: 6px; }
.rng { position: absolute; inset: 0; width: 100%; height: 48px; margin: 0; opacity: 0; cursor: pointer; }
.rng.plain { position: static; opacity: 1; max-width: 320px; accent-color: var(--pearl); }
.mkb:focus-visible, .opt:focus-visible, .rowb:focus-visible, .tabb:focus-visible { outline: 2px solid var(--pearl); outline-offset: 2px; }
div:has(> .rng:focus-visible) { outline: 2px solid var(--pearl); outline-offset: 2px; }

/* the landing's contents, and the site map */
.contents { align-self: stretch; }
.contents .dated { align-items: start; }
.toc-in { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; }
.toc-in a { display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; text-decoration: underline dotted 1px; text-underline-offset: 4px; color: var(--pearl-secondary); }
.smap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.smap > div { border-top: 2px solid var(--pearl); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.smap ul { list-style: none; margin: 8px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--earthshine-faint); display: flex; flex-direction: column; gap: 8px; }
.smap li { display: flex; flex-direction: column; }
@media (max-width: 760px) { .smap { grid-template-columns: minmax(0, 1fr); } }
