/* The front door and the rooms behind it: the one sheet a visitor who is not
 * signed in may load (server/front_door.py). Self-contained on purpose, so
 * nothing else need be served before sign-in: the tokens, the face, the
 * measure and the skip link are restated here from demo.css and shell.css.
 * demo/DESIGN.md: white ground, one grotesk, warm near-black, pills, hairlines,
 * one ink button per page at most, no motion but a colour easing in. */

@font-face {
  font-family: "Public Sans";
  src: url("/demo/static/fonts/PublicSans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #FFFFFF;
  --paper:  #F6F5F3;
  --ink:    #2B2927;
  --ink-2:  #716F6C;
  --ink-3:  #A19D99;
  --line:   #E4E0DC;
  --line-2: #C9C4BF;
  --shadow: 43, 41, 39;
  --r-ctl:  999px;
  --r-card: 16px;
  --r-panel: 24px;
  --zoom: 1;
}
/* The measure: the platform's own ladder (demo.css), so the door is drawn at
 * the size the screens behind it are. */
/* The platform's ladder (demo.css): natural size on a laptop and a phone, a wide
 * monitor larger (2026-10-17: nothing is scaled down; 0.88 read "zoomed out"). */
@media (min-width: 1700px) { :root { --zoom: 1.1; } }
@media (min-width: 1900px) { :root { --zoom: 1.2; } }
@media (min-width: 2200px) { :root { --zoom: 1.35; } }
@media (min-width: 2450px) { :root { --zoom: 1.5; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  zoom: var(--zoom);
  background: var(--ground); color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 20px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mark { display: block; flex: none; }

/* The skip link (shell.py puts it on a page with a rail-less body only when
 * the page has none of its own): not painted until focused. */
.sh-skip {
  position: fixed; top: 8px; left: 8px; z-index: 10;
  padding: 8px 14px; border-radius: var(--r-ctl);
  background: var(--ink); color: #FFFFFF; font-size: 13px; line-height: 18px; text-decoration: none;
}
.sh-skip:not(:focus):not(:focus-visible) { clip-path: inset(50%); width: 1px; height: 1px; padding: 0; overflow: hidden; white-space: nowrap; }
#sh-main:focus { outline: none; }

/* A toast the sign-in leaves (shell.toast_html): no script here, so it is
 * simply shown. */
.sh-toasts { position: fixed; top: 16px; right: 16px; z-index: 10; max-width: calc(100vw / var(--zoom) - 32px); }
.sh-toast {
  display: flex; align-items: flex-start; gap: 12px; max-width: 380px; padding: 10px 16px;
  background: var(--ground); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(var(--shadow), .12), 0 1px 2px rgba(var(--shadow), .06);
  font-size: 13px; line-height: 18px;
}
.sh-toast-x { display: none; }

/* ------------------------------------------------------------- the door -- */

/* Centred, a little above the middle (the optical centre), on white. */
.door-page {
  min-height: calc(100vh / var(--zoom));
  min-height: calc(100svh / var(--zoom));
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px calc(48px + 8vh / var(--zoom));
}
.door-stage { width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; gap: 56px; }

.door-lockup { display: flex; flex-direction: column; align-items: center; text-align: center; }
.door-lockup .mark { margin-bottom: 24px; }
/* The Client portal's door: the lockup is the way back to the website. */
a.door-home, a.door-home:link, a.door-home:visited { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; }
a.door-home:hover .door-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
a.door-home:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 12px; }
.door-name { font-size: 40px; line-height: 44px; font-weight: 400; letter-spacing: -0.025em; }
.door-line { margin-top: 10px; font-size: 15px; line-height: 22px; color: var(--ink-2); }

/* The two ways in: equal weight, two quiet cards. */
.door-ways { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.door-way, .door-way:link, .door-way:visited {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name go" "sub go";
  align-items: center; column-gap: 12px;
  padding: 18px 20px; min-height: 76px;
  background: var(--ground); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: 0 1px 2px rgba(var(--shadow), .04);
}
.door-way:hover { border-color: var(--line-2); box-shadow: 0 8px 24px rgba(var(--shadow), .08), 0 1px 2px rgba(var(--shadow), .04); }
.door-way:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--line-2); }
.door-way-name { grid-area: name; font-size: 15px; line-height: 22px; font-weight: 500; letter-spacing: -0.005em; }
.door-way-sub { grid-area: sub; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.door-way-go { grid-area: go; font-size: 16px; line-height: 1; color: var(--ink-3); }
.door-way:hover .door-way-go, .door-way:focus-visible .door-way-go { color: var(--ink); }
/* One way on: an investor's personal link (demo/door/invite.html), its Continue a button drawn as the door's card. */
.door-ways.is-one { grid-template-columns: minmax(0, 320px); justify-content: center; }
button.door-way { width: 100%; font: inherit; text-align: left; cursor: pointer; }
/* Two ways to sign in (demo/door/choose.html): a name on each, and no line under it. */
.door-ways.is-one a.door-way { grid-template-areas: "name go"; min-height: 64px; }
.door-note { margin-top: -36px; font-size: 13px; line-height: 18px; color: var(--ink-3); text-align: center; }
/* The visitor told at the door (asked.html, invite.html): the door's own lockup, a way back. Here, not in room.css,
 * which a visitor signed in as no one never loads: the link drew the browser's own blue. */
.door-back { font-size: 14px; line-height: 20px; }
.door-back a { color: var(--ink-2); text-underline-offset: 3px; }
/* The emailed code at a sign-in (signin_code.html): one box, one ink button, a quiet way to ask again. Its titles are
 * longer than the brand, so a size down, and every control a thumb's height. */
.door-stage.is-tight { gap: 24px; }
.door-stage.is-tight .door-lockup { margin-bottom: 8px; }
.door-name-long { font-size: 32px; line-height: 38px; }
.door-said, .door-code, .door-again { width: 100%; max-width: 320px; }
.door-said { font-size: 14px; line-height: 20px; color: var(--ink-2); text-align: center; }
.door-said.is-bad { color: var(--ink); font-weight: 500; }
.door-code { display: flex; flex-direction: column; gap: 10px; }
.door-code-label { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.door-code-box {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: inherit; font-size: 22px; line-height: 28px; letter-spacing: 0.2em; text-align: center; color: var(--ink);
  background: var(--ground); border: 1px solid var(--line-2); border-radius: var(--r-card);
}
.door-code-box:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.door-code .btn-primary { width: 100%; min-height: 44px; }
.door-again button {
  width: 100%; min-height: 44px; padding: 10px 22px; cursor: pointer;
  font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink);
  background: var(--ground); border: 1px solid var(--line-2); border-radius: var(--r-ctl);
}
.door-again button:hover { border-color: var(--ink); }
.door-stage.is-tight .door-back a, .door-ways.is-one ~ .door-back a { display: inline-block; padding: 10px 12px; }

/* ------------------------------------------- the rooms behind the door -- */

/* The investors' pages and the refusal: the brand and the way out on one
 * line, then a title and what is in the room. */
.room-page { max-width: 960px; margin: 0 auto; padding: 0 40px 120px; }
.room-head { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.room-brand, .room-brand:link, .room-brand:visited {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.room-brand:focus-visible { border-radius: 6px; }
.room-out button {
  font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink);
  padding: 7px 16px; border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  background: var(--ground); cursor: pointer;
}
.room-out button:hover { border-color: var(--ink); }

.room-main { padding-top: 104px; }
.room-crumb { font-size: 13px; line-height: 18px; color: var(--ink-2); margin-bottom: 12px; }
.room-title { font-size: 48px; line-height: 52px; font-weight: 400; letter-spacing: -0.025em; margin-bottom: 56px; }
.room-line { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 560px; margin-top: -32px; }

.room-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.room-card {
  background: var(--paper); border-radius: var(--r-panel); padding: 32px;
  min-height: 248px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 32px;
}
.room-card-name { font-size: 26px; line-height: 32px; font-weight: 400; letter-spacing: -0.02em; }
/* Not yet open: a quiet pill with a hollow ring — there, not yet ready. */
.room-state {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; border-radius: var(--r-ctl);
  background: var(--ground); border: 1px solid var(--line);
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2);
}
.room-state::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--ink-3); box-sizing: border-box;
}

/* ------------------------------------- the sign-in's own pages, bare -- */

/* Signed out, the laptop's picker, the step-up: drawn behind the door with
 * the room's header, measure and buttons, so the door and the sign-in are
 * one flow. */
.vpage { max-width: 960px; margin: 0 auto; padding: 0 40px 120px; }
.id-brand { height: 80px; }
.dk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 104px 0 40px; }
.id-brand + .dk-head { margin-top: 24px; }
.v-crumb { font-size: 13px; line-height: 18px; color: var(--ink-2); margin-bottom: 12px; }
.v-title { font-size: 48px; line-height: 52px; font-weight: 400; letter-spacing: -0.025em; }
.id-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.id-links input[type="hidden"] { display: none; }

.btn-primary, .btn-secondary, .id-act button, .id-signout button {
  display: inline-block; font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; cursor: pointer;
  padding: 10px 22px; border-radius: var(--r-ctl); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink); background: var(--ink); color: #FFFFFF;
}
a.btn-primary:link, a.btn-primary:visited { color: #FFFFFF; }
.btn-primary:hover { background: #3E3B39; border-color: #3E3B39; }
/* Many on a page (one per person): hairline pills, so no row shouts. */
a.btn-secondary, a.btn-secondary:link, a.btn-secondary:visited, .id-signout button, .id-act button {
  background: var(--ground); color: var(--ink); border-color: var(--line-2);
}
.id-act button { font-size: 13px; line-height: 18px; padding: 7px 16px; }
.btn-secondary:hover, .id-signout button:hover, .id-act button:hover { background: var(--ground); border-color: var(--ink); }
.id-link, .id-link:link, .id-link:visited { color: var(--ink-2); font-size: 13px; text-underline-offset: 3px; }
.id-link:hover { color: var(--ink); }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: middle; padding: 14px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); padding-top: 0; padding-bottom: 10px; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
td.gl-name { font-weight: 500; white-space: nowrap; }
td.gl-sub, .gl-sub { color: var(--ink-2); font-size: 13px; line-height: 18px; }
td.id-act { text-align: right; width: 1%; white-space: nowrap; }
.gl-tag { font-size: 11px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 1px 8px; margin-left: 6px; }
tr.is-current td { background: var(--paper); }
tr.is-current td:first-child { padding-left: 12px; border-radius: 12px 0 0 12px; }
tr.is-current td:last-child { padding-right: 12px; border-radius: 0 12px 12px 0; }

/* -------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: no-preference) {
  .door-way, .door-way-go, .room-out button, .btn-primary, .btn-secondary, .id-act button, .id-signout button {
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
  }
}

/* ------------------------------------------------- on a phone (760px) -- */

@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) and (max-width: 1000px) {
  .door-page { padding: 40px 16px calc(40px + 6vh); }
  .door-stage { gap: 44px; }
  .door-lockup .mark { width: 40px; height: 40px; margin-bottom: 20px; }
  .door-name { font-size: 34px; line-height: 40px; }
  .door-name-long { font-size: 28px; line-height: 34px; }
  .door-ways { grid-template-columns: 1fr; }
  .door-note { margin-top: -28px; }

  .room-page, .vpage { padding: 0 16px 64px; }
  .room-head, .id-brand { height: 64px; }
  .room-main { padding-top: 48px; }
  .room-title, .v-title { font-size: 36px; line-height: 42px; letter-spacing: -0.02em; }
  .room-title { margin-bottom: 32px; }
  .room-line { font-size: 16px; line-height: 24px; margin-top: -12px; }
  .room-cards { grid-template-columns: 1fr; gap: 12px; }
  .room-card { min-height: 168px; padding: 24px; border-radius: 20px; }
  .room-card-name { font-size: 22px; line-height: 28px; }
  .dk-head { margin: 48px 0 28px; flex-wrap: wrap; }
  .id-brand + .dk-head { margin-top: 16px; }
  /* The picker: a person's roles go under their name, the button stays on the row. */
  .id-people thead { display: none; }
  .id-people tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name act" "sub act"; align-items: center; column-gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .id-people td { border: 0; padding: 0; }
  .id-people td.gl-name { grid-area: name; white-space: normal; }
  .id-people td.gl-sub { grid-area: sub; margin-top: 2px; }
  .id-people td.id-act { grid-area: act; width: auto; }
  .id-people tr.is-current { background: var(--paper); border-radius: 12px; padding: 14px 12px; }
  .id-people tr.is-current td { background: none; padding: 0; border-radius: 0; }
}

/* A phone on its side: the two ways in side by side, so both are in view. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1000px) {
  .door-page { padding: 24px 16px; }
  .door-stage { gap: 28px; max-width: 560px; }
  .door-lockup .mark { width: 32px; height: 32px; margin-bottom: 12px; }
  .door-name { font-size: 28px; line-height: 32px; }
  .door-ways { grid-template-columns: 1fr 1fr; }
}
