@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-italic.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --architecture-blue: #7195a6;
  /* Deeper blue keeps normal-size white button text above 4.5:1 contrast. */
  --blue-ink: #507789;
  --blue-hover: #416576;
  --ink: #31383c;
  --graphite: #535b60;
  --muted: #626d73;
  --site-font: "Cormorant Garamond", Garamond, Baskerville, Georgia, serif;
  --header-top: 20px;
  --page-gutter: clamp(24px, 5.7vw, 88px);
  font-family: var(--site-font);
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-width: 280px; min-height: 100svh;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
}
.site-header {
  min-width: 0;
  padding: var(--header-top) var(--page-gutter) 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px;
}
.brand {
  margin: 0; min-width: 0; width: clamp(200px, 22vw, 280px); line-height: 0;
  /* Reserve a touch target and gap even without navigation, so the logo never jumps. */
  flex-shrink: 0; max-width: calc(100% - 60px);
}
.site-header:has(.account-controls) { flex-wrap: nowrap; column-gap: 16px; }
.brand img { display: block; width: 100%; height: auto; }
.brand a { display: block; }
.landing, .account-main {
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 40px;
  overflow-x: clip;
}
.paper-surface {
  --paper-bleed: clamp(32px, 8vw, 64px);
  position: relative; isolation: isolate; display: flow-root;
  width: min(100%, 420px); margin: 0 auto;
}
.paper-surface::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: calc(-1 * var(--paper-bleed));
  background-image:
    linear-gradient(rgb(from var(--architecture-blue) r g b / .38) 1.4px, transparent 1.4px),
    linear-gradient(90deg, rgb(from var(--architecture-blue) r g b / .38) 1.4px, transparent 1.4px),
    linear-gradient(rgb(from var(--architecture-blue) r g b / .23) .8px, transparent .8px),
    linear-gradient(90deg, rgb(from var(--architecture-blue) r g b / .23) .8px, transparent .8px),
    linear-gradient(rgb(from var(--architecture-blue) r g b / .14) .45px, transparent .45px),
    linear-gradient(90deg, rgb(from var(--architecture-blue) r g b / .14) .45px, transparent .45px);
  /* Five fine squares per medium square; two medium squares per large square. */
  background-size: 80px 80px, 80px 80px, 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -32px -48px;
  /* Equal physical margins and fade distances, whatever the content's aspect ratio. */
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 var(--paper-bleed), #000 calc(100% - var(--paper-bleed)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--paper-bleed), #000 calc(100% - var(--paper-bleed)), transparent);
  mask-image:
    linear-gradient(to right, transparent, #000 var(--paper-bleed), #000 calc(100% - var(--paper-bleed)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--paper-bleed), #000 calc(100% - var(--paper-bleed)), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* A soft white wash quiets the grid beneath the content, keeping the outer paper visible. */
.paper-surface::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -20px; background: rgb(255 255 255 / .7);
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent),
    linear-gradient(to bottom, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image:
    linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent),
    linear-gradient(to bottom, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Short homepage copy keeps its natural width, centred like the account forms. */
.invitation {
  width: fit-content;
  max-width: min(100%, 420px);
}
/* Keep the circle outside the text block without changing its centre. */
.invitation .graphite-circle {
  margin: -.65em -1.1em;
  max-inline-size: calc(100% + 2.2em);
}
.pencil-link {
  color: var(--graphite); font-size: clamp(28px, 2.4vw, 33px); line-height: 1.35;
  font-style: italic; font-weight: 400; letter-spacing: -.025em;
  text-decoration: none; text-shadow: .35px .2px 0 #535b6026;
}
.pencil-link:is(:hover, :focus-visible) { color: var(--blue-hover); }
/* A decorative mark for any text element; typography and semantics stay with it. */
.graphite-circle {
  display: inline-block; position: relative; max-inline-size: 100%;
  padding: .65em 1.1em; overflow-wrap: anywhere; text-align: center;
}
.graphite-circle::after, :is(a, button).graphite-circle::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: currentColor;
  -webkit-mask: url("/assets/graphite-circle.svg") center / 100% 100% no-repeat;
  mask: url("/assets/graphite-circle.svg") center / 100% 100% no-repeat;
}
:is(a, button).graphite-circle::before {
  opacity: 0;
  transform: translate(.06em, .05em) rotate(-1.5deg) scale(1.025, .96);
}
:is(a, button).graphite-circle:is(:hover, :focus-visible)::before { opacity: .75; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 6px; border-radius: 2px; }
h1 { font-size: clamp(34px, 4vw, 42px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 22px; }
p { font-size: 20px; line-height: 1.5; }
.intro { margin: 0 0 28px; }
label { display: block; margin-bottom: 10px; font-size: 18px; }
input {
  display: block; width: 100%; padding: 13px 14px; border: 1px solid var(--architecture-blue);
  border-radius: 2px; background: #fffffff0; color: var(--ink); font: 20px/1.4 var(--site-font);
}
input[type="email"] {
  appearance: none; border-color: var(--graphite); border-radius: 0;
  border-image: url("/assets/graphite-field.svg") 12 / 8px / 6px stretch;
}
input[type="email"]:focus {
  outline: none; border-width: 2px; border-color: var(--ink); padding: 12px 13px;
  border-image-source: url("/assets/graphite-field.svg#focus");
}
button {
  border: 1px solid var(--blue-ink); border-radius: 2px; padding: 13px 22px; cursor: pointer;
  background: var(--blue-ink); color: white; font: 20px/1.4 var(--site-font);
}
button:enabled:hover { background: var(--blue-hover); }
button:disabled { background: #e5e8e9; border-color: #cdd3d6; color: #6d777d; cursor: default; }
.form-actions { margin-top: 23px; }
.fine-print { color: var(--muted); font-size: 17px; line-height: 1.5; margin-top: 26px; }
.account-email { overflow-wrap: anywhere; font-style: italic; }
.account-controls { margin-left: auto; flex-shrink: 0; anchor-name: --account; }
.account-controls button { min-height: 44px; }
.account-toggle {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border: 0; background: none; color: var(--graphite); font-size: 20px;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.account-toggle:enabled:hover { background: none; color: var(--blue-hover); }
.account-chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.account-controls:has(.account-panel:popover-open) .account-chevron { transform: translateY(2px) rotate(225deg); }
.account-panel {
  /* Position below the header when CSS anchor positioning is unavailable. */
  position: fixed; inset: auto; top: calc(var(--header-top) + 94px);
  right: var(--page-gutter); margin: 0;
  width: 280px; max-width: calc(100vw - 48px); padding: 18px 22px 12px;
  border: 1px solid var(--architecture-blue); border-radius: 2px;
  background: #fff; color: var(--ink); box-shadow: 0 5px 20px #31383c0d;
}
.account-caption { margin: 0 0 4px; color: var(--muted); font-size: 17px; }
.account-panel .account-email { margin: 0 0 10px; font-size: 20px; line-height: 1.3; }
@supports (top: anchor(bottom)) {
  .account-panel { top: calc(anchor(--account bottom) + 8px); right: anchor(--account right); }
}
.room-status { margin: 0; font-size: clamp(28px, 2.4vw, 33px); line-height: 1.35; }
.quiet-button { color: var(--graphite); border: 0; border-bottom: 1px solid var(--architecture-blue); border-radius: 0; background: none; padding: 7px 0; font-size: 18px; }
.quiet-button:enabled:hover { background: none; color: var(--blue-hover); }
.quiet-button:disabled { background: none; color: var(--muted); border-color: var(--architecture-blue); }
.login-challenge[data-interactive] { margin-top: 20px; }
.error { color: #843f2e; font-size: 18px; }
[hidden] { display: none !important; }
@media (max-width: 799px) {
  :root { --header-top: 6px; --page-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .brand { width: 160px; }
}
/* Shared compact header on short screens, including the entrance and login. */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-top: 4px; --page-gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .brand { width: 145px; }
  .site-header { min-height: 48px; }
  .account-panel { top: 52px; }
  @supports (top: anchor(bottom)) { .account-panel { top: calc(anchor(--account bottom) + 8px); } }
}
@media (prefers-reduced-motion: no-preference) {
  .pencil-link, button { transition: color 160ms, background-color 160ms; }
  :is(a, button).graphite-circle:is(:hover, :focus-visible)::before {
    animation: graphite-retrace 400ms linear both;
  }
}
/* Sweep clockwise around the oval, keeping the first pencil mark visible. */
@keyframes graphite-retrace {
  0% { clip-path: polygon(50% 50%, 78% 0%, 78% 0%, 78% 0%, 78% 0%, 78% 0%, 78% 0%); }
  12% { clip-path: polygon(50% 50%, 78% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%); }
  35% { clip-path: polygon(50% 50%, 78% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 100%, 100% 100%); }
  65% { clip-path: polygon(50% 50%, 78% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 100%, 0% 100%); }
  85% { clip-path: polygon(50% 50%, 78% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 0% 0%); }
  100% { clip-path: polygon(50% 50%, 78% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 78% 0%); }
}
@media (forced-colors: active) {
  .paper-surface::before, .paper-surface::after, .graphite-circle::after, :is(a, button).graphite-circle::before { display: none; }
  .pencil-link { text-decoration: underline; }
  input[type="email"] { border-image: none; }
  input[type="email"]:focus { border-image: none; outline: 2px solid Highlight; outline-offset: 3px; }
}
