/*
 * Admin chrome for the newsletter tool.
 *
 * The site's own stylesheet (nwa.css) is loaded first and supplies the tokens,
 * buttons, inputs, tables and callouts. This file does three things it cannot:
 * lay out an application shell, set an application rhythm (nwa.css spaces
 * sections for a marketing page, which leaves craters in a tool), and add the
 * few pieces a tool needs that a website does not - stat tiles, status pills,
 * a block editor and a sticky action bar.
 */

/* ---------- shell ---------- */
.adm {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 16rem 1fr;
  /* Paints the sidebar column the whole height of the document, so the panel
     never stops halfway down a long page. */
  background: linear-gradient(to right, var(--sand) 0 16rem, var(--canvas) 16rem);
}
.adm--plain { grid-template-columns: 1fr; background: var(--canvas); }
.adm--plain .adm-main { padding-top: 0; }

.adm-side {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-4);
  border-right: 1px solid var(--line);
}
.adm-side__mark { font: 700 var(--fs-md)/1.2 var(--font-display); letter-spacing: var(--ls-tight); }
.adm-side__mark a { color: var(--ink); text-decoration: none; }
.adm-side__mark span { display: block; color: var(--muted); font-weight: 500; font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; margin-top: 2px; }
.adm-side nav { display: flex; flex-direction: column; gap: 2px; }
.adm-side nav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm, 6px);
  color: var(--ink-2);
  text-decoration: none;
  font: 600 var(--fs-sm)/1.3 var(--font-ui);
}
/* The second line describes the section; it must not run into the label. */
.adm-side nav a span { display: block; margin-top: 2px; font-weight: 500;
                       font-size: var(--fs-2xs); line-height: 1.35; color: var(--muted); }
.adm-side nav a:hover { background: var(--sand-2); }
.adm-side nav a[aria-current="page"] span { color: var(--text-muted-on-dark); }
.adm-side nav a[aria-current="page"] { background: var(--forest); color: var(--text-on-dark); }
.adm-side__foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.adm-side__who { font-size: var(--fs-2xs); color: var(--muted); margin-bottom: var(--sp-2); }

.adm-main { min-width: 0; padding: var(--sp-6) var(--sp-6) var(--sp-9); }

/* ---------- rhythm ---------- */
/* nwa.css gives .section page-sized padding; inside a tool that reads as a
   broken layout, so the admin sets its own spacing. */
.adm-main .section { padding-block: 0; }
.adm-block + .adm-block { margin-top: var(--sp-7); }
.adm-block > h2 {
  font: 700 var(--fs-lg)/1.2 var(--font-display);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--sp-3);
}
.adm-block > h2 + .adm-hint { margin-top: calc(var(--sp-2) * -1); }
.adm-hint { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 var(--sp-4); max-width: 46rem; }

.adm-head { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-start;
            justify-content: space-between; margin-bottom: var(--sp-5); }
.adm-head h1 { margin: 0; font-size: var(--fs-2xl); letter-spacing: var(--ls-tight); }
.adm-head__meta { color: var(--muted); font-size: var(--fs-sm); margin: var(--sp-1) 0 0; }
.adm-head__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------- cards ---------- */
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
            padding: var(--sp-5); }
.adm-card + .adm-card { margin-top: var(--sp-4); }
.adm-card--quiet { background: transparent; border-style: dashed; }
.adm-cols { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }

/* ---------- stat tiles ---------- */
.stat-row { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
        padding: var(--sp-4); }
.stat__label { display: block; color: var(--muted); font-size: var(--fs-2xs); }
.stat__value { display: block; font: 600 var(--fs-xl)/1.1 var(--font-ui); margin-top: var(--sp-1); }
.stat__note { display: block; color: var(--muted); font-size: var(--fs-3xs); margin-top: var(--sp-1); }
/* One hero per view: the number the page is actually about. */
.stat--hero { grid-column: span 2; border-color: var(--forest); background: var(--forest-wash); }
.stat--hero .stat__value { font-size: 3rem; line-height: 1; color: var(--forest-deep); }
.stat--zero .stat__value { color: var(--muted); font-weight: 500; }

/* ---------- status pills ---------- */
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px;
        font: 600 var(--fs-3xs)/1.6 var(--font-ui); letter-spacing: 0.02em;
        border: 1px solid transparent; white-space: nowrap; }
.pill--ok   { background: var(--forest-wash); color: var(--forest-deep); border-color: #CBDCC0; }
.pill--wait { background: var(--sand-2); color: var(--ink-2); border-color: var(--line); }
.pill--off  { background: transparent; color: var(--muted); border-color: var(--line); }
.pill--bad  { background: var(--ember-wash); color: #8E4620; border-color: #F0C9AE; }

/* ---------- tables ---------- */
.adm-table { overflow-x: auto; }
.adm-table table.data { width: 100%; }
.adm-table td, .adm-table th { padding-block: var(--sp-2); vertical-align: middle; }
.adm-table td.num, .adm-table td.when { font-variant-numeric: tabular-nums; white-space: nowrap;
                                        color: var(--ink-2); }
.adm-table td.act { text-align: right; white-space: nowrap; }
.adm-table tbody tr:hover { background: var(--canvas); }
/* Long labels get a short form on narrow screens rather than being cut off. */
.on-narrow { display: none; }

/* ---------- code ---------- */
.adm-code { display: block; background: var(--ink); color: var(--text-on-dark);
            border-radius: 8px; padding: var(--sp-3) var(--sp-4); overflow-x: auto;
            font: 400 var(--fs-xs)/1.6 var(--font-mono); white-space: pre; }

/* ---------- forms ---------- */
.adm-form { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-end; }
.adm-form .field { margin: 0; flex: 0 1 24rem; }
.adm-form .field--wide { flex: 1 1 26rem; }
.adm-form .field--narrow { flex: 0 0 9rem; }
/* A checkbox takes its own line and the button the line after it, so the
   button never ends up squeezed beside a wrapped label. */
.adm-form .check { margin: 0; flex: 1 0 100%; }
.adm-form .check + .btn { margin-right: auto; }
.adm-main .input, .adm-main .textarea, .adm-main .select { max-width: 100%; }
.adm-main .field label { font-size: var(--fs-sm); }
.adm-file, .field--fixed { max-width: 24rem; }
fieldset.fs .check + .field { margin-top: var(--sp-3); }

/* Buttons in a tool are sized to their words, never stretched across the page. */
.adm-main .btn--block { display: inline-block; width: auto; }

/* ---------- filters ---------- */
.adm-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.adm-filters a { display: inline-block; padding: 4px 12px; border-radius: 999px;
                 border: 1px solid var(--line); background: var(--surface);
                 color: var(--ink-2); text-decoration: none;
                 font: 600 var(--fs-xs)/1.7 var(--font-ui); }
.adm-filters a:hover { border-color: var(--line-strong); }
.adm-filters a[aria-current="true"] { background: var(--forest); border-color: var(--forest);
                                      color: var(--text-on-dark); }
.adm-filters a span { color: inherit; opacity: 0.7; }

/* ---------- block editor ---------- */
.blk { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
       padding: var(--sp-4); margin-bottom: var(--sp-3); }
.blk__head { display: flex; align-items: center; justify-content: space-between;
             gap: var(--sp-3); margin-bottom: var(--sp-3); }
.blk__type { font: 600 var(--fs-3xs)/1.6 var(--font-ui); letter-spacing: var(--ls-caps);
             text-transform: uppercase; color: var(--muted); }
.blk__tools { display: flex; gap: var(--sp-1); }
.blk__tools .btn { padding-inline: var(--sp-2); }
.blk .field { margin-bottom: var(--sp-3); }
.blk .field:last-child { margin-bottom: 0; }
.blk .textarea { min-height: 7rem; }
.blk__add { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* ---------- sticky save bar ---------- */
/* Static, not sticky: the editor has Send and Publish panels below it, and a
   floating bar would sit on top of them. */
.adm-actions { z-index: 5;
               display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
               background: var(--canvas); border-top: 1px solid var(--line);
               padding: var(--sp-3) 0; margin-top: var(--sp-5); }
.adm-actions__spacer { margin-left: auto; }

/* ---------- sign-in ---------- */
.adm-login { max-width: 23rem; margin: 10vh auto 0; background: var(--surface);
             border: 1px solid var(--line); border-radius: 12px; padding: var(--sp-6); }
.adm-login__mark { font: 700 var(--fs-md)/1.2 var(--font-display); margin-bottom: var(--sp-2); }
.adm-login h1 { font-size: var(--fs-xl); margin: 0 0 var(--sp-1); }
.adm-login .adm-hint { margin-bottom: var(--sp-5); }

/* ---------- narrow ---------- */
@media (max-width: 62rem) {
  /* align-content: on a page shorter than the screen, the spare height would
     otherwise be shared between the menu row and the page, opening a gap. */
  .adm { grid-template-columns: 1fr; background: var(--canvas); align-content: start; }
  .adm-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
              background: var(--sand); gap: var(--sp-3); }
  .adm-side nav { flex-direction: row; flex-wrap: wrap; }
  .adm-side nav a span { display: none; }
  .adm-side__foot { margin-top: 0; display: flex; align-items: center; gap: var(--sp-3); }
  .adm-side__who { margin: 0; }
  .adm-side__foot .btn { padding-block: var(--sp-1); }
  .adm-main { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
  .stat--hero { grid-column: span 2; }
  .stat--hero .stat__value { font-size: 2.25rem; }
  /* A phone shows who and what state. The rest is a horizontal scroll nobody
     performs, so it is dropped rather than clipped. */
  .adm-table .col-extra, .adm-table .col-name { display: none; }
  .adm-table td, .adm-table th { padding-inline: var(--sp-2); }
  .adm-table td:first-child { overflow-wrap: anywhere; }   /* long emails wrap, the button stays visible */
  .adm-table td.act .btn { padding-inline: var(--sp-2); }
  .on-wide { display: none; }
  .on-narrow { display: inline; }
}

/* ============================================================
   Issue editor (editor.js enhances; everything renders without it)
   ============================================================ */

/* Progressive enhancement switches: the script adds html.js on load. */
html:not(.js) .js-only { display: none !important; }
html.js .no-js-only { display: none !important; }

/* ---------- layout: writing on the left, preview on the right ---------- */
.ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
html.js .ed { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ed + .adm-block { margin-top: var(--sp-8, 4rem); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.ed__write { min-width: 0; }
.ed__preview { position: sticky; top: var(--sp-4); min-width: 0; }
@media (max-width: 80rem) {
  html.js .ed { grid-template-columns: minmax(0, 1fr); }
  .ed__preview { position: static; }
}

.ed-meta .field + .field { margin-top: var(--sp-4); }
.ed-meta .field { margin-bottom: 0; }
.count { margin-left: var(--sp-2); font-weight: 400; }
.count.is-over { color: var(--ember-ink); }

/* ---------- save state ---------- */
.ed-save { margin-left: var(--sp-2); font-size: var(--fs-2xs); font-family: var(--font-ui); }
.ed-save::before { content: "·"; margin-right: var(--sp-2); color: var(--muted); }
.ed-save.is-ok    { color: var(--forest-deep); }
.ed-save.is-dirty { color: var(--muted); }
.ed-save.is-busy  { color: var(--muted); font-style: italic; }
.ed-save.is-bad   { color: var(--ember-ink); font-weight: 600; }

/* ---------- unfinished blocks ---------- */
.ed-problems { margin: var(--sp-4) 0 0; padding: var(--sp-3) var(--sp-4); border-radius: 8px;
               background: var(--ember-wash); border: 1px solid #F0C9AE; font-size: var(--fs-sm); }
.ed-problems.is-empty { display: none; }
.ed-problems__title { margin: 0 0 var(--sp-1); font: 600 var(--fs-sm)/1.4 var(--font-ui); color: #8E4620; }
.ed-problems ul { margin: 0; padding-left: 1.2em; }
.ed-problems li { margin: 2px 0; }

/* ---------- blocks ---------- */
.ed-blocks { margin-top: var(--sp-5); }
.ed-empty { padding: var(--sp-6); text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.blk { position: relative; transition: box-shadow .2s, opacity .2s; }
.blk:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-wash); }
.blk.is-dragging { opacity: .45; }
.blk.is-moved { box-shadow: 0 0 0 3px var(--forest-wash); }
.blk__head { margin-bottom: var(--sp-2); }
.blk__grip { cursor: grab; color: var(--muted); font-size: var(--fs-md); line-height: 1; letter-spacing: -0.35em;
             padding-right: var(--sp-3); user-select: none; }
.blk__grip:active { cursor: grabbing; }
.blk__head .blk__type { flex: 1; }
.blk__tools .btn { min-width: 2rem; font-size: var(--fs-2xs); }
.blk__delete:hover { color: var(--ember-ink); }
.input--heading { font: 700 var(--fs-lg)/1.25 var(--font-display); letter-spacing: var(--ls-tight); }
.blk .textarea { min-height: 4.5rem; resize: vertical; font-family: var(--font-read); font-size: var(--fs-md); line-height: 1.55; }
.blk .check { margin-top: var(--sp-2); }

/* Formatting toolbar */
.fmt { display: flex; gap: 2px; margin-bottom: var(--sp-1); }
.fmt__b { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px;
          min-width: 2rem; padding: 2px 8px; font: 500 var(--fs-xs)/1.6 var(--font-ui); cursor: pointer; }
.fmt__b:hover { background: var(--sand); border-color: var(--line-strong, var(--line)); }
.fmt__b:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }

/* Picture area inside an image block */
.pic { margin-bottom: var(--sp-3); }
.pic__empty { border: 2px dashed var(--line); border-radius: 10px; padding: var(--sp-5); text-align: center;
              background: var(--canvas); transition: border-color .15s, background .15s; }
.pic__empty p { margin: 0 0 var(--sp-2); }
.pic__empty p:last-child { margin-bottom: 0; }
.pic.is-over .pic__empty, .pic.is-over .pic__have { border-color: var(--forest); background: var(--forest-wash); }
.pic__have { display: none; border: 1px solid var(--line); border-radius: 10px; padding: var(--sp-2); background: var(--canvas); }
.pic__img { display: block; width: 100%; max-height: 22rem; object-fit: contain; border-radius: 6px; background: var(--sand); }
.pic__have .pic__actions { margin: var(--sp-2) 0 0; }
.pic__actions { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }
.pic.has-pic .pic__empty { display: none; }
.pic.has-pic .pic__have { display: block; }
.pic__status { margin: var(--sp-2) 0 0; min-height: 1.2em; }
.pic__url { margin-top: var(--sp-2); }
.pic__url summary { cursor: pointer; font-size: var(--fs-xs); color: var(--muted); }
.pic__url .field { margin: var(--sp-2) 0 0; }
html:not(.js) .pic__url { display: block; }
html:not(.js) .pic__url summary { display: none; }
html:not(.js) .pic__url .field { display: block; }
html:not(.js) details.pic__url:not([open]) .field { display: block; }

/* Insert-between line */
.ed-ins { position: relative; height: var(--sp-3); margin: 0; }
.ed-ins::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px solid transparent; transition: border-color .15s; }
.ed-ins:hover::before, .ed-ins:focus-within::before { border-color: var(--line-strong, var(--line)); }
.ed-ins__b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
             width: 1.6rem; height: 1.6rem; border-radius: 999px; border: 1px solid var(--line);
             background: var(--surface); color: var(--muted); font: 600 1rem/1 var(--font-ui);
             cursor: pointer; opacity: 0; transition: opacity .15s; }
.ed-ins:hover .ed-ins__b, .ed-ins__b:focus-visible, .ed-ins:focus-within .ed-ins__b { opacity: 1; }
.ed-ins__b:hover { border-color: var(--forest); color: var(--forest); }
.ed-pop { margin: var(--sp-2) 0 var(--sp-3); padding: var(--sp-3); background: var(--surface);
          border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(22,24,15,.08); }

/* Add-a-block menu */
.ed-add { margin-top: var(--sp-5); }
.ed-add__label { margin: 0 0 var(--sp-2); font: 600 var(--fs-3xs)/1.6 var(--font-ui); letter-spacing: var(--ls-caps);
                 text-transform: uppercase; color: var(--muted); }
.ed-add__menu { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.ed-add__b { display: flex; align-items: center; gap: var(--sp-3); text-align: left; padding: var(--sp-2) var(--sp-3);
             border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
             font: 600 var(--fs-sm)/1.25 var(--font-ui); cursor: pointer; transition: border-color .15s, background .15s; }
.ed-add__b:hover { border-color: var(--forest); background: var(--forest-wash); }
.ed-add__b:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.ed-add__b small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-3xs); margin-top: 1px; }
.ed-add__ic { flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 6px; background: var(--sand);
              display: grid; place-items: center; font: 700 .8rem/1 var(--font-mono); color: var(--forest-deep); }
.ed-add__ic--heading::before   { content: "H"; font-size: 1rem; }
.ed-add__ic--paragraph::before { content: "¶"; }
.ed-add__ic--image::before     { content: "▣"; }
.ed-add__ic--list::before      { content: "≡"; font-size: 1rem; }
.ed-add__ic--quote::before     { content: "“"; font-size: 1.3rem; font-family: var(--font-read); line-height: .5; padding-top: .35rem; }
.ed-add__ic--button::before    { content: "→"; }
.ed-add__ic--divider::before   { content: "—"; }

/* ---------- preview pane ---------- */
.ed-preview__bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-2); }
.ed-preview__bar .btn { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 2px; }
.seg__b { border: 0; background: transparent; color: var(--ink-2); padding: 3px 12px; border-radius: 999px;
          font: 600 var(--fs-xs)/1.6 var(--font-ui); cursor: pointer; }
.seg__b[aria-selected="true"], .seg__b[aria-pressed="true"] { background: var(--forest); color: var(--text-on-dark); }
.seg__b:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.ed-preview__frame { background: var(--sand); border: 1px solid var(--line); border-radius: 10px; padding: var(--sp-3);
                     height: calc(100vh - 9rem); min-height: 28rem; display: flex; justify-content: center; }
.ed-preview__frame iframe { width: 100%; height: 100%; border: 0; background: #FBFAF8; border-radius: 6px;
                            box-shadow: 0 2px 12px rgba(22,24,15,.08); transition: width .2s; }
.ed-preview__frame.is-phone iframe { width: 390px; max-width: 100%; }
@media (max-width: 80rem) { .ed-preview__frame { height: 70vh; } }

/* ---------- checklist ---------- */
.checks { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: grid; gap: var(--sp-2);
          grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.checks li { padding: var(--sp-2) var(--sp-3) var(--sp-2) 2.2rem; position: relative; border-radius: 8px;
             border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-sm); }
.checks li::before { position: absolute; left: .8rem; top: .55rem; font: 700 .9rem/1.4 var(--font-mono); }
.checks li.is-ok  { border-color: #CBDCC0; }
.checks li.is-ok::before  { content: "✓"; color: var(--forest-deep); }
.checks li.is-not { border-color: #F0C9AE; background: var(--ember-wash); }
.checks li.is-not::before { content: "!"; color: #8E4620; }

/* ---------- picture picker dialog ---------- */
.picker { width: min(56rem, calc(100vw - 2rem)); max-height: min(44rem, calc(100vh - 2rem));
          border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--ink);
          box-shadow: 0 20px 60px rgba(22,24,15,.25); }
.picker::backdrop { background: rgba(22,24,15,.45); }
.picker__head { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4);
                border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.picker__head h2 { margin: 0; flex: 1; font: 700 var(--fs-md)/1.2 var(--font-display); }
.picker__pane { padding: var(--sp-4); }
.picker__search { width: 100%; max-width: 24rem; margin-bottom: var(--sp-3); }
.picker__status { margin: 0 0 var(--sp-3); }
.picker__grid { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.picker__group { grid-column: 1 / -1; margin: var(--sp-3) 0 0; font: 600 var(--fs-3xs)/1.6 var(--font-ui);
                 letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--muted); }
.picker__item { display: block; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--sand);
                overflow: hidden; cursor: pointer; text-align: left; }
.picker__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.picker__item span { display: block; padding: 4px 6px; font: 500 var(--fs-3xs)/1.3 var(--font-ui); color: var(--ink-2);
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker__item:hover, .picker__item:focus-visible { border-color: var(--forest); outline: none; }
.picker__drop { display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; justify-content: center;
                text-align: center; padding: var(--sp-7) var(--sp-4); border: 2px dashed var(--line); border-radius: 10px;
                background: var(--canvas); cursor: pointer; }
.picker__drop:hover, .picker__drop.is-over, .picker__drop:focus-within { border-color: var(--forest); background: var(--forest-wash); }
.picker__upstatus { margin: var(--sp-3) 0 0; min-height: 1.2em; }

/* ---------- toast ---------- */
.ed-toast { position: fixed; left: 50%; bottom: var(--sp-5); transform: translateX(-50%); z-index: 20;
            display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
            background: var(--ink); color: var(--text-on-dark); border-radius: 999px; font: 500 var(--fs-sm)/1.4 var(--font-ui);
            box-shadow: 0 8px 24px rgba(22,24,15,.25); }
.ed-toast .btn { color: var(--text-on-dark); }

/* Signed-in name links to the account page */
.adm-side__who a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- sidebar logo and section icons ---------- */
.adm-side__mark img { display: block; width: 11rem; max-width: 100%; height: auto; }
.adm-side__mark span { margin-top: var(--sp-2); }
.adm-side nav a { display: grid; grid-template-columns: 18px 1fr; column-gap: var(--sp-3); align-items: center; }
.adm-side__icon { opacity: .8; }
.adm-side nav a[aria-current="page"] .adm-side__icon,
.adm-side nav a:hover .adm-side__icon { opacity: 1; }
.adm-side nav a span { grid-column: 2; }
@media (max-width: 62rem) {
  .adm-side__mark img { width: 8.5rem; }
}

/* A row of small buttons in a table cell: one line, right-aligned. */
.row-actions { display: inline-flex; gap: var(--sp-2); justify-content: flex-end; flex-wrap: nowrap; }
.row-actions .btn { padding-inline: var(--sp-3); }
/* Side-by-side fields in an editor block line up on their inputs; the
   stacked-field margin from .blk .field would lift all but the last. */
.blk .adm-form .field { margin-bottom: 0; }
.adm-table td.nowrap { white-space: nowrap; }
.adm-table .data--compact td, .adm-table .data--compact th { padding-inline: var(--sp-3); }
