@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 360 620; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  /* One page, never scrolled, in the configurator's language ("ground truth", DECISIONS.md section 31): paper, an editorial serif for
     the name and the one line that says what the configurator is for, a plain sans for the rest, the land drawn faintly behind in
     contours, and the configurator large in its frame, the page's one picture. Its colours are the configurator's own
     (src/styles/app.css), copied here by hand: nothing links the two. Evening, its default, and Paper, light mode. */
  --ground: #0b0c0a;      /* the page */
  --line: #a7a293;        /* the contours, at a few per cent */
  --ink: #f2eee5;
  --ink-2: #d0cabd;
  --ink-3: #aca698;
  --rim: rgba(242, 238, 229, 0.2);  /* the frame's edge, a hairline */
  --key-edge: rgba(242, 238, 229, 0.42); /* a button's edge */
  --night: #050607;       /* the frame's own ground, the configurator's canvas */
  --accent: #ffb547;      /* the house in the mark, as on the icon */
  --press: #f2eee5;       /* a pressed button: ink */
  --press-ink: #121410;
  --focus: #ffb547;
  --shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --edge-w: clamp(12px, 2vmin, 24px); /* the margin round the page */
  color-scheme: dark;
}
/* Paper: light mode (Ryan, 2026-10-11), as the configurator's: white paper, a green-black ink, the frame's ground the map's light
   canvas */
:root[data-theme='light'] {
  --ground: #ffffff;
  --line: #59625a;
  --ink: #141914;
  --ink-2: #3a423b;
  --ink-3: #59625a;
  --rim: rgba(20, 25, 20, 0.16);
  --key-edge: rgba(20, 25, 20, 0.42);
  --night: #f3f4f6;
  --press: #141914;
  --press-ink: #ffffff;
  --focus: #8a5310;
  --shadow: 0 40px 90px -50px rgba(20, 25, 20, 0.45);
  color-scheme: light;
}

html, body { height: 100%; margin: 0; overflow: hidden; background: var(--ground); }
body {
  color: var(--ink); font: 400 15px/1.5 var(--sans); font-synthesis: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none;
}
p, h1 { margin: 0; }
.nowrap { white-space: nowrap; }

.sheet { position: fixed; inset: 0; overflow: hidden; background: var(--ground); }

/* the page inside its margin; the ground is drawn out to the screen's edge */
.layout {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + var(--edge-w));
  right: calc(env(safe-area-inset-right, 0px) + var(--edge-w));
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--edge-w));
  left: calc(env(safe-area-inset-left, 0px) + var(--edge-w));
  container-type: size;
}
.ground {
  position: absolute; pointer-events: none; z-index: -1;
  top: calc(-1 * (env(safe-area-inset-top, 0px) + var(--edge-w)));
  right: calc(-1 * (env(safe-area-inset-right, 0px) + var(--edge-w)));
  bottom: calc(-1 * (env(safe-area-inset-bottom, 0px) + var(--edge-w)));
  left: calc(-1 * (env(safe-area-inset-left, 0px) + var(--edge-w)));
}
.topo { display: block; width: 100%; height: 100%; }

/* The page: the masthead above the frame (a tablet, a small laptop, a phone held upright), or beside it where a laptop or a desktop
   has the width for both and the configurator still 960 px across inside the frame's edge, where its laptop layout starts. The frame
   is never wider than 1.8 times its height above the masthead: on a wide, short window it stands in the middle. */
.stage {
  --gap: clamp(14px, 2.2cqh, 28px);
  position: relative; height: 100cqh;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: var(--gap);
}
.masthead {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "mark lead tools" "mark sub tools";
  align-items: start; column-gap: clamp(20px, 3cqw, 48px); row-gap: 4px; min-width: 0;
}
.mark { grid-area: mark; display: flex; align-items: center; gap: 10px; font: 500 22px/1 var(--serif); letter-spacing: -0.005em; white-space: nowrap; }
.mark-house { width: 26px; height: 26px; flex: none; fill: var(--accent); }
.lead { grid-area: lead; font: 440 clamp(24px, 3.4cqh, 34px)/1.08 var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
.sub { grid-area: sub; max-width: 60ch; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.tools { grid-area: tools; display: flex; align-items: center; gap: 14px; }
.contact { color: var(--ink); font-size: 14px; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--key-edge); }
.contact:hover { text-decoration-color: var(--ink); }
.contact:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.maker { display: none; font-size: 12px; line-height: 1.45; color: var(--ink-3); }

/* light mode: a square key, a sun until it is on, then a moon on the ink it fills with */
.mode {
  width: 36px; height: 36px; padding: 0; display: grid; place-items: center; cursor: pointer; flex: none;
  border: 1px solid var(--key-edge); border-radius: 4px; background: transparent; color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.mode svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mode .mode-moon, [data-theme='light'] .mode .mode-sun { display: none; }
[data-theme='light'] .mode .mode-moon { display: block; }
[data-theme='light'] .mode { background: var(--press); border-color: var(--press); color: var(--press-ink); }
.mode:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) { .mode:hover { border-color: var(--ink); } }

/* the frame: the configurator on its own ground, a hairline round it, lifted a little off the page */
.frame {
  position: relative; z-index: 1; min-height: 0; justify-self: center;
  width: min(100%, max(962px, (100cqh - var(--top, 96px) - var(--gap)) * 1.8));
  border: 1px solid var(--rim); border-radius: 3px; background: var(--night); box-shadow: var(--shadow);
  container-type: size;
}
.frame-app { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--night); border-radius: 2px; }
/* the configurator's full screen where the browser has none for a frame (an iPhone): the frame fills the page, clear of the notch
   (gablemap.js); the layout lets go of its containment, which would hold a fixed frame inside it */
.is-expanded .layout { container-type: normal; }
/* (stretched: a fixed box aligned otherwise is sized to its content, and the frame has none of its own, its configurator laid over it) */
.is-expanded .frame {
  position: fixed; z-index: 100; border: 0; border-radius: 0; box-shadow: none; width: auto; height: auto; max-width: none;
  justify-self: stretch; align-self: stretch;
  top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); bottom: env(safe-area-inset-bottom, 0px); left: env(safe-area-inset-left, 0px);
}
.frame:has(.frame-app) .frame-slot { display: none; }
.frame-slot { position: absolute; inset: 0; overflow: hidden; }
.frame-topo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plate {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max-content; max-width: calc(100% - 32px); box-sizing: border-box;
  padding: clamp(18px, 4cqh, 36px) clamp(20px, 4cqw, 48px);
  background: var(--ground); border: 1px solid var(--rim); border-radius: 4px;
  color: var(--ink); text-align: center;
}
.plate-title { font: 440 clamp(26px, 4.6cqw, 52px)/1.05 var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
.plate-note { margin-top: 0.7em; font-size: clamp(13px, 1.4cqw, 15px); line-height: 1.45; color: var(--ink-2); }

/* a laptop or a desktop with the width for both: the masthead a column beside the frame, the frame the page's whole height, and still
   962 px across at least (the configurator's 960 inside its edge) */
@container (min-width: 1210px) and (min-height: 520px) {
  .stage {
    --side: clamp(220px, calc(100cqw - 990px), 330px);
    grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: 28px;
  }
  .masthead {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "mark" "lead" "sub" "tools" "maker"; grid-template-rows: auto auto auto auto 1fr;
    align-content: start; row-gap: 0; padding-top: 2px;
  }
  .lead { margin-top: clamp(28px, 8cqh, 88px); font-size: clamp(30px, 4.4cqh, 44px); }
  .sub { margin-top: 16px; font-size: 15px; }
  .tools { margin-top: 24px; flex-wrap: wrap; }
  .maker { display: block; align-self: end; }
  .frame { width: auto; height: 100%; justify-self: stretch; max-width: calc(100cqh * 1.9); }
}

/* a phone held upright: the mark and the light mode key on a line, the one line under them, the frame the rest */
@media (orientation: portrait) and (max-width: 639px) {
  .layout { --edge-w: 12px; }
  .stage { --gap: 12px; }
  .masthead { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "mark tools" "lead lead"; row-gap: 10px; }
  .mark { font-size: 20px; }
  .mark-house { width: 22px; height: 22px; }
  .lead { font-size: 23px; }
  .sub, .contact { display: none; }
  .frame { width: 100%; }
}
/* a phone turned sideways: the mark alone in a narrow column, everything else for the frame */
@media (orientation: landscape) and (max-height: 520px) {
  .layout { --edge-w: 8px; }
  .stage { grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: 8px; }
  .masthead { display: block; }
  .mark span, .lead, .sub, .tools, .maker { display: none; }
  .mark-house { width: 26px; height: 26px; margin: 2px 0 0 4px; }
  .frame { width: 100%; }
}
@media (forced-colors: active) {
  .frame, .mode { border-color: CanvasText; }
  .mark-house { fill: CanvasText; }
}
