/* The users' entry: the sign-in (v2/login.html) and the join request (v2/signup.html), the
 * owner's order of 28 October 2026. The centre's identity on the Salmani lattice of every page,
 * drawn half as large again so it reads as a wall and not a texture, brighter in a ring round the
 * form in the middle, and the Najdi parapet along the foot. The form sits on a figure card's panel
 * (design H: the start corner cut at 45 degrees, a short gold edge on its top); nothing glows,
 * nothing runs over the button, no corner brackets. The flight deck and its head-up display are
 * the CEO's alone (css/v2-hud.css).
 *
 * Dark when it opens, on every device (html.v2-dark-default); the corner's theme switch turns it
 * light, and the working pages keep the same choice. Words never leave their boxes. */

body.v2.v2-entry {
  --entry-panel: var(--surface);
  --entry-rule: var(--line);
  --entry-gold: #B5892A;   /* the one filled control: the system's focus gold, on both readings */
  --entry-lit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='104' viewBox='0 0 60 104'%3E%3Cpath d='M0 6.5H60M0 19.5H60M0 32.5H60M0 45.5H60M0 58.5H60M0 71.5H60M0 84.5H60M0 97.5H60M-56.25 -13L18.75 117M-41.25 -13L33.75 117M-26.25 -13L48.75 117M-11.25 -13L63.75 117M11.25 -13L-63.75 117M3.75 -13L78.75 117M26.25 -13L-48.75 117M18.75 -13L93.75 117M41.25 -13L-33.75 117M33.75 -13L108.75 117M56.25 -13L-18.75 117M48.75 -13L123.75 117M71.25 -13L-3.75 117M86.25 -13L11.25 117M101.25 -13L26.25 117M116.25 -13L41.25 117' fill='none' stroke='%23A9822A' stroke-opacity='0.12' stroke-width='0.75'/%3E%3Cpath d='M2.85 8.15L12.15 8.15L7.5 16.21ZM0 35.79L-4.65 43.85L4.65 43.85ZM60 35.79L55.35 43.85L64.65 43.85ZM32.85 60.15L42.15 60.15L37.5 68.21ZM30 87.79L25.35 95.85L34.65 95.85Z' fill='%23A9822A' fill-opacity='0.2'/%3E%3C/svg%3E");
  --entry-parapet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16' viewBox='0 0 26 16'%3E%3Cpath d='M5 15L13 6L21 15Z' fill='%23A9822A' fill-opacity='0.3'/%3E%3Cpath d='M0 15.5H26' stroke='%23A9822A' stroke-opacity='0.3' stroke-width='1'/%3E%3C/svg%3E");
  position: relative;
  background: var(--bg) var(--salmani) 0 0 / 90px 156px repeat;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.v2.v2-entry {
    --entry-panel: #142A27; --entry-rule: rgba(213, 208, 195, .35);
    --entry-lit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='104' viewBox='0 0 60 104'%3E%3Cpath d='M0 6.5H60M0 19.5H60M0 32.5H60M0 45.5H60M0 58.5H60M0 71.5H60M0 84.5H60M0 97.5H60M-56.25 -13L18.75 117M-41.25 -13L33.75 117M-26.25 -13L48.75 117M-11.25 -13L63.75 117M11.25 -13L-63.75 117M3.75 -13L78.75 117M26.25 -13L-48.75 117M18.75 -13L93.75 117M41.25 -13L-33.75 117M33.75 -13L108.75 117M56.25 -13L-18.75 117M48.75 -13L123.75 117M71.25 -13L-3.75 117M86.25 -13L11.25 117M101.25 -13L26.25 117M116.25 -13L41.25 117' fill='none' stroke='%23DEB83B' stroke-opacity='0.1' stroke-width='0.75'/%3E%3Cpath d='M2.85 8.15L12.15 8.15L7.5 16.21ZM0 35.79L-4.65 43.85L4.65 43.85ZM60 35.79L55.35 43.85L64.65 43.85ZM32.85 60.15L42.15 60.15L37.5 68.21ZM30 87.79L25.35 95.85L34.65 95.85Z' fill='%23DEB83B' fill-opacity='0.2'/%3E%3C/svg%3E");
    --entry-parapet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16' viewBox='0 0 26 16'%3E%3Cpath d='M5 15L13 6L21 15Z' fill='%23DEB83B' fill-opacity='0.24'/%3E%3Cpath d='M0 15.5H26' stroke='%23DEB83B' stroke-opacity='0.24' stroke-width='1'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] body.v2.v2-entry,
:root.v2-dark-default:not([data-theme="light"]) body.v2.v2-entry {
  --entry-panel: #142A27; --entry-rule: rgba(213, 208, 195, .35);
  --entry-lit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='104' viewBox='0 0 60 104'%3E%3Cpath d='M0 6.5H60M0 19.5H60M0 32.5H60M0 45.5H60M0 58.5H60M0 71.5H60M0 84.5H60M0 97.5H60M-56.25 -13L18.75 117M-41.25 -13L33.75 117M-26.25 -13L48.75 117M-11.25 -13L63.75 117M11.25 -13L-63.75 117M3.75 -13L78.75 117M26.25 -13L-48.75 117M18.75 -13L93.75 117M41.25 -13L-33.75 117M33.75 -13L108.75 117M56.25 -13L-18.75 117M48.75 -13L123.75 117M71.25 -13L-3.75 117M86.25 -13L11.25 117M101.25 -13L26.25 117M116.25 -13L41.25 117' fill='none' stroke='%23DEB83B' stroke-opacity='0.1' stroke-width='0.75'/%3E%3Cpath d='M2.85 8.15L12.15 8.15L7.5 16.21ZM0 35.79L-4.65 43.85L4.65 43.85ZM60 35.79L55.35 43.85L64.65 43.85ZM32.85 60.15L42.15 60.15L37.5 68.21ZM30 87.79L25.35 95.85L34.65 95.85Z' fill='%23DEB83B' fill-opacity='0.2'/%3E%3C/svg%3E");
  --entry-parapet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16' viewBox='0 0 26 16'%3E%3Cpath d='M5 15L13 6L21 15Z' fill='%23DEB83B' fill-opacity='0.24'/%3E%3Cpath d='M0 15.5H26' stroke='%23DEB83B' stroke-opacity='0.24' stroke-width='1'/%3E%3C/svg%3E");
}
/* The lattice's light: the same tile, brighter, in a ring round the middle, fading out to the
   edges. It lies on the page, not the window, so it never slides off the lattice under it. */
body.v2.v2-entry::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--entry-lit) 0 0 / 90px 156px repeat;
  -webkit-mask: radial-gradient(ellipse 64% 72% at 50% 46%, transparent 0 20%, #000 38%, transparent 80%);
  mask: radial-gradient(ellipse 64% 72% at 50% 46%, transparent 0 20%, #000 38%, transparent 80%); }

/* --- the sign-in -------------------------------------------------------------------------- */
.v2-entry .entry { position: relative; z-index: 1; box-sizing: border-box; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 72px 24px 40px; }
/* The Najdi parapet: a row of crenellations along the foot of the page. */
.v2-entry .entry::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px;
  background: var(--entry-parapet) 0 0 / 26px 16px repeat-x; pointer-events: none; }
.v2-entry .entry-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.v2-entry .entry-brand img { height: 56px; width: auto; }
.v2-entry .entry-brand .logo-light { display: var(--logo-light); }
.v2-entry .entry-brand .logo-dark { display: var(--logo-dark); }
.v2-entry .entry-name { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 14px;
  color: var(--muted); white-space: nowrap; }
.v2-entry .entry-name .sep { width: 1px; height: 12px; background: currentColor; opacity: .5; }

/* The panel: a figure card's own language (design H). Its fill starts a diagonal away from the
   start corner, so nothing inside is clipped, its bubble included. */
.v2-entry .entry-card { --cut: 22px; position: relative; box-sizing: border-box; width: min(440px, 100%);
  padding: 36px 36px 32px; display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(225deg, transparent calc(var(--cut) * .7071), var(--entry-panel) 0); }
[dir="ltr"] .v2-entry .entry-card { background: linear-gradient(135deg, transparent calc(var(--cut) * .7071), var(--entry-panel) 0); }
.v2-entry :is(.entry-card, .shell)::after { content: ""; position: absolute; top: 0;
  inset-inline-start: calc(var(--cut) + 4px); width: 44px; height: 2px; background: var(--gold); pointer-events: none; }
.v2-entry h1 { margin: 0; font-size: 28px; font-weight: 700; color: var(--ink); }
.v2-entry .step, .v2-entry .step-form { display: flex; flex-direction: column; gap: 16px; }
.v2-entry .step[hidden] { display: none; }
.v2-entry .field-label { font-size: 14px; font-weight: 700; }
.v2-entry .entry-card .field { min-height: 48px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--entry-rule);
  border-radius: 0; background: transparent; color: var(--ink); font-size: 17px; }
.v2-entry .entry-card .field:focus-visible { outline: none; border-bottom: 2px solid var(--entry-gold); }
.v2-entry .entry-card .field[aria-invalid="true"] { border: 0; border-bottom: 2px solid var(--danger); }
.v2-entry .pw { position: relative; }
.v2-entry .pw .field { padding-inline-start: 48px; }
.v2-entry #toggle-pw { position: absolute; top: 2px; inset-inline-start: 0; width: 44px; height: 44px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.v2-entry .divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.v2-entry .divider::before, .v2-entry .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.v2-entry .sso { position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center;
  gap: 10px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: not-allowed; }
.v2-entry .pill { align-self: flex-start; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--ink); font: inherit;
  font-size: 15px; cursor: pointer; }
.v2-entry .done { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ok); }
.v2-entry .otp-box { border-radius: 2px; background: transparent; }

/* The steps: the gold node where things stand, without a halo. The end labels keep to their ends. */
.v2-entry .path { --path-ink: color-mix(in srgb, var(--ink) 55%, transparent); --path-label: var(--muted); }
.v2-entry .path-node.now { width: 14px; height: 14px; box-shadow: none; }
.v2-entry .path-line { opacity: .45; }
.v2-entry .path-labels > span:first-child { justify-self: start; white-space: nowrap; }
.v2-entry .path-labels > span:last-child { justify-self: end; white-space: nowrap; }

/* The one filled control: still until pressed, no sheen running over it. */
.v2-entry .btn:not(.btn-secondary):not(.btn-danger) { min-height: 52px; border-radius: 2px; background: var(--entry-gold);
  color: #142A27; font-size: 16px; font-weight: 700; }
.v2-entry .btn::after { display: none; }
.v2-entry .btn:focus-visible { outline: 2px solid var(--entry-gold); outline-offset: 3px; }
.v2-entry .btn-secondary { border-radius: 2px; }

/* The four sectors under the form, in the identity's gold; their short names on the phone. */
.v2-entry .entry-sectors { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 28px; }
.v2-entry .entry-sectors li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.v2-entry .entry-sectors .sico { display: inline-block; width: 20px; height: 20px; flex: none; background: var(--gold);
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.v2-entry .entry-sectors .short { display: none; }
/* The motto at the foot: its line alone, the logo stands at the top. */
.v2-entry-in .road-foot--sheet { margin-top: 0; padding-top: 0; }
.v2-entry-in .road-foot .road-logo { display: none; }

@media (max-width: 899px) {
  /* Under the switches' own row (10 px above 44 px buttons): the page fills the screen, no more. */
  .v2-entry .entry, .v2-entry.v2-signup .shell { min-height: calc(100vh - 54px); min-height: calc(100dvh - 54px); }
  .v2-entry .entry { justify-content: flex-start; gap: 22px; padding: 12px 16px 36px; }
  .v2-entry .entry-brand img { height: 44px; }
  .v2-entry .entry-name { font-size: 13px; }
  .v2-entry .entry-card { padding: 28px 20px 24px; }
  .v2-entry h1 { font-size: 26px; }
  .v2-entry .entry-sectors { gap: 16px; }
  .v2-entry .entry-sectors li { gap: 6px; font-size: 13px; }
  .v2-entry .entry-sectors .sico { width: 18px; height: 18px; }
  .v2-entry .entry-sectors .long { display: none; }
  .v2-entry .entry-sectors .short { display: inline; }
  .v2-entry-in .road-foot--sheet { margin-top: auto; }
}

/* --- the join request --------------------------------------------------------------------- */
.v2-entry.v2-signup .shell { --cut: 22px; position: relative; z-index: 1; border: 0;
  background: linear-gradient(225deg, transparent calc(var(--cut) * .7071), var(--entry-panel) 0); }
[dir="ltr"] .v2-entry.v2-signup .shell { background: linear-gradient(135deg, transparent calc(var(--cut) * .7071), var(--entry-panel) 0); }
.v2-entry.v2-signup :is(.top, .foot) { background: transparent; border-color: var(--line); }
.v2-entry.v2-signup .back { background: transparent; border-color: var(--line); color: var(--ink); }
.v2-entry.v2-signup .email-group { border: 0; border-radius: 0; border-bottom: 1px solid var(--entry-rule); background: transparent; }
.v2-entry.v2-signup .email-group:focus-within { outline: none; border-bottom: 2px solid var(--entry-gold); }
.v2-entry.v2-signup .email-group:has([aria-invalid="true"]) { border: 0; border-bottom: 2px solid var(--danger); }
.v2-entry.v2-signup .email-suffix { background: transparent; }
.v2-entry.v2-signup .field:not(.email-group .field) { border: 0; border-bottom: 1px solid var(--entry-rule); border-radius: 0; background: transparent; }
.v2-entry.v2-signup .field:not(.email-group .field):focus-visible { outline: none; border-bottom: 2px solid var(--entry-gold); }
.v2-entry.v2-signup .field[aria-invalid="true"] { border: 0; border-bottom: 2px solid var(--danger); }
.v2-entry.v2-signup :is(.sector-chips button, .note, .timeline, .qr-row img) { border-radius: 2px; }
/* The sector choices in equal halves, two to a row; the odd one out takes its row whole. */
.v2-entry.v2-signup .sector-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-entry.v2-signup .sector-chips button { width: 100%; }
.v2-entry.v2-signup .sector-chips button:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* The sectors' artwork on the dark reading the page opens in. */
:root.v2-dark-default:not([data-theme="light"]) .v2-signup .sector-chips .sico { filter: brightness(0) invert(1); }
@media (min-width: 880px) {
  /* The page's own padding, not the panel's margin, keeps it off the edges: a margin would
     fall through the body and leave the page taller than the screen. */
  body.v2.v2-entry.v2-signup { box-sizing: border-box; padding-block: 32px; }
  .v2-entry.v2-signup .shell { min-height: calc(100vh - 64px); min-height: calc(100dvh - 64px); }
}
@media (max-width: 879px) {
  /* The panel fills the phone: the lattice shows through it, quieter than on the ground. */
  .v2-entry.v2-signup .shell { background: linear-gradient(225deg, transparent calc(var(--cut) * .7071), color-mix(in srgb, var(--entry-panel) 62%, transparent) 0); }
  [dir="ltr"] .v2-entry.v2-signup .shell { background: linear-gradient(135deg, transparent calc(var(--cut) * .7071), color-mix(in srgb, var(--entry-panel) 62%, transparent) 0); }
}
