/* broadside — the member pages set as one printed sheet.
 *
 * docs/design-broadside.md is the specification; mockups/2027/index.html is
 * the prototype it was drawn from. This file sets the two member shells (the
 * front door and the signed-in portal). The admin shell still wears bezel
 * (assets/bezel.css) until Broadside's admin structure is designed.
 *
 * It restyles the class vocabulary the pages already use (bezel's), so the
 * markup, the forms and every field name are unchanged by it. Identical on
 * every instance: it reads only `--accent`, `--accent-ink` and `--bg` from
 * tokens.css, which the manifest generates, and sets the rest itself.
 *
 * No inline styles anywhere (the CSP has no 'unsafe-inline'), no ids, no
 * `!important` outside the reduced-motion block.
 */

/* ---- type: Centurion, the house variable font ----------------------------
 * Kyle's kerned build of Ben Whitmore's Coelacanth, made variable by
 * lab/coelacanth/web/build.py (profile `broadside`) and named Centurion, as
 * the OFL requires (NAMING.md § centurion). Two files, roman and italic,
 * each cut into a core and an extension the browser fetches only for the
 * characters that need it. Two axes: weight (400 to 600) and optical size
 * in CSS px. Each role below names its cut on that axis, so a role keeps
 * the cut the design chose at any size: Display 80, Text 18.67, Caption 12. */
@font-face {
  font-family: "Centurion";
  src: url("/assets/broadside/Centurion-Roman.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2002-2006, U+2009-200A, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02, U+2190-2193, U+2766;
}
@font-face {
  font-family: "Centurion";
  src: url("/assets/broadside/Centurion-Roman-Ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0100-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+0218-021B, U+0259, U+02C7-02DD, U+0300-0308, U+030A-030C, U+0326-0328, U+2016-2017, U+2023-2025, U+2027-202F, U+2031, U+2034-2038, U+203B-2043, U+2045-205E, U+2070-209F, U+20A0-20C0, U+2100-214F, U+2194-2199, U+2153-215E, U+FB00, U+FB03-FB06;
}
@font-face {
  font-family: "Centurion";
  src: url("/assets/broadside/Centurion-Italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2002-2006, U+2009-200A, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02, U+2190-2193, U+2766;
}
@font-face {
  font-family: "Centurion";
  src: url("/assets/broadside/Centurion-Italic-Ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0100-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+0218-021B, U+0259, U+02C7-02DD, U+0300-0308, U+030A-030C, U+0326-0328, U+2016-2017, U+2023-2025, U+2027-202F, U+2031, U+2034-2038, U+203B-2043, U+2045-205E, U+2070-209F, U+20A0-20C0, U+2100-214F, U+2194-2199, U+2153-215E, U+FB00, U+FB03-FB06;
}

/* ---- ink and paper -------------------------------------------------------
 * Day: the instance's own paper (manifest `background`) and a near-black
 * ink. Night: one near-black sheet for every instance. The second ink is
 * the instance's accent, lifted toward the night ink after dark so it still
 * reads on the black sheet. Everything grey is a mix of ink and paper.
 */
:root {
  color-scheme: light dark;
  --paper: var(--bg);
  --ink: #131312;
  --second: var(--accent);
  --on-second: var(--accent-ink);

  --display: "Centurion", "Iowan Old Style", Palatino, Georgia, serif;
  --text: "Centurion", "Iowan Old Style", Palatino, Georgia, serif;
  --caption: "Centurion", "Iowan Old Style", Palatino, Georgia, serif;
  /* the optical-size cut each role sets, with its family (§ type above) */
  --display-cut: "opsz" 80;
  --text-cut: "opsz" 18.67;
  --caption-cut: "opsz" 12;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  /* 18.67px: the browser's 16px plus 2pt (Kyle, 2026-10-09). */
  font-size: 18.67px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0d0c;
    --ink: #ebeae5;
    --second: color-mix(in oklab, var(--accent) 50%, #ebeae5);
    --on-second: #0d0d0c;
  }
}

:root {
  --ink-2: color-mix(in oklab, var(--ink) 64%, var(--paper));
  --ink-3: color-mix(in oklab, var(--ink) 46%, var(--paper));
  --rule: color-mix(in oklab, var(--ink) 15%, var(--paper));
  --rule-2: color-mix(in oklab, var(--ink) 7%, var(--paper));
  --wash: color-mix(in oklab, var(--ink) 3.5%, var(--paper));
}

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

html {
  /* Room for a scrollbar on every page, so a short page and a long one
   * centre their column in the same place. */
  scrollbar-gutter: stable;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--text);
  font-variation-settings: var(--text-cut);
  font-size: 1.125rem;
  line-height: 1.5;
  font-feature-settings: "onum", "pnum", "liga", "kern";
  hanging-punctuation: first last;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition:
    color 0.2s,
    text-decoration-color 0.2s;
}

a:hover {
  color: var(--second);
  text-decoration-color: currentColor;
}

strong {
  font-weight: 600;
}

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

:focus-visible {
  outline: 1.5px solid var(--second);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.tabular,
.mono {
  font-feature-settings: "tnum", "lnum";
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: var(--ease);
}

/* Named so the front door (email → code → account) reads as one sheet
 * moving rather than three replacing each other. Each name appears at most
 * once per document, which is what the algorithm requires. */
.wordmark {
  view-transition-name: broadside-wordmark;
}

.auth-card {
  view-transition-name: broadside-auth-card;
}

/* ---- the masthead: the wordmark in the instance's ink, centred ---------- */
.wordmark {
  font-family: var(--display);
  font-variation-settings: var(--display-cut);
  font-size: 24.8px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--second);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--second);
}

.tagline {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-top: 0.2rem;
}

.portal-header,
.auth-brand {
  text-align: center;
  padding: 2.1rem 1.4rem 0;
}

.portal-header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4rem 1.6rem;
}

.portal-header-inner > .wordmark {
  flex-basis: 100%;
  margin-bottom: 0.2rem;
}

.portal-nav {
  display: contents;
}

.portal-nav a,
button.signout {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.6rem 0;
}

.portal-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--second);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.5em;
}

.portal-nav a:hover,
button.signout:hover {
  color: var(--ink);
}

.signout-form {
  display: inline;
  margin: 0;
}

button.signout {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---- the sheet ---------------------------------------------------------- */
.portal-main,
.auth-card {
  width: 100%;
  max-width: 35rem;
  margin: 0 auto;
  padding: 2rem 1.4rem 0;
}

.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* The head: kicker, title, italic lede, then the one strong stroke. */
.page-head,
.auth-card {
  text-align: center;
}

.page-head {
  padding-bottom: 1.9rem;
}

.page-head::after,
.auth-card > h1 + .auth-lead::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--ink);
  margin: 1.8rem auto 0;
}

.page-head .eyebrow {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--ink-2);
}

.page-head h1,
.auth-card > h1 {
  font-family: var(--display);
  font-variation-settings: var(--display-cut);
  font-size: clamp(44.8px, 8vw, 73.6px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0.4rem 0 0.7rem;
}

/* A name or an address as the title is long, and it is not a headline. */
.page-head h1.title-name {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.page-head .email,
.auth-lead {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 28rem;
  margin: 0 auto;
  overflow-wrap: anywhere;
}

/* An auth-lead that is not directly under a title (a second paragraph,
 * an error page) is plain reading text, still centred. */
.auth-card > .auth-lead + .auth-lead,
.auth-card > p + .auth-lead,
[data-passkey-door] > .auth-lead + .auth-lead {
  margin-top: 1rem;
}

/* The passkey offer's pitch sits under its title like any lede, and its
 * button a breath below the words. */
[data-passkey-door] > .auth-lead + .btn {
  margin-top: 1.6rem;
}

.auth-card > h1 + .auth-lead {
  margin-bottom: 2.4rem;
}

/* What a row is, in italic Caption — also the voice of a section's notes. */
.row-meta {
  margin-bottom: 1rem;
}

.panel-foot {
  margin-top: 1.2rem;
}

div.panel-foot {
  display: flex;
  justify-content: center;
}

.panel-foot form {
  margin: 0;
}

/* ---- rows: what it is over its value, the action set right -------------- */
.rows {
  margin: 0;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1.5rem;
  align-items: center;
  padding: 0.55rem 0;
}

.row + .row {
  border-top: 1px solid var(--rule-2);
}

.row-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-main > strong {
  font-family: var(--display);
  font-variation-settings: var(--display-cut);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
}

.row-meta {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.row-meta.agent {
  font-style: normal;
  color: var(--ink-3);
}

/* ---- sections ----------------------------------------------------------- */
/* A section starts on a heavier rule than the hairlines inside it, so the
 * account page reads as sections at a glance (Kyle, 2026-10-19). */
/* Twice the air between a section's rule and what it holds (Kyle,
 * 2026-10-19: "double the space between the rule and content"). */
.panel {
  padding: 2.6rem 0 1.5rem;
  border-top: 2px solid var(--ink-3);
}

.page-head + .panel,
.page-head + .notice + .panel,
.page-head + p + .panel {
  border-top: 0;
}

/* Twice the height they were (Kyle, 2026-10-19: "the titles like
 * membership, passkeys, etc should be about twice as tall"), so each
 * section announces itself; the tracking eases as the size grows. */
.panel > h2 {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--ink-2);
  text-align: center;
  margin-bottom: 0.8rem;
}

.panel > .row-meta,
.panel-foot {
  font-family: var(--text);
  font-variation-settings: var(--text-cut);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
}

.panel > .row-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.row-action > a:not(.btn),
.row-action .btn-link {
  display: inline-block;
  padding: 0.6rem 0 0.6rem 0.8rem;
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--second);
  text-decoration: none;
  white-space: nowrap;
}

.row-action > a:not(.btn):hover,
.row-action .btn-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.row-action form {
  margin: 0;
}

/* A row's action is a word or two: it keeps its natural width rather than
 * taking the wrapping the long-address buttons need. */
.row-action .btn {
  flex: none;
  overflow-wrap: normal;
}

.tier-options {
  flex-direction: column;
  align-items: stretch;
}

/* ---- the tier badge: small capitals, no box ----------------------------- */
.badge {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--ink-2);
}

.badge-tier {
  font-family: var(--display);
  font-variation-settings: var(--display-cut);
  font-size: 1.6rem;
  letter-spacing: 0;
  font-feature-settings: "onum", "pnum", "liga", "kern";
  color: var(--second);
}

.badge + .badge::before {
  content: "· ";
  color: var(--ink-3);
}

/* ---- buttons ------------------------------------------------------------ */
.btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  font-feature-settings: "c2sc", "smcp", "onum";
  line-height: 1.3;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.95rem 2rem;
  border-radius: 0;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.2s var(--ease),
    background 0.3s,
    color 0.3s,
    border-color 0.3s,
    opacity 0.3s;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--second);
  border-color: var(--second);
  color: var(--on-second);
}

.btn-primary:hover {
  color: var(--on-second);
  border-color: var(--second);
  background: color-mix(in oklab, var(--second) 88%, var(--ink));
}

.btn-quiet {
  background: transparent;
}

.btn-danger {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-danger:hover {
  color: var(--paper);
}

.btn-small {
  font-size: 0.85rem;
  padding: 0.6rem 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.55;
  cursor: default;
}

.btn-icon {
  flex: none;
}

/* A link-shaped button: a form that only needs to look like a link. */
.btn-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.btn-link:hover {
  color: var(--second);
  text-decoration-color: currentColor;
}

/* ---- fields: a label over a single underline ---------------------------- */
label {
  display: block;
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.field,
.auth-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.3rem;
}

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

.input,
.code-field,
textarea.input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.55rem 0;
  outline: none;
  transition: border-color 0.3s;
}

.auth-field .input {
  font-size: 1.3rem;
  text-align: center;
}

/* The newsletter box under the email field: the sentence is the target too. */
.auth-check {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.6rem;
  margin: -0.3rem 0 1.4rem;
  font-size: 0.95rem;
  color: var(--ink-2);
  cursor: pointer;
}

.input:focus,
.code-field:focus {
  border-color: var(--second);
}

.input::placeholder,
.code-field::placeholder {
  color: var(--ink-3);
}

.input.invalid,
.code-field.invalid {
  border-color: var(--ink);
}

textarea.input {
  field-sizing: content;
  min-height: 4.5rem;
  resize: none;
}

/* The six digits: one field, set large in lining figures. */
.code-field {
  font-family: var(--display);
  font-variation-settings: var(--display-cut);
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.35em;
  font-feature-settings: "lnum", "tnum";
  caret-color: var(--second);
}

.field-hint {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* There is no red. An error is said in italic, in full ink, under the
 * thing that failed. */
.field-error {
  font-style: italic;
  color: var(--ink);
  font-size: 0.95rem;
}

form > .btn-block,
.auth-card > form > .btn {
  margin-top: 0.4rem;
}

/* ---- notices: a sentence between hairlines ------------------------------ */
.notice {
  font-style: italic;
  text-align: center;
  color: var(--ink);
  padding: 0.8rem 0;
  margin: 0 0 1.6rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.notice-ok {
  color: var(--second);
}

/* ---- the front door's particulars --------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.6rem 0;
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}

.fineprint {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-3);
  text-align: center;
  margin-top: 1.6rem;
}

/* An instance's welcome under the sign-in door: reading text, set off
 * by a short rule like the one under the title. */
.auth-note {
  max-width: 28rem;
  margin: 2.6rem auto 0;
  text-align: left;
}

.auth-note::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--ink);
  margin: 0 auto 2rem;
}

.auth-note p {
  margin: 0 0 1rem;
}

.auth-note-links {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  text-align: center;
}

.auth-note-links li + li {
  margin-top: 0.5rem;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4rem 1.4rem;
  margin-top: 1.6rem;
  font-size: 0.95rem;
}

.auth-links form {
  display: inline;
  margin: 0;
}

/* The verification words, at the foot under "Send a new code" (Kyle,
 * 2026-11-07): a nice extra check, not a step, so quiet — body face,
 * second ink only on the words, nothing louder than the links above. */
.auth-phrase {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.4rem;
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.auth-phrase-label {
  font-style: italic;
}

.auth-phrase-words {
  font-weight: 400;
  font-style: italic;
  color: var(--second);
}

/* ---- empty, disclosure, the address, the way out ------------------------ */
.empty {
  text-align: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.empty p {
  font-style: italic;
  color: var(--ink-2);
  max-width: 26rem;
}

.disclosure {
  margin-top: 1.2rem;
  text-align: center;
}

.disclosure > summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--ink-2);
  padding: 0.6rem 0;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary::after {
  content: " +";
  color: var(--ink-3);
}

.disclosure[open] > summary::after {
  content: " –";
}

.disclosure > summary:hover {
  color: var(--ink);
}

.disclosure > form {
  margin-top: 1.2rem;
  text-align: left;
}

.disclosure .field {
  margin-bottom: 1rem;
}

.disclosure .field label {
  text-align: left;
}

.address-block {
  font-style: normal;
  line-height: 1.45;
}

/* ---- a row edited in place: the value becomes its own field ------------ *
 * Edit mode is unmistakable (Kyle, 2026-10-19: "the design should show it
 * more clearly in edit mode"): the row lifts onto a wash of the second ink,
 * with a rule of it down the left, a small-capital label, and the field's
 * underline drawn in the second ink. */
.rows > .editable {
  border-top: 1px solid var(--rule-2);
}

.editable.is-editing {
  background: color-mix(in oklab, var(--second) 9%, var(--paper));
  box-shadow: inset 2px 0 0 var(--second);
  margin: 0.35rem -0.9rem;
  padding: 0.35rem 0.9rem 0.45rem;
  border-top-color: transparent;
}

.editable.is-editing + .row {
  border-top-color: transparent;
}

.editable-label {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--second);
  margin-bottom: 0.15rem;
}

.input-inline {
  font-size: inherit;
  line-height: inherit;
  padding: 0.1rem 0 0.2rem;
  border-bottom: 2px solid var(--second);
}

.editable-form .row-meta {
  margin-top: 0.3rem;
}

.editable-form .row-action {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* ---- mailings: the address, dense (Kyle, 2026-10-19) -------------------- */
.address-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.2rem;
  text-align: left;
}

.address-form > .field {
  grid-column: 1 / -1;
  gap: 0.1rem;
  margin: 0;
}

.address-form > .field-half {
  grid-column: auto;
}

.address-form label {
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-feature-settings: "c2sc", "smcp";
}

.address-form .input {
  font-size: 1.05rem;
  line-height: 1.3;
  height: auto;
  padding: 0.1rem 0 0.25rem;
}

.address-form > .btn,
.address-form > .field-error {
  grid-column: 1 / -1;
}

.address-form > .btn {
  margin-top: 0.6rem;
}

.mailing-address {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.3;
}

.mailing .disclosure {
  margin: 0.4rem 0 0.8rem;
}

.mailing .disclosure > form {
  margin-top: 0.6rem;
}

.mailing-remove {
  text-align: center;
  margin-top: 0.7rem;
}

.mailing-remove .btn-link {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.85rem;
}

.mailing > .panel-foot {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.danger {
  text-align: center;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
}

.danger::after {
  content: "❦";
  display: block;
  font-style: normal;
  font-size: 1.2rem;
  color: var(--ink-3);
  margin-top: 2.2rem;
}

/* ---- checkboxes (the deletion page, any consent) ------------------------ */
input[type="checkbox"] {
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  flex: none;
  margin: 0.3rem 0 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  vertical-align: -0.1em;
  transition:
    background 0.2s,
    border-color 0.2s;
}

input[type="checkbox"]:checked {
  background: var(--second);
  border-color: var(--second);
}

input[type="checkbox"]:checked::after {
  content: "";
  width: 0.3rem;
  height: 0.55rem;
  border: solid var(--on-second);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(45deg);
}

/* ---- the footer: wordmark, the fine print, and a colophon --------------- */
.portal-foot,
.auth-foot {
  margin-top: auto;
  padding: 4rem 1.4rem 3rem;
  text-align: center;
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.portal-foot a,
.auth-foot a {
  color: var(--ink-3);
  text-decoration: none;
}

.portal-foot a:hover,
.auth-foot a:hover {
  color: var(--ink);
}

.colophon {
  margin-top: 0.3rem;
}

/* ---- arrival: the head and the sections rise into place ----------------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.portal-main > *,
.auth-card > * {
  animation: rise 0.6s var(--ease) both;
}

.portal-main > :nth-child(2),
.auth-card > :nth-child(2) {
  animation-delay: 0.05s;
}

.portal-main > :nth-child(3),
.auth-card > :nth-child(3) {
  animation-delay: 0.1s;
}

.portal-main > :nth-child(4),
.auth-card > :nth-child(4) {
  animation-delay: 0.15s;
}

.portal-main > :nth-child(n + 5),
.auth-card > :nth-child(n + 5) {
  animation-delay: 0.2s;
}

/* ---- the phone ---------------------------------------------------------- */
@media (max-width: 640px) {
  .portal-header-inner {
    gap: 0.2rem 1rem;
  }

  .portal-header-inner {
    gap: 0.1rem 0.8rem;
  }

  /* One line, edge to edge: the words share the width instead of each
   * keeping a gap that pushes the last one onto a second line. */
  .portal-nav {
    display: flex;
    flex-basis: 100%;
    justify-content: center;
    gap: 0 0.55rem;
  }

  .portal-nav a {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  /* Editing in place on a phone: the field takes the width, and Cancel and
   * Save sit under it, on the right. */
  .editable-form {
    grid-template-columns: 1fr;
  }

  .editable-form .row-action {
    justify-content: flex-end;
  }

  /* A row with a long action (a button with a sentence on it) stacks; a
   * row whose action is a word keeps it on the right, where the thumb is. */
  .row.row-stack {
    grid-template-columns: 1fr;
  }

  .row.row-stack .row-action {
    justify-content: flex-start;
  }

  .tier-options {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Reduced motion, carried from bezel unchanged: the member who asked their
 * OS for less motion overrules every author style, including ones not yet
 * written. The transition is off, not the navigation. */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  *,
  *::before,
  *::after {
    /* biome-ignore lint/complexity/noImportantStyles: overruling every author animation is the point */
    animation-duration: 1ms !important;
    /* biome-ignore lint/complexity/noImportantStyles: overruling every author animation is the point */
    animation-delay: 0s !important;
    /* biome-ignore lint/complexity/noImportantStyles: overruling every author animation is the point */
    animation-iteration-count: 1 !important;
    /* biome-ignore lint/complexity/noImportantStyles: overruling every author transition is the point */
    transition-duration: 1ms !important;
    /* biome-ignore lint/complexity/noImportantStyles: overruling author smooth-scroll is the point */
    scroll-behavior: auto !important;
  }
}

/* ---- the system, 2026-10-19 design pass ---------------------------------- */
.auth-lead,
.panel-foot,
.notice,
.empty p,
.page-head .email {
  text-wrap: balance;
}

/* Sign out sits at the foot of every signed-in page. */
.portal-foot .signout-form {
  display: block;
  margin-bottom: 1.1rem;
}

.portal-foot button.signout {
  font-style: normal;
  font-size: 1.2rem; /* half again (Kyle, 2026-10-19) */
  letter-spacing: 0.1em;
  color: var(--ink-2);
  padding: 0.5rem 0;
}

/* Inside a row, a note sits under its line with no margin of its own; the
 * row's padding is the spacing (the 1rem below is for notes between
 * sections). */
.row .row-meta {
  margin-bottom: 0;
}

/* A button is upright wherever it sits, even inside an italic note. */
.btn {
  font-style: normal;
}

/* A badge beside a row's title keeps its distance. */
.row-main > .badge:not(:first-child) {
  margin-left: 0.6rem;
  vertical-align: 0.1em;
}

/* A second badge follows its dot, not the badge's own margin. */
.row-main > .badge + .badge {
  margin-left: 0.25rem;
}

/* A sentence that starts mid-thought ("a gift, with no end date") still
 * starts with a capital. */
.row-meta.sentence-start::first-letter {
  text-transform: uppercase;
}

/* The prices: one column of equal buttons, a breath apart. */
.row-action.tier-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tier-options form,
.tier-options .btn {
  width: 100%;
}

/* The ways to join, under what the member has: a hairline, then a small
 * heading in the same voice as a section's. */
.offers {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-2);
}

.offers-head {
  font-family: var(--caption);
  font-variation-settings: var(--caption-cut);
  font-weight: 400;
  font-size: 1.3rem; /* bigger (Kyle, 2026-10-19), still under the 1.7rem section title */
  letter-spacing: 0.1em;
  font-feature-settings: "c2sc", "smcp";
  color: var(--second);
  text-align: center;
  margin: 0 0 0.6rem;
}

.offers > .row-meta {
  text-align: center;
  margin-bottom: 0.6rem;
}

/* A section that ends on its rows ends there, not a breath later. */
.panel:has(> .rows:last-child) {
  padding-bottom: 0.9rem;
}

/* A button that asks once: armed, it turns to the ink and says what will
 * happen, and a second press does it. */
.is-armed {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn[aria-busy="true"] {
  cursor: progress;
}
