/* ctl-build's pages (build.guild.tw) in the Guild house style: the tokens of
   app/ctl_auth/pages/guild-tokens.css (signup-design-v4) and the sign-up's
   laptop pattern (Sam, 2026-11-02): the art covers the whole page and the
   panel floats, frosted, in the centre. On a phone the art is a band across
   the top and the panel sits under it. No script: the pages are forms, and
   everything here is served from this origin (CSP 'self').

   Art: one tall picture for phones and one wide for laptops per scene; the
   files are a closed list in app/ctl_build/app.py ASSETS. */

/* Noto Serif TC Bold, cut to ASCII plus the sign-up's headings (SIL OFL 1.1,
   NotoSerifTC-OFL.txt beside this file). */
@font-face { font-family: "Guild Display"; src: url("/assets/guild-display.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --night: #131A33; --hall: #1D2648; --hall-2: #27325E;
  --peri: #8FA2F7; --peri-hi: #AEBBFF; --peri-lo: #7186EC; --ink: #0E1433;
  --gold: #E2C07A; --gold-text: #FFE7A8; --ember: #C99A4A;
  --parch: #F4EFE4; --mist: #B7BFDC; --ok: #8FE3B0; --danger: #FF9C9C;
  --display: "Guild Display", "Noto Serif TC", "Songti TC", Georgia, serif;
  --body: -apple-system, system-ui, "PingFang TC", "Noto Sans TC", "Segoe UI", Roboto, sans-serif;
  --tall: url("/assets/city-tall.webp"); --wide: url("/assets/city-wide.webp");
  color-scheme: dark;
}
body[data-scene="gate"] { --tall: url("/assets/gate-tall.webp"); --wide: url("/assets/hall-wide.webp"); }

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  font: 400 16px/1.55 var(--body); color: var(--parch); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(120% 60% at 50% 30%, rgba(61, 91, 255, 0.14), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(226, 192, 122, 0.10), transparent 70%),
    var(--night);
}
h1, h2 { font: 700 26px/1.2 var(--display); letter-spacing: 0.02em; margin: 0 0 10px;
  text-shadow: 0 2px 10px rgba(10, 12, 30, 0.9); text-wrap: balance; }
h2 { font-size: 20px; margin-top: 26px; }
p { margin: 0 0 12px; }
a { color: var(--gold); }
code { font: 13px/1.4 ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* ---- phone: a band of art on top, the panel under it ---- */
.band {
  height: clamp(180px, 30vh, 280px); background: var(--tall) center 45% / cover no-repeat;
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent);
}
.panel { position: relative; max-width: 480px; margin: -70px auto 0; padding: 0 18px 48px; }

.steps { display: flex; gap: 6px; margin-bottom: 12px; }
.steps b { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.steps b.on { background: linear-gradient(90deg, var(--gold), var(--gold-text)); }
.kicker { font: 600 12px/1 var(--body); color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.lede { color: var(--mist); }
.who { color: var(--mist); font-size: 14px; }
.who b { color: var(--parch); font-weight: 600; }
.group { color: var(--gold); font-size: 13px; font-weight: 600; margin: 14px 0 6px; }

.card {
  background: linear-gradient(165deg, rgba(39, 50, 94, 0.88), rgba(29, 38, 72, 0.88));
  border: 1px solid rgba(226, 192, 122, 0.22); border-radius: 16px; padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(5, 8, 25, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06); margin-bottom: 14px;
}
.card.warn { background: linear-gradient(165deg, rgba(162, 48, 74, 0.35), rgba(80, 30, 50, 0.35)); border-color: rgba(255, 143, 143, 0.4); }
.card.warn p { margin: 0; }
.promise { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.promise + .promise, .repo + .repo, .sum + .sum, .okrow + .okrow { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.promise p { margin: 0; font-size: 15px; }
.promise small { display: block; color: var(--mist); font-size: 13px; }
.dot { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--ok); background: rgba(143, 227, 176, 0.16);
  border: 1px solid rgba(143, 227, 176, 0.35); }

.list { padding: 2px 14px; }
.repo { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.repo input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--peri); }
.repo label { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; cursor: pointer; }
.repo select, select, input[type=text], input:not([type]), textarea {
  font: 14px var(--body); color: var(--parch); background: rgba(10, 14, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 7px 10px; max-width: 100%;
}
.repo select { flex: none; max-width: 42%; }
/* a branch menu is quiet until its repository is ticked */
.repo:has(input:not(:checked)) select { opacity: 0.4; }

.sum, .okrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; font-size: 15px; }
.sum span { color: var(--mist); }
.sum b { font-weight: 600; overflow-wrap: anywhere; }
.okrow b { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.okrow span:last-child { color: var(--mist); }
.sum.stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.ref { user-select: all; font-size: 14px; color: var(--parch); }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin: 4px 0 0;
  border: 0; border-radius: 14px; font: 700 16px/1.2 var(--body); color: var(--ink); text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, var(--peri-hi), var(--peri) 55%, var(--peri-lo));
  box-shadow: 0 8px 22px rgba(113, 134, 236, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.gold { background: linear-gradient(180deg, #F6E2B0, var(--gold) 60%, var(--ember));
  box-shadow: 0 8px 22px rgba(201, 154, 74, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn.ghost { background: none; box-shadow: none; color: var(--mist); font-weight: 500; font-size: 15px; min-height: 44px; }
.btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.fine { color: var(--mist); font-size: 13px; text-align: center; margin-top: 10px; }
.fine.left { text-align: left; }
.nowrap { white-space: nowrap; }

/* the expert forms on / (build, revoke, status) */
form label { display: block; margin: 10px 0; color: var(--mist); font-size: 14px; }
form label textarea, form label input, form label select { display: block; width: 100%; margin-top: 4px; }
form small { color: var(--mist); }
form > button:not(.btn) { margin-top: 8px; font: 600 15px var(--body); color: var(--ink); border: 0; border-radius: 12px;
  padding: 11px 18px; background: linear-gradient(180deg, var(--peri-hi), var(--peri)); cursor: pointer; }

/* ---- laptop and wider: the whole page is the art, the panel frosted in the centre ---- */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  body { display: flex; align-items: center; justify-content: center; padding: 40px 24px;
    background: var(--night) var(--wide) center 40% / cover no-repeat fixed; }
  .band { display: none; }
  .panel {
    width: 520px; max-width: 100%; margin: 0; padding: 30px 32px 26px; border-radius: 28px;
    background: linear-gradient(180deg, rgba(30, 40, 82, 0.5), rgba(19, 26, 51, 0.64));
    -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25);
    border: 1px solid rgba(226, 192, 122, 0.4);
    box-shadow: 0 30px 80px rgba(5, 8, 25, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 0 0 4px rgba(10, 14, 32, 0.18);
  }
  h1 { font-size: 30px; }
  .card { background: linear-gradient(180deg, rgba(40, 52, 100, 0.42), rgba(22, 29, 58, 0.5)); }
}
@media (prefers-reduced-transparency: reduce) {
  .panel, .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--hall); }
}
