/* Studio admin. Plain, high-contrast and large-target: this gets used on a
   phone between clients as often as at a desk. */

:root {
  --bg: #f6f4ef;
  --panel: #fff;
  --ink: #1c1a17;
  --ink-soft: #5d574d;
  --line: #ddd7cb;
  --accent: #7a3f22;
  --accent-ink: #fff;
  --ok: #37652f;
  --warn: #8a5a12;
  --danger: #97331f;
  --radius: 10px;      /* panels */
  --radius-s: 8px;     /* inputs and buttons */
  --radius-xs: 6px;    /* thumbnails, small controls */
  --tint: #fdf8f4;     /* the accent at a whisper, for selected and changed */
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Checkboxes, radios and the caret take the studio's colour, not the browser's blue. */
  accent-color: var(--accent);
  caret-color: var(--accent);
}
::selection { background: rgb(122 63 34 / 0.18); }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

a { color: var(--accent); }
.loading { padding: 3rem; text-align: center; color: var(--ink-soft); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------ shell */

.shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 900px) { .shell { grid-template-columns: 232px 1fr; } }

.sidebar {
  background: var(--ink);
  color: #efeae0;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sidebar-brand { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; font-weight: 600; }
.brand-mark { width: 30px; height: 30px; flex: none; color: #d9ab4f; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.sidebar-brand small { display: block; font-size: 0.78rem; font-weight: 400; color: #b7b0a4; letter-spacing: 0.02em; margin-top: 0.15rem; }
.sidebar nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
@media (min-width: 900px) { .sidebar nav { flex-direction: column; flex-wrap: nowrap; } }
.sidebar nav a {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  color: #cfc7b8;
  text-decoration: none;
  font-size: 0.95rem;
}
.sidebar nav a:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.sidebar nav a.active { background: #efeae0; color: var(--ink); font-weight: 600; }
@media (min-width: 900px) { .sidebar nav a.nav-sep { margin-top: 0.85rem; position: relative; }
  .sidebar nav a.nav-sep::before { content: ""; position: absolute; left: 0.85rem; right: 0.85rem; top: -0.45rem; border-top: 1px solid rgb(255 255 255 / 0.12); } }
.sidebar-foot { margin-top: auto; font-size: 0.82rem; opacity: 0.75; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-foot a { color: #cfc7b8; }

.main { padding: clamp(1rem, 3vw, 2rem); max-width: 1100px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: 0.35rem 0 0; color: var(--ink-soft); max-width: 60ch; }

/* ----------------------------------------------------------------- panels */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; }
.row-meta { font-size: 0.85rem; color: var(--ink-soft); }
.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.thumb { width: 62px; height: 62px; flex: none; object-fit: cover; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.thumb--empty { display: grid; place-items: center; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

/* ----------------------------------------------------------------- inputs */

label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; }
label .hint { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 0.15rem; }

input[type=text], input[type=password], input[type=number], input[type=url], input[type=email], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 700px) { .field-row { grid-template-columns: 1fr 1fr; } }

.check { display: flex; align-items: center; gap: 0.6rem; }
.check input { width: 20px; height: 20px; }
.check label { margin: 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.btn:hover { border-color: var(--ink-soft); }
a.btn { text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn--small { min-height: 36px; padding: 0.3rem 0.7rem; font-size: 0.84rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn--primary[disabled] { opacity: 1; background: transparent; color: var(--ink-soft); border-color: var(--line); font-weight: 500; }

/* The row of buttons that ends a form: save first, delete at the far end. */
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.25rem; }
.form-actions .btn--danger { margin-left: auto; }

/* ------------------------------------------------------------------ misc */

.pill { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; border: 1px solid; }
.pill--available { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill--on_hold { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill--claimed, .pill--draft { color: var(--ink-soft); border-color: var(--line); }
.pill--published { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

.empty { padding: 2rem 0; color: var(--ink-soft); text-align: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 50;
  padding: 0.8rem 1.3rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 14px 30px -14px rgb(0 0 0 / 0.5);
  font-size: 0.92rem;
}
.toast--error { background: var(--danger); }

.media-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.media-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.media-item div { padding: 0.6rem; font-size: 0.8rem; }

.theme-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.theme-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; background: #fff; text-align: left; font: inherit; }
.theme-card.active { border-color: var(--accent); }
.theme-card strong { display: block; margin-bottom: 0.3rem; }
.theme-card span { font-size: 0.85rem; color: var(--ink-soft); }
.theme-swatches { display: flex; gap: 4px; margin: 0.7rem 0 0.3rem; }
.theme-swatches i { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgb(0 0 0 / 0.15); }
.theme-card .row-actions { margin-top: 0.6rem; }

.login { max-width: 380px; margin: clamp(2rem, 10vh, 6rem) auto; }
.login .panel { padding: 1.75rem; }
.login h1 { margin-bottom: 0.35rem; }
.login p.sub { margin: 0 0 1.5rem; color: var(--ink-soft); font-size: 0.92rem; }

/* --------------------------------------------------------- markdown tools */

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.md-toolbar + textarea { border-radius: 0 0 8px 8px; }
.md-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.md-btn:hover { border-color: var(--ink-soft); background: var(--bg); }
.md-icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ------------------------------------------------------------- split view */

.editor-split { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 1100px) {
  .editor-split { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); }
  .editor-preview { position: sticky; top: 1rem; }
}

.editor-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.editor-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--ink);
  color: #efeae0;
  font-size: 0.8rem;
}
.editor-preview-bar select {
  min-height: 32px;
  max-width: 160px;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
}
.editor-preview iframe {
  display: block;
  width: 100%;
  height: min(78vh, 900px);
  border: 0;
  background: #fff;
}

/* --------------------------------------------------------- draft/publish */

.publish-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.publish-bar.has-changes { border-color: var(--accent); background: var(--tint); }
.publish-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ------------------------------------------------------------ drag order */

.block-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.6rem; background: #fff; }
.block-item[draggable="true"] { cursor: grab; }
.block-item.dragging { opacity: 0.4; }
.block-item.drop-target { border-color: var(--accent); border-style: dashed; }
.block-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  font-weight: 600;
}
.block-grip { color: var(--ink-soft); cursor: grab; font-size: 1.1rem; line-height: 1; }
.block-body { padding: 0 0.9rem 0.9rem; }
.block-flag { font-size: 0.72rem; font-weight: 600; color: var(--accent); }

/* ------------------------------------------------------------- phone shell */
/* The admin gets used on a phone between clients, so the nav cannot eat the
   screen. Below 900px it becomes a compact sticky bar with the sections in a
   single horizontally-scrolling row — around 90px instead of 373px. */

@media (max-width: 899px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 0.55rem;
    padding: 0.6rem 0.9rem 0.5rem;
    /* Grid items default to min-width:auto, so without this the sidebar grows
       to fit the whole nav row and takes the page with it — the nav's
       overflow-x never gets a chance to apply. */
    min-width: 0;
  }
  .sidebar-brand { font-size: 0.95rem; white-space: nowrap; }
  .sidebar-brand small { display: none; }

  .sidebar nav {
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    gap: 0.3rem;
    margin: 0 -0.9rem;
    padding: 0 0.9rem 0.2rem;
    scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { white-space: nowrap; padding: 0.55rem 0.8rem; font-size: 0.88rem; }

  /* Sign out lives on Your account instead, so the bar stays one row. */
  .sidebar-foot { display: none; }

  .main { padding: 0.9rem; min-width: 0; }
  .page-head { margin-bottom: 1rem; }

  /* The row fades at its right edge so it reads as scrollable. */
  .sidebar nav { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }

  /* Publish lives at the bottom of the screen, whichever tab is open. */
  .publish-bar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 25; margin: 0; border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -12px 30px -18px rgb(0 0 0 / 0.35); padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
  .has-publish-bar .main { padding-bottom: 8rem; }
  .publish-bar .row-meta { display: none; }

  /* A long form keeps its Save in reach. */
  .form-actions--sticky { position: sticky; bottom: 0; z-index: 10; margin: 0 -0.9rem -0.9rem; padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }

  .toast { top: 100px; bottom: auto; max-width: calc(100% - 2rem); }
}

/* ---------------------------------------------------- phone: editor tabs */
/* Stacked, the preview lands three and a half screens down and never gets
   found. On a phone the two panes become tabs instead. */

.editor-tabs { display: none; }

@media (max-width: 1099px) {
  .editor-tabs {
    position: sticky;
    top: 92px;
    z-index: 15;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 0.9rem;
    padding: 4px;
    background: var(--line);
    border-radius: var(--radius);
  }
  .editor-tabs button {
    min-height: 42px;
    background: transparent;
    border: 0;
    border-radius: var(--radius-s);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
  }
  .editor-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }

  .editor-split[data-pane="editor"] .editor-preview { display: none; }
  .editor-split[data-pane="preview"] > div:first-child { display: none; }
  .editor-preview iframe { height: calc(100vh - 210px); }
}

/* Targets that were under the 24px minimum on a phone. */
.sidebar-foot a,
.panel details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.panel details > summary { min-height: 40px; cursor: pointer; list-style: none; }
.panel details > summary::-webkit-details-marker { display: none; }
.panel details > summary::before { content: "+"; margin-right: 0.6rem; color: var(--accent); font-size: 1.1rem; line-height: 1; }
.panel details[open] > summary::before { content: "–"; }

/* Rows stack on a narrow screen rather than squeezing a title beside a
   dropdown — this is the flash list, which is the thing most likely to be
   updated one-handed on a phone. */
.row-select { max-width: 170px; font-weight: 600; }
.row-select[data-status="available"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.row-select[data-status="on_hold"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.row-select[data-status="claimed"], .row-select[data-status="draft"] { color: var(--ink-soft); }

@media (max-width: 620px) {
  .row { flex-wrap: wrap; row-gap: 0.6rem; }
  .row-main { flex: 1 1 100%; }
  .row-select { flex: 1 1 auto; max-width: none; }
  .row-actions { flex: 0 0 auto; }
  .thumb { width: 52px; height: 52px; }
}

/* --------------------------------------------------------------- dashboard */

.status-choices { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.status-choice {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.status-choice:hover { border-color: var(--ink-soft); }
.status-choice.active { border-color: var(--accent); background: var(--tint); }
.status-choice strong { font-size: 1rem; }
.status-choice span { font-size: 0.85rem; color: var(--ink-soft); }

.quick-links { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.quick-links a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.quick-links a:hover { border-color: var(--accent); background: var(--tint); }
.quick-links span { font-size: 0.85rem; color: var(--ink-soft); }

/* -------------------------------------------------------------------- help */

.help-summary { margin: 0; padding-left: 1.1rem; line-height: 1.85; }
.help-summary li { margin-bottom: 0.3rem; }

.faq-help details { border-bottom: 1px solid var(--line); }
.faq-help details:last-child { border-bottom: 0; }
.faq-help summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-help summary::-webkit-details-marker { display: none; }
.faq-help summary::before { content: "+"; margin-right: 0.7rem; color: var(--accent); font-size: 1.15rem; }
.faq-help details[open] summary::before { content: "–"; }
.help-answer { padding: 0 0 1.1rem 1.6rem; max-width: 62ch; color: var(--ink-soft); }
.help-answer p { margin: 0 0 0.8rem; line-height: 1.65; }
.help-answer strong { color: var(--ink); }
.help-answer ul { margin: 0 0 0.8rem; padding-left: 1.1rem; }
.help-answer li { margin-bottom: 0.3rem; }
.help-answer code {
  padding: 0.1rem 0.35rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.9em;
}

/* Menu rows: label and address side by side, stacking on a phone. */
.nav-row { display: grid; gap: 0.5rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 700px) { .nav-row { grid-template-columns: 1fr 1.3fr auto; } }
.nav-row input { min-height: 40px; }

/* Reordering must not be drag-only: dragging is unusable by keyboard, and
   fiddly on a phone. These are the same action, reachable another way. */
.block-move { display: flex; gap: 0.4rem; padding: 0 0.9rem 0.6rem; }

.error-stack {
  max-height: 260px;
  margin: 0;
  padding: 0.8rem;
  overflow: auto;
  background: #1c1a17;
  color: #d9cfc0;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ------------------------------------------------------------ image field */
/* One way to choose a photo, everywhere a photo is chosen: what is picked,
   and a button that opens the picker. */

.image-field { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.image-field .thumb { width: 72px; height: 72px; }
.image-field-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.image-field-name { font-size: 0.85rem; color: var(--ink-soft); }

.picker { width: min(100% - 2rem, 760px); max-height: min(85vh, 720px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.45); }
.picker::backdrop { background: rgb(28 26 23 / 0.45); }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.picker-head h2 { font-size: 1.1rem; }
.picker-body { padding: 1rem 1.25rem 1.25rem; overflow: auto; max-height: calc(min(85vh, 720px) - 70px); }
.picker-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.picker-tile { position: relative; display: block; padding: 0; margin: 0; border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--bg); overflow: hidden; cursor: pointer; font: inherit; color: inherit; text-align: left; aspect-ratio: 1; }
.picker-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-tile:hover, .picker-tile:focus-visible { border-color: var(--accent); }
.picker-tile.is-current { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--tint); }
.picker-tile--upload { display: grid; place-items: center; gap: 0.3rem; border-style: dashed; color: var(--accent); font-weight: 600; font-size: 0.9rem; text-align: center; padding: 0.5rem; }
.picker-tile--upload svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.picker-tile-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.3rem 0.45rem; background: rgb(28 26 23 / 0.6); color: #fff; font-size: 0.72rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ rows */
/* A list row carries its picture. */
.thumb--empty { display: grid; place-items: center; color: var(--ink-soft); }
.thumb--empty svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.row-edit { flex: 1 1 100%; padding: 0.25rem 0 0.5rem 0; }
.row-edit[hidden] { display: none; }

/* ------------------------------------------------------------ stat tiles */
.stat-tiles { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.stat strong { display: block; font-size: 1.4rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.85rem; color: var(--ink-soft); }

/* -------------------------------------------------------------- utilities */
.muted { color: var(--ink-soft); }
.measure { max-width: 62ch; }
.mb-1 { margin-bottom: 1rem; }
.mt-1 { margin-top: 1rem; }
.stack-0 { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 0.5rem; top: -4rem; z-index: 100; padding: 0.7rem 1rem; background: var(--ink); color: #fff; border-radius: var(--radius-s); text-decoration: none; }
.skip-link:focus { top: 0.5rem; }
h1[tabindex="-1"]:focus { outline: none; }

/* The login card wears the mark too. */
.login h1 { display: flex; align-items: center; gap: 0.6rem; }
.login .brand-mark { width: 32px; height: 32px; color: var(--accent); }
.password-field { position: relative; }
.password-field input { padding-right: 4.5rem; }
.password-field .btn--small { position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0.25rem 0.6rem; font-size: 0.8rem; }

/* An inline "add" form at the foot of a list, in place of a prompt dialog. */
.inline-add { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.inline-add .field-row { margin-bottom: 0.6rem; }

.field--short { max-width: 420px; }
.media-alt { min-height: 38px; font-size: 0.84rem; }
.media-delete { margin-top: 0.5rem; }
.row-detail { padding: 0 0 0.85rem; }
.block-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 0.4rem; align-items: baseline; }
.block-grip svg { display: block; }
#new-block-type { max-width: 260px; }
/* Section rows have a drag grip; they do not need the disclosure marker too. */
.block-item > details > summary::before { content: none; }
