/* Jaybird Digital - customer portal stylesheet (every signed-in page; the guest booking page has its own copy).

   One file, in this order: tokens, base, controls, components, then the page and area sections that use them.
   The standard (tokens, components with markup, do and don't) is docs/core/portal-ui-standard.md; read it before
   adding a rule here. In short: use a token, never a literal; use a component, never a one-off; flat and
   hairline, not gradient and shadow; a card never holds a bordered box that holds a bordered box.

   Every class name here is referenced by the portal JS and HTML; restyle, do not rename. */

/* A class that sets `display` would otherwise beat the hidden attribute (the Convenience offer showed to
   owners who already had it). One rule here, so no class needs its own [hidden] patch. */
[hidden] { display: none !important; }

@view-transition { navigation: auto; }

/* ---- Tokens -------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Surfaces: a cool-tinted page, white cards, two quiet fills */
  --bg: #f3f5f7;
  --bg-top: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef2f5;

  /* Ink */
  --ink: #17202b;
  --ink-2: #3a4653;
  --muted: #5f6b78;

  /* Lines. Three only: --line is the hairline (dividers, card edges); --line-2 a stronger divider or hover edge;
     --line-control outlines inputs, selects, secondary buttons, checkboxes and switches (3.5:1 on white, 3.1:1 on
     the page background and on --surface-3, so a control stays visible on a tinted panel too). */
  --line: #e1e6eb;
  --line-2: #cbd3db;
  --line-control: #7f8b98;

  /* Jaybird navy: the single accent */
  --metal: #174b70;
  --metal-hi: #245d81;
  --metal-lo: #123c5c;
  --metal-ink: #f2f7fb;
  --on-accent: #ffffff;

  /* Status tones: ink, fill and edge. Used by .chip, .portal-note and the status lines. */
  --ok: #2e6b45;
  --ok-bg: #e7f3ec;
  --ok-line: #b5d6c1;
  --warn: #7a4f0c;
  --warn-bg: #fbf0d9;
  --warn-line: #e6cf9e;
  --err: #a33a30;
  --err-lo: #8a2e25;
  --err-bg: #fbebe9;
  --err-line: #e9bcb7;
  --info: #174b70;
  --info-bg: #e6eff6;
  --info-line: #b9cfe0;

  /* Terminal panels (a command to copy) */
  --code-bg: #1d2b36;
  --code-ink: #e8eef3;

  /* The scrim behind a dialog */
  --scrim: rgba(20, 32, 50, 0.42);

  /* Corners. Cards, panels, dialogs and menus are --radius; buttons, inputs, selects, rows and tiles are
     --radius-sm; chips, badges, tags and small tiles are --radius-xs. Pill is for switches, avatars, dots. */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --radius-pill: 999px;

  /* Controls: 40px on a desktop pointer, 44px on touch and phones (stops the iOS focus zoom too) */
  --control-h: 40px;
  --control-h-sm: 32px;
  --control-pad-x: 12px;
  --fs-control: var(--fs-md);

  /* A quiet button's label sits in from its edge by its padding plus its transparent 1px border. --quiet-offset is minus
     that, so margin-left: var(--quiet-offset) puts the label of a quiet button that starts a line under the text above
     it, and margin-right: var(--quiet-offset) puts the label of one that ends a line at the content edge. */
  --quiet-pad-x: 10px;
  --quiet-offset: calc(-1px - var(--quiet-pad-x));

  /* Focus: a real outline, never removed */
  --focus: 2px solid var(--metal);
  --focus-offset: 2px;

  /* Elevation: flat by default. --shadow-sm only where a card must sit above the page, --shadow-pop for
     menus, popovers and dialogs. --shadow and --sheen are kept so older rules resolve. */
  --shadow-sm: 0 1px 2px rgba(18, 28, 42, 0.06);
  --shadow-pop: 0 8px 24px rgba(18, 28, 42, 0.14);
  --shadow: var(--shadow-pop);
  --sheen: transparent;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.875rem;
  --fs-lg: 1rem;
  --fs-h2: 1.0625rem;
  --fs-xl: 1.375rem;
  --fs-h1: 1.75rem;

  --agent-panel-width: 400px;
}

@media (pointer: coarse), (max-width: 640px) {
  :root {
    --control-h: 44px;
    --control-h-sm: 40px;
    --fs-control: 1rem;
  }
}

@media (max-width: 640px) {
  :root { --fs-h1: 1.375rem; --agent-panel-width: 100vw; }
}

/* ---- Base ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.portal-body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-md) / 1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3, h4 { font-size: var(--fs-md); }

a:where(:not([class])) { color: var(--metal); text-underline-offset: 3px; }
/* <small> would otherwise shrink to 11.8px (a browser default of `smaller`); nothing in the portal is under 12px. */
small { font-size: var(--fs-xs); }

/* Keyboard focus: one rule for everything that can take it. */
:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }

/* A plain disclosure summary is a tap target: without this it is 19 to 21px tall. */
:where(summary) { padding-block: 6px; }
@media (pointer: coarse), (max-width: 640px) {
  :where(summary) { padding-block: 10px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Shell --------------------------------------------------------------- */

.portal-shell {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.portal-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-copy, .portal-small { color: var(--muted); line-height: 1.5; }
.portal-small { font-size: var(--fs-sm); }

/* ---- Controls ------------------------------------------------------------ */

/* Buttons. White with a control outline is the default; .primary is the one solid navy action on a screen. */
.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 8px 16px;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: 600 var(--fs-md) / 1.25 var(--font);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.portal-button:hover:not(:disabled) { border-color: var(--ink-2); background: var(--surface-2); }

.portal-button.primary { border-color: var(--metal); background: var(--metal); color: var(--on-accent); }
.portal-button.primary:hover:not(:disabled) { border-color: var(--metal-lo); background: var(--metal-lo); }

.portal-button.sm { min-height: var(--control-h-sm); padding: 4px 12px; }
.portal-button.icon { width: var(--control-h); padding: 0; }
.portal-button.icon.sm { width: var(--control-h-sm); }

/* A text action in a row: no outline, hover tint, still a 32px target. Replaces underlined action links. */
.portal-button.quiet { min-height: var(--control-h-sm); padding: 4px var(--quiet-pad-x); border-color: transparent; background: transparent; color: var(--metal); }
.portal-button.quiet:hover:not(:disabled) { border-color: transparent; background: var(--surface-3); }
.portal-button.icon.quiet { padding: 0; }

.portal-button.danger, .portal-button-danger { border-color: var(--err-line); color: var(--err); }
.portal-button.danger:hover:not(:disabled), .portal-button-danger:hover:not(:disabled) { border-color: var(--err); background: var(--err-bg); }
.portal-button.quiet.danger { border-color: transparent; }
.portal-button.primary.danger { border-color: var(--err); background: var(--err); color: var(--on-accent); }
.portal-button.primary.danger:hover:not(:disabled) { border-color: var(--err-lo); background: var(--err-lo); }

/* A toggle button that is on (aria-pressed or aria-checked) wears the accent outline and text, as a selected segment does. */
.portal-button[aria-pressed="true"]:not(.primary):not(:disabled), .portal-button[aria-checked="true"]:not(.primary):not(:disabled) { border-color: var(--metal); color: var(--metal); }

/* Disabled is a flat grey button with muted text, never a faded copy of the live one: a faded primary reads as
   half active. Listed per variant so each one beats its own tone rule above. */
.portal-button:disabled, .portal-button[aria-disabled="true"],
.portal-button.primary:disabled, .portal-button.primary[aria-disabled="true"],
.portal-button.danger:disabled, .portal-button.danger[aria-disabled="true"],
.portal-button.primary.danger:disabled, .portal-button.primary.danger[aria-disabled="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}
.portal-button.quiet:disabled, .portal-button.quiet[aria-disabled="true"],
.portal-button.quiet.danger:disabled { border-color: transparent; background: transparent; }

/* A button that is a grid item would stretch the whole width of its cell (Manage plan, Save, Continue). Keep it
   its own width on a desktop pointer; a feature that wants a full-width button sets width: 100% or its own
   justify-self. Phones keep the stretch: a full-width action is what a thumb wants there. */
@media (min-width: 641px) {
  :where(.portal-button) { justify-self: start; }
}

.portal-button.sso-button { width: 100%; margin-bottom: 8px; }

.portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* A link that acts like a button: inline text with an underline and a 24px minimum target. */
.portal-link-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-top: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-md);
  text-decoration: underline;
  text-decoration-color: var(--line-control);
  text-underline-offset: 3px;
}
.portal-link-button:hover { color: var(--ink); text-decoration-color: currentColor; }
.portal-link-button.danger { color: var(--err); }
.portal-link-button.with-icon { gap: 6px; }

/* Inputs, selects and textareas share one recipe. It is :where() so it has no specificity of its own: a
   feature's own rule still wins, and a page that wants the standard control just deletes its copy. */
:where(button, input, select, textarea) { font-family: var(--font); }

:where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
  select:not([multiple]):not([size]),
  select[size="1"]
) {
  min-width: 0;
  max-width: 100%;
  height: var(--control-h);
  padding: 0 var(--control-pad-x);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--fs-control);
  font-weight: 400;
  line-height: 1.3;
}
:where(textarea, select[multiple], select[size]:not([size="1"])) {
  min-width: 0;
  max-width: 100%;
  padding: 10px var(--control-pad-x);
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--fs-control);
  line-height: 1.45;
}
:where(textarea) { min-height: 96px; resize: vertical; }

/* The chevron has to out-rank a feature's own `background:` shorthand, so it is not :where(). */
select:not([multiple]):not([size]), select[size="1"] {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23174b70' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  text-overflow: ellipsis;
}

:where(input, select, textarea)::placeholder { color: var(--muted); opacity: 1; }
:where(input, select, textarea):where(:hover:not(:disabled)) { border-color: var(--ink-2); }
:where(input, select, textarea):where(:focus-visible) { border-color: var(--metal); }
:where(input, select, textarea):where(:disabled) { background-color: var(--surface-2); color: var(--muted); cursor: not-allowed; }
:where(input, select, textarea)[aria-invalid="true"] { border-color: var(--err); }

.sm:where(input, select) { height: var(--control-h-sm); }

/* Phones and touch: 16px, so iOS Safari does not zoom the page when a field takes focus. A feature rule with
   `font: inherit` would inherit the 14px body size and out-rank the token, so this is the one !important in the
   controls; delete a feature's own font rule as its page is restyled and this stays a safety net. */
@media (pointer: coarse), (max-width: 640px) {
  :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
    select,
    textarea
  ) { font-size: 1rem !important; }
}

/* Plain checkboxes and radios take the accent; .check below draws the portal's own. */
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--metal); }
/* Until a page adopts .check or .switch, a plain checkbox is still 18px, not the browser's 13px. */
:where(input[type="checkbox"]:not(.check):not(.switch), input[type="radio"]:not(.check):not(.switch)) { flex: none; width: 18px; height: 18px; }
:where(input[type="range"]) { accent-color: var(--metal); }

/* .check: 18px box with a control-strength outline and a navy fill when on. Radios are .check too. */
.check {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--line-control);
  border-radius: var(--radius-xs);
  background: var(--surface) center / 12px no-repeat;
  cursor: pointer;
}
.check[type="radio"] { border-radius: 50%; }
.check:hover:not(:disabled) { border-color: var(--ink-2); }
.check:checked { border-color: var(--metal); background-color: var(--metal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='m2.5 6.4 2.4 2.4 4.6-5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check[type="radio"]:checked { background-image: none; box-shadow: inset 0 0 0 3px var(--surface); }
/* Some of a set are chosen (a select-all box over a table): a dash, not a tick. Listed after :checked and more specific than :hover, so it wins.
   Checkboxes only: a radio group with nothing chosen is also :indeterminate and must stay an empty circle. */
input.check[type="checkbox"]:indeterminate { border-color: var(--metal); background-color: var(--metal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 6h6' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.check:disabled { opacity: 0.5; cursor: not-allowed; }

/* .switch: 36x20, role="switch", for settings that save the moment they change. */
.switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.switch::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.switch:checked { border-color: var(--metal); background: var(--metal); }
.switch:checked::before { background: var(--on-accent); transform: translateX(16px); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }

@media (forced-colors: active) {
  .check, .switch, select:not([multiple]):not([size]), select[size="1"] { -webkit-appearance: auto; appearance: auto; background-image: none; }
  .switch::before { display: none; }
}

/* ---- Components ---------------------------------------------------------- */

/* Card: flat, white, one hairline. It holds rows and groups; it never holds a bordered box that holds a bordered box. */
.portal-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.portal-card.compact { padding: 16px; }
.portal-card.flush { padding: 0; overflow: hidden; }
/* Cards that sit one after another in a page's column are 16px apart. */
.portal-shell > .portal-card + .portal-card, .portal-shell > .portal-card + .portal-note, .portal-shell > .portal-note + .portal-card { margin-top: var(--space-4); }
.portal-card h1 { margin: 0 0 8px; }
.portal-card h2 { margin: 0 0 12px; font-size: var(--fs-h2); }
.portal-card > :last-child { margin-bottom: 0; }

/* Section head: the title of a card or a block, with its note and actions. No eyebrow. */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.section-head > div { min-width: 0; }
.section-head > div:first-child { flex: 1 1 12rem; }
.section-head h2 { margin: 0; font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.01em; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.section-head-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.section-count { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }

/* Group: a titled run of rows inside a card. Groups are told apart by a hairline and the gap, never by a box. */
.group + .group { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.group-title { margin: 0 0 4px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.section-head + .group { margin-top: 0; }
/* A title that names a part of a form, not a run of option rows: larger and in ink, so it does not read as a field label. */
.group-title.is-section { margin-bottom: var(--space-2); color: var(--ink); font-size: var(--fs-lg); }
/* The parts of a group stack with one gap, so a title, a note, a banner and a button need no spacing of their own. The title
   sits closer to what it names, and option rows and disclosures draw their own hairlines instead of a gap. */
.group > * + * { margin-top: var(--space-3); }
.group > .group-title + * { margin-top: var(--space-2); }
.group > :is(.option-row, .more) + :is(.option-row, .more), .group > .group-title + :is(.option-row, .more) { margin-top: 0; }
/* A group title with an action at its right ("To review" and its button). */
.group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 var(--space-2); }
.group-head .group-title { display: flex; align-items: center; gap: 8px; margin: 0; }
/* A fieldset used as a group has no box of its own. When its legend is a group title, the legend floats: it is an ordinary
   row of the group, so the hairline above the group runs unbroken instead of passing through the legend. */
fieldset.group { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset > legend.group-title { float: left; width: 100%; padding: 0; }
fieldset > legend.group-title + * { clear: both; }
/* A label with where its value came from at the right ("Business name", "From your website"). */
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.field-source { color: var(--muted); font-weight: 400; line-height: 1.3; }

/* Option row: the whole row is the label. Switch at the end for instant-save settings, check at the start for
   form choices. A chip may follow the title; a long effect goes in .option-desc or a .more under the row. */
.option-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 10px 0;
  cursor: pointer;
}
.option-row:has(> .check:first-child) { align-items: flex-start; gap: 12px; }
.option-row:has(> .check:first-child) > .check { margin-top: 1px; }
.option-row + .option-row, .option-row + .more, .more + .option-row { border-top: 1px solid var(--line); }
.option-copy { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.option-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink); font-size: var(--fs-md); font-weight: 600; }
.option-desc { color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }
.option-row:has(:disabled), .option-row.is-disabled { cursor: not-allowed; }
/* A disabled row says so in its title colour (a chip beside it keeps its own), and the reason below stays full strength. */
.option-row:has(:disabled) > .option-copy > .option-title, .option-row.is-disabled > .option-copy > .option-title { color: var(--muted); }
.option-title > .chip { align-self: center; }
/* A button at the end of a row (Go live) keeps its label on one line. */
.option-row > .portal-button { flex: none; white-space: nowrap; }

/* More: a disclosure. A summary row with a chevron, no box; .is-boxed gives it one for Advanced and Insights. */
.more > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: var(--fs-md);
  font-weight: 600;
  list-style: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 3px 3px auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.more[open] > summary::after { margin-bottom: 0; margin-top: 3px; transform: rotate(-135deg); }
.more > summary:hover { color: var(--metal); }
.more-body { padding: 12px 0; border-top: 1px solid var(--line); }
.more-body > :last-child { margin-bottom: 0; }
.more.is-boxed { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.more.is-boxed > summary { min-height: 48px; padding: 0 16px; border-radius: var(--radius); }
.more.is-boxed > summary:hover { background: var(--surface-2); }
.more.is-boxed > .more-body { padding: 12px 16px 16px; }
/* A small disclosure for a table cell: a 32px summary (40px on touch). */
.more.sm > summary { min-height: var(--control-h-sm); font-size: var(--fs-sm); font-weight: 500; }
/* A muted gist in a summary, after its title: what is inside, or the first of what is inside. */
.more-hint { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--muted); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }

/* Chip: a status or count, 22px, never a button. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.chip.ok, .chip[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.chip.warn, .chip[data-tone="warn"] { background: var(--warn-bg); color: var(--warn); }
.chip.err, .chip[data-tone="err"] { background: var(--err-bg); color: var(--err); }
.chip.info, .chip[data-tone="info"] { background: var(--info-bg); color: var(--info); }
.chip.dot::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* A chip the page fills in later (a count, a role) draws nothing until it has words. */
.chip:empty { display: none; }

/* Menu: a popover of text rows, 40px each (44px on touch and phones), sections told apart by a hairline. */
.menu {
  width: 280px;
  max-width: calc(100vw - 24px);
  padding: 4px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.menu-section { padding: 4px 0; }
.menu-section + .menu-section { border-top: 1px solid var(--line); }
/* A section a menu has nothing for (the destructive one) takes no padding and draws no hairline. */
.menu-section:empty { display: none; }
.menu-section-title { margin: 0; padding: 6px 12px 2px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
/* The account menu's one switch (Email from Jaybird): the row lines up with the menu's items. */
.user-menu-notes .option-row { padding: 6px 12px; }
.user-menu-notes .portal-status { margin: 0; padding: 0 12px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--control-h);
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: 500 var(--fs-md) / 1.3 var(--font);
  text-align: left;
  text-decoration: none;
}
.menu-item:hover { background: var(--surface-3); }
.menu-item[aria-current="true"], .menu-item[aria-current="page"] { color: var(--metal); font-weight: 600; }
.menu-item.danger { color: var(--err); }
.menu-item:focus-visible { outline-offset: -2px; }

/* Row list: tools, insights, plans, handovers. One bordered group, hairlines between rows. A row is an <a>,
   a <button> or a plain element; wrap it in <li> when the list is a <ul>.
   The hairlines are each row's own top and left edge, pulled over its neighbour's by a 1px negative margin and clipped
   at the group's edge, so they stay right when a row is hidden (a module that is off) or the last row stands alone. */
.row-list { display: grid; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); list-style: none; }
.row-list > * { margin: -1px 0 0 -1px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; color: inherit; text-decoration: none; }
button.row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
a.row:hover, button.row:hover { background: var(--surface-2); }
.row:focus-visible { outline-offset: -2px; }
.row-icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--metal); }
.row-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.row-copy { display: grid; flex: 1 1 auto; gap: 1px; min-width: 0; }
.row-title { color: var(--ink); font-size: var(--fs-md); font-weight: 600; }
.row-desc { overflow: hidden; color: var(--muted); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.row-desc.is-wrap { overflow: visible; white-space: normal; }
.row-chevron { flex: none; width: 7px; height: 7px; margin-right: 4px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
/* A row that is a disclosure: a .more as a direct child of the list, with the row's own side padding. */
.row-list > .more > summary { padding: 0 14px; }
.row-list > .more > summary:hover { background: var(--surface-2); }
.row-list > .more > summary:focus-visible { outline-offset: -2px; }
.row-list > .more > .more-body { padding: 12px 14px 14px; }
/* A list whose rows open a menu or popover must not clip it. Without the clip the rows' own top and left edges would draw
   outside the group, so the dividers are plain ones between rows instead. */
.row-list.is-open-menus { overflow: visible; }
.row-list.is-open-menus > * { margin: 0; border-top: 0; border-left: 0; }
.row-list.is-open-menus > * + * { border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .row-list.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* One row alone fills the group instead of leaving the other half empty. */
  .row-list.two-col:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
}

/* Segmented control: 2 to 5 views of the same thing. Selected is aria-selected, aria-pressed or .is-active. */
.seg, .auth-tabs, .obs-range {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}
.seg > button, .seg > a, .auth-tab, .obs-range-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font: 600 var(--fs-sm) / 1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
}
.seg > button:hover, .seg > a:hover, .auth-tab:hover, .obs-range-btn:hover { color: var(--ink); }
/* The selected segment is told apart by a navy outline and navy text, not by a white fill alone (white on the
   grey track is 1.2:1, too faint for a state). */
.seg > [aria-selected="true"], .seg > [aria-pressed="true"], .seg > .is-active, .seg > [aria-current="page"],
.auth-tab[aria-selected="true"], .obs-range-btn.is-active { border-color: var(--metal); background: var(--surface); color: var(--metal); }
.seg > :focus-visible, .auth-tab:focus-visible, .obs-range-btn:focus-visible { outline-offset: -2px; }
.seg.fill, .auth-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
/* Tabs: the segments are taller, so the whole control is a full control height (40px; 44px on touch and phones). */
.seg.tabs > button, .seg.tabs > a { min-height: calc(var(--control-h) - 6px); }
/* Shrink to the segments, even as a grid or column item (it would stretch the width of its cell); .fill opts out. */
.seg:not(.fill), .obs-range { width: fit-content; max-width: 100%; justify-self: start; overflow-x: auto; }
.auth-tabs { margin: 16px 0 20px; }
/* The sign-in tabs are the page's one primary control: a full control height. */
.auth-tab { min-height: var(--control-h); }
@media (pointer: coarse), (max-width: 640px) {
  .seg > button, .seg > a, .obs-range-btn { min-height: var(--control-h-sm); }
}

/* Notes and status lines: a message in place. Tones are ok, warn, err and info. */
.portal-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.portal-note > :last-child { margin-bottom: 0; }
.portal-note strong { color: var(--ink); }
.portal-note.ok { border-color: var(--ok-line); background: var(--ok-bg); }
.portal-note.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.portal-note.err { border-color: var(--err-line); background: var(--err-bg); }
.portal-note.info { border-color: var(--info-line); background: var(--info-bg); }

.portal-status { min-height: 1.2em; font-size: var(--fs-sm); font-weight: 600; }
/* An empty live region takes no space, but stays in the page so what is written into it later is still announced. */
.portal-status:empty { min-height: 0; }
.portal-status.success, .portal-status.error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.portal-status.success { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.portal-status.error { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
/* A message that has been cleared draws no box and takes no space, whatever its tone; it stays in the page. */
.portal-status.success:empty, .portal-status.error:empty { min-height: 0; margin: 0; padding: 0; border: 0; background: none; }
.portal-status[data-tone="ok"] { color: var(--ok); }
.portal-status[data-tone="warn"] { color: var(--warn); }

/* Field: a label above one control. .form-grid lays fields out two to a row; .address-grid is City | State | ZIP. */
.portal-field, .field {
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 12px 0;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}
.portal-field input:not([type="checkbox"]):not([type="radio"]), .portal-field select, .portal-field textarea,
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { width: 100%; font-weight: 400; }
.field-hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; line-height: 1.4; }
.field-error { margin: 0; color: var(--err); font-size: var(--fs-sm); font-weight: 500; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid > .full { grid-column: 1 / -1; }
.form-grid > .portal-field, .form-grid > .field, .address-grid > .portal-field, .address-grid > .field { min-width: 0; margin: 0 0 12px; }
.address-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Toolbar: a search, filters and actions on one wrapping row. */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar > .grow { flex: 1 1 220px; min-width: 0; }
/* A wrapper around a segmented control may shrink, so the control scrolls inside itself instead of the page. */
.toolbar > :has(> .seg) { min-width: 0; max-width: 100%; }

/* Table: for records people compare. A bordered wrap, a quiet head, hairline rows. */
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data-table, .admin-data-table, .dns-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.data-table th, .data-table td, .admin-data-table th, .admin-data-table td, .dns-table th, .dns-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th, .admin-data-table th, .dns-table th { background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:last-child > td, .admin-data-table tbody tr:last-child > td, .dns-table tbody tr:last-child > td { border-bottom: 0; }
.data-table tbody tr:hover > td { background: var(--surface-2); }
/* A table in a card or a disclosure is part of it: a hairline above, no second box. */
.portal-card > .table-wrap, .more-body > .table-wrap { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
/* The records table follows the add-record form, which already ends in a hairline. */
#dns-body > .table-wrap { margin: 0; border: 0; border-radius: 0; }
.portal-card.flush > .table-wrap:first-child { border-top: 0; }

/* Page head: breadcrumb, then the title with its chip and actions, then one short line. Replaces every
   per-page hero, welcome and "Back to website" button. */
.page-head { margin: 4px 0 20px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0 0 8px; padding: 0; color: var(--muted); font-size: var(--fs-sm); list-style: none; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--metal); text-decoration: underline; text-underline-offset: 3px; }
/* The separator follows a crumb only when a visible crumb follows it, so a wrapped line ends with a slash instead of
   starting with one and a hidden last crumb never leaves a dangling slash. */
.breadcrumb li:has(~ li:not([hidden]))::after { content: "/"; content: "/" / ""; margin-left: 8px; color: var(--line-control); }
.breadcrumb [aria-current] { color: var(--ink-2); font-weight: 500; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.page-head-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.page-head h1 { margin: 0; overflow-wrap: anywhere; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-lede { max-width: 60ch; margin: 6px 0 0; color: var(--muted); font-size: var(--fs-lg); line-height: 1.45; }

/* An empty list, said plainly. */
.empty-state { padding: 24px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* Every page is this one column, so the content edge never moves between pages. A page that is only a form or
   reading text (Connect, Report a problem, Email, Settings) adds .reading for a narrower measure; nothing else
   sets its own page width. */
.portal-shell.reading { max-width: 880px; }

@media (pointer: coarse), (max-width: 640px) {
  .breadcrumb { gap: 0 8px; }
  .breadcrumb a { min-height: var(--control-h-sm); }
}
@media (max-width: 640px) {
  .portal-shell { width: min(100% - 32px, 1160px); padding: 16px 0 48px; }
  .portal-card { padding: 16px; }
  .portal-card.compact { padding: 12px; }
  .page-head { margin-bottom: 16px; }
}

/* ==== Pages and areas =====================================================
   Each section below styles one page or area and uses the tokens and components above. When an area is
   restyled, move its rules onto the components (.page-head, .group, .option-row, .more, .chip, .row-list,
   .menu, .seg) and delete the old ones instead of adding a layer.

   In order: sign-in and page shells; chat messages; confirmation dialog; the visual editor and the dated items
   base rules; the connection list; dashboard, account menu and website pages; DNS; the assistant panel;
   domains; small widgets; claim page. Pages with a stylesheet of their own (billing, shop, scheduler, search,
   dated items, the console and the rest) keep their rules there. */

/* ---- Sign-in, notices and page shells ------------------------------------ */

/* The full-page conversation shell. No page uses it now (the assistant is the docked panel); scripts/core/chat-motion.test.mjs
   still asserts these two rules, so they stay until that test is retired. */
.portal-shell.request-shell {
  width: min(860px, calc(100% - 32px));
  height: 100vh;
  height: 100dvh;
  padding: 24px 0;
}
.request-shell .request-main { overflow: hidden; }

.portal-shell.narrow { width: min(440px, calc(100% - 28px)); padding-top: 88px; }
/* A card that is the whole page (sign in, help, a password, your website) titles itself at the card-title size. */
.portal-shell.narrow .portal-card h1 { font-size: var(--fs-xl); }
/* A short notice in the middle of the page: finishing a sign-in, a payment received. */
.portal-shell.notice { padding-top: 48px; text-align: center; }
.portal-shell.notice .portal-card { margin-top: 24px; }
.portal-shell.notice .portal-card h1 { font-size: var(--fs-xl); }
.portal-shell.notice .portal-card .portal-small { margin-top: 8px; color: var(--ink-2); }

.portal-switch { margin: 16px 0 0; }
.portal-switch .portal-link-button { margin: 0; font-size: inherit; }
.jaybird-loading { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.jaybird-loading::before { content: ""; display: block; flex: 0 0 64px; width: 64px; height: 64px; background: url("/jaybirdload.webp") center / contain no-repeat; }

/* Under Sign in: the emailed password link, and "Use a passkey" where the browser can use passkeys (public/login.js). */
.auth-more-ways { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
@media (pointer: coarse), (max-width: 640px) {
  .auth-more-ways .portal-link-button, .portal-switch .portal-link-button { min-height: var(--control-h-sm); }
}

/* "or use your email", with a line either side. */
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 16px; color: var(--muted); font-size: var(--fs-sm); }
.auth-divider-line { flex: 1; height: 1px; background: var(--line); }

.auth-brand {
  display: block;
  margin: 0 0 18px;
  text-align: center;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--metal);
}

/* The brand logo image replaces the text wordmark. Transparent PNG served
   from the marketing bucket; dimensions in the markup prevent layout shift,
   so these rules only set the display height. */
.auth-brand img {
  display: inline-block;
  height: 32px;
  width: auto;
}

.instagram-admin { margin-bottom: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.instagram-admin .portal-button, .instagram-admin .portal-link-button { margin-right: 8px; margin-bottom: 8px; }

.portal-agreement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.portal-agreement input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--metal);
}

.portal-agreement a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.terms-gate { max-width: 640px; margin: 0 0 24px; }
.terms-gate h1 { font-size: var(--fs-xl); }

/* ---- Chat -------------------------------------------------------------- */

.portal-chat {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  max-height: 340px;
  overflow: auto;
}

.portal-chat.console {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.portal-chat-message > p { margin: 0; white-space: pre-wrap; }
/* An action under a message is a small button at its own width, not a stretched bar. */
.portal-chat-message > .portal-button { align-self: flex-start; }

.portal-chat-message + .portal-chat-message { margin-top: 12px; }

/* The planner replies in a shape - a sentence, the changes as a list, a
   verification line - and the list is the part being scanned. Unstyled it
   inherited the browser's default indent and sat hard against the text above
   it, which is most of why a structured reply still read as a wall. */
.portal-chat-message ul.chat-list,
.portal-chat-message ol.chat-list {
  margin: 0;
  padding-left: 1.15em;
  display: grid;
  gap: 6px;
}
.portal-chat-message .chat-list li { margin: 0; }
.portal-chat-message .chat-list li::marker { color: var(--muted); }
.portal-chat-message strong { font-weight: 600; }

/* Sending should look like the message moving into the thread rather than
   appearing there between frames. */
@keyframes chat-message-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.portal-chat-message { margin: 0; padding: 12px 14px; border-radius: var(--radius); font-size: var(--fs-lg); line-height: 1.5; max-width: 82%; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-wrap: anywhere; animation: chat-message-in 180ms ease-out both; }

/* "Looking at deniz-12.jpg." - the assistant going and checking something,
   which is neither a message nor a status line. */
.chat-note {
  margin: 4px 0 4px 2px;
  font-size: var(--fs-sm);
  color: var(--muted);
  font-style: italic;
  animation: chat-message-in 180ms ease-out both;
}
.chat-note + .chat-note { margin-top: 0; }

.portal-chat-message.user {
  margin-left: auto;
  color: var(--metal-ink);
  border: 1px solid var(--metal-lo);
  background: var(--metal);
}

.portal-chat-message.assistant {
  margin-right: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* "Assistant is working" indicator — three pulsing dots in an assistant bubble. */
/* The bubble is a column; these three dots are the one thing in it that runs
   across. Without the reset they stack vertically. */
.portal-chat-message.chat-typing {
  display: inline-flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  width: auto;
}
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: chat-typing-bounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-typing span { animation: none; opacity: 0.6; }
  .portal-chat-message { animation: none; }
}

/* ---- Mobile chat: clean, texting-app feel ------------------------------ */
/* On phones the assistant's chat is iMessage-style bubbles and a compact pill
   composer, with the "card in a card" chrome removed. */
@media (max-width: 760px) {
  .portal-chat-message {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: var(--radius);
    font-size: var(--fs-lg);
    line-height: 1.4;
  }
  .portal-chat-message + .portal-chat-message { margin-top: 6px; }
  .portal-chat-message.user { border-bottom-right-radius: var(--radius-xs); }
  .portal-chat-message.assistant { border-bottom-left-radius: var(--radius-xs); }

  /* No height cap on a phone: the messages are the only scroller. */
  .portal-chat.console { border: 0; background: transparent; max-height: none; }
}

/* ---- Confirmation dialog -------------------------------------------------
   Replaces window.confirm, which a browser is allowed to stop showing - and
   when it does, it returns false silently, so every destructive button in the
   portal quietly stopped working. See confirmAction in conversation.js. */
.portal-confirm {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 22px 24px 18px;
  max-width: 420px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.portal-confirm::backdrop { background: var(--scrim); }
.portal-confirm h2 { margin: 0 0 8px; font-size: var(--fs-h2); line-height: 1.35; }
.portal-confirm p { margin: 0 0 18px; color: var(--ink-2); line-height: 1.5; }
.portal-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.portal-confirm p + p { margin-top: -8px; }
.portal-confirm-details { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); line-height: 1.5; }
.portal-confirm-details li + li { margin-top: 4px; }

/* ---- The visual editor ---------------------------------------------------
   The owner's website is the workspace and the panel beside it holds the words, pictures and settings. The panel is
   built from the portal components: .seg for the tabs, .more for disclosures, .option-row for choices, .chip for
   counts and status, .row-list for tools, .portal-card for the cards in Settings. The labels, groups, crop controls,
   schedule and its form shared with the dated items page (public/collections/dated-*.js) stay unprefixed. */
.content-group { display: grid; gap: 12px; min-width: 0; }
.content-update-view { display: grid; gap: 12px; padding: 4px 0; min-width: 0; }
.updates-admin { min-width: 0; }

.content-pending-event-title { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.content-group-name { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.content-format-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.content-format-tools .portal-button { min-width: var(--control-h-sm); padding: 0 10px; }
.content-format-bold { font-weight: 800; }
.content-format-italic { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.content-format-hint { font-size: var(--fs-sm); color: var(--muted); }

/* The labels and fields below are shared with the dated items page: a field is a label above one control. */
.content-field { display: grid; gap: 5px; }
.content-label { font-size: var(--fs-md); font-weight: 600; }
.content-field input:not([type="checkbox"]):not([type="radio"]),
.content-field textarea { width: 100%; }
.content-field textarea { min-height: 76px; resize: vertical; }
.content-field select { width: 100%; max-width: 100%; }
.content-caption { color: var(--muted); }

/* Crop and zoom, shared with the dated items page (public/core/image-crop.js). The preview is the one framed thing;
   the controls around it sit on the page of the row they are in, with no box of their own. */
.content-image-crop { display: grid; gap: 10px; }
.content-image-crop-preview { width: min(100%, 310px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-3); }
.content-image-crop-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 100ms linear, object-position 100ms linear; }
.content-image-crop-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.content-image-crop-control { display: grid; gap: 3px; }
.content-image-crop-control input[type="range"] { padding: 0; border: 0; box-shadow: none; accent-color: var(--metal); }
@media (max-width: 520px) { .content-image-crop-controls { grid-template-columns: 1fr; } }

/* ---- The workspace ------------------------------------------------------
   The owner's live page is the canvas; the panel opens over it on narrow screens and docks beside it on wide ones. */
.editor-page .portal-shell { max-width: none; width: 100%; padding: 8px 14px; }

/* One compact row: the logo, the way back, the title and the role, then the links and the language. */
.editor-page .dash-top { min-height: 48px; margin-bottom: 8px; padding: 4px 0; }
.editor-page .dash-top-group { flex-wrap: nowrap; min-width: 0; }
.editor-title { margin: 0; min-width: 0; overflow: hidden; font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.editor-page #site-role:empty { display: none; }
.editor-page .dash-top-actions { flex-wrap: nowrap; }
.editor-page .editor-bar-link { white-space: nowrap; }
.editor-page .editor-bar-link svg { flex: none; }
@media (max-width: 1000px) { .editor-page #site-role { display: none; } }
.editor-page #site-status:empty { display: none; }
.editor-page #content-card { overflow: hidden; }
.editor-page .content-split { position: relative; display: block; height: calc(100dvh - 88px); min-height: 360px; overflow: hidden; }
/* The panel overlays the preview on narrow screens and docks beside it on wide ones. */
.editor-page .content-main { display: none; position: absolute; inset: 12px auto 12px 12px; z-index: 8; width: min(500px,calc(100% - 24px)); min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; overflow: clip; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop); }
.editor-page .content-split.is-editing .content-main { display:flex; gap:0; }
@media(min-width:1100px){
  .editor-page .content-split { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); }
  .editor-page .content-split.is-editing { grid-template-columns:clamp(440px,34vw,560px) minmax(0,1fr); }
  .editor-page .content-main { position: static; inset: auto; z-index: auto; width: auto; height: 100%; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--surface-2); }
}
.editor-page .content-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 4px; background: var(--surface); }
.editor-page .content-panel-heading { min-width: 0; }
.editor-page .content-panel-title { margin: 0; font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.01em; }
.editor-page .content-page-context { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.editor-page .content-panel-controls { display: grid; gap: 8px; padding: 4px 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor-page .content-toolbar { display: block; }

.editor-page .content-search { width: 100%; padding-left: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b78' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E"); background-position: 12px 50%; background-repeat: no-repeat; background-size: 17px; }

/* The three views are the standard segmented control, taller because each holds an icon, a name and a count. */
.editor-page .content-mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; overflow: visible; }
.editor-page .content-mode-tab { display: flex; min-width: 0; min-height: 52px; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: var(--fs-sm); line-height: 1.2; white-space: normal; }
.editor-page .content-tab-text { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; }
.editor-page .content-tab-count { min-height: 18px; padding: 0 6px; background: var(--surface); }
.editor-page .content-mode-tab.is-active .content-tab-count { background: var(--surface-3); }
.editor-page .content-panel-body { flex: 1 1 auto; min-height: 0; display: grid; grid-auto-rows: max-content; align-content: start; gap: 12px; padding: 14px 16px 20px; overflow-y: auto; overscroll-behavior: contain; scroll-padding: 12px; }
.editor-page .content-fields { display: grid; gap: 12px; min-width: 0; }

/* Cards in Settings: one card each, a title and a line under it, then rows. Nothing inside is a second card. */
.editor-page .portal-card.content-group { gap: 12px; margin: 0; }
.editor-page .content-group > .section-head { margin: 0; }
.editor-page .content-group > .section-head > div:first-child { flex: 1 1 180px; }
.editor-page .section-head h3 { margin: 0; font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.01em; }
.editor-page .section-head .portal-status { margin: 0; }
.editor-page .content-group > :where(p, ul) { margin: 0; }
.editor-page .content-group > .more, .editor-page .content-group > .update-dated-link { margin-top: 0; }
.editor-page .content-group > .more { border-top: 1px solid var(--line); }
.editor-page .social-feed-body { display: grid; gap: 4px; }
.editor-page .social-feed-body > p { margin: 0 0 8px; }

/* Updates: what has been written, then the form for one update, then what an update contains. */
.editor-page .updates-admin > .content-event-editor:empty { display: none; }
.update-row { flex-wrap: wrap; row-gap: 2px; }
.update-row .row-copy { flex: 1 1 140px; }
.update-row-actions { display: flex; flex: 1 0 100%; gap: 4px; margin-left: var(--quiet-offset); }
.update-row .row-title { overflow-wrap: anywhere; }
.update-form-title { margin: 0 0 8px; font-size: var(--fs-md); }
.content-update-form { display: grid; padding: 12px 0; border-block: 1px solid var(--line); }
.content-update-form .portal-field { margin: 0 0 12px; }
.content-update-form .group { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.content-update-form .group .portal-field:last-child { margin-bottom: 8px; }
.content-update-form > .portal-actions { margin-top: 4px; }

/* What an update contains: a row for each box (its name, then its kind), told apart by hairlines. */
.update-schema-fields { display: grid; margin-bottom: 8px; }
.update-schema-item + .update-schema-item { border-top: 1px solid var(--line); }
.update-schema-field { display: grid; padding: 12px 0 0; }
.update-schema-field .portal-field { margin: 0 0 10px; }
.update-schema-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 12px; }
.update-schema-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
.update-schema-required { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-h-sm); color: var(--ink); font-size: var(--fs-md); font-weight: 600; cursor: pointer; }
.update-schema-tools { display: flex; align-items: center; gap: 2px; margin-right: -6px; }
.update-schema-technical > summary { min-height: var(--control-h-sm); padding-block: 2px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.update-schema-technical .more-body { padding: 0 0 10px; border-top: 0; }
.update-schema-technical .field-hint { margin: 0 0 6px; }
.editor-page .content-group .portal-status:empty { display: none; }
.update-schema-removed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 6px 0; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 480px) { .update-schema-main { grid-template-columns: minmax(0, 1fr); } }

/* Wording shared by every page ("Shown across your website") is a card of rows like a section. */
.editor-page .content-shared { gap: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.editor-page .content-shared > .content-group-name { padding: 12px 14px 8px; }
.editor-page .content-page.is-flat { display: grid; gap: 12px; }

/* A section of the page: a standard boxed disclosure whose summary carries the name and the count. */
.editor-page .content-section-card { min-width: 0; overflow: hidden; }
.editor-page .content-section-card > summary { padding-inline: 14px; }
.editor-page .content-section-card > summary:focus-visible { outline-offset: -2px; }
.editor-page .content-section-title { flex: 1 1 auto; min-width: 0; font-size: var(--fs-md); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.editor-page .content-section-badges { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.editor-page .content-section-card[open] > summary { border-bottom: 1px solid var(--line); }
.editor-page .content-section-body { display: grid; }
/* The header's and footer's line saying a change reaches every page. */
.editor-page .content-section-note { grid-column: 1 / -1; margin: 0; padding: 10px 14px 8px; color: var(--ink-2); }
.editor-page .content-main .content-section-body > .content-section-note + .content-field[data-content-kind] { border-top: 0; }
.editor-page .content-section-card .content-caption { font-size: var(--fs-sm); line-height: 1.4; }

/* A field is a compact row (label plus a glance at its value) that opens into its control. */
.editor-page .content-field[data-content-kind] { gap:0; }
.editor-page .content-main .content-field[data-content-kind] { padding:0; border-top:1px solid var(--line); }
.editor-page .content-main .content-section-body > .content-field[data-content-kind]:first-child,
.editor-page .content-main .content-shared > .content-group-name + .content-field[data-content-kind] { border-top:0; }
.content-field-body { display: grid; gap: 6px; min-width: 0; }
.editor-page .content-main .content-field[data-content-kind]:not(.is-open) > .content-field-body { display: none; }
/* An open row is a quiet fill and a hairline, not a second box. The label is read aloud and shown by the summary above. */
.editor-page .content-main .content-field[data-content-kind].is-open { background: var(--surface-2); }
.editor-page .content-main .content-field[data-content-kind].is-open > .content-field-body { padding: 6px 14px 14px; }
.editor-page .content-main .content-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.editor-page .content-main .content-field[data-content-kind].is-flash { animation: content-field-flash 1.2s ease-out; }
@keyframes content-field-flash { from { background: var(--info-bg); } to { background: var(--surface-2); } }
.editor-page .content-field-summary { display: flex; width: 100%; min-width: 0; min-height: 52px; align-items: center; gap: 12px; padding: 8px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.editor-page .content-field-summary:hover { background: var(--surface-2); }
.editor-page .content-field-summary:focus-visible { outline-offset: -2px; }
.editor-page .content-field-summary-text { display: grid; flex: 1 1 auto; min-width: 0; gap: 1px; }
.editor-page .content-field-summary-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.editor-page .content-field-summary-value { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: var(--fs-md); line-height: 1.35; overflow-wrap: anywhere; }
.editor-page .content-field-summary-value.is-empty { color: var(--muted); font-style: italic; }
.editor-page .content-field-summary > .ww-icon-chevron { flex: 0 0 auto; color: var(--muted); transition: transform .14s ease; }
.editor-page .content-field.is-open > .content-field-summary > .ww-icon-chevron { transform: rotate(90deg); }
.editor-page .content-field-thumb { display: grid; flex: 0 0 auto; width: 56px; height: 56px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-3); }
.editor-page .content-field-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.editor-page .content-field-thumb.is-video { background: var(--ink); color: var(--on-accent); }
.editor-page .content-field-thumb.is-video::before { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent currentColor; }
.editor-page .content-field-popover .content-field-summary { display: none; }

/* What is inside an open row: the control, a line about it, then its disclosures as hairline rows. */
.content-field-actions { display: grid; justify-items: start; gap: 0; width: 100%; }
.content-field-actions > .content-format-tools { padding-bottom: 8px; }
.content-field-actions > .more, .content-field-actions > .content-link { width: 100%; border-top: 1px solid var(--line); }
.content-field-actions .more-body { padding: 4px 0 12px; border-top: 0; }
.content-field-actions > .content-suggest { margin-left: var(--quiet-offset); }
.content-link { display: grid; gap: 8px; padding: 8px 0 0; }
.content-link .portal-field, .content-field-body .portal-field { margin: 0; }
.content-link-detail { display: grid; gap: 10px; padding: 0 0 4px; }
.content-link-detail select { max-width: 100%; }
.content-link-hint { min-height: 1.2em; margin: 0; color: var(--ink-2); font-weight: 400; }
.content-link-hint.is-error { color: var(--err); }
.content-link-note { margin: 0; color: var(--ink-2); }
.content-link-label { color: var(--ink); font-size: var(--fs-md); font-weight: 600; }
.content-image-meta-field { color: var(--ink-2); }
.content-image-metadata-fields { display: grid; gap: 12px; }
.content-image-metadata-fields > .portal-button { justify-self: start; }
.content-image-metadata-status { overflow-wrap: anywhere; }
.content-image-metadata-status:empty { display: none; }
/* The words read aloud for a logo are one more hairline row of the open field, set off from the disclosure above it. */
.content-field-actions > .content-alt { width: 100%; padding-top: 12px; border-top: 1px solid var(--line); }
.content-no-results { margin: 0; color: var(--muted); }

/* Photos browse as a grid of tiles; opening one shows it with its caption. */
.editor-page .content-fields[data-mode="images"] .content-section-body { grid-template-columns:repeat(auto-fill,minmax(min(100%,144px),1fr)); gap:10px; padding:12px; }
.editor-page .content-fields[data-mode="images"] .content-section-body > .content-field[data-content-kind] { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.editor-page .content-fields[data-mode="images"] .content-section-body > .content-field.is-open { grid-column:1 / -1; }
.editor-page .content-fields[data-mode="images"] .content-section-body > .content-field.is-value:not(.is-open) { display:none; }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) > .content-field-summary { flex-direction:column; align-items:stretch; gap:6px; padding:0 0 8px; }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) .content-field-thumb { width:100%; height:auto; aspect-ratio:1; border:0; border-radius:0; }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) .content-field-summary-text { padding:0 10px; }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) .content-field-summary-label,
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) .content-field-summary-value { overflow-wrap:break-word; word-break:normal; }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) .content-field-summary-value { font-size: var(--fs-sm); -webkit-line-clamp: 2; }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) .content-field-summary-label { font-size: var(--fs-xs); }
.editor-page .content-fields[data-mode="images"] .content-field.is-photo:not(.is-open) > .content-field-summary > .ww-icon-chevron { display:none; }
.editor-page .content-fields[data-mode="images"] .content-field.is-open > .content-field-summary { border-bottom:1px solid var(--line); margin-bottom:12px; }
/* "Something else you change often?" and "Picture tools" are standard disclosures; their rows are the standard row list. */
.editor-page .content-ask > .more-body { display: grid; gap: 10px; }
.editor-page .content-ask > .more-body > p { margin: 0; }
.editor-page .content-ask textarea { min-height: 76px; }
.editor-page .content-photo-tools .row-desc, .editor-page .content-upkeep .row-desc { white-space: normal; }
.editor-page .content-photo-tools > .more-body { padding: 0; }
.editor-page .content-photo-tools .row-list { border: 0; border-radius: 0; }
.editor-page .content-tool-row:disabled { color: var(--muted); cursor: wait; }
.editor-page .search-needs ul { margin: 0; padding-left: 18px; }
.editor-page .content-unsaved { flex: none; }

.editor-page .content-browse-fields { display: inline-flex; align-items: center; gap: 7px; }
.editor-page .content-browse-fields.is-active { border-color: var(--metal); background: var(--info-bg); color: var(--metal); }
.editor-page .content-preview-panel { position: relative; top: auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: var(--surface); }
.editor-page .content-preview-head { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(130px, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor-page .content-preview-head select { width: min(260px, 100%); min-width: 0; max-width: 100%; height: var(--control-h-sm); }
.editor-page .content-preview-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.editor-page .content-preview-controls .portal-button { white-space: nowrap; }
.editor-page .content-preview-controls select { width: auto; max-width: 150px; height: var(--control-h-sm); }
.editor-page .content-preview-panel .content-preview-frame { position: relative; z-index: 0; display: block; width: 100%; height: 100%; min-height: 0; max-height: none; border: 0; border-radius: 0; background: var(--surface); }

.editor-page .content-preview-hint { margin: 10px 14px; font-size: var(--fs-sm); }

/* The floating editor over the preview: a popover (the standard menu's edge and shadow), a title and Done, then the row. */
.editor-page .content-field-popover { position: absolute; z-index: 5; width: min(390px, calc(100% - 24px)); max-height: min(72dvh, 640px, calc(100% - 24px)); overflow: auto; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); animation: content-field-popover-in .14s ease-out; }

.editor-page .content-field-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.editor-page .content-field-popover-title { overflow: hidden; color: var(--ink); font-size: var(--fs-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.editor-page .content-field-popover .content-field { gap: 8px; }
.editor-page .content-field-popover .content-caption { font-size: var(--fs-sm); }
.editor-page .content-field-popover .content-image-crop-preview, .editor-page .content-field-popover .content-image-crop-preview img { max-height: 180px; }
.editor-page .content-image-crop-preview { max-height: 240px; }
@keyframes content-field-popover-in { from { opacity: 0; } to { opacity: 1; } }

/* The photo picker shared with the dated items page: a disclosure, then tiles. The brand logos sit on the quiet fill. */
.content-photo-picker { width: 100%; }
.content-photo-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 8px 0; }
.content-photo-choice { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--surface); }
.content-photo-choice:hover { border-color: var(--line-control); }
.content-photo-choice img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.content-photo-choice-brand img { object-fit: contain; background: var(--surface-3); }
.content-photo-choice-label { display: block; padding: 6px; color: var(--ink); font-size: var(--fs-xs); line-height: 1.35; }
.content-photo-choice-group { grid-column: 1 / -1; margin: 0; padding: 4px 0; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
/* ---- The schedule and its form: base rules of the dated items page (public/collections/dated-*.js) ----
   The editor no longer has a Dated items tab; these are not the editor's, and stay for that page until it moves them. */
.content-dated-pointer { display:grid; gap:12px; justify-items:start; }
.content-dated-pointer .portal-small { margin:0; color:var(--ink-2); line-height:1.5; }
.content-schedule-view { display:grid; gap:14px; min-width:0; }
.schedule { display:grid; gap:12px; min-width:0; }
.schedule-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.schedule-summary { margin: 0; color: var(--ink-2); font-size: var(--fs-md); font-weight: 600; }
.schedule-search { width: 100%; padding-left: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7683' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") 11px 50% / 17px no-repeat; }
.schedule-search:focus { border-color: var(--metal); }
.schedule-filter:hover { color:var(--ink); }
.schedule-filter:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
.schedule-filter-count { min-width: 20px; padding: 1px 6px; border-radius: var(--radius-xs); background: color-mix(in srgb,var(--ink-2) 12%,transparent); font-size: var(--fs-xs); line-height: 1.4; }
.schedule-item { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .12s ease,box-shadow .12s ease; }
.schedule-item:hover { border-color: var(--line-2); }
.schedule-item[data-state="today"] { border-color: color-mix(in srgb,var(--metal) 45%,var(--line)); }
.schedule-item[data-state="past"] { background: var(--surface-2); }
.schedule-item[data-state="past"] .schedule-title,
.schedule-item[data-state="past"] .schedule-when { color:var(--muted); }
.schedule-date { display: grid; align-content: center; justify-items: center; align-self: start; width: 58px; min-height: 64px; border-radius: var(--radius-sm); background: var(--metal); color: var(--metal-ink); text-align: center; line-height: 1.05; }
.schedule-item[data-state="past"] .schedule-date { background:var(--muted); }
.schedule-item[data-status="tentative"] .schedule-date { background: var(--warn); }
.schedule-item[data-status="cancelled"] .schedule-date { background:var(--err); }
.schedule-title { justify-self: start; max-width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.schedule-title:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); border-radius: var(--radius-xs); }
.schedule-actions .portal-link-button { padding: 2px 0; font-size: var(--fs-sm); }
.schedule-empty { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); text-align: center; }
.schedule-empty .portal-small { max-width:38ch; color:var(--muted); }
.content-pending-events { display: block; gap: 8px; padding: 12px 14px; border: 1px solid var(--warn-line); border-radius: var(--radius); background: var(--warn-bg); }

/* Event form: grouped sections, with the actions kept in reach. */
.content-managed-event-form { display:grid; gap:14px; min-width:0; }
.event-form-title { margin: 0; font-size: var(--fs-h2); }
.events-admin.is-composing .content-schedule-view { display:none; }
.events-admin:not(.is-composing) > .content-event-editor:empty { display:none; }
@media(max-width:520px){ .schedule-item.has-thumb { grid-template-columns:58px minmax(0,1fr); } .schedule-item.has-thumb .schedule-thumb { display:none; } }
/* Save and action results float over the workspace instead of hiding under it. */
.editor-page #content-body > .portal-status[role="status"] { position: fixed; left: 50%; bottom: 22px; z-index: 60; max-width: min(560px,calc(100vw - 32px)); margin: 0; padding: 12px 18px; border: 0; border-radius: var(--radius); background: var(--ink); color: var(--on-accent); font-size: var(--fs-md); box-shadow: var(--shadow-pop); transform: translateX(-50%); pointer-events: none; animation: content-toast-in .18s ease-out; }
.editor-page #content-body > .portal-status[role="status"]:empty { display:none; }
.editor-page #content-body > .portal-status[role="status"] a { color: var(--on-accent); text-decoration: underline; pointer-events: auto; }
@keyframes content-toast-in { from { opacity:0; transform:translate(-50%,8px); } to { opacity:1; transform:translate(-50%,0); } }

@media(max-width:760px){
  /* Phone: the page is the editor. The shell is exactly one screen tall, a slim bar on top
     (back, media library), the page picker, then the website filling everything left over,
     and the Edit / Save buttons docked at the thumb. Nothing is reserved by guesswork, so the
     website gets the whole remaining height on any phone, with or without browser toolbars. */
  .editor-page { --ed-page-h: 56px; --ed-tools-h: 64px; }
  .editor-page .portal-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; min-height: 0; padding: 0; }
  /* One row of icons: back at the left; the media library, the website and the language at the right. The names are
     still there for a screen reader, and the title is only read aloud. */
  .editor-page .dash-brand, .editor-page #site-role, .editor-page .editor-bar-label { display: none; }
  .editor-page .dash-top { flex-wrap: nowrap; gap: 4px; margin: 0; padding: 4px 10px; min-height: 52px; }
  .editor-page .dash-top-actions { flex-wrap: nowrap; gap: 4px; }
  .editor-page .dash-top .editor-bar-link { width: var(--control-h); min-width: var(--control-h); padding: 0; border-color: transparent; background: transparent; color: var(--metal); }
  .editor-page .editor-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .editor-page #site-status { margin: 0; padding: 6px 12px; }
  .editor-page #content-card { min-height: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .editor-page #content-body { height: 100%; }
  .editor-page .content-split { height: 100%; min-height: 0; }
  /* The preview head dissolves into the panel grid: page picker on top, website, button bar below. */
  .editor-page .content-preview-panel { grid-template-rows: var(--ed-page-h) minmax(0, 1fr) var(--ed-tools-h); }
  .editor-page .content-preview-head { display: contents; }
  .editor-page .content-preview-head > select { grid-row: 1; grid-column: 1; align-self: center; width: calc(100% - 20px); margin: 0 10px; height: var(--control-h); }
  .editor-page .content-preview-panel .content-preview-frame { grid-row: 2; grid-column: 1; }
  .editor-page .content-preview-hint { grid-row: 2; grid-column: 1; }
  .editor-page .content-preview-controls { grid-row: 3; grid-column: 1; z-index: 2; justify-content: stretch; flex-wrap: nowrap; gap: 8px; padding: 8px 10px; overflow-x: auto; border-top: 1px solid var(--line); background: var(--surface); }
  .editor-page .content-preview-controls .portal-button { flex: 1 1 0; justify-content: center; min-height: var(--control-h); padding: 8px 10px; }
  .editor-page .content-preview-controls select { flex: 0 1 110px; width: auto; min-width: 0; max-width: 110px; height: var(--control-h); }
  .editor-page .content-panel-head { padding: 10px 12px 4px; }
  .editor-page .content-panel-close { width: var(--control-h); min-height: var(--control-h); }
  .editor-page .content-panel-controls { padding: 4px 12px 10px; }
  .editor-page .content-panel-body { padding: 12px 12px 20px; }
  .editor-page .content-mode-tab { min-height: 52px; padding: 6px 2px; }
  /* Unsaved changes: the chip shrinks to its dot, and still says so to a screen reader. */
  .editor-page .content-unsaved { flex: 0 0 12px; width: 12px; min-height: 12px; height: 12px; gap: 0; padding: 0; overflow: hidden; border-radius: 50%; background: var(--warn); font-size: 0; }
  .editor-page .content-unsaved::before { display: none; }
  .editor-page .content-field-popover { width: min(370px, calc(100% - 16px)); max-height: min(54dvh, 440px, calc(100% - 16px)); padding: 12px; }
  /* The field browser is a sheet over the website that leaves the picker and the button bar usable. */
  .editor-page .content-split.is-editing .content-main { inset: var(--ed-page-h) 0 var(--ed-tools-h) 0; width: 100%; border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-pop); }
}
@media(max-width:380px){
  .editor-page .content-preview-controls .content-preview-popout { display:none; }
}
/* On touch and phones the panel's small buttons, its disclosures and the sliders take the full 44px target, so a thumb
   can hit every row action. */
@media (pointer: coarse), (max-width: 640px) {
  .editor-page .content-main .portal-button.sm, .editor-page .content-field-popover .portal-button.sm { min-height: var(--control-h); }
  .editor-page .content-main .portal-button.icon.sm { width: var(--control-h); }
  .editor-page .update-schema-technical > summary { min-height: var(--control-h); }
  .editor-page .update-schema-required { min-height: var(--control-h); }
  .content-image-crop-control input[type="range"] { min-height: var(--control-h); }
}
@media (pointer: fine) {
  .content-image-crop-control input[type="range"] { min-height: 24px; }
}
.editor-page .content-request-quote { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: var(--fs-md); overflow-wrap: anywhere; }

/* ---- Connect: the dashboard's connection list ------------------------------------------------------------
   The Connect page is public/mcp/connect.css; the dashboard builds a short list of connected apps (public/core/dashboard.js). */
#connect-summary { margin-top: 14px; }
/* A settings card reached by its own link (/site-settings#keys-card) keeps a little air above it. */
#access-card, #billing-card, #keys-card { scroll-margin-top: 16px; }
.connect-connections { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.connect-connections:empty { display: none; }
.connect-connection { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--fs-md); line-height: 1.5; }
.connect-connection span { color: var(--ink-2); }
.connect-connection:last-child { padding-bottom: 0; }
@media (max-width: 640px) {
  .connect-connection { flex-direction: column; align-items: flex-start; }
}

.admin-table-wrap { max-width:100%; overflow:auto; margin:12px 0; }
.admin-table-wrap > input { width:100%; margin-bottom:10px; }

.admin-data-table caption { text-align:left; font-weight: 600; padding:8px 0; }

.admin-data-table img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-xs); }

/* Mobile hide for AI client setup option */
@media (max-width: 768px) {
  #connect-card,
  #connect-ai-btn {
    display: none !important;
  }
}

/* ---- Dashboard, account menu and website pages -------------------------- */

/* The slim bar on every signed-in page: the brand, then the account actions. Header buttons are small. */
.dash-top {
  --bar-control: var(--control-h-sm);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 56px;
  margin: 0 0 20px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.dash-top > :first-child { margin-right: auto; }
.dash-brand { display: inline-flex; align-items: center; flex-shrink: 0; min-height: var(--control-h-sm); color: var(--metal); }
.dash-brand:has(> img) { min-height: 0; }
@media (pointer: coarse), (max-width: 640px) {
  .dash-brand:has(> img) { min-height: var(--control-h-sm); }
}
.dash-brand img { display: block; height: 32px; width: auto; object-fit: contain; }
.dash-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* The brand and the links beside it in the editor's and the media library's header. */
.dash-top-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dash-top .portal-button { min-height: var(--bar-control); }
.dash-top .portal-button:not(.quiet) { padding: 4px 12px; }
.dash-top .portal-language-select { width: auto; min-width: 124px; height: var(--bar-control); margin: 0; }
/* "New website" becomes "Start building <name>" while a plan waits: a long name shortens rather than wraps. */
.dash-top-actions > #new-website { display: block; min-width: 0; padding-block: 0; overflow: hidden; line-height: calc(var(--bar-control) - 2px); text-overflow: ellipsis; white-space: nowrap; }

.user-menu { position: relative; }
.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bar-control);
  height: var(--bar-control);
  padding: 0;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.user-menu-toggle:hover { border-color: var(--ink-2); color: var(--ink); }
/* On touch the bar's controls all take the full 44px target, so the row stays even. */
@media (pointer: coarse), (max-width: 640px) {
  .dash-top { --bar-control: var(--control-h); }
}

/* The account menu is a .menu: identity, then the things to do, the language, then Sign out. The language field is
   added by the page's language switcher as the panel's first child; public/core/dashboard.js seats it above Sign out. */
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.user-menu-panel > * { flex: none; }
.user-menu-panel > .menu-section:not(.user-profile) { border-top: 1px solid var(--line); }
.user-menu-panel > .portal-language-field { margin: 0; padding: 8px 12px 12px; border: 0; border-top: 1px solid var(--line); }
.dash-top .user-menu-panel .portal-language-select { width: 100%; height: var(--control-h-sm); margin: 0; }
/* Get a domain and Billing sit in the bar on a desktop and in this menu on a phone, where the bar has room for one button. */
.user-menu-panel > .menu-phone-only { display: none; }
.user-menu-sign-out .menu-item.danger:hover { background: var(--err-bg); }

.user-profile-summary { padding: 8px 12px 4px; }
.user-profile-head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-bottom: 8px; }
.user-profile-avatar { display: grid; width: 32px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--info-bg); color: var(--metal); font-size: var(--fs-xs); font-weight: 600; }
.user-profile-id { display: grid; min-width: 0; }
.user-profile-id strong { overflow-wrap: anywhere; font-size: var(--fs-md); font-weight: 600; }
.user-profile-company { color: var(--muted); font-size: var(--fs-sm); }
.user-profile-summary-content { display: grid; gap: 2px; }
.user-profile-summary.is-editing .user-profile-summary-content { display: none; }
.user-profile-detail { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; padding: 2px 0; font-size: var(--fs-sm); line-height: 1.4; }
.user-profile-detail-label { color: var(--muted); }
.user-profile-detail-value { min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
#profile-extras:empty { display: none; }
#profile-extras > .portal-note { display: grid; justify-items: start; gap: 6px; margin: 4px 12px 8px; }
#profile-extras > .portal-note p { margin: 0; }
#profile-extras > .portal-status { margin: 4px 12px 8px; }

/* The forms that open inside the menu: details and password. */
.user-menu-panel .details-form { display: grid; padding: 4px 12px 12px; }
.user-menu-panel .details-form .portal-field { margin: 6px 0; }
.user-menu-panel .details-form .group-title.is-section { margin: 16px 0 4px; }
.profile-edit-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.user-menu-panel .profile-edit-actions .portal-button { width: 100%; }
.user-menu-panel .profile-save-status { margin: 4px 12px 8px; }
.profile-save-status:empty { display: none; }

/* A phone's bar has room for the brand, New website and the profile button: one row. */
@media (max-width: 640px) {
  .dash-top .bar-extra { display: none; }
  .user-menu-panel > .menu-phone-only { display: block; }
  .dash-top:has(.user-menu) { flex-wrap: nowrap; }
  .dash-top:has(.user-menu) .dash-top-actions { flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; }
}

.dash-section { margin-top: 16px; }

/* A payment that failed and is still owed (public/billing/payment-due.js): the words, then the one button. On a phone
   the button takes the full width under the words. */
.payment-due-list { display: grid; gap: var(--space-2); }
.payment-due { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); }
.payment-due-copy { flex: 1 1 320px; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.payment-due-copy strong { font-size: var(--fs-md); }
.payment-due-copy p { margin: 0; }
@media (max-width: 640px) { .payment-due > .portal-button { width: 100%; } }

/* The plan waiting to be started (public/core/dashboard.js showUnstarted). */
.unstarted-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.unstarted-copy { flex: 1 1 280px; min-width: 0; }
.unstarted-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; }
.unstarted-title h2 { margin: 0; }
.unstarted-copy p { margin: 0; }
.unstarted-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* The quiet action's text lines up with the primary button's edge, not with its own invisible padding. */
.unstarted-actions > .portal-button.quiet { margin-left: var(--quiet-offset); }

/* A website being handed to this account (public/core/site-handovers.js): rows in the card, not boxes. */
.handover-list { display: grid; }
.handover-card { display: grid; gap: var(--space-3); padding: 12px 0; border-top: 1px solid var(--line); }
.handover-card:first-child { padding-top: 0; border-top: 0; }
.handover-card.focused { margin-inline: -12px; padding: 12px; border-radius: var(--radius-sm); background: var(--info-bg); }
.handover-card .portal-small { margin: 4px 0 0; }
.handover-card .row-title { overflow-wrap: anywhere; }
.handover-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.handover-card .portal-status:empty { display: none; }

.site-danger h2 { color: var(--err); }

/* Each website keeps a restrained, almost-square portfolio tile: the one bordered layer on the dashboard. The preview
   is lazy and sandboxed so it does not delay the account shell or navigate it. */
.site-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  justify-content: center;
}
.site-cards > .empty-state { grid-column: 1 / -1; }
/* The websites could not be read: one message across the page, and what can be done about it. */
.site-cards > .dashboard-load-error { grid-column: 1 / -1; display: grid; gap: 12px; }
.dashboard-load-error .portal-status { margin: 0; }
.dashboard-load-error-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.site-card {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.12s ease;
  position: relative;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  overflow: hidden;
  animation: workspace-enter 320ms cubic-bezier(.4,0,.2,1) backwards;
}
.site-card:hover { border-color: var(--line-control); }
.site-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.site-card-link:focus-visible { outline: var(--focus); outline-offset: -2px; }
.site-card-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
.site-card-info, .site-card-activity { pointer-events: none; }
.site-card-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: var(--surface); pointer-events: none; }

.site-preview-placeholder { display: grid; place-items: center; height: 100%; position: relative; overflow: hidden; }
.site-preview-placeholder::before, .site-preview-placeholder::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line-2);
  border-radius: 50%;
}
.site-preview-placeholder::before { width: 175px; height: 175px; }
.site-preview-placeholder::after { width: 120px; height: 120px; }
.preview-orbit { width: 64px; height: 64px; z-index: 1; border: 1px solid var(--line-control); border-radius: var(--radius); transform: rotate(-12deg); background: var(--surface); }
.preview-label { position: absolute; bottom: 12px; left: 14px; color: var(--muted); font-size: var(--fs-xs); }
.site-preview-open { position: absolute; right: 12px; bottom: 12px; padding: 4px 8px; border-radius: var(--radius-xs); background: var(--ink); color: var(--on-accent); font-size: var(--fs-xs); font-weight: 600; opacity: 0; transition: opacity 180ms ease; }
.site-card:hover .site-preview-open, .site-card-link:focus-visible ~ .site-card-preview .site-preview-open { opacity: 1; }
.site-card-info { padding: 12px 16px 4px; }
.site-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.site-card-name { font-weight: 600; letter-spacing: -.01em; min-width: 0; margin: 0; overflow: hidden; color: var(--ink); font-size: var(--fs-h2); text-overflow: ellipsis; white-space: nowrap; }
/* The status is a .chip. One that is a link (Preview ready, Build the website) sits above the card's own link. */
.site-card-status { flex: 0 0 auto; }
a.site-card-status { position: relative; z-index: 2; pointer-events: auto; text-decoration: none; }
a.site-card-status.chip:hover { text-decoration: underline; text-underline-offset: 2px; }
.site-card-edit-preview { position: relative; z-index: 2; pointer-events: auto; display: inline-flex; align-items: center; min-height: 24px; margin-top: 4px; color: var(--metal); font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 2px; }
.site-card-edit-preview:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
.site-card-host { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.site-card-activity { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin: 8px 16px 12px; padding: 8px 0 0; border-top: 1px solid var(--line); background: transparent; }
.activity-summary { display: grid; gap: 2px; }
.activity-summary strong { color: var(--ink); font-size: var(--fs-lg); font-weight: 600; line-height: 1; }
.activity-summary span, .activity-empty { color: var(--muted); font-size: var(--fs-xs); }
.activity-sparkline { width: 36%; height: 34px; overflow: visible; }
.activity-sparkline-line { stroke: var(--metal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-card-activity.is-loading { justify-content: flex-start; }
.activity-skeleton { display: block; width: 42px; height: 24px; border-radius: var(--radius-xs); }
.activity-skeleton-wide { width: 45%; height: 30px; }
.activity-skeleton, .site-card-skeleton span, .site-card-skeleton i, .site-card-skeleton b,
.traffic-skeleton, .content-skeleton { background: var(--surface-3); animation: skeleton-pulse 1.55s ease-in-out infinite; }
.site-card-skeleton { width: 100%; aspect-ratio: 1.12 / 1; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.site-card-skeleton span { display: block; width: 100%; height: 68%; border-radius: var(--radius-sm); }
.site-card-skeleton i, .site-card-skeleton b { display: block; width: 60%; height: 12px; margin-top: 16px; border-radius: var(--radius-xs); }
.site-card-skeleton b { width: 38%; height: 9px; margin-top: 8px; }

/* Waiting for you and Running now: one card for each piece of work, the section around them has no box. */
.running-list { display: grid; gap: 8px; }
.running-card { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.running-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.running-card-title { margin: 0; font-size: var(--fs-lg); }
.running-card-site { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-md); }
.running-current { margin: 8px 0 0; }
.running-steps { margin-top: 4px; }
.running-steps > summary { min-height: var(--control-h-sm); }
.running-steps ol { display: grid; gap: 4px; margin: 0; list-style: none; font-size: var(--fs-md); }
.running-steps li { display: flex; gap: 12px; }
.running-steps time { flex: 0 0 4.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.running-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.running-note { margin: 8px 0 0; color: var(--muted); font-size: var(--fs-md); }
.running-note:empty { display: none; }
.running-setup { margin-top: 8px; }
.running-actions > .quiet:first-child { margin-left: var(--quiet-offset); }
/* On a phone each action is a line of its own, so a quiet one that would otherwise wrap onto a row alone still lines up with the text above. */
@media (max-width: 640px) {
  .running-actions { flex-direction: column; align-items: flex-start; }
  .running-actions > .quiet { margin-left: var(--quiet-offset); }
}

/* Passkeys in the account menu (public/core/passkey-settings.js builds the list; its actions are quiet small buttons). */
.passkeys-panel { padding: 8px 12px 12px; }
.passkeys-title { margin: 0 0 4px; font-weight: 600; }
.passkey-list { display: grid; margin: 8px 0; padding: 0; list-style: none; }
.passkey-item { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.passkey-name { min-width: 0; font-size: var(--fs-md); overflow-wrap: anywhere; }
.passkey-dates { display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--muted); font-size: var(--fs-sm); }
.passkey-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-left: var(--quiet-offset); }
.passkey-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.passkey-rename input { box-sizing: border-box; flex: 1 1 100%; min-width: 0; }
.passkey-empty { padding: 4px 0; color: var(--muted); font-size: var(--fs-sm); }
#passkey-wait { min-height: 64px; margin: 4px 0; }
/* The one-time passkey offer after a sign-in (public/passkey-offer.js): a small banner in the page, not a window. */
.passkey-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.passkey-offer-words { flex: 1 1 260px; margin: 0; color: var(--ink); font-weight: 600; }
.passkey-offer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.passkey-offer .portal-status { flex: 1 1 100%; margin: 0; }
.passkey-offer .portal-status:empty { display: none; }

/* The website page (public/site.html): the page head, Quick access, Worth a look, Convenience, the tools, the insights. */
.page-head-links { display: contents; }
a.site-hero-state { text-decoration: none; }
a.site-hero-state[href]:hover { text-decoration: underline; text-underline-offset: 2px; }
.site-review { display: grid; gap: 8px; margin-top: 12px; }
.site-review .portal-actions { margin: 0; }
.site-hero-review-note { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.site-hero-review-note:empty { display: none; }
.site-hero-credit .site-credit { max-width: 40rem; }

/* Quick access: the pins are rows in one list; editing adds the move and remove buttons at the end of each row. */
.quick-access-entry { display: flex; align-items: stretch; min-width: 0; }
.quick-access-item { flex: 1 1 auto; min-width: 0; }
.quick-access.is-editing .quick-access-item { cursor: default; }
.quick-access.is-editing .quick-access-item:hover { background: none; }
.quick-access.is-editing .quick-access-item .row-chevron, .quick-access.is-editing .quick-access-item .chip { display: none; }
.quick-access-item .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-access-tools { display: flex; align-items: center; gap: 2px; padding-right: 8px; }
.quick-access-picker { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.quick-access-picker-intro { margin: 12px 0; color: var(--muted); font-size: var(--fs-sm); }
.quick-access-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.quick-access-choices + .quick-access-choices { margin-top: 12px; }
.quick-access-choices legend { width: 100%; margin-bottom: 4px; padding: 0; }
.quick-access-choice { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-h-sm); padding: 4px 12px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--fs-md); cursor: pointer; }
.quick-access-choice:has(input:checked) { border-color: var(--metal); background: var(--info-bg); }
.quick-access-choice:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.quick-access-status:empty { display: none; }
.quick-access-start, .quick-access-pin { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; }
.quick-access-start svg, .quick-access-pin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.quick-access-pin[aria-pressed="true"] svg { fill: var(--warn-line); stroke: var(--warn); }

/* Worth a look: one closed strip (a boxed .more). Open, it is a hairline list, each notice with Fix it and Dismiss, and
   the weekly email's switch under it. No icon and no colour, so it never shouts. */
.notices > summary { min-height: 44px; }
.notices > summary > :first-child, .site-tool-advanced > summary > :first-child { flex: none; white-space: nowrap; }
.notices > .more-body { padding-top: 0; }
.notices-list { margin: 0; padding: 0; list-style: none; }
.notices-list > .notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; }
.notices-list > .notice + .notice { border-top: 1px solid var(--line); }
.notice-main { flex: 1 1 280px; min-width: 0; }
.notice-main strong { display: block; font-size: var(--fs-md); font-weight: 600; }
.notice-main p { margin: 2px 0 0; }
.notice-actions { display: flex; flex: none; align-items: center; gap: 4px; }
#site-notices-more { margin: 0 0 4px var(--quiet-offset); }
/* Open, the list below says what the strip's hint said, so the hint goes. */
.notices[open] > summary > .more-hint { display: none; }
.notices-email { border-top: 1px solid var(--line); }

/* The tools: rows in a list per group. The dividers do not depend on which rows are showing (a module that is off is hidden). */
.site-tools-stage { display: grid; }
.site-tools-loading, .site-tools-content { grid-area: 1 / 1; min-width: 0; }
.site-tools-content { opacity: 1; visibility: visible; transition: opacity 360ms cubic-bezier(.4,0,.2,1); }
.site-tools-loading { display: grid; align-content: start; gap: 12px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 360ms cubic-bezier(.4,0,.2,1), visibility 0s 360ms; }
.site-tools-loading .content-skeleton { height: 52px; width: 100%; }
.site-tool-section[aria-busy="true"] .site-tools-content { opacity: 0; visibility: hidden; }
.site-tool-section[aria-busy="true"] .site-tools-loading { opacity: 1; visibility: visible; transition: none; }
.site-tool-section[aria-busy="true"] + .insights-section { visibility: hidden; }
.site-tool-section[aria-busy="false"] + .insights-section { animation: workspace-enter 360ms cubic-bezier(.4,0,.2,1) backwards; }
.site-tool-section .group + .group { margin-top: 20px; padding-top: 0; border-top: 0; }
.site-tool-section .group-title { margin: 0 0 8px; }
.site-tools .row-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; white-space: normal; }
.site-tool-advanced { margin-top: 20px; }
.site-tool-advanced > .more-body { padding-bottom: 0; }

/* The insights: one boxed disclosure; inside, a hairline row per insight that opens to its chart. */
.insights > .more-body { padding: 0; }
.insight + .insight { border-top: 1px solid var(--line); }
.insight > summary { gap: 12px; min-height: 52px; padding: 8px 16px; }
.insight > summary:hover { background: var(--surface-2); color: inherit; }
.insight > summary:focus-visible { outline-offset: -2px; }
.insight-summary { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; line-height: 1.4; font-variant-numeric: tabular-nums; }
.insight-summary[data-tone]::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-control); }
.insight-summary[data-tone=good]::before { background: var(--ok); }
.insight-summary[data-tone=fair]::before { background: var(--warn); }
.insight-summary[data-tone=poor]::before { background: var(--err); }
.insight-body { padding: 4px 16px 16px; }
.insight-body > .obs-range { margin-bottom: 16px; }
.insight-more { margin-top: 16px; }
.insight .obs-stats, .insight .search-stats { gap: 16px 0; margin: 0 0 16px; }
.insight .obs-stat, .insight .search-stat { padding: 2px 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; color: inherit; background: none; box-shadow: none; }
.insight .obs-stat:first-child, .insight .search-stat:first-child { padding-left: 0; border-left: 0; }
.insight .search-stat small { color: var(--muted); }
.obs-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.obs-stat { display: grid; gap: 4px; min-width: 0; }
.obs-stat-value { color: var(--ink); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.obs-stat-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.obs-chart { min-width: 0; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.obs-chart-title { margin: 0 0 8px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.obs-spark { display: block; width: 100%; height: 128px; overflow: visible; }
.obs-spark-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.obs-spark-fill { fill: var(--info-bg); }
.obs-spark-line { stroke: var(--metal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.obs-spark-point { fill: var(--metal); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.obs-chart-dates { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.obs-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.obs-list { min-width: 0; }
.obs-list-title { margin: 0 0 8px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.obs-list-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: 8px; margin-top: 6px; }
.obs-list-bar { position: relative; display: flex; align-items: center; min-width: 0; min-height: 28px; overflow: hidden; padding: 0 8px; border-radius: var(--radius-xs); background: var(--surface-3); isolation: isolate; }
.obs-list-bar::before { position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: var(--info-bg); content: ""; }
.obs-list-label { display: block; min-width: 0; overflow: hidden; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.obs-list-count { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-align: right; }
#observability-body { transition: opacity 280ms cubic-bezier(.4,0,.2,1); }
#observability-body[aria-busy="true"]:not(.traffic-loading) { opacity: .62; }
#observability-body:not(.traffic-loading) { animation: workspace-enter 320ms cubic-bezier(.4,0,.2,1) backwards; }
.traffic-loading { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.traffic-skeleton { display: block; min-height: 76px; border-radius: var(--radius-sm); }
.traffic-skeleton-stat { grid-column: span 1; }
.traffic-skeleton-chart { grid-column: 1 / -1; min-height: 130px; }

/* Site speed: the devices side by side, each device's three ratings in one row, told apart by hairlines. */
.health-devices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.health-device { min-width: 0; }
.health-device + .health-device { padding-left: 16px; border-left: 1px solid var(--line); }
.health-device-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.health-device-heading h3 { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.health-sample-count { color: var(--muted); font-size: var(--fs-xs); text-align: right; }
.health-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.health-metric { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 0 12px; border-left: 1px solid var(--line); }
.health-metric:first-child { padding-left: 0; border-left: 0; }
.health-metric-line { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.health-metric-title { color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.health-metric-value { color: var(--ink); font-size: var(--fs-h2); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.health-metric-description { overflow: hidden; color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.health-footnote { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.health-loading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.health-skeleton { display: block; min-height: 137px; border-radius: var(--radius-sm); }
.health-skeleton:nth-child(3) { display: none; }
.health-loading .health-skeleton { background: var(--surface-3); animation: skeleton-pulse 1.55s ease-in-out infinite; }
.health-devices, #site-health-body > .portal-small { animation: workspace-enter 320ms cubic-bezier(.4,0,.2,1) backwards; }

/* ---- DNS and other focused sub-pages ------------------------------------- */
.content-loading { display: grid; gap: 10px; }
.content-skeleton { display: block; height: 48px; border-radius: var(--radius-sm); }
.content-skeleton:nth-child(2) { width: 74%; }
.content-skeleton:nth-child(3) { width: 58%; }
.dns-intro { margin: -4px 0 16px; }
.dns-zone-label { margin-bottom: 12px; color: var(--metal); font-size: var(--fs-sm); font-weight: 600; }
/* The record form is fields on the card, told apart from the table below by a hairline, not a box of its own. */
.dns-record-form { display: grid; grid-template-columns: 105px minmax(130px, 1fr) minmax(170px, 1.5fr) 110px 125px; gap: 12px; align-items: end; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dns-record-form .portal-field { margin: 0; }
.dns-proxy-field { grid-column: 1 / span 2; }
.dns-form-actions { display: flex; align-items: center; gap: 8px; grid-column: 3 / -1; justify-content: flex-end; }
.dns-record-form > .portal-status { grid-column: 1 / -1; margin: 0; }
.dns-type { color: var(--metal); font-weight: 600; }
.dns-name { min-width: 155px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); }
.dns-content { max-width: 360px; overflow-wrap: anywhere; color: var(--ink-2); }
.dns-actions { min-width: 112px; white-space: nowrap; }
.dns-label { display: none; }
.dns-table td { vertical-align: middle; }
.dns-table .dns-record-form { margin: 0; padding: 4px 0; border: 0; }
.site-danger { border-color: var(--err-line); background: var(--surface); }

/* The keys on the settings page (public/core/site.js): a hairline row each, the form for a new key or a new value under its row. */
.row-list .site-key-box { padding: 0 14px 14px; }
.site-key-name { font-size: var(--fs-md); font-weight: 600; }
.site-key-label { color: var(--ink-2); font-size: var(--fs-md); }
.site-key-check.is-pass { color: var(--ok); }
.site-key-check.is-fail { color: var(--err); }
.site-key-box, .site-key-add-form { display: grid; gap: 8px; margin-top: 8px; }
.site-key-add { margin-top: 12px; }

@keyframes workspace-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* Equal, overlapping fades keep navigation continuous while the next page's
   loading placeholders give its asynchronous modules time to settle. */
::view-transition-old(root) { animation: 320ms cubic-bezier(.4,0,.2,1) both fade-leave; }
::view-transition-new(root) { animation: 320ms cubic-bezier(.4,0,.2,1) both fade-arrive; }
@keyframes fade-leave { to { opacity: 0; } }
@keyframes fade-arrive { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .dns-record-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dns-proxy-field, .dns-form-actions { grid-column: 1 / -1; }
  .health-devices { grid-template-columns: 1fr; }
  .health-device + .health-device { padding: 16px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .obs-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-tool-advanced .more-hint { display: none; }
  .site-cards { grid-template-columns: minmax(0, 1fr); }
  .site-card { width: 100%; max-width: none; }
  .site-card-skeleton { width: 100%; }
  .insight > summary { padding-inline: 12px; }
  .insight-body { padding: 4px 12px 12px; }
  .insight .search-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .traffic-loading { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .traffic-skeleton-chart { min-height: 105px; }
  .health-metric { padding: 0 8px; }
  .health-metric-line { align-items: flex-start; flex-direction: column; }
  .obs-spark { height: 104px; }
  .obs-lists { grid-template-columns: 1fr; }
  .dns-record-form { grid-template-columns: 1fr 1fr; }
  .dns-record-form .dns-content-field, .dns-record-form .dns-proxy-field, .dns-form-actions { grid-column: 1 / -1; }
  .dns-form-actions { justify-content: stretch; }
  .dns-form-actions .portal-button { flex: 1; }
  /* The records table is a short stack per record on a phone, so Edit and Delete are never scrolled out of sight. */
  .dns-table, .dns-table tbody, .dns-table .dns-edit-row, .dns-table .dns-edit-row > td { display: block; }
  .dns-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dns-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .dns-table tbody tr:last-child { border-bottom: 0; }
  .dns-row > td { padding: 0; border: 0; }
  .dns-row > .dns-name { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
  .dns-row > .dns-content { flex: 1 1 100%; max-width: none; }
  .dns-row > .dns-actions { min-width: 0; margin: 0 var(--quiet-offset) 0 auto; }
  .dns-label { display: inline; margin-right: 6px; color: var(--muted); font-size: var(--fs-sm); }
  .dns-edit-row > td { padding: 8px 0; border: 0; }
  .notice-actions { width: 100%; }
  /* A row with a group of actions puts them under its words on a phone, not in a column beside them. */
  .row:has(> .portal-actions) { flex-wrap: wrap; }
  .row:has(> .portal-actions) > .row-copy { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* Website protection (public/site-security.html): the overview as rows, then the controls as switch rows under a
   heading each. The switch says on or off, so a chip appears only for a fact the switch cannot say. */
.security-overview .row { align-items: flex-start; }
.security-overview .row-desc { overflow: visible; white-space: normal; }
.security-overview > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.security-notice { display: grid; justify-items: start; gap: 8px; }
.security-notice p { margin: 0; }
.security-action { margin-top: 8px; }
/* "What visitors notice" hangs under its own row as a small disclosure, so a control is one block, not two rows. */
.security-controls .option-row + .more { border-top: 0; }
.security-controls .more > summary { justify-content: flex-start; min-height: var(--control-h-sm); color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.security-controls .more > summary::after { margin: 0 0 3px 0; }
.security-controls .more[open] > summary::after { margin: 3px 0 0 0; }
.security-controls .more > summary:hover { color: var(--metal); }
.security-controls .more-body { padding-top: 4px; border-top: 0; }
.security-controls .more-body p { max-width: 72ch; }
@media (max-width: 640px) {
  .security-overview .row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---- The assistant panel: docked to the right of every signed-in page ----- */

.agent-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--metal);
  color: var(--metal-ink);
  font: 600 var(--fs-lg)/1 var(--font);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.agent-launcher-bird { width: 32px; height: auto; border-radius: 50%; background: var(--surface); }
.agent-launcher:hover { background: var(--metal-hi); }
.agent-launcher:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
.agent-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: var(--agent-panel-width);
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
}

/* The header is one row of small controls: the conversation, New chat, More (a standard menu) and a close icon. */
.agent-panel-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.agent-switcher { flex: 1; min-width: 0; height: var(--control-h-sm); }
.agent-panel-new { flex: none; }
.agent-panel-more { position: relative; flex: none; }
.agent-panel-more > summary { list-style: none; }
.agent-panel-more > summary::-webkit-details-marker { display: none; }
.agent-panel-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 1; width: auto; min-width: 160px; }
.agent-panel-close { flex: none; }
.agent-panel-chat { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; border: 0; border-radius: 0; }
.agent-panel-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.agent-panel-compose textarea { flex: 1; min-height: var(--control-h); max-height: 200px; resize: none; }
.agent-panel .portal-status { margin: 0; padding: 0 12px 8px; }
.agent-panel .portal-status:empty { display: none; }

/* A fresh chat: one sentence, then starting points as hairline rows. */
.agent-empty { display: grid; gap: 0; color: var(--ink-2); font-size: var(--fs-md); }
.agent-empty p { margin: 0 0 8px; }
.agent-suggestion {
  position: relative;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 28px 12px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md);
  line-height: 20px;
  cursor: pointer;
  text-align: left;
}
.agent-suggestion::after { content: ""; position: absolute; right: 8px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
.agent-suggestion:hover { background: var(--surface-2); }
.agent-suggestion:focus-visible { outline-offset: -2px; }
/* The first-website questions: one card, four runs of questions told apart by a hairline. */
.agent-intake { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.agent-intake-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.agent-intake-note { margin: -6px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.agent-intake .group + .group { margin-top: 0; }
.agent-intake .portal-field { margin: 0 0 12px; }
.agent-intake .portal-field:last-child { margin-bottom: 0; }
.agent-intake-field { display: grid; gap: 4px; }
.agent-intake-field + .agent-intake-field { margin-top: 12px; }
.agent-intake-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-intake-chip { display: inline-flex; align-items: center; min-height: var(--control-h-sm); padding: 4px 10px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.agent-intake-chip:hover { border-color: var(--ink-2); }
.agent-intake-chip[aria-pressed="true"] { border-color: var(--metal); background: var(--info-bg); color: var(--metal); font-weight: 600; }
.agent-intake-chip[aria-pressed="true"]::before { content: "✓" / ""; margin-right: 6px; }
.agent-intake-radios { display: flex; flex-wrap: wrap; gap: 0 16px; color: var(--ink); }
.agent-intake-radio { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-h-sm); cursor: pointer; }
.agent-intake-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.agent-intake-add-icon { font-size: 1.15rem; line-height: 1; }
.agent-panel-attach[aria-expanded="true"] { border-color: var(--metal); color: var(--metal); }

/* The drawer beside the assistant (public/agent/add-drawer.js): drop, choose or paste, and a row with a bar for each
   upload. Wide screens: a column to the left of the panel, the page still beside it. Narrow ones: over the panel. */
.agent-drawer, .agent-questions {
  position: fixed;
  top: 0;
  bottom: 0;
  right: var(--agent-panel-width);
  z-index: 59;
  width: min(330px, calc(100vw - var(--agent-panel-width)));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  animation: agent-drawer-in 160ms ease-out both;
}

@keyframes agent-drawer-in { from { opacity: 0; } to { opacity: 1; } }
.agent-drawer-head, .agent-questions-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.agent-drawer-title, .agent-questions-title { flex: 1; margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.agent-drawer-close, .agent-questions-close { flex: none; }
.agent-drawer-body, .agent-questions-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 16px; padding: 16px; }
/* The drop zone is the one dashed edge: it says "drop here", as an empty state does. */
.agent-drawer-drop { display: grid; justify-items: center; gap: 8px; padding: 20px 14px; border: 1px dashed var(--line-control); border-radius: var(--radius); background: var(--surface); text-align: center; }
.agent-drawer-drop.is-dropping { border-color: var(--metal); background: var(--info-bg); }
.agent-drawer-drop-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--metal); font-size: var(--fs-h2); font-weight: 600; }
.agent-drawer-drop-title { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.agent-drawer-drop .portal-button { justify-self: center; }
.agent-drawer-hint, .agent-questions-hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.agent-drawer-paste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.agent-drawer-paste textarea { width: 100%; min-height: 72px; resize: vertical; }
.agent-drawer-paste .portal-button { justify-self: end; }
/* What is going up: one list, a hairline between the rows, a bar on the row that is moving. */
.agent-drawer-list { display: grid; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); list-style: none; }
.agent-drawer-list:empty { display: none; }
.agent-drawer-item { display: grid; gap: 4px; padding: 10px 12px; font-size: var(--fs-sm); }
.agent-drawer-item + .agent-drawer-item { border-top: 1px solid var(--line); }
.agent-drawer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }
.agent-drawer-item progress { width: 100%; height: 6px; accent-color: var(--metal); }
.agent-drawer-line { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.agent-drawer-item[data-phase="done"] .agent-drawer-state { color: var(--ok); font-weight: 600; }
.agent-drawer-item[data-phase="done"] .agent-drawer-state::before { content: "✓ "; }
.agent-drawer-item[data-phase="failed"] .agent-drawer-line { color: var(--err); }
.agent-drawer-heading { margin: 4px 0 0; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.agent-drawer-kept { display: grid; gap: 8px; }
/* The tab on the panel's left edge, there from the first message: the drawer can be found without knowing to look. */
.agent-drawer-tab {
  position: fixed;
  top: 132px;
  right: var(--agent-panel-width);
  z-index: 59;
  display: none;
  justify-items: center;
  gap: 2px;
  width: 44px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface);
  color: var(--metal);
  font: 600 var(--fs-xs)/1.1 var(--font);
  cursor: pointer;
}
body.agent-panel-open .agent-drawer-tab { display: grid; }
body.agent-drawer-open .agent-drawer-tab { display: none; }
.agent-drawer-tab:hover { background: var(--info-bg); }
.agent-drawer-tab-icon { font-size: 1.25rem; line-height: 1; }
@media (max-width: 759px) {
  .agent-drawer, .agent-questions { right: 0; width: var(--agent-panel-width); max-width: 100vw; z-index: 61; }
  body.agent-panel-open .agent-drawer-tab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-drawer, .agent-questions { animation: none; }
}
/* The open questions, together (public/agent/questions-drawer.js): a line above the chat while the plan still needs facts,
   and a drawer in the Add drawer's place (it shares that drawer's shell rules above) with one box for each. */
.agent-questions-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--info-bg); font-size: var(--fs-sm); color: var(--ink); }
.agent-questions-count { font-weight: 600; }
.agent-questions-list { display: grid; grid-template-columns: minmax(0, 1fr); }
/* Each question is a standard group, so the shared hairline between groups divides them; the list adds no gap of its own. */
.agent-question .group-title, .agent-question .agent-questions-hint { overflow-wrap: anywhere; }
.agent-question textarea { width: 100%; min-height: 64px; resize: vertical; }
.agent-question-leave { display: flex; align-items: center; gap: 8px; min-height: var(--control-h-sm); font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.agent-questions-foot { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.agent-questions-foot .portal-button { justify-self: end; }
.agent-panel-chat.is-dropping { outline: 2px dashed var(--metal); outline-offset: -6px; }

/* The cards inside an assistant message are runs of the message, told apart by a hairline: the bubble is the box. */
.agent-ready { padding: 12px 0 0; border-top: 1px solid var(--line); }
.agent-ready p { margin: 0 0 8px; color: var(--ink-2); font-size: var(--fs-md); }
.agent-secret { display: grid; gap: 8px; margin-top: 10px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.agent-secret label { display: grid; gap: 6px; font-size: var(--fs-md); font-weight: 600; }
.agent-secret-note { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.agent-plan { display: grid; gap: 8px; margin-top: 10px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.agent-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.agent-approve .portal-button { margin: 0; }
.agent-approve .agent-secret-note { margin: 0; }
.agent-approve .site-credit { flex-basis: 100%; }
/* "Website by Jaybird Digital" on or off (site-credit-switch.js): the editor, Website settings, Approve and publish. */
.site-credit { display: grid; gap: 4px; }
.site-credit p { margin: 0; }
.site-credit p:empty { display: none; }
.agent-plan-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.agent-plan-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-plan-pay .portal-button, .agent-plan .portal-button { margin: 0; }
.agent-plan-more > .more-body { padding: 4px 0 12px; border-top: 0; }
.agent-plan-code { display: flex; gap: 8px; margin-top: 8px; }
.agent-plan-email { display: grid; gap: 6px; margin-top: 8px; font-size: var(--fs-sm); }
.agent-plan-code input { flex: 1; min-width: 0; text-transform: uppercase; }
/* The Materials card: what the owner handed over for a new website, read; adding is the drawer's (below). */
.agent-materials { display: grid; gap: 10px; margin-top: 10px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.agent-materials > .portal-button { justify-self: start; margin: 0; min-height: var(--control-h); padding: 0 14px; font-size: var(--fs-md); }
/* A card's one column may shrink to the card. Left implicit (auto), it took the width of its widest piece's minimum, an
   input's built-in ~190px plus a button, and in the 400px panel "Add link" and "Add note" ran off the card's edge
   (owner, 2026-11-14). The same holds for every card made as a grid in a chat bubble. */
.agent-materials, .agent-look, .agent-market, .agent-plan, .agent-secret, .agent-intake { grid-template-columns: minmax(0, 1fr); }
.agent-materials-read { margin-top: 0; }
.agent-materials-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.agent-materials-list { display: grid; }
.agent-materials-read { gap: 0; }
/* What was handed over: hairline rows under the title, not a box for each, so the card sitting in a bubble stays one level. */
.agent-materials-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px var(--space-2); padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.agent-materials-name { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.agent-materials-name span { color: var(--ink-2); }
.agent-materials-note { margin: 0; color: var(--ink-2); }
.agent-materials-note.is-problem { color: var(--err); }
.agent-materials-use { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); }
.agent-materials-photos { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
/* Remove is the row's action at its end, in the first line, so it never pokes out of the card at the left. */
.agent-materials-item > :not(.agent-materials-remove) { grid-column: 1; }
.agent-materials-remove { grid-column: 2; grid-row: 1; align-self: start; margin-block: -8px; }
/* The look card: the chosen look and three others, as swatches drawn with their own corners (src/generation/design-directions.js lookOptions). */
.agent-look { display: grid; gap: 10px; margin-top: 10px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.agent-look-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.agent-look-option { display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); font: inherit; font-size: var(--fs-xs); color: var(--ink-2); text-align: left; cursor: pointer; }
.agent-look-option strong { color: var(--ink); font-size: var(--fs-sm); }
.agent-look-option.is-chosen { border-color: var(--metal); }
.agent-look-swatch { display: grid; gap: 6px; align-content: space-between; height: 64px; padding: 8px; border: 1px solid; border-radius: var(--radius-sm); }
.agent-look-swatch.is-square, .agent-look-swatch.is-square .agent-look-dots span { border-radius: 0; }
.agent-look-headline { font-size: var(--fs-xl); line-height: 1; font-weight: 600; }
.agent-look-dots { display: flex; gap: 4px; }
.agent-look-dots span { display: block; width: 14px; height: 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); }
.agent-look-line { font-size: var(--fs-xs); line-height: 1.35; }
/* A look the design research drew from websites of the owner's trade (researchDirection). */
.agent-look-source { justify-self: start; padding-block: 2px; white-space: normal; }
/* The Market card: who the business is up against and what the website leads with (src/agent/market-research.js). */
.agent-market { display: grid; gap: 10px; margin-top: 10px; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.agent-market-lead { margin: 0; color: var(--ink); }
.agent-market-lead span { color: var(--ink-2); }
.agent-market-section { display: grid; gap: 4px; }
.agent-market-heading { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.agent-market-list { margin: 0; padding-left: 18px; color: var(--ink); }
.agent-market-list li { margin: 2px 0; overflow-wrap: anywhere; }
.agent-market-list a { color: var(--metal); text-decoration: none; }
/* The journey strip: where a first website stands, in six steps above the chat (src/build/build-journey.js). */
.agent-journey { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 10px 14px; list-style: none; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-xs); color: var(--ink-2); }
.agent-journey-step { display: inline-flex; align-items: center; gap: 6px; }
.agent-journey-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: var(--surface); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.agent-journey-step.is-done .agent-journey-dot { border-color: var(--metal); background: var(--metal); color: var(--on-accent); }
.agent-journey-step.is-now { color: var(--ink); font-weight: 600; }
.agent-journey-step.is-now .agent-journey-dot { border-color: var(--metal); color: var(--metal); }
.agent-journey-step.is-next { opacity: 0.75; }
.agent-progress { display: grid; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }

.agent-progress-item { display: grid; gap: 4px; }
.agent-progress-title { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.agent-progress-stage { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.agent-progress progress { width: 100%; height: 6px; accent-color: var(--metal); }
/* Wide screens keep the page usable beside the panel; narrow ones let it cover the page. */
@media (min-width: 1100px) {
  /* The Add tab hangs 44px off the panel's edge: the page stops short of it, with a gap, so no button sits under or against it. */
  body.agent-panel-open { padding-right: calc(var(--agent-panel-width) + var(--space-5) + var(--space-4)); }
}
@media (max-width: 640px) {
  .agent-launcher { right: 12px; bottom: 12px; }
}
/* On touch and phones the panel's small controls take the full 44px target. */
@media (pointer: coarse), (max-width: 640px) {
  .agent-panel .portal-button.sm, .agent-drawer .portal-button.sm, .agent-questions .portal-button.sm { min-height: var(--control-h); }
  .agent-panel .portal-button.icon.sm, .agent-drawer .portal-button.icon.sm, .agent-questions .portal-button.icon.sm { width: var(--control-h); }
  .agent-switcher { height: var(--control-h); }
  .agent-intake-chip, .agent-intake-radio { min-height: var(--control-h); }
}

/* ---- Domains: connect, transfer, search ----------------------------------- */
/* A panel of the domain card is a section of the card: a hairline above it, no box of its own. The one tinted tile is the
   domain chosen to buy (.domain-selection). */
.domain-option, .domain-instructions, .transfer-step { padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.domain-option { display: grid; gap: 6px; margin-top: 16px; }
.domain-option h3 { margin: 0; font-size: var(--fs-h2); }
.domain-option > .portal-small { max-width: 80ch; margin: 0; color: var(--ink-2); }
.domain-option > .portal-button, .domain-option > .portal-link-button { justify-self: start; }
.domain-unavailable { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }

.domain-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: stretch; margin-top: 12px; }
.domain-search-form .portal-button { min-height: var(--control-h); white-space: nowrap; }

.domain-selection, .domain-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.domain-selection { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-3); }
.domain-name { overflow-wrap: anywhere; font-size: var(--fs-h2); }
.domain-selection p, .domain-result p, .domain-note { margin: 4px 0 0; }
/* With no domain yet, the card's first line is its note: it sits under the title like every card's note. */
#domain-body > .domain-note:first-child { margin-top: -10px; }

.domain-instructions { display: grid; gap: 8px; margin-top: 16px; }
.domain-instructions h3 { margin: 0 0 4px; font-size: var(--fs-lg); }
.domain-instructions .portal-small { margin: 0; overflow-wrap: anywhere; }
.domain-instructions > .portal-button { justify-self: start; margin-top: 6px; }
.domain-instructions .transfer-nameserver { margin: 0; }
.domain-carryover { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.domain-carryover-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 4px; font-size: var(--fs-md); }
.domain-records-list { margin: 6px 0 0; padding-left: 1.25rem; display: grid; gap: 4px; font-size: var(--fs-md); overflow-wrap: anywhere; }
.domain-records-list code { padding: 1px 5px; border-radius: var(--radius-xs); background: var(--surface-2); }

.transfer-step { display: grid; gap: 10px; margin-top: 16px; }
/* The transfer's own title: a section of the card like the others (hairline above), larger than the step titles under it. */
.domain-panel-title { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-h2); }
.domain-panel-title + .transfer-step { margin-top: 12px; padding-top: 0; border-top: 0; }
.transfer-step[data-state="waiting"] { opacity: 0.75; }
/* A step that is done, or not started, is one quiet row. Only the step in front of the owner is a full section. */
.transfer-step[data-state="done"], .transfer-step[data-state="waiting"] {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 0; padding: 9px 0; opacity: 1;
}
.transfer-step[data-state="done"] h3, .transfer-step[data-state="waiting"] h3 { font-size: var(--fs-lg); }
.transfer-step[data-state="done"] .portal-status, .transfer-step[data-state="waiting"] .portal-small {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--ink-2);
}
.transfer-step[data-state="done"] .portal-status.success { color: var(--ok); }
.domain-facts { color: var(--ink-2); font-size: var(--fs-md); }
.domain-facts span:not(:last-child)::after { content: "·"; margin: 0 0.2em 0 0.45em; }
.transfer-step h3, .transfer-step h4 { margin: 0; font-size: var(--fs-lg); }
.transfer-step h4 { margin-top: 6px; font-size: var(--fs-md); }
.transfer-step p, .transfer-steps { margin: 0; font-size: var(--fs-md); overflow-wrap: anywhere; }
.transfer-steps { padding-left: 1.25rem; display: grid; gap: 6px; }
.transfer-nameserver { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.transfer-nameserver code { padding: 4px 8px; border-radius: var(--radius-xs); background: var(--surface-2); }
.transfer-step .portal-button { justify-self: start; }
.transfer-recommended { display: grid; gap: 10px; justify-items: start; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.domain-results { display: grid; gap: 8px; margin-top: 12px; }
.domain-result { padding: 14px 0; border-top: 1px solid var(--line); }
.domain-term-control { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.domain-remove { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  .domain-search-form { grid-template-columns: 1fr; }
  .domain-search-form .portal-button { width: 100%; }
  .domain-selection, .domain-result { flex-direction: column; align-items: flex-start; }
}

/* ---- Small widgets ------------------------------------------------------- */
/* The floating link public/operator/report-problem.js adds to every signed-in page: it is a .portal-button.sm, so this is only
   where it sits. */
.report-problem-button { position: fixed; left: var(--space-4); bottom: max(var(--space-5), env(safe-area-inset-bottom)); z-index: 50; box-shadow: var(--shadow-sm); }
@media (max-width: 640px) { .report-problem-button { left: var(--space-3); } }

/* Website settings > Website icon (public/site-icon.js). */
.site-icon-preview { display: flex; gap: 14px; align-items: center; }
.site-icon-preview .portal-small { margin: 0; }
.site-icon-sizes { display: flex; align-items: flex-end; gap: 14px; flex: none; }
.site-icon-size { display: grid; justify-items: center; gap: 4px; margin: 0; }
.site-icon-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--icon-bg, var(--ink));
  color: var(--icon-fg, var(--on-accent));
  font: 700 var(--fs-xl)/1 Helvetica, Arial, sans-serif;
}
.site-icon-image { flex: none; width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; }
.site-icon-about { flex: 1 1 100%; margin: 0; }

/* A bounded, keyboard-accessible record of the assistant's actual operations. */
.agent-activity { margin: 6px 0 12px; font-size: var(--fs-sm); color: var(--ink-2); }
.agent-activity-status { margin: 0 0 6px; }
.agent-activity-list { max-height: 160px; overflow-y: auto; overscroll-behavior: contain; margin: 8px 0 0; padding-left: 22px; }
.agent-activity-list li { padding: 4px 0; overflow-wrap: anywhere; }
.agent-activity-list li[data-phase="running"]::marker { content: "◌  "; }
.agent-activity-list li[data-phase="complete"]::marker { content: "✓  "; }
.agent-activity-list li[data-phase="attention"]::marker { content: "!  "; }

/* The operator bar: a customer's website opened from the operator console (public/operator-bar.js). */
.operator-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 8px 16px;
  background: var(--metal-lo);
  color: var(--metal-ink);
  font-size: var(--fs-md);
}
.operator-bar-leave {
  border: 1px solid color-mix(in srgb, var(--metal-ink) 50%, transparent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 4px 12px;
  cursor: pointer;
}
.operator-bar-leave:hover, .operator-bar-leave:focus-visible { background: color-mix(in srgb, var(--metal-ink) 12%, transparent); }
.operator-bar-leave:focus-visible { outline-color: var(--on-accent); }
.operator-bar-leave:disabled { opacity: 0.6; cursor: default; }
/* Customers' websites opened from the console, on the operator's dashboard (public/dashboard.js). */
.console-site-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.console-site { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.console-site a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.console-site a:hover { text-decoration-color: currentColor; }

/* ---- A website's own page (/claim/<id>, public/claim.html): see it, keep it, put it on a domain ---- */
/* It wears .narrow only so the language field is seated above the first card, as on sign-in and help (public/languages/
   portal-i18n.js looks for .portal-shell.narrow > .portal-card); its own width and top padding win by coming second. */
.portal-shell.claim-shell { width: min(880px, calc(100% - 32px)); padding-top: 40px; display: grid; gap: 22px; }
.claim-shell > .portal-card + .portal-card { margin-top: 0; }
.claim-shell .auth-brand { margin-bottom: 0; }

.claim-hero h1 { margin: 0 0 8px; line-height: 1.15; }
.claim-lead { margin: 0; color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.6; }
/* Where the copy is for now: a hairline row in the card, not a box inside it. */
.claim-address {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.claim-address .portal-small { margin: 0; }
.claim-address-name { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
/* The way on from a link that leads nowhere: a sentence with a link in it (a button once it is the one thing to press). */
.claim-again { margin: 12px 0 0; }
.claim-again a:not(.portal-button) { color: var(--metal); text-decoration: underline; text-underline-offset: 3px; }
.claim-fixes ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); line-height: 1.6; }
.claim-choices > h2 { margin: 10px 0 6px; font-size: var(--fs-xl); letter-spacing: -0.01em; }
.claim-choices > .claim-lead { margin-bottom: 18px; }
.claim-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Each choice is a card (.portal-card); only what is special to this page is here. */
.claim-option { display: flex; flex-direction: column; gap: 10px; }
.claim-option h3 { margin: 0; font-size: var(--fs-h2); }
.claim-option p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.claim-option .portal-button { align-self: flex-start; margin-top: auto; }
.claim-option.recommended { grid-column: 1 / -1; border-color: var(--metal); }
.claim-option.recommended .portal-button { margin-top: 4px; }
.claim-option > .chip { align-self: flex-start; }
/* The one choice left over is not half a row. */
.claim-options:not(:has(> #keep-part:not([hidden]), > #kept-part:not([hidden]))) > #domain-part { grid-column: 1 / -1; }
.claim-option p.claim-price { color: var(--ink); }
.claim-price strong { font-size: var(--fs-xl); letter-spacing: -0.02em; }
.claim-option:not(.recommended) .claim-price { font-size: var(--fs-md); font-weight: 600; }
.claim-option:not(.recommended) .claim-price strong { font-size: inherit; letter-spacing: 0; }
#domain-part .claim-price { color: var(--muted); }
.claim-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.claim-list li { position: relative; padding-left: 26px; color: var(--ink-2); line-height: 1.5; }
.claim-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.3em; width: 14px; height: 8px;
  border-left: 2px solid var(--metal); border-bottom: 2px solid var(--metal); transform: rotate(-45deg);
}
/* The questions are .more disclosures with a hairline between them. */
.claim-questions h2 { margin-bottom: 4px; }
.claim-questions .more + .more { border-top: 1px solid var(--line); }
.claim-questions .more-body p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.claim-questions a { color: var(--metal); }
.claim-delete { margin: 0; text-align: center; }

/* ---- Adding photos at a picture link (/add-pictures/<link>, public/add-pictures.html): the claim page's frame ---- */
.pictures-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.pictures-pick-row .portal-small { margin: 0; }
.pictures-pick { position: relative; cursor: pointer; }
.pictures-pick:focus-within { outline: 2px solid var(--metal); outline-offset: 2px; }
.pictures-pick:has(.pictures-input:disabled) { opacity: 0.6; cursor: progress; }
.pictures-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pictures-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.pictures-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; }
.pictures-thumb { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.pictures-name { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pictures-state { margin: 2px 0 0; }
.pictures-state.ok { color: var(--ok); }
.pictures-state.error { color: var(--err); }
.pictures-row progress { display: block; width: 100%; height: 6px; margin-top: 6px; accent-color: var(--metal); }
.pictures-row progress[hidden] { display: none; }
.pictures-view { margin: 16px 0 0; }
@media (max-width: 700px) {
  .claim-options { grid-template-columns: minmax(0, 1fr); }
  .claim-address .portal-button { width: 100%; }
}
