/* Monolen client portal. Black, white and the luxury colours of monolen.com, in a dark and a light mode. The
   pages for logged-in clients are plain dashboards in the device's own interface font, set big and bold; the
   edge of the Earth at dawn shows only behind log in and sign up, in dark mode. The login boxes themselves come
   from Clerk and are styled in js/portal.js ("appearance"), with the same colours as here. */

:root {
  color-scheme: dark;

  --space: #000000;
  --ink: #ffffff;
  --ink-2: #c9c9cc;          /* body text on black: 12.9:1 */
  --ink-3: #a3a3a8;          /* quiet text on black: 8.2:1 */
  --accent: #ffb69b;         /* the sunlit edge of the planet */
  --champagne: rgb(232 211 168);
  --gold: rgb(212 175 106);
  --line: rgb(var(--tint) / 0.12);

  --box: #0e0e11;
  --box-edge: rgb(var(--tint) / 0.13);

  /* Colours that change with the theme (dark here, light below). */
  --tint: 255 255 255;          /* fine lines and soft fills: white on dark, ink on light */
  --champ-rgb: 232 211 168;
  --accent-rgb: 255 182 155;
  --gold-rgb: 212 175 106;
  --danger: #f4a092;            /* 7.9:1 on the box */
  --danger-rgb: 244 160 146;
  --on-ink: #000000;            /* words on a white button */
  --bar-bg: rgb(0 0 0 / 0.86);
  --shade: 0 0 0;
  --shadow-a: 0.85;
  --scrollbar: #4d4d52;
  --menu-bg: #101014;
  --well: #0a0a0c;
  --surface-2: #15151a;
  --surface-3: #121216;
  --bubble: #19191f;
  --bubble-mine: #29251f;
  --next-bg: #1a1413;
  --notice-bg: #17140e;
  --danger-bg: #1b1211;
  --choice-on: #1f1c16;
  --field: #141418;
  --field-edge: #6b6b74;        /* 3.6:1 on the box */
  --field-edge-hover: #8c8c96;
  --edge-strong: #3a3a42;
  --placeholder: #8e8e96;
  --box-r: 0.5rem;
  --box-pad: clamp(1.375rem, 1.1rem + 1.1vw, 2rem);

  /* The device's own interface font (the owner asked for bigger, bolder, clearer type in the portal,
     November 18, 2026): Segoe UI on Windows, San Francisco on Apple devices, Roboto on Android. Nothing to load. */
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-title: clamp(2.125rem, 1.5rem + 2.6vw, 3.75rem);
  --t-lede: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --t-body: clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem);
  --t-small: 0.9375rem;

  --gutter: clamp(1rem, 5vw, 4rem);
  --content: 76rem;
  --bar-h: 4.25rem;

  /* Where the still sky draws its dawn. */
  --dawn-x: 38.8%;
  --dawn-y: 40.3vh;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Light mode: warm paper, ink words, the same champagne and dawn colours made deep enough to read.
   Chosen with the sun and moon button in the bar (js/theme.js), or by the device when nobody has chosen.
   Every pair still passes WCAG AA: words 15:1, second words 9.4:1, quiet words 6:1, labels 5.8:1,
   the dawn colour 5.3:1, field edges 3.4:1. ---- */

:root[data-theme="light"] {
  color-scheme: light;
  --space: #f5f3ee;
  --ink: #17171a;
  --ink-2: #45454d;
  --ink-3: #5c5c64;
  --accent: #a4502f;
  --accent-rgb: 164 80 47;
  --champagne: #7a5a22;
  --champ-rgb: 122 90 34;
  --gold: #86672a;
  --gold-rgb: 134 103 42;
  --danger: #b3372c;
  --danger-rgb: 179 55 44;
  --tint: 23 23 26;
  --line: rgb(23 23 26 / 0.12);
  --box: #ffffff;
  --box-edge: rgb(23 23 26 / 0.13);
  --on-ink: #ffffff;
  --bar-bg: rgb(255 255 255 / 0.94);
  --shade: 70 55 35;
  --shadow-a: 0.1;
  --scrollbar: #b9b5ab;
  --menu-bg: #ffffff;
  --well: #faf9f6;
  --surface-2: #f1efe9;
  --surface-3: #ffffff;
  --bubble: #f1efea;
  --bubble-mine: #f4ebda;
  --next-bg: #fbf0ea;
  --notice-bg: #f8f1e2;
  --danger-bg: #fbecea;
  --choice-on: #f8f1e2;
  --field: #ffffff;
  --field-edge: #8a8a93;
  --field-edge-hover: #5c5c64;
  --edge-strong: #d6d2c8;
  --placeholder: #6e6e76;
}

/* No sky in light mode: a plain page. */
:root[data-theme="light"] .sky,
:root[data-theme="light"] .pause {
  display: none !important;
}

:root[data-theme="light"] .glow::before {
  display: none;
}

:root[data-theme="light"] .glow > * {
  text-shadow: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 106.25%; /* everything a little bigger: 17px where the usual is 16px */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--scrollbar) var(--space);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  overflow-x: clip;
}

main {
  flex: 1;
}

h1, h2, h3, p, ul, ol, dl, dd {
  margin: 0;
}

img, svg {
  display: block;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--ink);
  color: var(--on-ink);
}

a {
  color: var(--ink);
  text-decoration-thickness: 0.0625rem;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.25rem;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  border-radius: 62.5rem;
  background-color: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---- The sky: the same still sky and canvas as on monolen.com ---- */

.sky {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: #000;
}

/* The still sky, for when the canvas cannot run. It follows the moving one: stars and a faint nebula in the
   upper left, the dawn at the same spot on the edge of the planet, and the dark planet in the lower right. */
.sky-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #000;
  background-image:
    radial-gradient(circle at var(--dawn-x) 40.3%, #fff4e6 0, rgb(255 236 220 / 0.95) 0.5vh, rgb(255 196 168 / 0.6) 1.2vh, rgb(244 136 118 / 0.3) 2.6vh, rgb(190 70 84 / 0.14) 5vh, rgb(190 70 84 / 0) 9vh),
    radial-gradient(ellipse 30vw 19vh at 51% 16%, rgb(66 18 48 / 0.7), rgb(66 18 48 / 0) 72%),
    radial-gradient(ellipse 24vw 15vh at 64% 7%, rgb(44 22 68 / 0.55), rgb(44 22 68 / 0) 72%),
    radial-gradient(ellipse 28vw 24vh at 27% 31%, rgb(42 14 36 / 0.55), rgb(42 14 36 / 0) 72%),
    radial-gradient(ellipse 30vw 28vh at 3% 54%, rgb(9 28 40 / 0.6), rgb(9 28 40 / 0) 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='352' height='352'%3E%3Ccircle cx='137.9' cy='279.7' r='0.61' fill='%23ffd9bf' opacity='0.33'/%3E%3Ccircle cx='99.1' cy='287.1' r='0.54' fill='%23cfe0ff' opacity='0.30'/%3E%3Ccircle cx='108.8' cy='213.4' r='0.70' fill='%23bcd2ff' opacity='0.55'/%3E%3Ccircle cx='243.6' cy='11.6' r='1.10' fill='%23ffffff' opacity='0.98'/%3E%3Ccircle cx='19.3' cy='131.8' r='0.53' fill='%23bcd2ff' opacity='0.50'/%3E%3Ccircle cx='102.9' cy='269.4' r='0.57' fill='%23ffffff' opacity='0.49'/%3E%3Ccircle cx='152.5' cy='232.0' r='0.88' fill='%23ffffff' opacity='0.82'/%3E%3Ccircle cx='302.9' cy='33.0' r='0.36' fill='%23bcd2ff' opacity='0.58'/%3E%3Ccircle cx='326.3' cy='256.1' r='0.44' fill='%23e9d6ff' opacity='0.63'/%3E%3Ccircle cx='86.8' cy='153.7' r='0.46' fill='%23e9d6ff' opacity='0.38'/%3E%3Ccircle cx='212.9' cy='89.0' r='0.37' fill='%23ffffff' opacity='0.50'/%3E%3Ccircle cx='278.6' cy='231.1' r='0.52' fill='%23cfe0ff' opacity='0.43'/%3E%3Ccircle cx='192.8' cy='98.9' r='0.46' fill='%23ffffff' opacity='0.53'/%3E%3Ccircle cx='190.4' cy='348.8' r='0.88' fill='%23ffffff' opacity='0.93'/%3E%3Ccircle cx='231.7' cy='223.5' r='0.56' fill='%23ffffff' opacity='0.40'/%3E%3Ccircle cx='83.2' cy='211.0' r='0.56' fill='%23ffffff' opacity='0.51'/%3E%3Ccircle cx='336.5' cy='63.0' r='0.87' fill='%23bcd2ff' opacity='0.75'/%3E%3Ccircle cx='112.5' cy='272.8' r='0.38' fill='%23ffffff' opacity='0.54'/%3E%3Ccircle cx='254.6' cy='217.0' r='0.54' fill='%23ffffff' opacity='0.56'/%3E%3Ccircle cx='152.9' cy='42.5' r='1.04' fill='%23ffd9bf' opacity='0.98'/%3E%3Ccircle cx='38.7' cy='260.7' r='0.99' fill='%23ffffff' opacity='0.81'/%3E%3Ccircle cx='56.0' cy='81.6' r='0.93' fill='%23ffffff' opacity='0.93'/%3E%3Ccircle cx='18.3' cy='109.7' r='0.66' fill='%23bcd2ff' opacity='0.49'/%3E%3Ccircle cx='336.4' cy='240.6' r='0.51' fill='%23ffffff' opacity='0.51'/%3E%3Ccircle cx='218.6' cy='345.6' r='0.69' fill='%23ffd9bf' opacity='0.40'/%3E%3Ccircle cx='199.9' cy='132.2' r='0.48' fill='%23ffffff' opacity='0.48'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='496' height='496'%3E%3Ccircle cx='77.6' cy='466.6' r='0.51' fill='%23ffffff' opacity='0.50'/%3E%3Ccircle cx='176.2' cy='257.7' r='0.69' fill='%23e9d6ff' opacity='0.38'/%3E%3Ccircle cx='395.1' cy='99.2' r='0.63' fill='%23cfe0ff' opacity='0.56'/%3E%3Ccircle cx='146.5' cy='411.3' r='1.10' fill='%23e9d6ff' opacity='0.87'/%3E%3Ccircle cx='129.4' cy='344.7' r='0.42' fill='%23bcd2ff' opacity='0.35'/%3E%3Ccircle cx='317.0' cy='346.6' r='0.62' fill='%23cfe0ff' opacity='0.34'/%3E%3Ccircle cx='495.8' cy='307.0' r='0.56' fill='%23e9d6ff' opacity='0.51'/%3E%3Ccircle cx='225.8' cy='210.4' r='0.37' fill='%23cfe0ff' opacity='0.36'/%3E%3Ccircle cx='32.2' cy='329.9' r='0.67' fill='%23ffffff' opacity='0.52'/%3E%3Ccircle cx='270.0' cy='377.0' r='0.43' fill='%23e9d6ff' opacity='0.30'/%3E%3Ccircle cx='157.0' cy='49.2' r='0.53' fill='%23ffd9bf' opacity='0.39'/%3E%3Ccircle cx='229.1' cy='179.1' r='0.40' fill='%23ffffff' opacity='0.29'/%3E%3Ccircle cx='406.4' cy='412.1' r='0.57' fill='%23cfe0ff' opacity='0.39'/%3E%3Ccircle cx='312.7' cy='448.4' r='0.37' fill='%23ffd9bf' opacity='0.53'/%3E%3Ccircle cx='268.5' cy='451.0' r='1.04' fill='%23ffffff' opacity='0.90'/%3E%3Ccircle cx='385.7' cy='464.4' r='0.42' fill='%23ffffff' opacity='0.41'/%3E%3Ccircle cx='354.9' cy='56.3' r='0.51' fill='%23e9d6ff' opacity='0.36'/%3E%3Ccircle cx='91.2' cy='372.0' r='0.36' fill='%23e9d6ff' opacity='0.38'/%3E%3Ccircle cx='232.8' cy='277.2' r='0.51' fill='%23ffd9bf' opacity='0.49'/%3E%3Ccircle cx='234.8' cy='410.4' r='0.50' fill='%23ffd9bf' opacity='0.59'/%3E%3Ccircle cx='290.8' cy='244.1' r='0.40' fill='%23ffffff' opacity='0.44'/%3E%3Ccircle cx='463.5' cy='324.0' r='0.64' fill='%23bcd2ff' opacity='0.59'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 7rem 4rem;
}

.sky-fallback[hidden] {
  display: none;
}

/* The glow of the dawn lies along the edge of the planet, so it is drawn on a turned shape. */
.sky-fallback::before {
  content: "";
  position: absolute;
  left: var(--dawn-x);
  top: 40.3%;
  width: 70vh;
  height: 30vh;
  margin: -15vh 0 0 -35vh;
  background: radial-gradient(closest-side, rgb(255 176 150 / 0.5) 0, rgb(236 112 106 / 0.34) 10%, rgb(178 58 80 / 0.22) 26%, rgb(110 30 62 / 0.13) 50%, rgb(60 16 44 / 0.05) 76%, rgb(60 16 44 / 0) 100%);
  transform: rotate(-40deg);
}

.sky-planet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.limb-tall {
  display: none;
}

@media (max-aspect-ratio: 1/1) {
  .limb-wide { display: none; }
  .limb-tall { display: inline; }
  .sky-fallback::before { transform: rotate(-66deg); }
}

.sky-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Buttons: white, softly rounded, with a fill that rises on hover ---- */

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.5rem;
  overflow: hidden;
  border: 0.125rem solid var(--ink);
  border-radius: 62.5rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.35s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-color: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  color: var(--on-ink);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: scaleY(1);
}

.btn-solid {
  background-color: var(--ink);
  color: var(--on-ink);
}

.btn-solid::before {
  background-color: var(--space);
}

.btn-solid:hover,
.btn-solid:focus-visible {
  color: var(--ink);
}

.btn:active {
  transform: translateY(0.0625rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Small labels: champagne, normal case. */
.label {
  color: var(--champagne);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.title {
  font-size: var(--t-title);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

/* ---- The bar at the top ---- */

.top {
  position: relative;
  z-index: 20;
  background-color: var(--bar-bg);
  box-shadow: 0 0.0625rem 0 var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--content) + 2 * var(--gutter));
  min-height: var(--bar-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9688rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav .nav-quiet:hover {
  color: var(--accent);
}

.nav .nav-cta {
  margin-left: 0.5rem;
  padding: 0 1.125rem;
  border: 0.125rem solid var(--ink);
  border-radius: 62.5rem;
  font-weight: 600;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.nav .nav-cta:hover,
.nav .nav-cta:focus-visible {
  background-color: var(--ink);
  color: var(--on-ink);
}

/* On a phone the bar keeps the name and the one action. */
@media (max-width: 39.99rem) {
  .nav .nav-quiet {
    display: none;
  }

  .brand {
    font-size: 1.125rem;
  }

  .nav .nav-cta {
    margin-left: 0;
    padding: 0 0.875rem;
    font-size: 0.9375rem;
  }
}

/* ---- The pause button: a small round button in the bottom corner ---- */

.pause {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 21;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0.0625rem solid rgb(var(--tint) / 0.4);
  border-radius: 62.5rem;
  background-color: rgb(0 0 0 / 0.72);
  color: var(--ink);
  cursor: pointer;
}

.pause:hover {
  border-color: var(--ink);
}

.pause .icon-play,
.pause[data-state="still"] .icon-pause {
  display: none;
}

.pause[data-state="still"] .icon-play {
  display: block;
}

.pause-words {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Boxes: every block of text on black sits in one ---- */

.box {
  position: relative;
  padding: var(--box-pad);
  border: 0.0625rem solid var(--box-edge);
  border-radius: var(--box-r);
  background-color: var(--box);
  box-shadow: inset 0 0.0625rem 0 rgb(var(--tint) / 0.05), 0 2rem 4rem -1.5rem rgb(var(--shade) / var(--shadow-a));
}

.box h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.box p {
  color: var(--ink-2);
}

.box h2 + p,
.box h2 + .rows {
  margin-top: 0.75rem;
}

.small {
  color: var(--ink-3) !important;
  font-size: var(--t-small);
}

/* Words over the sky have no box: they sit on a soft dark fade with no edge, and a shadow close around the
   letters, as on monolen.com. */
.glow {
  position: relative;
  isolation: isolate;
}

.glow::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.5rem -6rem;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.5) 55%, rgb(0 0 0 / 0));
  pointer-events: none;
}

.glow > * {
  text-shadow: 0 0 0.75rem rgb(0 0 0 / 0.9), 0 0 2rem rgb(0 0 0 / 0.7);
}

/* ---- Loading, and when something goes wrong ---- */

.wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  min-height: 9rem;
  color: var(--ink-2);
}

.wait-ring {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  border: 0.125rem solid rgb(var(--tint) / 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: turn 0.9s linear infinite;
}

@keyframes turn {
  to { transform: rotate(1turn); }
}

.trouble-title {
  font-size: 1.3125rem;
  font-weight: 700;
}

.trouble p {
  margin-top: 0.75rem;
}

.trouble .actions {
  margin-top: 1.5rem;
}

/* ---- Log in and sign up ---- */

.auth {
  display: grid;
  justify-items: center;
  gap: 1.75rem;
  width: 100%;
  max-width: 28rem; /* the login box is 26rem wide on a wide screen, and fills a phone screen */
  margin-inline: auto;
  padding: clamp(2.5rem, 8vh, 5.5rem) 1rem clamp(3rem, 8vh, 5rem);
}

.auth-head {
  text-align: center;
}

.auth-lede {
  margin-top: 0.5rem;
  color: var(--ink);
  font-size: var(--t-lede);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-box {
  width: 100%;
}

/* Clerk draws its box inside this one (its width is set in js/portal.js). */
.clerk-mount:empty {
  display: none;
}

/* Clerk draws the edge of its fields at 11% strength, too faint to find on the dark box. This one is 3.6:1. While
   a field is in use, Clerk's own focus ring (the dawn colour) takes over. */
input.cl-formFieldInput:not(:focus),
input.cl-otpCodeFieldInput:not(:focus) {
  box-shadow: 0 0 0 1px var(--field-edge) !important;
}

.auth-note {
  max-width: 26rem;
  color: var(--ink-2);
  font-size: var(--t-small);
  text-align: center;
}

.auth-note::before {
  inset: -1.5rem -4rem;
}

/* ---- The help and account icons in the bar, and their menus ---- */

.nav .icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: 0.375rem;
  padding: 0;
  border: 0.0625rem solid rgb(var(--tint) / 0.3);
  border-radius: 50%;
  background-color: rgb(var(--tint) / 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.nav .icon-btn:hover {
  border-color: var(--champagne);
  background-color: rgb(var(--champ-rgb) / 0.1);
}

.nav .icon-btn svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* The account icon shows the first letter of the account, in champagne. */
.nav .avatar {
  border-color: rgb(var(--champ-rgb) / 0.6);
}

.avatar-letter {
  display: none;
  color: var(--champagne);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1;
}

.avatar.has-initial .avatar-letter {
  display: block;
}

.avatar.has-initial svg {
  display: none;
}

/* The menus open over the page, just under the bar, lined up with its right edge. */
.menu {
  display: none;
  position: fixed;
  inset: auto;
  top: calc(var(--bar-h) + 0.5rem);
  right: calc(max(0px, (100vw - var(--content) - 2 * var(--gutter)) / 2) + var(--gutter));
  width: min(22rem, calc(100vw - 2rem));
  max-height: calc(100vh - var(--bar-h) - 1.5rem);
  margin: 0;
  padding: 1.25rem;
  overflow: auto;
  border: 0.0625rem solid var(--box-edge);
  border-radius: 0.75rem;
  background-color: var(--menu-bg);
  color: var(--ink);
  box-shadow: inset 0 0.0625rem 0 rgb(var(--tint) / 0.06), 0 1.5rem 3rem rgb(var(--shade) / var(--shadow-a));
}

.menu:popover-open {
  display: block;
}

.menu.is-open {
  display: block;
}

@media (max-width: 39.99rem) {
  .menu {
    right: 1rem;
  }
}

.menu-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.menu-text {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.menu-list {
  display: grid;
  gap: 0.125rem;
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9688rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background-color: rgb(var(--tint) / 0.07);
  color: var(--ink);
}

.menu-who {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-bottom: 1rem;
  border-bottom: 0.0625rem solid var(--line);
}

.avatar-large {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0.0625rem solid rgb(var(--champ-rgb) / 0.6);
  border-radius: 50%;
  background-color: rgb(var(--champ-rgb) / 0.08);
  color: var(--champagne);
  font-size: 1.25rem;
  font-weight: 700;
}

.menu-who-words {
  min-width: 0;
}

.menu-email {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.menu-since {
  margin-top: 0.125rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.menu-note {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 0.0625rem solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.menu-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border: 0.0625rem solid rgb(var(--gold-rgb) / 0.65);
  border-radius: 62.5rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.875em;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* ---- The page shapes: one centred column on every screen ---- */

.home,
.proj,
.ask {
  width: 100%;
  margin-inline: auto;
  padding: clamp(2rem, 6vh, 4rem) 1rem clamp(3rem, 8vh, 5rem);
}

.home {
  max-width: 50rem;
}

.proj {
  max-width: 48rem;
}

.ask {
  max-width: 46rem;
}

.page-loading,
.missing,
.not-admin {
  max-width: 32rem;
  margin-inline: auto;
}

.missing p,
.not-admin p {
  margin-top: 0.75rem;
}

.missing .actions,
.not-admin .actions {
  margin-top: 1.5rem;
}

.home-head,
.proj-head,
.ask-head {
  text-align: center;
}

.home-head .title,
.proj-head .title,
.ask-head .title {
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.home-lede,
.ask-lede {
  max-width: 34rem;
  margin: 0.875rem auto 0;
  color: var(--ink-2);
  font-size: var(--t-lede);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.section-head h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  margin-left: 0.5rem;
  padding: 0 0.5rem;
  border: 0.0625rem solid rgb(var(--champ-rgb) / 0.45);
  border-radius: 62.5rem;
  color: var(--champagne);
  font-size: 0.875rem;
  font-weight: 700;
  vertical-align: 0.125rem;
}

.projects {
  margin-top: clamp(2rem, 5vh, 3rem);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.375rem 1.125rem;
  font-size: 0.9375rem;
}

/* A quiet red for the one action that cannot be undone. 7.9:1 on the box. */
.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger::before {
  background-color: var(--danger);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* A button that reads like a link, inside a sentence. */
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

.notice {
  margin-top: 1.5rem;
  padding: 0.875rem 1.125rem;
  border: 0.0625rem solid rgb(var(--gold-rgb) / 0.5);
  border-radius: var(--box-r);
  background-color: var(--notice-bg);
  color: var(--ink);
}

.notice-trouble {
  border-color: rgb(var(--danger-rgb) / 0.55);
  background-color: var(--danger-bg);
}

/* ---- The project cards in a list ---- */

.card-list {
  display: grid;
  gap: 0.875rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.card-list:empty {
  display: none;
}

.project-card {
  position: relative;
  padding: clamp(1.125rem, 0.9rem + 1vw, 1.5rem);
  border: 0.0625rem solid var(--box-edge);
  border-radius: 0.875rem;
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(var(--accent-rgb) / 0.07), transparent 55%),
    var(--box);
  box-shadow: inset 0 0.0625rem 0 rgb(var(--tint) / 0.05), 0 1.5rem 3rem -1.5rem rgb(var(--shade) / var(--shadow-a));
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.project-card:hover {
  border-color: rgb(var(--champ-rgb) / 0.5);
  transform: translateY(-0.125rem);
}

.project-card.has-new {
  border-color: rgb(var(--accent-rgb) / 0.6);
}

.project-card.is-closed {
  opacity: 0.72;
}

.project-card:has(.pc-link:focus-visible) {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.1875rem;
}

.pc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.pc-kind {
  color: var(--champagne);
  font-size: 0.875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pc-name {
  margin-top: 0.625rem;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* The whole card opens the project: the name is the link, and it stretches over the card. */
.pc-link {
  color: var(--ink);
  text-decoration: none;
}

.pc-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.pc-link:hover {
  color: var(--ink);
}

.pc-link:focus-visible {
  outline: none;
}

.pc-client {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* The four steps as four short bars. */
.pc-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
  margin-top: 1.125rem;
}

.pc-steps span {
  height: 0.375rem;
  border-radius: 1rem;
  background-color: rgb(var(--tint) / 0.13);
}

.pc-steps .done {
  background: linear-gradient(90deg, var(--champagne), var(--gold));
}

.pc-steps .now {
  background: linear-gradient(90deg, var(--accent) 55%, rgb(var(--tint) / 0.13) 55%);
}

.pc-steps .off {
  background-color: rgb(var(--tint) / 0.08);
}

.pc-step {
  margin-top: 0.625rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.pc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 0.0625rem solid var(--line);
}

.icon {
  display: inline-flex;
  flex: none;
}

.pc-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.pc-msg .icon {
  color: var(--champagne);
}

.pc-last {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-msg.is-new {
  color: var(--ink);
  font-weight: 700;
}

.pc-msg.is-new .icon {
  color: var(--accent);
}

.pc-msg.is-quiet {
  color: var(--ink-3);
}

.pc-open {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.375rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.pc-open .icon {
  color: var(--ink);
  transition: transform 0.3s var(--ease);
}

.project-card:hover .pc-open .icon {
  transform: translateX(0.1875rem);
}

@media (max-width: 33.99rem) {
  .pc-when {
    display: none;
  }
}

/* The step a project is on, as a small tag. */
.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.875rem;
  padding: 0 0.75rem;
  border: 0.0625rem solid rgb(var(--tint) / 0.24);
  border-radius: 62.5rem;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pill::before {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background-color: var(--accent);
}

.pill-3 {
  border-color: rgb(var(--gold-rgb) / 0.6);
  color: var(--champagne);
}

.pill-3::before {
  background-color: var(--gold);
}

.pill-closed::before {
  background-color: var(--ink-3);
}

/* No projects yet: a small drawn planet with a moon on its orbit, the four steps, and the way to start. */
.empty {
  display: grid;
  justify-items: center;
  margin-top: 1.25rem;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
}

.empty h3 {
  margin-top: 1rem;
  font-size: 1.3125rem;
  font-weight: 700;
}

.empty p {
  max-width: 30rem;
  margin-top: 0.5rem;
}

.empty .actions {
  justify-content: center;
  margin-top: 1.75rem;
}

.empty .small {
  margin-top: 1rem;
}

.empty-art {
  width: 10rem;
  height: 7.5rem;
  overflow: visible;
}

.empty-art .orbit {
  fill: none;
  stroke: rgb(var(--champ-rgb) / 0.35);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.empty-art .orbit-2 {
  stroke: rgb(var(--tint) / 0.14);
}

.empty-art .planet {
  fill: var(--surface-2);
  stroke: rgb(var(--tint) / 0.28);
}

.empty-art .planet-lit {
  fill: rgb(var(--accent-rgb) / 0.55);
}

.empty-art .moon {
  fill: var(--champagne);
}

.empty-art .star {
  fill: var(--ink-3);
  opacity: 0.7;
}

.empty-art .moon-path {
  transform-origin: 80px 60px;
}

/* ---- The four steps: a dot for each, joined by a line that fills in champagne and gold ---- */

.track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.track li {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.5rem;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.3;
}

.track li::before {
  content: "";
  position: absolute;
  top: 0.4375rem;
  left: 1.125rem;
  right: -0.375rem;
  height: 0.125rem;
  border-radius: 1rem;
  background-color: rgb(var(--tint) / 0.14);
}

.track li:last-child::before {
  display: none;
}

.track li.done::before {
  background: linear-gradient(90deg, var(--champagne), var(--gold));
}

.track .dot {
  position: relative;
  width: 1rem;
  height: 1rem;
  border: 0.125rem solid rgb(var(--tint) / 0.4);
  border-radius: 50%;
  background-color: var(--box);
}

.track li.done {
  color: var(--ink-2);
}

.track li.done .dot {
  border-color: var(--gold);
  background-color: var(--gold);
}

/* A small tick inside each finished step. */
.track li.done .dot::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.0625rem;
  width: 0.25rem;
  height: 0.5rem;
  border: solid var(--box);
  border-width: 0 0.125rem 0.125rem 0;
  transform: rotate(45deg);
}

.track li.now {
  color: var(--ink);
  font-weight: 600;
}

.track li.now .dot {
  border-color: var(--accent);
  background-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgb(var(--accent-rgb) / 0.16);
}

.track.is-closed li.now .dot {
  border-color: var(--ink-3);
  background-color: var(--ink-3);
  box-shadow: none;
}

.step-note {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.track-intro {
  width: 100%;
  max-width: 36rem;
  margin: 1.75rem auto 0;
  text-align: left;
}

/* On a phone the steps stand in a column, joined by a line down the left. */
@media (max-width: 33.99rem) {
  .track {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .track li {
    grid-template-columns: 1rem 1fr;
    align-items: center;
    column-gap: 0.75rem;
  }

  .track li::before {
    top: 1.125rem;
    bottom: -0.75rem;
    left: 0.4375rem;
    right: auto;
    width: 0.125rem;
    height: auto;
  }

  .track li.done::before {
    background: linear-gradient(180deg, var(--champagne), var(--gold));
  }

  .step-note {
    grid-column: 2;
  }
}

/* ---- One project ---- */

.back-row {
  margin-bottom: 1rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  padding-right: 0.5rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.back:hover {
  color: var(--ink);
}

.proj-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.proj .page-body > .box {
  margin-top: 1rem;
}

.proj-head {
  margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
}

.box h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.next-up {
  margin-top: 1.5rem;
  padding: 1rem 1.125rem;
  border: 0.0625rem solid rgb(var(--accent-rgb) / 0.28);
  border-radius: var(--box-r);
  background-color: var(--next-bg);
}

.next-label {
  color: var(--accent) !important;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.next-text {
  margin-top: 0.25rem;
  color: var(--ink) !important;
}

.proj-preview {
  margin-top: 1.25rem;
}

.proj-ask .rows {
  margin-top: 1rem;
}

.ask-words {
  white-space: pre-line;
}

/* Label and value, with a fine line between, as on monolen.com. */
.rows {
  margin: 0;
}

.rows > div {
  display: grid;
  gap: 0.125rem;
  padding-block: 0.875rem;
  border-bottom: 0.0625rem solid var(--line);
}

.rows > div:first-child {
  border-top: 0.0625rem solid var(--line);
}

.rows dt {
  color: var(--champagne);
  font-size: 0.875rem;
  font-weight: 600;
}

.rows dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---- The conversation ---- */

.chat .section-head {
  margin-bottom: 1rem;
}

.chat-with {
  color: var(--ink-3);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-height: 12rem;
  max-height: min(34rem, 62vh);
  margin: 0;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 0.0625rem solid var(--line);
  border-radius: var(--box-r);
  background-color: var(--well);
}

.thread:focus-visible {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.125rem;
}

.thread-day {
  align-self: center;
  margin: 0.375rem 0 0.125rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.thread-day span {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 62.5rem;
  background-color: rgb(var(--tint) / 0.06);
}

.thread-new {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
}

.thread-new::before,
.thread-new::after {
  content: "";
  flex: 1;
  height: 0.0625rem;
  background-color: rgb(var(--accent-rgb) / 0.45);
}

.thread-empty {
  max-width: 22rem;
  margin: auto;
  color: var(--ink-3);
  font-size: 0.9375rem;
  text-align: center;
}

.msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(85%, 34rem);
}

.msg-mine {
  align-self: flex-end;
}

.msg-theirs {
  align-self: flex-start;
}

.msg-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0.0625rem solid rgb(var(--champ-rgb) / 0.45);
  border-radius: 50%;
  background-color: var(--surface-2);
  color: var(--champagne);
  font-size: 0.8125rem;
  font-weight: 700;
}

.msg-avatar img {
  width: 1.125rem;
  height: 1.125rem;
}

.msg-body {
  min-width: 0;
  padding: 0.625rem 0.875rem 0.75rem;
  border: 0.0625rem solid rgb(var(--tint) / 0.09);
  border-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
  background-color: var(--bubble);
}

.msg-mine .msg-body {
  border-color: rgb(var(--champ-rgb) / 0.38);
  border-radius: 1rem;
  border-bottom-right-radius: 0.25rem;
  background-color: var(--bubble-mine);
}

.chat .msg-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.msg-who {
  color: var(--champagne);
  font-weight: 700;
}

.chat .msg-text {
  margin-top: 0.25rem;
  color: var(--ink);
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.msg.is-sending {
  opacity: 0.6;
}

/* The portal's own short notes, such as "Moved to step 2", in the middle of the conversation. */
.msg-note {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  max-width: 90%;
  padding: 0.375rem 0.875rem;
  border: 0.0625rem dashed rgb(var(--gold-rgb) / 0.5);
  border-radius: 62.5rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  text-align: center;
}

.msg-note time {
  color: var(--ink-3);
}

/* On a phone the conversation takes more of the width. */
@media (max-width: 33.99rem) {
  .chat.box {
    padding-inline: 0.875rem;
  }

  .thread {
    padding: 0.625rem;
  }

  .msg {
    max-width: 94%;
  }

  .msg-avatar {
    width: 1.625rem;
    height: 1.625rem;
  }
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.625rem;
  margin-top: 0.875rem;
}

.composer textarea {
  min-height: 3rem;
  max-height: 12rem;
  resize: vertical;
}

.btn-send {
  min-height: 3rem;
}

.composer-hint {
  margin-top: 0.5rem;
  color: var(--ink-3) !important;
  font-size: 0.8125rem;
}

/* ---- Monolen's controls on a project ---- */

.admin-panel {
  border-color: rgb(var(--gold-rgb) / 0.5);
}

.admin-who {
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.admin-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 40rem) {
  .admin-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: end;
  }

  .admin-form .check,
  .admin-form .actions {
    grid-column: 1 / -1;
  }
}

.admin-form .actions,
.admin-panel > .actions {
  margin-top: 0;
}

.admin-panel > .actions {
  margin-top: 1.25rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  width: fit-content;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--accent);
}

.admin-status {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  color: var(--champagne) !important;
  font-weight: 600;
}

.admin-status.is-bad {
  color: var(--danger) !important;
}

.admin-empty {
  margin-top: 1.25rem;
}

/* ---- Fields (the questions, the messages, the admin controls) ---- */

.field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > label {
  color: var(--champagne);
  font-size: 0.9688rem;
  font-weight: 600;
}

.hint {
  color: var(--ink-3) !important;
  font-size: var(--t-small);
}

/* A clear edge (3.6:1 on the box), the dawn colour around the one in use, and 1rem text so phones do not zoom in. */
.field input[type="text"],
.field input[type="url"],
.field select,
.big-input,
.composer textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  border: 0.0625rem solid var(--field-edge);
  border-radius: var(--box-r);
  background-color: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
}

.field select {
  padding-right: 2.75rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e8d3a8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.field input:hover,
.field select:hover,
.big-input:hover,
.composer textarea:hover {
  border-color: var(--field-edge-hover);
}

.field input:focus,
.field select:focus,
.big-input:focus,
.composer textarea:focus {
  border-color: var(--accent);
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.0625rem;
}

::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.form-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 0.0625rem solid rgb(var(--danger-rgb) / 0.6);
  border-radius: var(--box-r);
  background-color: var(--danger-bg);
  color: var(--danger) !important;
  font-weight: 600;
}

/* Cards to pick from. */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 0.625rem;
}

.choices-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.choice-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.125rem;
  min-height: 4.75rem;
  padding: 0.875rem 1rem 0.875rem 2.875rem;
  border: 0.0625rem solid var(--edge-strong);
  border-radius: 0.75rem;
  background-color: var(--surface-3);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.choice-card:hover {
  border-color: var(--field-edge-hover);
}

.choice-card:active {
  transform: scale(0.985);
}

.choice-card input {
  position: absolute;
  top: 1.0625rem;
  left: 1rem;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--champagne);
  background-color: var(--choice-on);
}

.choice-card:has(input:focus-visible) {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.125rem;
}

.choice-name {
  color: var(--ink);
  font-weight: 700;
}

.choice-note {
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.35;
}

/* ---- Start a project: one question at a time ---- */

.wizard {
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  overflow: hidden;
}

.wizard-progress {
  display: grid;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}

.wizard-count {
  color: var(--champagne) !important;
  font-size: 0.875rem;
  font-weight: 700;
}

.wizard-bar {
  height: 0.25rem;
  overflow: hidden;
  border-radius: 62.5rem;
  background-color: rgb(var(--tint) / 0.1);
}

.wizard-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--champagne), var(--accent));
  transition: width 0.5s var(--ease);
}

.wizard-q {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.018em !important;
  line-height: 1.2 !important;
}

.wizard-q:focus {
  outline: none;
}

.wizard-q label {
  cursor: default;
}

.wizard-step .hint {
  margin-top: 0.5rem;
}

.wizard-step .choices {
  margin-top: 1.25rem;
}

.big-input {
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

textarea.big-input {
  min-height: 10rem;
  resize: vertical;
}

.counter {
  margin-top: 0.5rem;
  color: var(--ink-3) !important;
  font-size: 0.875rem;
}

.counter.is-enough {
  color: var(--champagne) !important;
}

.other-field {
  margin-top: 1.25rem;
}

.review {
  margin: 1.25rem 0 0;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  padding-block: 0.875rem;
  border-bottom: 0.0625rem solid var(--line);
}

.review-row:first-child {
  border-top: 0.0625rem solid var(--line);
}

.review-row dt {
  grid-column: 1;
  color: var(--champagne);
  font-size: 0.875rem;
  font-weight: 600;
}

.review-row dd {
  grid-column: 1;
  margin: 0.125rem 0 0;
  overflow-wrap: anywhere;
}

.review-row .review-change {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
}

.review-change .link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.review-words {
  max-height: 9rem;
  overflow: auto;
  white-space: pre-line;
}

.wizard-step > .small {
  margin-top: 1.25rem;
  overflow-wrap: anywhere;
}

.wizard-step > .small strong {
  color: var(--ink-2);
  font-weight: 600;
}

.wizard-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.wizard-nav [data-action="next"] {
  min-width: 9.5rem;
  margin-left: auto;
}

.wizard-step.from-right {
  animation: from-right 0.45s var(--ease) both;
}

.wizard-step.from-left {
  animation: from-left 0.45s var(--ease) both;
}

@keyframes from-right {
  from { opacity: 0; transform: translateX(1.5rem); }
}

@keyframes from-left {
  from { opacity: 0; transform: translateX(-1.5rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .card-list > .project-card,
  .page-body:not([hidden]) > .box,
  .wizard:not([hidden]) {
    animation: rise 0.6s var(--ease) both;
  }

  .card-list > .project-card:nth-child(2) { animation-delay: 0.06s; }
  .card-list > .project-card:nth-child(3) { animation-delay: 0.12s; }
  .card-list > .project-card:nth-child(n + 4) { animation-delay: 0.18s; }
}

@keyframes beacon {
  50% { box-shadow: 0 0 0 0.4375rem rgb(var(--accent-rgb) / 0.06); }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card:hover,
  .choice-card,
  .wizard-bar span {
    transition: none;
    transform: none;
  }
}

@media (forced-colors: active) {
  .track .dot,
  .pill,
  .project-card,
  .choice-card,
  .msg-body,
  .menu,
  .icon-btn {
    border: 0.0625rem solid CanvasText;
  }
}

/* ---- Page not found ---- */

.lost {
  display: grid;
  justify-items: center;
  max-width: 34rem;
  margin: clamp(3rem, 12vh, 7rem) auto;
  padding-inline: var(--gutter);
  text-align: center;
}

.lost-code {
  color: var(--gold);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.lost .title {
  margin-top: 0.75rem;
}

.lost-text {
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: var(--t-lede);
}

.lost .actions {
  justify-content: center;
  margin-top: 2rem;
}

/* ---- Footer ---- */

.foot {
  padding-block: 2rem 5rem;
  border-top: 0.0625rem solid var(--line);
  background-color: var(--space);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.foot-links a:hover {
  text-decoration: underline;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1rem;
  color: var(--ink-3);
  font-size: var(--t-small);
}

/* ---- Motion: a little, and only where it is asked for ---- */

@media (prefers-reduced-motion: no-preference) {
  .page-body:not([hidden]) > header,
  .clerk-mount:not(:empty) {
    animation: rise 0.7s var(--ease) both;
  }
}

/* The moon goes round the planet on the round orbit. */
@keyframes moon {
  to { transform: rotate(1turn); }
}

@keyframes twinkle {
  50% { opacity: 0.2; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  .wait-ring {
    animation-duration: 3s;
  }

  .btn,
  .btn::before {
    transition: none;
  }
}

/* ---- High contrast mode: the system draws its own colours ---- */

@media (forced-colors: active) {
  .btn,
  .nav .nav-cta,
  .box {
    border: 0.0625rem solid CanvasText;
  }

  .glow::before {
    display: none;
  }
}

/* ==================================================================================================
   Plain and clear (November 18, 2026): the owner asked for client pages that are plainer and easier to
   understand, with a light mode. No sky and no looping motion on the pages for logged-in clients; the steps of a
   project say Done, Now, Next or Later in words.
   ================================================================================================== */

/* The sun and moon button: a sun in dark mode (press it for light), a moon in light mode. */
.theme-btn .icon-moon,
:root[data-theme="light"] .theme-btn .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-btn .icon-moon {
  display: block;
}

/* Clerk's wheel logo is white; in light mode the page's own wheel turns dark too. */
:root[data-theme="light"] .brand img,
:root[data-theme="light"] .msg-avatar img {
  filter: brightness(0);
}

/* Pages for logged-in clients: a calm, plain background. */
.plain .glow::before {
  display: none;
}

.plain .glow > * {
  text-shadow: none;
}

.proj-status {
  margin-top: 0.75rem;
  color: var(--ink);
  font-size: var(--t-lede);
  font-weight: 600;
}

/* The four steps of a project, as a numbered list. */
.steps {
  display: grid;
  gap: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
  padding-block: 0.75rem;
  color: var(--ink-2);
}

/* The line that joins the numbers. */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(50% + 1.0625rem);
  bottom: calc(-50% + 1.0625rem);
  left: calc(1rem - 0.0625rem);
  width: 0.125rem;
  background-color: rgb(var(--tint) / 0.16);
}

.steps li.done:not(:last-child)::after {
  background-color: var(--gold);
}

.step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0.125rem solid rgb(var(--tint) / 0.3);
  border-radius: 50%;
  background-color: var(--box);
  color: var(--ink-3);
  font-size: 0.875rem;
  font-weight: 700;
}

.steps li.done .step-num {
  border-color: var(--gold);
  background-color: var(--gold);
}

/* A tick in each finished step. */
.steps li.done .step-num::after {
  content: "";
  width: 0.375rem;
  height: 0.75rem;
  margin-top: -0.125rem;
  border: solid var(--box);
  border-width: 0 0.15rem 0.15rem 0;
  transform: rotate(45deg);
}

.steps li.now .step-num {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--on-ink);
}

.steps .step-name {
  font-size: 1.0625rem;
}

.steps li.now .step-name {
  color: var(--ink);
  font-weight: 700;
}

.step-state {
  padding: 0.125rem 0.625rem;
  border-radius: 62.5rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 700;
}

.steps li.done .step-state {
  color: var(--gold);
}

.steps li.now .step-state {
  border: 0.0625rem solid var(--accent);
  color: var(--accent);
}

.steps.is-closed li.now .step-num {
  border-color: var(--ink-3);
  background-color: var(--ink-3);
}

.steps.is-closed li.now .step-state {
  border-color: var(--ink-3);
  color: var(--ink-3);
}

/* The cards say "Open", not only an arrow. */
.pc-open-word {
  color: var(--ink);
  font-weight: 600;
}

/* Light mode: softer shadows, and the boxes sit on the paper with a fine edge. */
:root[data-theme="light"] .box,
:root[data-theme="light"] .project-card,
:root[data-theme="light"] .menu {
  box-shadow: 0 0.0625rem 0.125rem rgb(70 55 35 / 0.06), 0 0.75rem 2rem -1rem rgb(70 55 35 / 0.18);
}

:root[data-theme="light"] .project-card {
  background: var(--box);
}

:root[data-theme="light"] .top {
  box-shadow: 0 0.0625rem 0 var(--line);
}

:root[data-theme="light"] .foot {
  background-color: var(--space);
}

/* ---- Account pictures (November 18, 2026): a drawn avatar or the client's own photo ---- */

.nav .avatar,
.avatar-large {
  position: relative;
  overflow: hidden;
}

.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar.has-image .avatar-letter,
.avatar.has-image svg,
.avatar-large.has-image {
  color: transparent;
}

.avatar.has-image svg {
  display: none;
}

/* Monolen's messages show a plain person, not the logo. */
.msg-avatar.is-person {
  color: var(--ink-2);
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.msg-avatar {
  overflow: hidden;
}

/* The window for choosing a picture. */
.avatar-dialog {
  width: min(31rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  overflow: auto;
  border: 0.0625rem solid var(--box-edge);
  border-radius: 0.875rem;
  background-color: var(--menu-bg);
  color: var(--ink);
  box-shadow: 0 1.5rem 3rem rgb(var(--shade) / var(--shadow-a));
}

.avatar-dialog::backdrop {
  background-color: rgb(0 0 0 / 0.6);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.avatar-option {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
}

.avatar-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.avatar-option img {
  width: 100%;
  height: 100%;
  border: 0.1875rem solid transparent;
  border-radius: 50%;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.avatar-option:hover img {
  transform: scale(1.04);
}

.avatar-option:has(input:checked) img {
  border-color: var(--champagne);
}

.avatar-option:has(input:checked)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1.375rem;
  height: 1.375rem;
  border: 0.125rem solid var(--menu-bg);
  border-radius: 50%;
  background: var(--champagne) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

.avatar-option:has(input:focus-visible) {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.1875rem;
}

.avatar-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
}

.avatar-note {
  margin-top: 0.75rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.avatar-dialog .actions {
  justify-content: flex-end;
  margin-top: 1.5rem;
}

@media (max-width: 22rem) {
  .avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==================================================================================================
   Dashboards (November 18, 2026): the owner asked to see everything at once. The home pages show numbers at a
   glance and the projects in a grid; a project shows its messages beside its progress and its request on a wide
   screen, and one after the other on a phone.
   ================================================================================================== */

.home,
.proj {
  max-width: 78rem;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.dash-head > div {
  min-width: 0;
}

.title-dash {
  margin-top: 0.375rem;
  font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.dash-lede {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: var(--t-lede);
}

.dash-head .proj-status {
  margin-top: 0.5rem;
}

.dash-head .proj-meta {
  justify-content: flex-start;
  margin-top: 0;
}

/* Numbers at a glance. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.25rem, 1fr));
  gap: 0.75rem;
  margin: clamp(1.25rem, 3vh, 2rem) 0 0;
  padding: 0;
  list-style: none;
}

.stat {
  display: grid;
  gap: 0.125rem;
  padding: 1rem 1.125rem;
  border: 0.0625rem solid var(--box-edge);
  border-radius: 0.75rem;
  background-color: var(--box);
}

.stat-num {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
}

.stat-alert {
  border-color: var(--accent);
}

.stat-alert .stat-num {
  color: var(--accent);
}

.projects {
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
}

.card-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 23rem), 1fr));
}

.home .empty {
  max-width: 46rem;
  margin-inline: auto;
}

/* One project. */
.dash {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.25rem, 3vh, 2rem);
}

.proj .page-body > .box,
.dash > .box {
  min-width: 0;
  margin-top: 0;
}

@media (min-width: 62rem) {
  .dash {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: start;
  }

  /* The messages stay in view on the left while the right side scrolls. */
  .dash > .dash-main {
    grid-column: 1;
    grid-row: 1 / span 4;
    position: sticky;
    top: 1rem;
  }

  .dash > .dash-side {
    grid-column: 2;
  }

  .dash .thread {
    height: clamp(16rem, calc(100vh - 26rem), 46rem);
    max-height: none;
  }

  .dash .admin-form {
    grid-template-columns: 1fr;
  }
}

.back-row {
  margin-bottom: 0.5rem;
}

/* Bolder, clearer words. */
.title {
  letter-spacing: -0.03em;
}

.section-head h2,
.box h2 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}

.label,
.pc-kind,
.rows dt,
.field > label {
  font-weight: 700;
}

.btn {
  font-weight: 700;
}

.pc-name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Phones: every link and button is at least 2.75rem tall, so a thumb can hit it. */
.brand {
  min-height: 2.75rem;
}

.avatar-upload .link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* The bar on phones. "Create an account" is said in two words ("Sign up") on a narrow screen; screen readers
   still hear the full name. On the smallest phones the icons sit a little closer, so all of them fit. */
.cta-short {
  display: none;
}

@media (max-width: 26rem) {
  .cta-long {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .cta-short {
    display: inline;
  }

  .bar {
    gap: 0.5rem;
  }

  .brand {
    gap: 0.5rem;
    font-size: 1.0625rem;
  }

  .nav .icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.25rem;
  }
}

/* The switch for notification emails, in the account menu. */
.menu-check {
  justify-content: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}

.menu-check input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--accent);
}
