/*
  Plotland: free hand-made homepages and a webring (Screenery template)
  1. Tokens, drawn background tiles (SVG data URIs), bevelled buttons, the base "1998 homepage" table look.
  2. Masthead (WordArt title, sprites, marquee), the left button menu, sections divided by drawn horizontal rules.
  3. Builder, drawn browser preview, address and sign up, guestbook, webring, tables, footer counter, then responsive and motion rules.
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* the period palette: web-safe and proud of it */
  --night: #0b0b3b;        /* starfield ground */
  --paper: #ffffe8;        /* main table, a warm "#FFFFCC" softened */
  --paper-2: #f4f0cc;      /* alternate rows, boxes */
  --silver: #c0c0c0;       /* buttons and the menu column */
  --silver-hi: #ffffff;    /* bevel light edge */
  --silver-mid: #dfdfdf;
  --silver-lo: #808080;    /* bevel shadow edge */
  --ink: #111111;
  --ink-2: #3a3a3a;
  --link: #0000ee;         /* unvisited blue */
  --visited: #551a8b;      /* visited purple */
  --active: #cc0000;
  --yellow: #ffcc00;
  --red: #c41010;
  --lime: #00ff00;
  --teal: #008080;
  --ok: #006600;
  --bad: #b00000;
  --focus: #ff00ff;        /* magenta focus ring, unmissable on every tile */

  --display: "Tinos", "Times New Roman", Times, serif;
  --text: "Arimo", Arial, Helvetica, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --page-w: 1120px;

  /* tiles: small SVGs repeated, the way a 2 KB GIF tile was */
  --tile-stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Crect width='96' height='96' fill='%230b0b3b'/%3E%3Cg fill='%23fff'%3E%3Crect x='7' y='11' width='2' height='2'/%3E%3Crect x='41' y='5' width='1' height='1'/%3E%3Crect x='70' y='19' width='2' height='2'/%3E%3Crect x='22' y='38' width='1' height='1'/%3E%3Crect x='88' y='44' width='1' height='1'/%3E%3Crect x='55' y='52' width='2' height='2'/%3E%3Crect x='12' y='70' width='1' height='1'/%3E%3Crect x='33' y='83' width='2' height='2'/%3E%3Crect x='77' y='79' width='1' height='1'/%3E%3Crect x='62' y='31' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%23ffee88'%3E%3Cpath d='M48 66h1v-3h1v3h3v1h-3v3h-1v-3h-3v-1h2z'/%3E%3Crect x='84' y='8' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  --tile-clouds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='90'%3E%3Crect width='120' height='90' fill='%2366a3ff'/%3E%3Cg fill='%23fff'%3E%3Cellipse cx='30' cy='26' rx='18' ry='8'/%3E%3Cellipse cx='40' cy='20' rx='10' ry='8'/%3E%3Cellipse cx='86' cy='66' rx='20' ry='8'/%3E%3Cellipse cx='96' cy='60' rx='10' ry='8'/%3E%3Cellipse cx='78' cy='61' rx='8' ry='6'/%3E%3C/g%3E%3C/svg%3E");
  --tile-bricks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='32'%3E%3Crect width='48' height='32' fill='%23d9d0c0'/%3E%3Cg fill='%23a0341c'%3E%3Crect x='1' y='1' width='22' height='14'/%3E%3Crect x='25' y='1' width='22' height='14'/%3E%3Crect x='-11' y='17' width='22' height='14'/%3E%3Crect x='13' y='17' width='22' height='14'/%3E%3Crect x='37' y='17' width='22' height='14'/%3E%3C/g%3E%3Cg fill='%23862a16'%3E%3Crect x='1' y='12' width='22' height='3'/%3E%3Crect x='25' y='12' width='22' height='3'/%3E%3Crect x='13' y='28' width='22' height='3'/%3E%3C/g%3E%3C/svg%3E");
  --tile-parchment: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Crect width='64' height='64' fill='%23ecd9a6'/%3E%3Cg fill='%23d8be80'%3E%3Crect x='5' y='9' width='3' height='1'/%3E%3Crect x='40' y='4' width='2' height='2'/%3E%3Crect x='22' y='30' width='4' height='1'/%3E%3Crect x='51' y='41' width='2' height='1'/%3E%3Crect x='11' y='52' width='2' height='2'/%3E%3Crect x='33' y='58' width='5' height='1'/%3E%3C/g%3E%3Cg fill='%23f7ebc8'%3E%3Crect x='28' y='14' width='3' height='2'/%3E%3Crect x='58' y='22' width='2' height='2'/%3E%3Crect x='3' y='36' width='2' height='1'/%3E%3C/g%3E%3C/svg%3E");
  --tile-grass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23339933'/%3E%3Cg stroke='%2366cc33' stroke-width='2'%3E%3Cpath d='M4 30l2-8M10 34l-1-9M22 14l2-8M27 18l-1-9M33 36l2-7'/%3E%3C/g%3E%3Cg stroke='%23226622' stroke-width='2'%3E%3Cpath d='M16 30l1-6M36 12l-2-6M2 10l2-5'/%3E%3C/g%3E%3C/svg%3E");
  --tile-checks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%23fff'/%3E%3Crect width='16' height='16' fill='%23000'/%3E%3Crect x='16' y='16' width='16' height='16' fill='%23000'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--silver-lo) var(--silver); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night) var(--tile-stars) repeat;
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
  accent-color: var(--teal);
  caret-color: var(--red);
  -webkit-text-size-adjust: 100%;
}
::selection { background: #000080; color: #ffffff; }
::-webkit-scrollbar { width: 16px; height: 16px; background: var(--silver); }
::-webkit-scrollbar-thumb { background: var(--silver); border: 2px outset var(--silver-hi); }
img, svg { display: block; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:visited { color: var(--visited); }
a:hover { color: var(--active); }
:focus-visible { outline: 3px dotted var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--yellow); color: #000; padding: 8px 12px; font-weight: 700; }
.skip:focus { top: 8px; }
.skip:hover, .skip:visited { color: #000; }

h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0 0 var(--s3); }
.small { font-size: .875rem; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hint { font-weight: 400; font-size: .8125rem; color: var(--ink-2); }

/* ---------- Bevelled grey button, the one control of the era ---------- */
.bevel {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 5px 14px;
  font: 700 .875rem/1.2 var(--text); color: #000; text-decoration: none;
  background: var(--silver);
  border: 2px solid; border-color: var(--silver-hi) #404040 #404040 var(--silver-hi);
  box-shadow: inset -1px -1px 0 var(--silver-lo), inset 1px 1px 0 var(--silver-mid);
  cursor: pointer;
}
.bevel:visited { color: #000; }
.bevel:hover { background: #cfcfcf; color: #000; }
.bevel:active, .bevel[aria-pressed="true"] {
  border-color: #404040 var(--silver-hi) var(--silver-hi) #404040;
  box-shadow: inset 1px 1px 0 var(--silver-lo);
  padding: 6px 13px 4px 15px;
}
.bevel[disabled] { color: var(--silver-lo); text-shadow: 1px 1px 0 var(--silver-hi); cursor: wait; }
.bevel--big { min-height: 44px; padding: 8px 22px; font-size: 1rem; }
.bevel--big:active { padding: 9px 21px 7px 23px; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 700 1rem var(--display); color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 32px; text-align: left; }
.link-btn:hover { color: var(--active); }
.link-btn[aria-pressed="true"] { color: var(--visited); }

/* ---------- The page: one big bordered table on the starfield ---------- */
.page { width: min(var(--page-w), 100% - 24px); margin: var(--s5) auto var(--s6); }

/* ---------- 2. Masthead ---------- */
.masthead { color: #fff; padding: 0 0 var(--s4); }
.mast-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s5); padding: var(--s3) var(--s2) var(--s4); }
.mast-title { text-align: center; }
.mast-sub { margin: var(--s3) auto 0; background: var(--night); padding: 2px 8px; width: fit-content; text-wrap: balance; max-width: 52ch; color: #ffffcc; font: italic 400 1.125rem/1.4 var(--display); }
.construction svg { width: 120px; height: auto; }

/* WordArt lettering: solid fills, black outline, stacked extrusion. No gradients. */
.wordart { font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: .01em; }
#site-title { font-size: clamp(3rem, 8vw, 5.75rem); font-style: normal; letter-spacing: .02em; }
.wordart--extrude {
  color: var(--yellow);
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill;
  text-shadow: 1px 1px 0 #c03000, 2px 2px 0 #c03000, 3px 3px 0 #b02800, 4px 4px 0 #a02000, 5px 5px 0 #902000, 6px 6px 0 #000;
  font-style: italic;
}
#site-title.wordart--extrude { -webkit-text-stroke: 2px #000; text-shadow: 1px 1px 0 #c03000, 2px 2px 0 #c03000, 3px 3px 0 #b02800, 4px 4px 0 #a02000, 5px 5px 0 #902000, 6px 6px 0 #802000, 7px 7px 0 #702000, 8px 8px 0 #000; }
.wordart--arch { color: #33ccff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; }
.wordart--wave { color: #ff66cc; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 2px 3px 0 #330066; }
.wordart--neon { color: #ffffff; background: #000; padding: .12em .3em; border: 3px double #ff33cc; text-shadow: 2px 2px 0 #ff33cc; font-style: normal; }
.wordart--slant { color: #e01010; -webkit-text-stroke: 1px #000; paint-order: stroke fill; display: inline-block; transform: skewX(-14deg); text-shadow: 4px 4px 0 #000; }
.wordart--plain { color: inherit; font-weight: 700; font-style: normal; }
.wordart .ch { display: inline-block; transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); }

/* Marquee: CSS animation, stoppable with a button and stopped by reduced motion */
.marquee { display: flex; align-items: stretch; background: #000; border: 2px inset var(--silver); }
.marquee-toggle { flex: none; border-width: 2px; min-height: 36px; font-size: .8125rem; }
.marquee-window { overflow: hidden; display: flex; flex: 1; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); }
.marquee-text { flex: none; margin: 0; padding: 6px 0 6px 3rem; color: var(--lime); font: 700 .9375rem/1.3 var(--text); white-space: nowrap; animation: marquee 60s linear infinite; }
.marquee.is-stopped .marquee-window { overflow-x: auto; }
.marquee.is-stopped .marquee-text { animation: none; }
.marquee.is-stopped .marquee-text[aria-hidden] { display: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Layout: menu column + main ---------- */
.layout {
  display: grid; grid-template-columns: 200px 1fr;
  border: 4px ridge var(--silver);
  background: var(--paper);
}
.menu { background: var(--silver); border-right: 2px solid var(--silver-lo); padding: var(--s4) var(--s3); }
.menu-stick { position: sticky; top: var(--s4); }
.menu-head { font: 700 1.25rem var(--display); color: #000; margin-bottom: var(--s3); text-align: center; border-bottom: 2px groove var(--silver-hi); padding-bottom: var(--s2); }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-btn { width: 100%; justify-content: flex-start; min-height: 40px; }
.menu-extra { margin-top: var(--s5); display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.mailme { display: grid; justify-items: center; gap: 4px; color: #000080; font-weight: 700; font-size: .875rem; line-height: 1.25; }
.mailme:visited { color: var(--visited); }
.badges { display: grid; gap: 6px; }
.badge88 {
  width: 88px; height: 31px; padding: 2px 4px; display: grid; place-content: center; text-align: center;
  font: 400 .6875rem/1.05 var(--text); letter-spacing: .02em; border: 1px solid #000;
}
.badge88 b { display: block; font-size: .8125rem; }
.badge88--hand { background: #ffff99; color: #000; }
.badge88--ads { background: #000; color: #ffff66; }
.badge88--ads b { color: #ff6666; }
.badge88--res { background: #000080; color: #fff; }
.menu-note { font: italic .875rem/1.4 var(--display); color: #000; margin: 0; }

main { min-width: 0; padding: var(--s5) var(--s6) var(--s6); }
.block { padding: var(--s4) 0 var(--s5); scroll-margin-top: var(--s4); }
.h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); color: #800000; line-height: 1.1; margin-bottom: var(--s4); text-align: center; }
.lede { font: 400 1.25rem/1.5 var(--display); }
#welcome > p, .whatsnew { max-width: 42rem; margin-inline: auto; }
.section-lede { max-width: 66ch; margin-inline: auto; }
.section-lede { text-align: center; margin-bottom: var(--s5); }
.new { display: inline-block; vertical-align: .35em; margin-right: .3em; padding: 1px 6px; background: var(--red); color: #fff; font: 700 .875rem var(--text); transform: rotate(-6deg); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { background: #000; color: var(--yellow); } }

/* Horizontal rules, drawn: rainbow bar, grooved, and a row of flames */
.rule { border: 0; margin: var(--s4) auto; max-width: 92%; }
.rule--groove { border-top: 2px groove #a0a0a0; border-bottom: 2px groove #ffffff; height: 0; }
.rule--rainbow { height: 6px; background: repeating-linear-gradient(90deg, #e01010 0 12%, #ff9900 12% 24%, #ffcc00 24% 36%, #33aa33 36% 48%, #3366ff 48% 60%, #6633cc 60% 72%, #e01010 72% 84%, #ff9900 84% 100%); border: 1px solid #000; }
.rule--flames { height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M11 1c2 5 7 7 7 13a7 7 0 0 1-14 0c0-4 3-5 3-9 2 2 2 4 2 5 1-3 2-6 2-9z' fill='%23ff6600' stroke='%23000'/%3E%3Cpath d='M11 10c1 3 4 4 4 7a4 4 0 0 1-8 0c0-2 2-3 2-5 1 1 1 2 1 2z' fill='%23ffcc00'/%3E%3C/svg%3E") repeat-x center; }

/* What's new: a plain bordered table */
.whatsnew { margin: var(--s5) auto 0; border-collapse: collapse; width: 100%; background: #fff; border: 2px outset var(--silver); }
.whatsnew caption { font: 700 1.125rem var(--display); text-align: left; padding: 0 0 var(--s2); color: #000080; }
.whatsnew th, .whatsnew td { border: 1px solid var(--silver-lo); padding: 8px 10px; vertical-align: top; text-align: left; }
.whatsnew th { white-space: nowrap; background: #000080; color: #fff; font: 700 .875rem/1.4 var(--text); }

/* ---------- 3. Builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s5); align-items: start; }
.builder-controls { display: grid; gap: var(--s4); }
.box { margin: 0; min-width: 0; border: 2px groove #d8d8d8; background: var(--paper-2); padding: var(--s3) var(--s4) var(--s4); }
.box legend { font: 700 1.0625rem var(--display); color: #000080; padding: 0 6px; background: var(--paper); border: 1px solid var(--silver-lo); }
.field { display: grid; gap: 4px; margin-bottom: var(--s3); }
.field:last-child { margin-bottom: 0; }
.field label { font-weight: 700; font-size: .875rem; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; min-height: 36px; padding: 6px 8px;
  font: 400 1rem/1.3 var(--text); color: #000; background: #fff;
  border: 2px inset #e0e0e0; border-radius: 0;
}
textarea { resize: vertical; }
select { appearance: none; padding-right: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='32'%3E%3Crect width='22' height='32' fill='%23c0c0c0'/%3E%3Cpath d='M0 0h1v32H0z' fill='%23fff'/%3E%3Cpath d='M6 14h10l-5 5z' fill='%23000'/%3E%3C/svg%3E") no-repeat right center / 22px 100%; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); background: #fff3f3; }
input::placeholder, textarea::placeholder { color: #6b6b6b; }
.err { margin: 0; min-height: 0; color: var(--bad); font-size: .875rem; font-weight: 700; }
.err:empty { display: none; }

/* tile and lettering pickers: radios drawn as framed samples */
.tiles, .letterings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.tile-opt, .let-opt { position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px; font-size: .8125rem; font-weight: 700; cursor: pointer; border: 2px solid transparent; }
.tile-opt input, .let-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.tile-swatch { width: 100%; height: 44px; border: 2px inset #e0e0e0; }
.let-sample { width: 100%; min-height: 44px; display: flex; justify-content: center; align-items: center; background: #fff; border: 2px inset #e0e0e0; font-size: 1.5rem; overflow: hidden; }
.let-sample.wordart--neon { border: 3px double #ff33cc; padding: 0; font-size: 1.25rem; background: #000; }
.let-sample.wordart--slant { transform: none; text-shadow: 2px 2px 0 #000; }
/* WordArt gallery samples sit on navy, the way the old picker did; Plain Times stays on white */
.let-sample.wordart--extrude, .let-sample.wordart--arch, .let-sample.wordart--wave, .let-sample.wordart--slant { background: #000080; }
.let-sample.wordart--slant { color: #ff4d4d; }
.let-sample.wordart--slant .ch, .let-sample.wordart--slant { font-style: italic; }
.tile-opt:has(input:checked), .let-opt:has(input:checked) { border: 2px dotted #000080; background: #ffffcc; }
.tile-opt:has(input:focus-visible), .let-opt:has(input:focus-visible) { outline: 3px dotted var(--focus); outline-offset: 1px; }

.tile--stars { background: var(--night) var(--tile-stars); }
.tile--clouds { background: #66a3ff var(--tile-clouds); }
.tile--bricks { background: #a0341c var(--tile-bricks); }
.tile--parchment { background: #ecd9a6 var(--tile-parchment); }
.tile--grass { background: #339933 var(--tile-grass); }
.tile--checks { background: #fff var(--tile-checks); }

/* colour swatches */
.swatch-row { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.swatch-label { font-weight: 700; font-size: .875rem; }
.swatches { display: grid; grid-template-columns: repeat(8, 30px); gap: 4px; }
.sw { width: 30px; height: 30px; padding: 0; border: 2px outset #e0e0e0; background: var(--c); cursor: pointer; position: relative; }
.sw[aria-checked="true"] { border: 2px inset #e0e0e0; outline: 2px solid #000; outline-offset: 1px; }
.sw[aria-checked="true"]::after { content: ""; position: absolute; inset: 7px; border: 2px solid var(--mark, #000); }
.sw:focus-visible { outline: 3px dotted var(--focus); }
.readability { margin: var(--s2) 0 0; padding: 6px 8px; font-size: .875rem; font-weight: 700; background: #fff; border: 1px solid var(--silver-lo); display: flex; gap: 6px; align-items: flex-start; }
.readability[data-kind="ok"] { color: var(--ok); }
.readability[data-kind="warn"] { color: var(--bad); background: #fff3f3; border-color: var(--bad); }
.readability .ic { margin-top: 2px; }

/* blocks list with reorder arrows */
.hint--block { margin-bottom: var(--s2); }
.blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.blocks li { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--silver-lo); padding: 2px 4px 2px 8px; }
.blocks label { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9375rem; min-height: 36px; cursor: pointer; }
.blocks input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.blocks .bevel { min-height: 30px; min-width: 32px; padding: 2px 6px; }
.blocks .bevel:active { padding: 3px 5px 1px 7px; }
.blocks .bevel[disabled] { cursor: default; }
.blocks li.is-moved { background: #ffffcc; }

/* drawn browser window */
.preview { position: sticky; top: var(--s4); }
.browser { background: var(--silver); border: 2px solid; border-color: var(--silver-hi) #404040 #404040 var(--silver-hi); box-shadow: 3px 4px 10px rgb(0 0 0 / .35); padding: 3px; }
.browser-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #000080; color: #fff; font: 700 .8125rem/1 var(--text); padding: 5px 6px; }
.browser-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-name::after { content: " - Plotland Navigator"; font-weight: 400; }
.browser-dots { display: flex; gap: 2px; }
.browser-dots i { width: 16px; height: 14px; background: var(--silver); border: 1px solid; border-color: #fff #404040 #404040 #fff; }
.browser-tools { display: flex; gap: 2px; padding: 4px 2px; border-bottom: 1px solid var(--silver-lo); flex-wrap: wrap; }
.tb { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 52px; padding: 2px 4px; font-size: .6875rem; color: #000; }
.tb .ic { width: 18px; height: 18px; }
.browser-addr { display: flex; align-items: center; gap: 6px; padding: 4px 2px; font-size: .8125rem; font-weight: 700; }
.addr-field { flex: 1; min-width: 0; background: #fff; border: 2px inset #e0e0e0; padding: 3px 6px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.browser-view { aspect-ratio: 4 / 3; overflow: auto; border: 2px inset #e0e0e0; background: #fff; }
.browser-status { display: flex; justify-content: space-between; padding: 3px 6px 1px; font-size: .75rem; color: #000; }

/* the homepage being built (inside the browser) */
.pv { min-height: 100%; padding: 14px 12px 18px; font: 400 .8125rem/1.45 var(--text); --t-bg: #ffffcc; --t-fg: #000; --t-link: #0000ee; }
.pv-table { max-width: 520px; margin: 0 auto; background: var(--t-bg); color: var(--t-fg); border: 3px ridge #c0c0c0; padding: 12px 14px 14px; }
.pv-title { font-size: clamp(1.5rem, 3.2vw, 2.125rem); text-align: center; margin: 2px 0 8px; overflow-wrap: anywhere; }
.pv-title.wordart--neon { display: table; margin-inline: auto; }
.pv-hr { border: 0; border-top: 2px groove #a0a0a0; border-bottom: 2px groove #fff; margin: 10px 0; }
.pv-h { font: 700 1rem var(--display); margin: 0 0 4px; text-decoration: underline; }
.pv p { margin: 0 0 6px; }
.pv a { color: var(--t-link); }
.pv ul { margin: 0 0 6px; padding-left: 18px; }
.pv-mini-gb { border: 1px solid currentColor; padding: 6px 8px; margin-top: 4px; }
.pv-mini-gb p { margin: 0 0 4px; }
.pv-counter { text-align: center; }
.pv-counter .odometer { justify-content: center; font-size: .875rem; }
.pv-welcome { text-align: center; font-style: italic; font-family: var(--display); }
.pv-empty { text-align: center; font-style: italic; }
.pv-coll { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.pv-coll li { display: flex; align-items: center; gap: 6px; border: 1px dashed currentColor; padding: 3px 8px 3px 4px; }
.pv-coll svg { width: 20px; height: 20px; }

/* address + sign up */
.claim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); margin-top: var(--s5); align-items: start; }
.addr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: end; gap: 4px; font: 700 1rem var(--display); }
.addr-pre, .addr-dot, .addr-post { padding-bottom: 8px; }
.field--name, .field--hood { margin: 0; font-family: var(--text); }
.status { margin: var(--s3) 0 0; padding: 8px 10px; font-weight: 700; font-size: .9375rem; background: #fff; border: 1px solid var(--silver-lo); display: flex; gap: 8px; align-items: flex-start; }
.status[data-kind="ok"] { color: var(--ok); border-color: var(--ok); background: #f0fff0; }
.status[data-kind="taken"], .status[data-kind="bad"] { color: var(--bad); border-color: var(--bad); background: #fff3f3; }
.status[data-kind="checking"] { color: #000080; }
.status .ic { margin-top: 3px; }
.hourglass { width: 14px; height: 18px; flex: none; margin-top: 2px; animation: flip 1.2s steps(2) infinite; }
@keyframes flip { 50% { transform: rotate(180deg); } }
.suggest { margin-top: var(--s2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .875rem; }
.suggest .bevel { min-height: 32px; font-weight: 400; }
.signup-grid { display: grid; gap: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; margin: var(--s2) 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.submit-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.result { margin-top: var(--s4); padding: var(--s3) var(--s4); border: 2px solid; background: #fff; }
.result[data-kind="loading"] { border-color: #000080; color: #000080; }
.result[data-kind="error"] { border-color: var(--bad); background: #fff3f3; color: #600; }
.result[data-kind="success"] { border-color: var(--ok); background: #f0fff0; color: #003300; }
.result h3 { font-size: 1.375rem; margin-bottom: 6px; }
.result p:last-child { margin-bottom: 0; }
.progress { height: 18px; border: 2px inset #e0e0e0; background: #fff; padding: 2px; margin-top: 8px; }
.progress i { display: block; height: 100%; width: var(--p, 0%); background: repeating-linear-gradient(90deg, #000080 0 10px, transparent 10px 12px); transition: width .3s steps(4); }

/* street sign for the chosen neighbourhood */
.streetsign { margin-top: var(--s4); }
.sign-plate { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 8px 14px; background: #0a5c2e; color: #fff; border: 3px solid #fff; outline: 2px solid #0a5c2e; border-radius: 4px; font: 700 1.5rem/1.1 var(--text); letter-spacing: .02em; text-transform: uppercase; max-width: 340px; }
.sign-pc { font-size: .875rem; color: #000; background: #fff; padding: 2px 6px; border-radius: 2px; }
.sign-who { margin: 8px 0 0; font-size: .9375rem; max-width: 46ch; }

/* ---------- Guestbook ---------- */
.gb { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.gb-note { margin: var(--s2) 0 0; font-weight: 700; color: var(--ok); font-size: .9375rem; }
.gb-note:empty { display: none; }
.gb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.gb-entry { background: #fff; border: 2px outset #e0e0e0; }
.gb-entry header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; background: #006666; color: #fff; padding: 5px 10px; font-size: .875rem; }
.gb-entry header b { font-family: var(--display); font-size: 1.0625rem; }
.gb-entry header a { color: #ffff99; }
.gb-entry header a:visited { color: #ffccff; }
.gb-entry p { margin: 0; padding: 10px 12px; overflow-wrap: anywhere; }
.gb-entry.is-new { border-color: #ffcc00; }
.gb-entry .gb-del { margin: 0 12px 10px; min-height: 28px; font-weight: 400; font-size: .8125rem; }
.gb-empty { background: #fff; border: 2px dashed var(--silver-lo); padding: var(--s4); text-align: center; font-style: italic; font-family: var(--display); font-size: 1.125rem; }

/* ---------- Webring ---------- */
.ringbox { max-width: 720px; margin: 0 auto var(--s5); border: 4px ridge var(--silver); background: #000080; color: #fff; padding: var(--s4); }
.ring-now { display: grid; grid-template-columns: 220px 1fr; gap: var(--s4); align-items: center; }
.ring-shot .thumb { width: 100%; }
.ring-pos { margin: 0 0 2px; font-size: .875rem; color: #ffff99; font-weight: 700; }
.ring-name { font-size: 1.625rem; color: #fff; margin-bottom: 2px; }
.ring-url { font-family: var(--text); font-size: .9375rem; color: #ccffff; margin-bottom: 6px; }
.ring-desc { margin: 0; font-size: .9375rem; }
.ring-nav { display: flex; justify-content: center; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.ring-nav .bevel { min-width: 120px; min-height: 40px; }
.ring-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
.ring-grid button { display: grid; gap: 6px; width: 100%; padding: 4px; background: none; border: 2px solid transparent; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.ring-grid button[aria-current="true"] { border: 2px dotted #000080; background: #ffffcc; }
.ring-grid .t-name { font: 700 .9375rem/1.25 var(--display); color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.ring-grid button.seen .t-name { color: var(--visited); }
.ring-grid .t-url { font-size: .75rem; color: var(--ink-2); overflow-wrap: anywhere; }

/* drawn member page thumbnails */
.thumb { aspect-ratio: 4 / 3; border: 2px solid; border-color: #fff #404040 #404040 #fff; position: relative; overflow: hidden; outline: 1px solid #000; }
.thumb-bar { height: 10%; background: #000080; }
.thumb-body { position: absolute; inset: 18% 10% 8%; background: var(--tb, #ffffcc); border: 2px ridge #c0c0c0; padding: 6% 7%; display: grid; align-content: start; gap: 6%; }
.thumb-title { height: 14%; min-height: 6px; width: 70%; justify-self: center; background: var(--tt, #c00); box-shadow: 2px 2px 0 #000; }
.thumb-line { height: 5%; min-height: 3px; background: var(--tl, #444); opacity: .55; }
.thumb-line:nth-child(odd) { width: 86%; }
.thumb-pic { width: 34%; aspect-ratio: 1; justify-self: start; }
.thumb-pic svg { width: 100%; height: 100%; }

/* ---------- Neighbourhoods table ---------- */
.table-wrap { overflow-x: auto; }
.nb { width: 100%; border-collapse: collapse; background: #fff; border: 3px outset var(--silver); }
.nb th, .nb td { border: 1px solid var(--silver-lo); padding: 8px 10px; text-align: left; vertical-align: top; }
.nb thead th { background: #800000; color: #fff; font-size: .875rem; }
.nb thead th.num { text-align: right; }
.nb tbody tr:nth-child(even) { background: #f5f5dc; }
.nb tbody th { white-space: nowrap; }
.nb tfoot th, .nb tfoot td { background: var(--silver); font-weight: 700; }
.nb .num, .books .num { text-align: right; }
.nb tr.is-picked { background: #ffff99 !important; }

/* ---------- House rules ---------- */
.rules-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s5); align-items: start; }
.rules { margin: 0; padding-left: 1.6em; display: grid; gap: var(--s3); font-size: 1.0625rem; max-width: 64ch; }
.rules li::marker { font: 700 1.125rem var(--display); color: #800000; }
.rules strong { font-family: var(--display); font-size: 1.1875rem; color: #000; }
.rules-aside { background: #ffffcc; border: 2px dashed #800000; padding: var(--s4); font: italic 1rem/1.5 var(--display); }
.rules-aside .sprite { margin: -40px auto var(--s2); }
.sig { font-style: normal; font-family: var(--text); font-size: .9375rem; margin: 0; }

/* ---------- Prices ---------- */
.price-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
.price { width: 100%; border-collapse: collapse; background: #fff; border: 3px outset var(--silver); }
.price caption { padding: 0; text-align: left; }
.price-head { background: #000080; color: #fff; padding: 10px 12px; border: 3px outset var(--silver); border-bottom: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px; }
.price--big .price-head { background: #800000; }
.price-name { font: 700 1.5rem var(--display); }
.price-amt { font: 700 2.25rem/1 var(--display); color: var(--yellow); grid-row: span 2; }
.price-per { font-size: .875rem; color: #fff; }
.price th, .price td { border: 1px solid var(--silver-lo); padding: 8px 10px; text-align: left; vertical-align: top; font-size: .9375rem; }
.price th { width: 42%; background: #f5f5dc; }
.books { margin: var(--s5) auto var(--s3); border-collapse: collapse; min-width: min(420px, 100%); background: #fff; border: 2px solid #000; font-variant-numeric: tabular-nums; }
.books caption { font: 700 1.125rem var(--display); padding-bottom: 6px; color: #000080; }
.books th, .books td { padding: 6px 12px; border-bottom: 1px dotted var(--silver-lo); text-align: left; font-weight: 400; }
.books tfoot th, .books tfoot td { font-weight: 700; border-top: 3px double #000; border-bottom: 0; }
#prices .small { text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 70ch; margin: 0 auto; display: grid; gap: 6px; }
.faq details { background: #fff; border: 2px outset #e0e0e0; }
.faq details[open] { border-style: inset; }
.faq summary { cursor: pointer; padding: 10px 12px; font: 700 1.125rem var(--display); color: #000080; min-height: 44px; list-style: none; display: flex; gap: 10px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; width: 0; height: 0; border-left: 7px solid #000; border-top: 5px solid transparent; border-bottom: 5px solid transparent; flex: none; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details p { padding: 0 14px 12px 29px; margin: 0; }

/* ---------- Footer: counter + ring box ---------- */
.foot { color: #fff; text-align: center; padding: var(--s2) var(--s4) var(--s5); margin-top: var(--s5); background: var(--night); border: 4px ridge var(--silver); }
.foot .rule { max-width: 70%; }
.foot-counter p { margin: 0 0 6px; font: italic 1.125rem var(--display); }
.foot-counter .small { color: #ccccff; font: .875rem var(--text); }
.odometer { display: inline-flex; gap: 2px; margin: 0; font: 700 1.5rem/1 var(--text); font-variant-numeric: tabular-nums; }
.foot .odometer { display: flex; justify-content: center; margin: 4px 0 8px; }
.odometer span { display: inline-block; min-width: 1.05em; padding: .18em .12em; background: #000; color: #66ff66; border: 1px solid #555; text-align: center; font-style: normal; }
.odometer span:last-child { animation: tick 3s steps(1) infinite; }
@keyframes tick { 90% { color: #66ff66; } 95% { color: #ffffff; } }
.foot-ring { margin: var(--s5) auto; max-width: 560px; background: var(--silver); color: #000; border: 3px outset #e0e0e0; padding: 10px 12px; }
.foot-ring-head { margin: 0 0 6px; font-weight: 700; display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.foot-ring-links { margin: 0; display: flex; justify-content: center; gap: 4px 12px; flex-wrap: wrap; }
.foot-ring-links a { color: #000080; display: inline-block; padding: 6px 2px; font-weight: 700; }
.foot-ring-links a:visited { color: var(--visited); }
.foot-meta { margin: 0 auto 8px; max-width: 78ch; font-size: .875rem; color: #e0e0ff; }
.foot-meta a { color: #ffff99; }
.foot-meta a:visited { color: #ffccff; }

/* ---------- Sprites: GIF-like motion with steps() ---------- */
.sprite--globe svg { width: 64px; height: 64px; }
.globe-land { animation: spin 4s steps(16) infinite; }
@keyframes spin { to { transform: translateX(-64px); } }
.shovel { transform-origin: 30px 32px; animation: dig 1s steps(2) infinite; }
@keyframes dig { 50% { transform: rotate(18deg); } }
.wing-l { transform-origin: 8px 14px; animation: flapL .6s steps(2) infinite; }
.wing-r { transform-origin: 56px 14px; animation: flapR .6s steps(2) infinite; }
@keyframes flapL { 50% { transform: rotate(28deg); } }
@keyframes flapR { 50% { transform: rotate(-28deg); } }
.envelope { animation: bob 1.2s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.twinkle { transform-origin: 50px 10px; animation: twinkle 1.6s steps(2) infinite; }
@keyframes twinkle { 50% { transform: scale(.3); opacity: .3; } }

/* Reduced motion and the stop button: every sprite, blink and marquee holds still */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee-window { overflow-x: auto; }
  .marquee-text[aria-hidden] { display: none; }
}
.is-still *, .is-still *::before { animation-play-state: paused !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .builder { grid-template-columns: 1fr; }
  .preview { position: static; order: -1; max-width: 640px; width: 100%; margin-inline: auto; }
  .claim { grid-template-columns: 1fr; }
  .tiles, .letterings { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ring-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .menu { border-right: 0; border-bottom: 2px solid var(--silver-lo); padding: var(--s3); }
  .menu-stick { position: sticky; top: var(--s4); }
.menu-head { display: none; }
  .menu-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .menu-btn { justify-content: center; padding-inline: 6px; }
  .menu-extra { margin-top: var(--s3); grid-template-columns: auto auto 1fr; align-items: center; justify-items: start; text-align: left; }
  .badges { grid-template-columns: repeat(3, 88px); }
  main { padding: var(--s4) var(--s5) var(--s5); }
  .gb { grid-template-columns: 1fr; }
  .rules-wrap { grid-template-columns: 1fr; }
  .rules-aside { max-width: 520px; margin-top: var(--s5); }
  .ring-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .mast-row { grid-template-columns: 1fr auto; gap: var(--s3); }
  .mast-title { grid-column: 1 / -1; order: -1; }
  .sprite--globe { justify-self: start; }
  .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-extra { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .tiles, .letterings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ring-now { grid-template-columns: 1fr; }
  .ring-shot { max-width: 260px; }
  .price-tables { grid-template-columns: 1fr; }
  .addr-row { grid-template-columns: 1fr; gap: 6px; }
  .addr-pre, .addr-dot { display: none; }
  .addr-post { padding: 0; font-size: .875rem; }
  .addr-post::before { content: "Your address ends in "; font-weight: 400; font-family: var(--text); }
  .marquee-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .marquee-toggle { min-width: 44px; }
}
@media (max-width: 480px) {
  .page { width: calc(100% - 16px); margin-top: var(--s3); }
  main { padding: var(--s3) var(--s3) var(--s4); }
  .box { padding: var(--s2) var(--s3) var(--s3); }
  .construction svg { width: 96px; }
  .badges { grid-template-columns: repeat(3, 88px); gap: 4px; }
  .nb thead { display: none; }
  .nb, .nb tbody, .nb tr, .nb th, .nb td, .nb tfoot { display: block; }
  .nb tr { border-bottom: 2px solid var(--silver-lo); padding: 6px 4px; }
  .nb th, .nb td { border: 0; padding: 2px 6px; }
  .nb td.num { text-align: left; display: inline-block; margin-right: 14px; }
  .nb td.num::before { content: attr(data-label) ": "; font-weight: 700; }
  .ring-nav .bevel { min-width: 0; flex: 1; padding-inline: 6px; }
  .tb { min-width: 40px; }
  .tb--wide { display: none; }
  .whatsnew th { white-space: normal; width: 6.5em; }
  .swatch-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Without JavaScript the swatches and block list cannot be drawn; hide their empty frames */
html:not(.js) .swatch-row, html:not(.js) .readability, html:not(.js) .blocks, html:not(.js) .hint--block { display: none; }
html:not(.js) .builder-controls fieldset:has(.swatches), html:not(.js) .builder-controls fieldset:has(.blocks) { display: none; }
