/* Every page of indoorfin.com is a spreadsheet lying under a thin sheet of still water (still.js). With the water on
   (html.gl), still.js sets every data-print element onto the paper (marking it data-printed) and draws the data-paper
   sheet's grid itself, so the HTML keeps only their places: a printed element's text is transparent, still there to
   select, find and read aloud, and one that is not printed yet shows as it is. A print's ink is --ink, a fill behind
   it --bg, a hairline frame round it --rule. A data-mark element (the selected cells) is a flat --bg fill and --rule
   frame that still.js lays over the prints. Without WebGL the same page shows as plain HTML, its grid drawn here, and
   the fish swim over it.

   The grid is rows of --row and columns of --col after a --gut wide gutter of row numbers. Every block keeps to it:
   line heights and margins are whole rows, and text starts one cell padding (--pad) in from a column line. Every word
   is Zen Maru Gothic, cut to Latin letters and punctuation: the name and titles 700 melted (still.js), the tagline 500,
   text 400, emphasis 700. */
@font-face { font-family: "Zen Maru Gothic"; src: url("ZenMaruGothic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zen Maru Gothic"; src: url("ZenMaruGothic-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Zen Maru Gothic"; src: url("ZenMaruGothic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  /* a phone's four columns fill its width, up to 88px each */
  --row: 30px; --col: min(88px, calc((100vw - 40px) / 4)); --gut: 34px; --head: 26px; --pad: 7px;
  --x0: var(--gut); /* the content's column line: A on a phone, B on a computer */
  --ink: #22343a; --ink-soft: #44555a; --grid: #dde3e1; --band: #f0f3f2; --head-ink: #6f7f83; --sel: #3f7d8c;
  --sans: "Zen Maru Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: #dfe7e3; }
body { margin: 0; overflow-x: hidden; color: var(--ink); font: 15px/var(--row) var(--sans); -webkit-text-size-adjust: 100%; }
.gl body { background: transparent; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
::selection { background: rgba(120, 170, 190, 0.35); }

.water { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.water ~ * { position: relative; z-index: 1; }
/* without WebGL the canvas lies over the plain page, clear but for the fish */
.no-gl .water { z-index: 2; pointer-events: none; }
.gl [data-printed] { color: transparent !important; text-decoration-color: transparent !important;
  background-color: transparent !important; border-color: transparent !important; }
.gl img[data-printed] { opacity: 0; }
.gl [data-paper] { background: transparent !important; }
.gl [data-mark] { visibility: hidden; }

/* a drop: clear water sitting on the surface, its label set on the paper under it and read through the water. Its
   --dome is how high it stands at rest and --rise how much the pointer raises it (still.js) */
.drop {
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  font: 500 1.06rem/1 var(--sans); color: var(--ink); text-decoration: none; cursor: pointer;
  /* without WebGL, the same bubble in CSS: see-through, a fine edge, a lit rim inside it and a small highlight at
     its upper left, and no shadow under it */
  background: radial-gradient(ellipse 38% 22% at 22% 24%, rgba(255, 255, 255, 0.9), transparent 70%), rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(34, 52, 58, 0.24), inset 2px 3px 4px rgba(255, 255, 255, 0.95), inset -2px -3px 6px rgba(34, 52, 58, 0.06);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.gl .drop { background: transparent; box-shadow: none; transition: none; }
html:not(.gl) .drop:hover { background-color: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 1px rgba(34, 52, 58, 0.32), inset 2px 3px 4px #fff, inset -2px -3px 6px rgba(34, 52, 58, 0.08); transform: translateY(-1px); }
.drop:active { transform: translateY(1px); }
/* html.phone (sheet.js: a touch screen with no hover, which cannot run the game) offers the copy-link drop in place
   of the downloads; without scripts every screen gets the downloads */
.only-phone, .phone .only-desk { display: none; }
.phone .only-phone { display: inline-flex; }
@media (prefers-reduced-motion: reduce) { .drop, html:not(.gl) .drop:hover, .drop:active { transform: none; transition: none; } }

/* the sheet's cells take a click, as a spreadsheet's do (cells.js); what is a link or a button stays one */
.sheet { position: relative; min-height: 100svh; padding: calc(var(--head) + var(--row)) 0 calc(var(--row) * 3 + var(--head)); background: #fdfdfc; cursor: cell; }
.sheet a, .sheet button, .tabs a { cursor: pointer; }
/* the grid, until still.js draws it: rows from under the header, columns from the gutter */
html:not(.gl) .sheet { background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px), linear-gradient(to right, var(--grid) 1px, transparent 1px);
  background-size: 100% var(--row), var(--col) 100%; background-position: 0 var(--head), var(--gut) 0; }
.colhead {
  position: fixed; top: 0; left: 0; right: 0; height: var(--head); z-index: 2; display: flex; padding-left: var(--gut);
  font: 500 12px/var(--head) var(--sans); color: var(--head-ink); --ink: #6f7f83;
  background: var(--band); --bg: #eef2f1; --rule: 1px #cfd8d5;
}
.colhead span { flex: 0 0 var(--col); text-align: center; }
.rownums { position: absolute; left: 0; top: var(--head); width: var(--gut); }
.rownums p { white-space: pre; text-align: center; font: 500 11px/var(--row) var(--sans); color: var(--head-ink); --ink: #7b8a8e; }
/* the name box in the header's corner: the selected cell, as B4 */
.namebox { position: fixed; top: 0; left: 0; width: var(--gut); height: var(--head); z-index: 3; text-align: center;
  font: 700 11px/var(--head) var(--sans); color: var(--sel); --ink: #3f7d8c; }

/* the selection: the range tinted, the active cell framed, its fill handle, and the headers of its rows and columns */
.mark { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; background: var(--bg); border: var(--rule) solid; }
.mark.range { --bg: rgba(63, 125, 140, 0.1); --rule: 1px #3f7d8c; }
.mark.active { --bg: transparent; --rule: 2px #3f7d8c; }
.mark.handle { --bg: #3f7d8c; --rule: 1px #fdfdfc; }
.mark.cols, .mark.colbar { position: fixed; z-index: 3; }
.mark.cols, .mark.rows { --bg: rgba(63, 125, 140, 0.16); --rule: 0px transparent; }
.mark.colbar, .mark.rowbar { --bg: #3f7d8c; --rule: 0px transparent; }

/* the sheet's place in the keyboard's order (cells.js): it has no box of its own, as the active cell's frame shows
   where it is */
.cells { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the sheet tabs along the bottom, as a spreadsheet's: one a page, the open one on paper. A tab is a drop with no
   dome at rest, so the water beads up over it only while the pointer is on it */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; height: calc(var(--head) + env(safe-area-inset-bottom));
  display: flex; align-items: flex-start; gap: 0; padding-left: calc(var(--gut) + 4px); }
.tabs .bar { position: absolute; inset: 0; background: var(--band); --bg: #eef2f1; border-top: 1px solid #cfd8d5; --rule: 1px #cfd8d5; }
.tab { position: relative; display: inline-flex; align-items: center; height: calc(var(--head) - 4px); padding: 0 8px;
  border-radius: 7px; font: 500 12.5px/1 var(--sans); color: var(--head-ink); --ink: #55666a; text-decoration: none;
  white-space: nowrap; --dome: 0; --rise: 0.4; transition: background-color 0.2s; }
.tab[aria-current="page"] { margin-top: -1px; height: calc(var(--head) - 3px); border-radius: 0 0 7px 7px; color: var(--ink); --ink: #22343a;
  font-weight: 700; background: #fdfdfc; --bg: #fdfdfc; box-shadow: inset 0 0 0 1px #cfd8d5; --rule: 1px #cfd8d5; }
html:not(.gl) .tab:hover { background: rgba(255, 255, 255, 0.85); color: var(--ink); }

.hero, section, .foot, .doc { padding-left: calc(var(--x0) + var(--pad)); padding-right: 12px; }
.hero { padding-top: var(--row); min-height: calc(100svh - var(--head) * 2 - var(--row) * 2); }

/* the logo slot: the G3 Wide gold logo and the name. The logo is a 64 cell pixel drawing, so its box is 64px on a phone
   and 128px on a computer: every art cell is a whole number of css px, and the file sizes (64, 128, 256, 512) give a
   whole number of pixels a cell on a 1x or 2x screen. It is a plain image, not a print, so the loop plays; under
   prefers-reduced-motion the picture swaps in the still. */
.slot { display: flex; align-items: center; gap: 12px; height: calc(var(--row) * 2); margin-left: -2px; }
.icon { display: block; width: 64px; height: 64px; }
/* the name is sized to run 12% wider than its old pixel face did, and h2 and a page's title as wide as they did */
.doc h1, .name { margin: 0; font: 700 47.4px/calc(var(--row) * 2) var(--sans); white-space: nowrap; --print-fx: melt; }
/* the home page's h1 holds the logo slot and the line under it, so it takes the page's own type and the name carries the face above */
.hero h1 { margin: 0; font: inherit; }
.tag { display: block; margin-top: var(--row); max-width: calc(var(--col) * 4 - var(--pad) * 2); font: 500 21px/var(--row) var(--sans); letter-spacing: -0.01em; }
.lead { margin-top: var(--row); max-width: calc(var(--col) * 4 - var(--pad) * 2); color: var(--ink-soft); --ink: #44555a; }
.lead + .lead { margin-top: 0; }

/* the downloads: two tall drops lying on top of the cells, not in them */
.offer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: calc(var(--row) * 2); margin: var(--row) 0 0 calc(var(--pad) * -1); }
.offer .drop { height: calc(var(--row) * 2 - 8px); padding: 0 26px; --dome: 1.3; --rise: 0.5; }
.offer .main { font-size: 1.12rem; padding: 0 32px; }
#phone { width: calc(var(--col) * 4 - 6px); font-size: 1.04rem; }
.fine { font-size: 13px; color: var(--ink-soft); --ink: #55666a; }
.version { min-height: var(--row); }
.after { margin-top: var(--row); max-width: calc(var(--col) * 5); }
.after-title { font-weight: 700; }
.after ol { margin: 0; padding: 0; list-style: none; color: var(--ink-soft); --ink: #44555a; }
.copyrow { display: flex; align-items: center; gap: 0 16px; height: calc(var(--row) * 2); margin-left: calc(var(--pad) * -1); }
.copyrow .drop { height: calc(var(--row) * 2 - 10px); width: calc(var(--col) * 2 - 10px); margin-left: 5px; }
.addr { font-weight: 700; }

section { padding-top: calc(var(--row) * 2); }
h2 { margin: 0 0 var(--row) calc(var(--pad) * -1); padding-left: var(--pad); height: calc(var(--row) * 2);
  font: 700 32.8px/calc(var(--row) * 2) var(--sans); white-space: nowrap; --print-fx: melt;
  max-width: calc(var(--col) * 4); background: var(--band); --bg: #eef3f1; }
/* the game's own screenshots, lying over the cells like pictures put into a sheet, each over its caption row;
   sheet.js fits each picture to whole rows */
.shots { display: grid; grid-template-columns: calc(var(--col) * 4); gap: var(--row) 0; margin: 0 0 0 calc(var(--pad) * -1); }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; object-fit: cover; --rule: 1px rgba(34, 52, 58, 0.25); }
.shots figcaption { padding: 0 var(--pad); font-size: 13px; color: var(--ink-soft); --ink: #55666a; }

/* small tables: How it plays, and What's new (the Worker writes each version as an h3 and a list) */
.table, .changes { margin-left: calc(var(--pad) * -1); }
.tr { display: grid; grid-template-columns: 0 calc(var(--col) * 2) calc(var(--col) * 2); }
.tr > span { padding: 0 var(--pad); min-height: var(--row); }
.tr > span:first-child { visibility: hidden; padding: 0; }
.th > span { font-weight: 700; background: var(--band); --bg: #eef3f1; }
.tr .wide { color: var(--ink-soft); --ink: #44555a; }
.tr b { font-weight: 700; --ink: #22343a; }
.changes { width: calc(var(--col) * 4); }
.changes h3, .doc h2 { margin: var(--row) 0 0; padding: 0 var(--pad); height: var(--row); font: 700 15px/var(--row) var(--sans);
  background: var(--band); --bg: #eef3f1; --print-fx: none; }
.changes h3:first-child { margin-top: 0; }
/* on the What's New page the list sits in a doc: a row under the title, and its lists keep the tight rows of the home page's */
.doc .changes { margin-top: var(--row); }
.doc .changes ul { margin: 0; }
.more { margin-top: var(--row); max-width: calc(var(--col) * 4 - var(--pad) * 2); }
.changes ul { margin: 0; padding: 0; list-style: none; }
.changes li { padding: 0 var(--pad); color: var(--ink-soft); --ink: #44555a; }

/* Questions: each a bold line over its answer, a whole row between one and the next; not a table, since the answers run
   to several lines */
.qa { margin-left: calc(var(--pad) * -1); max-width: calc(var(--col) * 4); }
.qa h3 { margin: var(--row) 0 0; padding: 0 var(--pad); font: 700 15px/var(--row) var(--sans); }
.qa h3:first-child { margin-top: 0; }
.qa p { padding: 0 var(--pad); color: var(--ink-soft); --ink: #44555a; }

/* a page of words (privacy, terms, credits): its title, then headed rows of text */
.doc { padding-top: var(--row); }
.doc h1 { font-size: 32.7px; }
.doc .updated { color: var(--ink-soft); --ink: #55666a; font-size: 13px; }
.doc .body { max-width: calc(var(--col) * 4 - var(--pad)); }
/* a heading sits two empty rows under what came before and right over its text; paragraphs and lists keep one
   empty row between them */
.doc h2 { margin-left: calc(var(--pad) * -1); margin-top: calc(var(--row) * 2); max-width: none; white-space: normal; height: auto; min-height: var(--row); }
.doc p, .doc ul { margin-top: var(--row); }
.doc h2 + p, .doc h2 + ul, .doc p.updated { margin-top: 0; }
.doc ul { margin-bottom: 0; padding: 0; list-style: none; }
.doc b { font-weight: 700; }
.doc .short { font-size: 17px; font-weight: 700; }

.foot { padding-top: calc(var(--row) * 2); font-size: 14px; color: var(--ink-soft); --ink: #55666a; }
.foot .small { font-size: 12px; }
.foot nav a { margin-right: 14px; }

@media (min-width: 760px) {
  :root { --row: 32px; --col: 132px; --gut: 52px; --head: 30px; --pad: 9px; --x0: calc(var(--gut) + var(--col)); }
  body { font-size: 16px; }
  .colhead { font-size: 12.5px; }
  .rownums p, .namebox { font-size: 12px; }
  .tabs { gap: 2px; }
  .tab { font-size: 13px; padding: 0 16px; }
  .hero { padding-top: calc(var(--row) * 2); }
  .slot { height: calc(var(--row) * 4); gap: 20px; }
  .icon { width: 128px; height: 128px; }
  .name { font-size: 94.8px; line-height: calc(var(--row) * 4); }
  .tag { font-size: 27px; max-width: calc(var(--col) * 6 - var(--pad) * 2); }
  .lead { font-size: 17px; max-width: calc(var(--col) * 7 - var(--pad) * 2); }
  .offer { margin-top: calc(var(--row) * 2); gap: 12px 18px; }
  .offer .drop { padding: 0 34px; }
  .offer .main { font-size: 1.18rem; padding: 0 42px; }
  .fine { font-size: 14px; }
  section { padding-top: calc(var(--row) * 3); }
  h2 { font-size: 49.3px; max-width: calc(var(--col) * 5); }
  .shots { grid-template-columns: repeat(2, calc(var(--col) * 3)); }
  .shots .wide { grid-column: 1 / -1; }
  .tr { grid-template-columns: var(--col) calc(var(--col) * 2) calc(var(--col) * 3); }
  .tr > span:first-child { visibility: visible; padding: 0 var(--pad); }
  .changes { width: calc(var(--col) * 6); }
  .qa { max-width: calc(var(--col) * 5); }
  .qa h3 { font-size: 16px; }
  .changes h3, .doc h2 { font-size: 16px; }
  .doc { padding-top: calc(var(--row) * 2); }
  .doc h1 { font-size: 52.3px; line-height: calc(var(--row) * 2); }
  .doc .body { max-width: calc(var(--col) * 5 - var(--pad)); }
  .shots figcaption { font-size: 14px; }
}
