/* The public landing page and the owner's door, v2 (docs/plans/landing-v2.md). design/landing/landing-v2.css then
   door-v2.css, verbatim, except the faces: one block, the three from /fonts/ and the two local fallback families
   (no network). test/public-assets.test.ts PA8 holds this. */

@font-face { font-family: 'Grenze Gotisch'; src: url('/fonts/GrenzeGotisch-wght.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
/* Fallback faces for the display font, used while Grenze loads (font-display: swap) or when it is blocked. Georgia
   and Times New Roman are about 1.35 and 1.13 times as wide as Grenze, so unscaled they cut the nowrap headlines off
   at 375. Each face is a local font scaled to Grenze's width (size-adjust, measured in Chrome over every display line
   on the page at its weight: Grenze / fallback, the narrowest ratio kept) and given Grenze's ascent 1.10 and descent
   0.38 em, divided by the size-adjust because Chrome scales the overrides by it, so the baseline stays where Grenze's
   is. A face whose local font is missing is skipped and the next family is tried. */
@font-face { font-family: 'Grenze Fallback'; src: local('Georgia Bold'), local('Georgia-Bold'); font-weight: 600 900; size-adjust: 71%; ascent-override: 155%; descent-override: 53.5%; }
@font-face { font-family: 'Grenze Fallback'; src: local('Georgia'); font-weight: 100 500; size-adjust: 78%; ascent-override: 141%; descent-override: 48.7%; }
@font-face { font-family: 'Grenze Fallback Times'; src: local('Times New Roman Bold'), local('TimesNewRomanPS-BoldMT'); font-weight: 600 900; size-adjust: 83%; ascent-override: 132.5%; descent-override: 45.8%; }
@font-face { font-family: 'Grenze Fallback Times'; src: local('Times New Roman'), local('TimesNewRomanPSMT'); font-weight: 100 500; size-adjust: 86%; ascent-override: 127.9%; descent-override: 44.2%; }

/* The public landing page, second look (design/landing/rounds.md, "Landing v2"). Mock-up styles.
   A build swaps the mock-up paths for the shipped ones: /fonts/... and /landing/dragon.jpg, /landing/seal.webp.
   No script, no form, no outside request. Everything is under .land2. */

.land2 {
  --navy: #0d1524;                       /* the page: the night the game plays through */
  --deep: #080e19;                       /* the notice band and the footer */
  --slate: #3c434b;                      /* the picture's own ground, so the picture has no edge */
  --ink: #eef1f4;                        /* reading text and the headline */
  --dim: #b7c2d0;                        /* second voice */
  --gold: #e3c06a;                       /* "Coming soon" and the away line, nothing else */
  --rule: rgba(183, 194, 208, .26);      /* hairlines */
  --display: 'Grenze Gotisch', 'Grenze Fallback', 'Grenze Fallback Times', serif;
  --text: 'Alegreya Sans', sans-serif;
  --m: 24px;                             /* page margin */
  margin: 0; background: var(--navy); color: var(--ink);
  font: 400 18px/1.45 var(--text); font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.land2 *, .land2 *::before, .land2 *::after { box-sizing: border-box; }
.land2 h1, .land2 h2, .land2 h3, .land2 p, .land2 ol { margin: 0; padding: 0; }
.land2 ol { list-style: none; }
.land2 img { display: block; }
.land2 a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.land2 a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.land2 .skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--deep); padding: 12px 16px; z-index: 5; }
.land2 .skip:focus { left: 8px; }
/* ss01 is Grenze's roman capital set over the same blackletter lower case: the fraktur T read as "C" and the
   fraktur I as "l" ("ldleChrones"), so every display capital (T, I, C, S, W, all of them) takes the plain cut. */
.land2 h1, .land2 h2, .land2 h3 { font-family: var(--display); font-weight: 700; font-feature-settings: 'ss01' 1; }
.land2 h1 > span, .land2 .during h3 > span { display: block; white-space: nowrap; }

/* ---------- phone first: picture, then the words, stacked ---------- */

.land2 .cover { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.land2 { min-height: 100vh; display: flex; flex-direction: column; }
.land2 main { flex: 1; display: flex; flex-direction: column; }
.land2 .away { flex: 1; display: flex; flex-direction: column; justify-content: center; }   /* in a window taller than the page the points sit mid-way, the footer on the bottom edge */
/* The seal sits on the picture's night-dark top left, not on a strip of its own. */
.land2 header { position: absolute; top: 0; left: 0; z-index: 2; padding: 16px var(--m); }
.land2 header .seal { width: 64px; height: 64px; }
/* The dragon starts at the top edge and is wider than the phone (about 340 px tall): head and body whole in the
   middle, both wing tips off the edges. */
.land2 .dragon { width: 190%; max-width: none; height: auto; margin: 0 0 0 -60%; background: var(--slate); }
.land2 .cover::before {                  /* the scrim: night over the seal's corner and under the picture, clear over the head */
  content: ""; position: absolute; inset: 0 0 auto 0; height: calc(190vw * 539 / 1140); z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(13 21 36 / .9) 0, rgb(13 21 36 / .55) 64px, rgb(13 21 36 / 0) 30vw),
    linear-gradient(0deg, rgb(13 21 36) 0, rgb(13 21 36 / .8) 14%, rgb(13 21 36 / 0) 40%);
}
.land2 .say { position: relative; z-index: 2; margin-top: -48px; padding: 0 var(--m) 32px; }
.land2 h1 { font-size: min(44px, 11.7vw); line-height: .92; letter-spacing: -.005em; }
.land2 h1 .if { margin-right: .04em; }
.land2 .lead { margin-top: 16px; max-width: 30em; text-wrap: balance; }

.land2 .soon { background: var(--deep); padding: 24px var(--m) 32px; }
.land2 .soon h2 { font-size: 44px; line-height: 1; font-weight: 600; color: var(--gold); }
.land2 .soon p { margin-top: 8px; color: var(--dim); max-width: 30em; text-wrap: balance; }

/* The away line: one rule for the time you start, the time you are gone and the time you come back.
   The stretch you are gone is the gold one, and the longest, because that is the game. */
.land2 .away { padding: 48px var(--m) 56px; }
.land2 .away h2 { font-size: 26px; line-height: 1; font-weight: 500; color: var(--gold); margin: 0 0 24px 0; }
.land2 .away li { position: relative; padding: 0 0 32px 24px; border-left: 1px solid var(--rule); }
.land2 .away li:last-child { padding-bottom: 0; }
.land2 .away .during { border-left: 2px solid var(--gold); margin-left: -.5px; padding: 8px 0 40px 24px; margin-bottom: 32px; }
.land2 .away .during::before, .land2 .away .during::after { content: ""; position: absolute; left: -2px; width: 14px; height: 2px; background: var(--gold); }
.land2 .away .during::before { top: 0; }
.land2 .away .during::after { bottom: 0; }
.land2 .away h3 { font-size: 26px; line-height: 1; font-weight: 600; }
.land2 .away .during h3 { font-size: min(39px, 10.4vw); line-height: .92; font-weight: 700; }
.land2 .away p { margin-top: 12px; color: var(--dim); max-width: 30em; }
.land2 .away .during p { color: var(--ink); }

.land2 footer { background: var(--deep); border-top: 1px solid var(--rule); padding: 24px var(--m); display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 12px; row-gap: 8px; color: var(--dim); font-size: 16px; }
.land2 footer .seal { width: 48px; height: 48px; }
.land2 footer .name b { font-weight: 800; }
.land2 footer .name { font: 300 26px/1 var(--display); font-feature-settings: 'ss01' 1; color: var(--ink); grid-column: 2 / -1; }
.land2 footer .credit { grid-column: 1 / 3; }
.land2 footer .door a { display: inline-block; padding: 12px 0; }       /* a 44 px target */

/* ---------- desktop: its own composition ----------
   The cover fills the first screen down to the notice band. The dragon is drawn as large as the height allows and
   set right, its head about 62 percent across and its right wing tip just off the window; the headline holds the
   left on the night side of the scrim, over the ghost of the left wing. */
@media (min-width: 960px) {
  .land2 {
    --m: 5vw; --g: 32px;
    --band: clamp(112px, 8vw, 148px);
    --cover: max(500px, min(100vh - var(--band), 44vw));
    --img: min(86vw, var(--cover) * 1.96);
    font-size: clamp(18px, 1.15vw, 22px);
  }
  /* In a window taller than the page the spare height is shared by the cover (night sky over the dragon) and the
     away line (air around it), so neither holds one big empty field. The cover clips the dragon sideways only, so the
     seal can cross into the band. */
  .land2 .cover { display: block; height: auto; min-height: var(--cover); flex: 1 0 var(--cover); background: var(--slate); overflow-x: clip; overflow-y: visible; }
  .land2 .away { flex: 1 0 auto; }
  .land2 .dragon { position: absolute; right: calc(var(--img) * -.04); bottom: 0; width: var(--img); margin: 0; }
  .land2 .cover::before {
    inset: 0; height: auto;
    background:
      linear-gradient(90deg, rgb(13 21 36) 0, rgb(13 21 36 / .97) 30%, rgb(13 21 36 / .9) 47%, rgb(13 21 36 / .62) 55%, rgb(13 21 36 / .3) 63%, rgb(13 21 36 / 0) 72%),
      linear-gradient(0deg, rgb(8 14 25 / .6) 0, rgb(8 14 25 / 0) 22%);
  }
  /* The seal is the page's one brand mark, so it is set large enough for its own lettering and stamped across the
     band's top edge at the right margin: the band holds the notice, its line and the mark, end to end. Its centre sits
     a fifth of its width under the edge, which keeps it 60 px or more clear of the dragon (FLOW.md). */
  .land2 { --seal: clamp(136px, 9.6vw, 184px); }
  .land2 header { top: auto; left: auto; right: var(--m); bottom: calc(var(--seal) * -.7); z-index: 3; padding: 0; }
  .land2 header .seal { width: var(--seal); height: auto; filter: drop-shadow(0 6px 14px rgb(4 8 15 / .55)); }
  .land2 .say { position: absolute; left: var(--m); bottom: clamp(40px, 3.6vw, 64px); margin: 0; padding: 0; }
  .land2 h1 { font-size: min(6.6vw, 15vh); line-height: .9; }
  .land2 .lead { margin-top: clamp(20px, 1.7vw, 32px); font-size: clamp(20px, 1.3vw, 25px); max-width: 27em; }

  /* The band and the away line share one split: a quarter, then the rest. The note, "While you are away" and the
     big middle point all start on the same vertical. */
  .land2 .soon { min-height: var(--band); padding: 16px var(--m); display: grid; grid-template-columns: 3fr 9fr; align-items: center; }
  .land2 .soon h2 { font-size: clamp(50px, 4vw, 76px); white-space: nowrap; }
  .land2 .soon p { margin: 0; padding: 0 calc(var(--seal) + var(--g) * 2) 0 var(--g); max-width: none; font-size: clamp(20px, 1.3vw, 25px); }

  .land2 .away { padding: clamp(72px, 6vw, 112px) var(--m) clamp(64px, 4.2vw, 80px); }
  .land2 .away h2 { font-size: clamp(28px, 2vw, 38px); margin: 0 0 20px calc(25% + var(--g)); }
  /* The two short points hang on the big one's lines: their headings sit level with its last line and all three
     paragraphs start on one line, so the columns end together instead of leaving navy under the short ones. */
  .land2 .away ol { display: grid; grid-template-columns: 3fr 6fr 3fr; grid-template-rows: auto auto; }
  .land2 .away li { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
  .land2 .away li h3 { align-self: end; }
  .land2 .away li, .land2 .away .during { border-left: 0; border-top: 1px solid var(--rule); margin: 0; padding: 32px var(--g) 0 0; }
  .land2 .away .during { border-top: 2px solid var(--gold); margin-top: -.5px; padding: 31px var(--g) 0 var(--g); }
  .land2 .away .after { padding: 32px 0 0 var(--g); }
  .land2 .away .during::before, .land2 .away .during::after { top: -2px; bottom: auto; width: 2px; height: 18px; }
  .land2 .away .during::before { left: 0; }
  .land2 .away .during::after { left: auto; right: 0; }
  .land2 .away h3 { font-size: clamp(34px, 2.6vw, 50px); }
  .land2 .away .during h3 { font-size: clamp(76px, 6vw, 116px); line-height: .88; }
  .land2 .away p { margin-top: 24px; max-width: 24em; }
  .land2 .away .during p { max-width: 29em; margin-top: 24px; }

  .land2 footer { padding: 28px var(--m); display: flex; gap: 16px; font-size: 18px; }
  .land2 footer .seal { width: 56px; height: 56px; }
  .land2 footer .name { font-size: 30px; }
  .land2 footer .credit { margin-left: auto; }
  .land2 footer .door { margin-left: 32px; }
}

/* The owner's door at /admin_test, in the Landing v2 look (design/landing/direction.md, "Landing v2"; notes in
   door-v2-notes.md). Mock-up styles. The words, the one button and the small print are door.html's, unchanged; only
   the look is v2's. A build swaps the mock-up paths for /fonts/... and /landing/dragon.jpg, /landing/seal.webp.
   No script, no form, no outside request. Everything is under .door2. */


.door2 {
  --navy: #0d1524;                       /* the page: the night the game plays through */
  --deep: #080e19;                       /* the footer, and the words on the button */
  --slate: #3c434b;                      /* the picture's own ground, so the picture has no edge */
  --ink: #eef1f4;                        /* the heading and the line */
  --dim: #b7c2d0;                        /* the small print */
  --gold: #e3c06a;                       /* the button, nothing else: the door's one thing to do */
  --rule: rgba(183, 194, 208, .26);      /* hairline */
  --display: 'Grenze Gotisch', 'Grenze Fallback', 'Grenze Fallback Times', serif;
  --text: 'Alegreya Sans', sans-serif;
  --m: 24px;                             /* page margin */
  --foot: 72px;
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--navy); color: var(--ink);
  font: 400 18px/1.45 var(--text); font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.door2 *, .door2 *::before, .door2 *::after { box-sizing: border-box; }
.door2 h1, .door2 p { margin: 0; }
.door2 img { display: block; }
.door2 a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.door2 a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.door2 .skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--deep); padding: 12px 16px; z-index: 5; }
.door2 .skip:focus { left: 8px; }
/* As on / (landing-v2.css): ss01 is Grenze's roman capital set over the same blackletter lower case, so every display
   capital takes the plain cut; the fraktur "O" of "Owner" had a doubled left stem no capital on / has. */
.door2 h1 { font-family: var(--display); font-weight: 700; font-feature-settings: 'ss01' 1; white-space: nowrap; }
.door2 .lead span { white-space: nowrap; }

/* ---------- phone: seal, the dragon, then the sign-in on the picture's dark foot ---------- */

.door2 .cover { flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.door2 header { order: -1; position: relative; z-index: 2; padding: 16px var(--m); }
.door2 header a { display: block; width: max-content; border-radius: 50%; }
.door2 header .seal { width: 72px; height: 72px; }
/* As on /, a step larger (the door has less to say under it): head and body whole, both wing tips off the edges.
   The head sits right of the file's middle, so the picture is pulled left past centre (-37.5% would centre it). */
.door2 .dragon { width: 175%; max-width: none; height: auto; margin: 0 0 0 -51%; background: var(--slate); }
.door2 .cover::before {                  /* the scrim: night above and below the picture, clear over the head */
  content: ""; position: absolute; inset: 0 0 auto 0; height: calc(175vw * 539 / 1140 + 104px); z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(13 21 36) 0, rgb(13 21 36) 104px, rgb(13 21 36 / .5) calc(104px + 9vw), rgb(13 21 36 / 0) calc(104px + 26vw)),
    linear-gradient(0deg, rgb(13 21 36) 0, rgb(13 21 36 / .8) 16%, rgb(13 21 36 / 0) 48%);
}
.door2 main { position: relative; z-index: 2; margin-top: -40px; padding: 0 var(--m) 32px; }
.door2 h1 { font-size: min(60px, 16vw); line-height: .92; letter-spacing: -.005em; }
.door2 .lead { margin-top: 16px; }
.door2 .lead span { display: block; white-space: normal; }
.door2 .act { margin-top: 48px; }
.door2 .button {
  display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 32px;
  background: var(--gold); color: var(--deep); border-radius: 4px; text-decoration: none;
  font: 800 21px/1 var(--text); letter-spacing: .005em;
}
.door2 .button:hover { background: #ecd08a; }
.door2 .button:focus-visible { outline-color: var(--ink); }
.door2 .hint { margin-top: 16px; font-size: 16px; color: var(--dim); }

.door2 footer {
  min-height: var(--foot); padding: 6px var(--m); background: var(--deep); border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 16px; color: var(--dim); font-size: 16px;
}
.door2 footer p { white-space: nowrap; }            /* each whole; on a phone under 375 the link takes a row of its own */
.door2 footer .back a { display: inline-block; padding: 12px 0; }   /* a 44 px target */

/* ---------- desktop: its own composition ----------
   The landing page's cover, the whole window down to the footer: the dragon lit on the right, standing on the
   footer's hairline, its head about two thirds across; the sign-in holds the left on the night side of the scrim, its
   heading where the landing page's headline is, and the gold button is the one lit thing on that side. */
@media (min-width: 960px) {
  .door2 {
    --m: 5vw;
    --foot: clamp(72px, 4.6vw, 88px);
    --cover: max(560px, 100vh - var(--foot));
    /* The dragon is sized from the height, not only the width: as tall as the cover allows less a 24 px sky, wider
       than the window if it must (the left wing runs off under the night side), so a taller window gets a larger
       dragon instead of a plain slate field over the right wing. */
    --img: min((var(--cover) - 24px) * 2.115, 125vw, 1760px);
    --seal: clamp(136px, 9.6vw, 184px);
    font-size: clamp(18px, 1.15vw, 22px);
  }
  /* The cover clips the dragon sideways only, so the seal can cross into the footer. */
  .door2 .cover { flex: none; display: block; height: var(--cover); background: var(--slate); overflow-x: clip; overflow-y: visible; }
  /* Set further right than on / (more of the right wing off the window), so the larger head stays clear of the
     heading's end. */
  .door2 .dragon { position: absolute; right: calc(var(--img) * -.13); bottom: 0; width: var(--img); margin: 0; }
  .door2 .cover::before {
    inset: 0; height: auto;
    background:
      linear-gradient(90deg, rgb(13 21 36) 0, rgb(13 21 36 / .97) 30%, rgb(13 21 36 / .86) 44%, rgb(13 21 36 / .4) 58%, rgb(13 21 36 / 0) 70%),
      linear-gradient(0deg, rgb(8 14 25 / .6) 0, rgb(8 14 25 / 0) 22%);
  }
  /* As on /: the seal is the page's one brand mark, stamped large across the footer's hairline at the right margin.
     The door's footer is shorter than the landing's band, so the seal's foot sits 16 px above the window's bottom
     edge (about half of it under the line) instead of the landing's seven tenths. */
  .door2 header { position: absolute; top: auto; left: auto; right: var(--m); bottom: calc(16px - var(--foot)); z-index: 3; padding: 0; }
  .door2 header .seal { width: var(--seal); height: auto; filter: drop-shadow(0 6px 14px rgb(4 8 15 / .55)); }
  /* The words sit on the cover's middle, so the night above the heading stays short at every height. */
  .door2 main { position: absolute; left: var(--m); top: 51%; transform: translateY(-50%); margin: 0; padding: 0; }
  .door2 h1 { font-size: min(8.2vw, 16vh); line-height: .9; }
  .door2 .lead { margin-top: clamp(20px, 1.7vw, 32px); font-size: clamp(20px, 1.3vw, 25px); }
  .door2 .lead span { white-space: nowrap; }          /* one sentence a line: never "for the / owner" */
  .door2 .act { margin-top: clamp(32px, 2.5vw, 48px); }
  .door2 .button { width: clamp(320px, 21vw, 400px); min-height: clamp(60px, 3.4vw, 68px); font-size: clamp(21px, 1.25vw, 24px); }
  .door2 .hint { font-size: clamp(18px, 1vw, 20px); white-space: nowrap; }
  /* Both small items stay left of the seal. */
  .door2 footer { padding: 0 calc(var(--m) + var(--seal) + 48px) 0 var(--m); font-size: 18px; }
}
