/* CRAFT home (/), in the public site's design language (operator, 2026-11-11: "use the same design language as the niv
   website, liquid glass should be implemented everywhere"). The tokens, the glass and the sky are the ones in
   craft-website-niv/app/globals.css: Inter, navy ink, a pale sky with a slow cloud deck, a floating glass bar, a light
   lead-in over a bold second line, and glass panes for everything that sits on the sky. */

:root {
  --navy: #0c1d3d;
  --ink: #0c1d3d;
  --ink-2: rgba(12, 29, 61, 0.6);
  --ink-3: rgba(12, 29, 61, 0.4);
  --border: rgba(12, 29, 61, 0.12);
  --accent: #85b5d8;
  --danger: #a3271f;
  --good: #1d6b45;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  /* The page's side gutter: the public site's px-6, sm:px-20. */
  --gutter: 24px;
  color-scheme: light;
}
@media (min-width: 640px) { :root { --gutter: 80px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100lvh;
  background: #f6fafc; color: var(--ink);
  font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ============================================================
   LIQUID GLASS. The public site's material, value for value.
   ============================================================ */
.glass {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.52) 55%, rgba(255, 255, 255, 0.66) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -14px 28px rgba(133, 181, 216, 0.08),
    0 0 0 1px rgba(12, 29, 61, 0.04),
    0 24px 80px rgba(12, 29, 61, 0.12);
}
/* Panes that float over other panes (the account menu, the dialogs): near-opaque, with a deeper lift. */
.glass-popover {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.84) 55%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(12, 29, 61, 0.07),
    0 26px 70px rgba(12, 29, 61, 0.24);
}
/* The brighter lozenge: the current tab, a quiet button, an unticked box. */
.glass-capsule {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), 0 0 0 1px rgba(12, 29, 61, 0.06), 0 6px 18px rgba(12, 29, 61, 0.16);
}
/* Navy glass: the main button, a ticked box. */
.glass-selected {
  background: linear-gradient(160deg, rgba(12, 29, 61, 0.82) 0%, rgba(12, 29, 61, 0.68) 55%, rgba(12, 29, 61, 0.78) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), 0 4px 14px rgba(12, 29, 61, 0.24);
  color: #fff;
}
.glass-btn { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease; cursor: pointer; }
@media (hover: hover) {
  .glass-btn:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.84) 100%);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), 0 0 0 1px rgba(12, 29, 61, 0.08), 0 10px 26px rgba(12, 29, 61, 0.2);
  }
  .glass-selected.glass-btn:hover {
    background: linear-gradient(160deg, rgba(12, 29, 61, 0.94) 0%, rgba(12, 29, 61, 0.82) 55%, rgba(12, 29, 61, 0.9) 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.26), 0 10px 26px rgba(12, 29, 61, 0.3);
  }
}
.glass-btn:focus-visible, .tile-link:focus-visible, .am-item:focus-visible, .field:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ============================================================
   SKY. The public site's backdrop: fixed, behind everything.
   ============================================================ */
.sky { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: -1; overflow: hidden; pointer-events: none; }
.sky-wash { position: absolute; inset: 0; background: linear-gradient(180deg, #f7fbfd 0%, #e8f2fa 30%, #d3e6f5 65%, #b8d7ee 100%); }
.cloud { position: absolute; left: var(--l); top: var(--t); width: var(--w); opacity: var(--o); will-change: transform;
  animation: cloudDrift var(--dur, 22s) ease-in-out var(--dly, 0s) infinite alternate; transition: opacity 0.8s ease; }
/* No clouds on the sign-in page (operator, 2026-11-11: "get rid of the clouds then on the main login page"): the route
   chart is its backdrop. They come in with the boxes once someone is signed in, and stay out while the session loads,
   so a signed-out visitor never sees them. */
:root:not([data-access="ok"]) .cloud { opacity: 0; }
.cloud img { display: block; width: 100%; height: auto; }
.cloud img.flip { transform: scaleX(-1); }
@keyframes cloudDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--dx, 18px), var(--dy, -9px), 0); } }

/* ============================================================
   THE ROUTE CHART behind the sign-in card (index.html .routes): the dashboard's sign-in chart in the light glass,
   on the bare sky (the clouds are out while the gate is up), under the card. Only while the gate is up.
   ============================================================ */
.routes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease; }
:root[data-access="signin"] .routes, :root[data-access="pending"] .routes, :root[data-access="blocked"] .routes { opacity: 1; }
.routes path { fill: none; stroke: rgba(12, 29, 61, 0.2); stroke-width: 1.4; stroke-dasharray: 5 7; vector-effect: non-scaling-stroke; }
.routes path.rt-live { stroke: rgba(59, 114, 160, 0.62); stroke-width: 1.6; animation: rtCrawl 40s linear infinite; }
/* Set by home.js placeLabels: an airport under the card, or a label with no clear side. */
.rt-wpt.rt-off, .rt-wpt.rt-nolabel text { display: none; }
@keyframes rtCrawl { to { stroke-dashoffset: -600; } }
/* Markers, labels and aeroplanes keep one size on any screen: --map-k is 1 over the chart's scale (js/home.js), and
   each is drawn about its own point. */
.rt-mark, .rt-plane path { transform: scale(var(--map-k, 1)); transform-box: view-box; transform-origin: 0 0; }
.rt-wpt rect { fill: rgba(255, 255, 255, 0.7); stroke: rgba(12, 29, 61, 0.42); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.rt-wpt text { font: 500 12px var(--sans); letter-spacing: 0.16em; fill: rgba(12, 29, 61, 0.5); }
.rt-base rect { fill: var(--navy); stroke: none; }
.rt-base text { fill: var(--navy); font-weight: 600; }
.rt-ring { fill: none; stroke: rgba(59, 114, 160, 0.5); stroke-width: 1.2; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center; animation: rtPulse 3.2s ease-out infinite; }
@keyframes rtPulse { from { transform: scale(0.5); opacity: 0.9; } to { transform: scale(2.4); opacity: 0; } }
.rt-plane { opacity: 0; }
.rt-plane path { fill: var(--navy); stroke: none; stroke-dasharray: none; }

/* ============================================================
   PAGE WIDTH. As on the public site: the layout stops widening at 1536px and sits centred on anything wider.
   ============================================================ */
.site-main { width: 100%; max-width: 1536px; margin-inline: auto; padding-inline: var(--gutter); }

/* ============================================================
   THE CORNER. No bar: only the account button, at the top right of the page's 1536px column.
   ============================================================ */
.corner {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: 100%; max-width: 1536px; height: 0; pointer-events: none;
}
.corner > * { pointer-events: auto; }
.acct { position: absolute; right: 32px; top: 0; }
.acct-btn { width: 48px; height: 48px; padding: 4px; border-radius: 50%; display: grid; place-items: center; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--navy) center / cover no-repeat; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
}
.avatar-lg { width: 44px; height: 44px; font-size: 13px; }
.avatar-xl { width: 76px; height: 76px; font-size: 22px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 8px 24px rgba(12, 29, 61, 0.18); }

.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 288px; padding: 8px; border-radius: 26px; }
.am-who { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.am-id { min-width: 0; display: grid; gap: 3px; }
.am-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-mail { font-size: 12px; font-weight: 300; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-item {
  display: block; width: 100%; padding: 13px 16px; border: 0; border-radius: 999px; background: none; cursor: pointer; text-align: left;
  font-size: 10px; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-2);
  transition: background 0.2s ease, color 0.2s ease;
}
@media (hover: hover) { .am-item:hover { background: rgba(12, 29, 61, 0.05); color: var(--navy); } }

/* ============================================================
   TYPE. The public site's eyebrow, display title and body.
   ============================================================ */
.eyebrow { margin: 0; font-size: 11px; font-weight: 400; letter-spacing: 0.35em; text-transform: uppercase; color: var(--ink-3); }
.display-title {
  margin: 0; font-weight: 200; letter-spacing: -0.025em; line-height: 1.02; color: var(--navy);
  font-size: clamp(40px, 7vw, 88px);
}
.display-title > span { display: block; font-weight: 600; }
.lede { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.625; color: var(--ink-2); }
.lede b { font-weight: 500; color: var(--navy); }
.note { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.5; color: var(--ink-2); }
.note.err { color: var(--danger); }
.note.okay { color: var(--good); }

.page-fade { animation: pageFade 0.45s ease both; }
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   HOME. A greeting, and a glass box for each site, in the middle of the screen.
   ============================================================ */
.home {
  /* The same room above and below, so the block sits at the screen's own middle; 84px clears the account button. */
  min-height: 100vh; min-height: 100svh; padding: 84px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero { text-align: center; }
.hero .eyebrow { margin-bottom: 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.32em; margin-right: -0.32em; color: var(--navy); }
.hero .display-title { font-size: clamp(36px, 5vw, 64px); }
.home-none { margin-top: 28px; text-align: center; }

/* Four boxes across where they fit, two, then one; fewer boxes stay centred. Each box is as wide as a quarter (a half)
   of the row, never over 300px. */
.tiles { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 56px; }
.tile {
  /* Everything in a box centred on it (operator, 2026-11-11: "center the text in the website tabs"). */
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; max-width: 420px; min-height: 0; padding: 28px; border-radius: 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
@media (min-width: 640px) { .tile { width: min(300px, calc((100% - 24px) / 2)); min-height: 300px; } }
@media (min-width: 1100px) { .tile { width: min(300px, calc((100% - 72px) / 4)); } }
.tile-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0;
  font-size: 10px; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3);
}
.tile-no { font-size: 11px; font-weight: 500; color: var(--navy); }
/* Tracked capitals carry their spacing after the last letter too: taken back, so "01 —— OPERATIONS" is centred on
   its letters and the rule has the same gap either side. */
.tile-no, .tile-kind { margin-right: -0.3em; }
.tile-eyebrow i { width: 28px; height: 1px; background: var(--border); }
.tile-title { margin: 22px 0 0; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--navy); }
.tile-text { margin: 12px 0 0; font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--ink-2); }
.tile-soon .tile-title { font-weight: 200; }
.tile-foot { display: flex; justify-content: center; margin-top: auto; padding-top: 24px; }
/* The whole box opens the site: this link covers it, and the box lifts under the pointer as the glass buttons do. */
.tile-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tile-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (hover: hover) {
  .tile-live:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -14px 28px rgba(133, 181, 216, 0.1), 0 0 0 1px rgba(12, 29, 61, 0.06), 0 34px 90px rgba(12, 29, 61, 0.18);
  }
  .tile-live:hover .pill.glass-selected { background: linear-gradient(160deg, rgba(12, 29, 61, 0.94) 0%, rgba(12, 29, 61, 0.82) 55%, rgba(12, 29, 61, 0.9) 100%); }
}
/* The other ways in to the same site, above the covering link. */
.tile-links { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 14px 0 0; }
.tile-link { font-size: 10px; font-weight: 500; letter-spacing: 0.25em; margin-right: -0.25em; text-transform: uppercase; white-space: nowrap; color: var(--navy); line-height: 24px; transition: opacity 0.3s ease; }
@media (hover: hover) { .tile-link:hover { opacity: 0.55; } }

.pill {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px; border-radius: 999px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase; white-space: nowrap;
  padding-right: calc(20px - 0.25em);
}
.pill.glass-capsule { color: var(--navy); }
.pill-off { color: var(--ink-3) !important; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), 0 0 0 1px rgba(12, 29, 61, 0.05); cursor: default; }
.pill-quiet { border: 0; background: none; color: var(--ink-2); cursor: pointer; transition: color 0.2s ease; }
@media (hover: hover) { .pill-quiet:hover { color: var(--navy); } }
button.pill:disabled { opacity: 0.45; cursor: default; transform: none !important; }

/* ============================================================
   THE GATE. Signed out, waiting for an admin, or shut out: one glass card over the route chart, everything in it
   centred (operator, 2026-11-11: "center the text on the tab").
   ============================================================ */
.gate { min-height: 100vh; min-height: 100svh; padding: 96px 0; display: grid; place-items: center; }
.gate-card {
  position: relative; overflow: hidden; width: 100%; max-width: 480px; padding: 44px 40px 40px; border-radius: 32px;
  text-align: center;
  /* The dashboard sign-in's second ring, in the light glass. */
  outline: 1px solid rgba(255, 255, 255, 0.55); outline-offset: 7px;
}
/* A slow specular sweep across the glass, resting most of the cycle: the liquid in it. */
.gate-card::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; left: 0; width: 34%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32) 42%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.32) 58%, transparent);
  transform: translateX(-140%) rotate(16deg);
  animation: gateGlint 12s ease-in-out infinite;
}
@keyframes gateGlint { 0%, 58% { transform: translateX(-140%) rotate(16deg); } 88%, 100% { transform: translateX(420%) rotate(16deg); } }
.gate-card > * { position: relative; z-index: 1; }
/* Tracked capitals carry their spacing after the last letter: the box reaches past it by as much, so the letters
   themselves are centred. */
.gate-card .eyebrow { margin: 0 -0.35em 18px 0; }
.gate-title { font-size: clamp(36px, 6vw, 56px); }

/* The time in Zulu between two hairlines. Its trailing letter spacing is taken back, so the digits are centred. */
.gate-strip {
  display: flex; align-items: center; justify-content: center;
  margin: 26px 0 22px; padding: 11px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 500;
}
.gate-zulu { color: var(--navy); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: 0.12em; margin-right: -0.12em; }

.gate-card .lede { margin: 0 auto; max-width: 22rem; }
.gate-gsi { display: flex; justify-content: center; margin-top: 26px; min-height: 44px; }
.gate-gsi:empty { display: none; }
.gate-card .note { margin-top: 18px; }

/* ============================================================
   DIALOGS. Account and Permissions: glass over a veil of the sky.
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px;
  background: rgba(214, 230, 244, 0.5);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
  animation: veil 0.25s ease both;
}
@keyframes veil { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: 100%; max-width: 460px; max-height: calc(100vh - 48px); max-height: calc(100svh - 48px); display: flex; flex-direction: column; padding: 28px; border-radius: 32px; animation: pageFade 0.3s var(--ease) both; }
.modal-wide { max-width: 1040px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
/* The card is a column no taller than the screen: only the list gives way and scrolls, never the heading, the search
   field or the foot. */
.modal-card > * { flex: none; }
.modal-head .eyebrow { line-height: 36px; }
.modal-sub { margin: 2px 0 0; max-width: 40rem; font-size: 13px; font-weight: 300; line-height: 1.5; color: var(--ink-2); }
.x { flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; font-weight: 300; line-height: 1; color: var(--navy); display: grid; place-items: center; padding: 0 0 2px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.modal-foot .note { min-height: 20px; }

.ac-photo { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.ac-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ac-rows { margin: 26px 0 0; display: grid; }
.ac-rows > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 52px; padding: 10px 0; border-top: 1px solid var(--border); }
.ac-rows dt { font-size: 10px; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3); }
.ac-rows dd { margin: 0; font-size: 15px; font-weight: 400; color: var(--navy); overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--navy);
  background: rgba(12, 29, 61, 0.06); border: 1px solid rgba(12, 29, 61, 0.06);
}
.chip-navy { background: var(--navy); color: #fff; border-color: transparent; }
.chip-warm { background: rgba(196, 138, 26, 0.14); color: #7d5200; border-color: transparent; }
.ac-photo + .ac-rows { }
#ac-note { margin-top: 14px; }

/* ---- Permissions: a row a person, a checkmark a site ---- */
.field {
  width: 100%; height: 44px; margin-top: 20px; padding: 0 18px; border-radius: 999px; font: 300 14px var(--sans); color: var(--navy);
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--border); box-shadow: inset 0 1px 2px rgba(12, 29, 61, 0.05);
  -webkit-appearance: none; appearance: none;
}
.field::placeholder { color: var(--ink-3); }

/* One grid for the heading and every row, so each checkmark sits under its site's name. */
.pm-head, .pm-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(6, 92px); align-items: center; column-gap: 4px; }
.pm-head { margin-top: 18px; padding: 0 12px 10px; border-bottom: 1px solid var(--border); }
.pm-head span { text-align: center; font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.modal-card > .pm-list { flex: 0 1 auto; overflow-y: auto; overscroll-behavior: contain; min-height: 96px; margin-inline: -4px; padding-inline: 4px; }
.pm-row { padding: 10px 12px; border-bottom: 1px solid rgba(12, 29, 61, 0.06); border-radius: 18px; transition: background 0.2s ease; }
.pm-row:last-child { border-bottom: 0; }
.pm-row.is-new { background: rgba(133, 181, 216, 0.14); }
.pm-row.is-dirty { background: rgba(12, 29, 61, 0.045); }
.pm-row.is-none .pm-who { opacity: 0.5; }
.pm-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-id { min-width: 0; display: grid; gap: 2px; }
.pm-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 500; color: var(--navy); }
.pm-name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-mail { font-size: 12px; font-weight: 300; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-decline { border: 0; background: none; padding: 0; cursor: pointer; font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--danger); }
.pm-empty { padding: 28px 12px; }

/* The checkmark: a glass box, navy when ticked. The site's name rides inside the label and shows only where the
   heading row is gone (a phone). */
.ck { position: relative; display: grid; place-items: center; height: 40px; cursor: pointer; }
.ck input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ck input:disabled { cursor: default; }
.ck-box {
  width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.72) 100%);
  border: 1px solid rgba(12, 29, 61, 0.14);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), 0 2px 6px rgba(12, 29, 61, 0.08);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease), border-color 0.2s ease;
}
.ck-box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.2s var(--ease); }
.ck input:checked + .ck-box {
  background: linear-gradient(160deg, rgba(12, 29, 61, 0.9) 0%, rgba(12, 29, 61, 0.74) 55%, rgba(12, 29, 61, 0.84) 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), 0 4px 12px rgba(12, 29, 61, 0.24);
}
.ck input:checked + .ck-box svg { opacity: 1; transform: none; }
.ck input:disabled + .ck-box { opacity: 0.45; }
.ck input:focus-visible + .ck-box { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) { .ck:hover input:not(:disabled) + .ck-box { transform: translateY(-1px); border-color: rgba(12, 29, 61, 0.28); } }
.ck-name { display: none; }

.confirm { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px 16px; background: rgba(12, 29, 61, 0.18); }
.confirm-card { width: 100%; max-width: 400px; padding: 28px; border-radius: 28px; animation: pageFade 0.25s var(--ease) both; }
.confirm-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--navy); }
.confirm-body { margin: 10px 0 0; font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--ink-2); }
.confirm-body b { font-weight: 500; color: var(--navy); }
.confirm-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* ============================================================
   NARROW SCREENS
   ============================================================ */
/* Permissions: the heading row goes and each checkmark carries its site's name. */
@media (max-width: 899px) {
  .pm-head { display: none; }
  .field { margin-bottom: 14px; }
  .pm-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2px; column-gap: 8px; padding: 14px 10px; }
  .pm-who { grid-column: 1 / -1; margin-bottom: 8px; }
  .ck { grid-template-columns: 28px minmax(0, 1fr); justify-items: start; column-gap: 10px; height: 40px; }
  .ck-name { display: block; font-size: 13px; font-weight: 400; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}

@media (max-width: 639px) {
  .corner { top: 14px; }
  .acct { right: 16px; }
  .acct-btn { width: 44px; height: 44px; }
  .acct-btn .avatar { width: 34px; height: 34px; font-size: 11px; }
  .acct-menu { width: min(288px, calc(100vw - 32px)); }

  .home { padding: 88px 0 56px; justify-content: flex-start; }
  .tiles { gap: 16px; margin-top: 36px; }
  .tile { padding: 24px; }
  .tile-title { font-size: 28px; margin-top: 18px; }
  .gate { padding: 72px 0; }
  .gate-card { padding: 32px 22px 32px; border-radius: 28px; outline-offset: 5px; }
  .gate-strip { font-size: 10px; }
  .modal { padding: 12px; align-items: end; }
  .modal-card { padding: 22px 18px; border-radius: 28px; max-height: calc(100svh - 24px); }
  .ac-photo { gap: 16px; }

  /* As on the public site: no backdrop blur on phones (it re-filters every frame under a fixed bar); nearer-opaque
     fills carry the material instead. The clouds hold still for the same reason, and the deck is thinned. */
  .glass {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.84) 55%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .glass-popover, .glass-selected, .modal { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-popover { background: #fcfdff; }
  .modal { background: rgba(214, 230, 244, 0.93); }
  .cloud { animation: none; }
  .cloud-alt { display: none; }
  .sky-wash { background: linear-gradient(180deg, #f7fbfd 0%, #f1f7fb 55%, #ecf3f9 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .page-fade, .modal, .modal-card, .confirm-card { animation: none; }
  .gate-card::after, .rt-ring, .routes path.rt-live { animation: none; }
  .rt-plane { display: none; }
  .glass-btn, .ck-box, .ck-box svg { transition: none; }
}

/* Nothing shown until the session is known, so nobody watches the wrong state flash. */
:root[data-access="wait"] .home, :root[data-access="wait"] .gate { visibility: hidden; }
