/* Shared by the quiet pages: privacy, uninstall survey, stats, 404. A typed sheet on the dark room. */

@font-face { font-family: "Special Elite"; src: url("../engine/fonts/SpecialElite-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../engine/fonts/CourierPrime-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../engine/fonts/CourierPrime-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --room: #1a1815;
  --sheet: #e6dcc6;
  --ink: #26221e;
  --soft: #6b6354;
  --rule: #cdc2a8;
  --accent: #a8392a;
  --type: "Special Elite", "American Typewriter", "Courier Prime", monospace;
  --mono: "Courier Prime", "American Typewriter", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { background: var(--room); }
body {
  margin: 0;
  min-height: 100dvh;
  padding: 28px 16px 64px;
  color: #e2d8c2;
  font: 16px/1.65 var(--mono);
  background: radial-gradient(60% 40% at 50% 0%, rgba(226, 190, 140, .12), transparent 70%), var(--room);
}

.top {
  max-width: 720px;
  margin: 0 auto 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.top a { color: #e2d8c2; text-decoration: none; font: 22px/1 var(--type); }
.top span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #a99f89; }

.page {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) clamp(20px, 5vw, 52px) 44px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 40px 70px -40px rgba(0, 0, 0, .8);
}
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .26  0 0 0 1.2 -.45'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
}
.page > * { position: relative; }

h1 { margin: 0 0 6px; font: 400 clamp(30px, 6vw, 42px)/1.1 var(--type); }
h2 { margin: 34px 0 6px; font: 400 22px/1.2 var(--type); }
.updated { margin: 0 0 22px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
p, li { max-width: 62ch; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 1.2em; }
li { margin-bottom: 6px; }
a { color: var(--accent); text-underline-offset: 3px; }
code { font: 700 .92em var(--mono); }

table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14.5px; }
th, td { padding: 8px 12px 8px 0; text-align: left; vertical-align: top; border-bottom: 1px dashed var(--rule); }
th { font-weight: 700; width: 30%; }

.foot { max-width: 720px; margin: 22px auto 0; font-size: 13px; color: #a99f89; letter-spacing: .06em; }
.foot a { color: #cfc5ad; }

/* Survey */
fieldset { margin: 0 0 18px; padding: 0; border: 0; }
legend { margin-bottom: 8px; font-weight: 700; }
.opt { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; }
label.field { display: block; margin: 0 0 6px; font-weight: 700; }
textarea.note {
  display: block; width: 100%; min-height: 84px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--soft); border-radius: 2px; background: #f1e9d6; color: var(--ink);
  font: 15px/1.5 var(--mono);
}
textarea.note:focus-visible, .opt input:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--soft); }
.btn {
  margin-top: 18px; padding: 12px 22px; border: 0; border-radius: 2px;
  background: var(--accent); color: #f6ecd9; font: 700 14px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 2px 0 #7a281c;
}
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: default; }

/* Stats */
.stats-wrap { max-width: 980px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.stat { padding: 12px 14px; border: 1px solid var(--soft); }
.stat b { display: block; font: 400 30px/1.1 var(--type); }
.stat span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.scroll-x { overflow-x: auto; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.err { color: var(--accent); font-weight: 700; }

/* Welcome guide */
.steps { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; margin: 0 0 22px; padding-left: 44px; max-width: none; counter-increment: s; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 2px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font: 400 17px/1 var(--type);
}
.steps h2 { margin: 0 0 4px; font-size: 20px; }
select.note { width: 100%; padding: 10px 12px; font: 15px var(--mono); }
