/*
 * Public document pages — GET /documents and GET /documents/{slug}.
 *
 * Theme tokens, base, header, error page and CTA are kept byte-identical to the
 * recipe-share page (recipes/app/web/static/styles.css) so both sites on
 * youmiamiam.be render as one product; they mirror the app design system
 * (theme/colors.js, theme/palette.js). Recipe-only blocks (hero, portions,
 * ingredients, steps, check-off) are dropped, document blocks added below.
 *
 * Light is the default; `[data-theme="dark"]` overrides the same variables.
 */

/* ── Theme tokens ─────────────────────────────────────────────────────────── */
:root {
  --screen-bg:        #FFFAF6; /* cream[100] */
  --card-bg:          #FFFFFF; /* white      */
  --card-bg-subtle:   #FFF0E8; /* cream[300] */
  --card-border:      #E8DDD5; /* cream[500] */
  --header-bg:        rgba(255, 255, 255, 0.85);

  --text-primary:     #2A2521; /* neutral[800] */
  --text-secondary:   #6E635A; /* neutral[550] */
  --text-tertiary:    #867A6E; /* neutral[500] */

  --accent:           #E8663C; /* orange[500] — brand primary */
  --secondary:        #2B5B4F; /* forest[500] — titles/icons  */
  --on-accent:        #FFFFFF;

  --divider:          rgba(45, 45, 45, 0.10);
  --card-shadow:      rgba(139, 90, 60, 0.12);

  --font-title: "Playfair Display", Georgia, serif;
  --font-body:  "Nunito", system-ui, -apple-system, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --screen-bg:        #1A1A1A; /* dark[500]  */
  --card-bg:          #2A2A2A; /* dark[200]  */
  --card-bg-subtle:   #3A2E28; /* warmDark[300] */
  --card-border:      #3A3A3A; /* dark[50]   */
  --header-bg:        rgba(42, 42, 42, 0.85);

  --text-primary:     #F2ECE6; /* neutral[100] */
  --text-secondary:   #C9BDB1; /* neutral[300] */
  --text-tertiary:    #A89B8E; /* neutral[400] */

  --accent:           #F0845E; /* orange[350] — lighter for dark bg */
  --secondary:        #6FBFAD; /* forest[300] */
  --on-accent:        #FFFFFF;

  --divider:          rgba(255, 255, 255, 0.10);
  --card-shadow:      rgba(0, 0, 0, 0.40);
}

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

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

body {
  margin: 0;
  background: var(--screen-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  /* Smooth theme switch without animating layout. */
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { display: block; max-width: 100%; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.15;
  color: var(--text-primary);
  white-space: nowrap;
}

.site-header .logo {
  height: 38px;
  width: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--secondary);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { background: var(--card-bg-subtle); }
.theme-toggle svg { width: 20px; height: 20px; }

/* Show the icon for the *opposite* theme (the one you'd switch to). */
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }

/* ── Language selector (document pages only) ──────────────────────────────── */
/* New chrome, not shared with the recipe-share header: groups the language
   drop-down and the theme toggle on the right of the header. */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Matches the theme toggle's pill so the two controls read as a set. */
.lang-select,
.lang-submit {
  height: 44px;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.lang-select:hover,
.lang-submit:hover { background: var(--card-bg-subtle); }

.lang-select { padding: 0 12px; }
.lang-submit { padding: 0 16px; font-weight: 600; }

/* lang.js sets [hidden] once JS takes over the change event. */
.lang-submit[hidden] { display: none; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 64px;
}

/* Wider on the document page: the sommaire takes its own column ≥1024px. */
.page--doc { max-width: 1080px; }

.doc-body { display: grid; gap: 8px; }

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ── Index (GET /documents) ───────────────────────────────────────────────── */
.page-head { padding-top: 20px; }
.page-head__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.15;
  margin: 0;
  color: var(--text-primary);
}
.page-head__sub {
  margin: 10px 0 26px;
  font-size: 15px;
  color: var(--text-secondary);
}

.doc-index { display: grid; gap: 14px; }

.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: 0 2px 10px var(--card-shadow);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.doc-card:hover {
  background: var(--card-bg-subtle);
  border-color: var(--accent);
}
.doc-card__emoji { flex: none; font-size: 34px; line-height: 1; }
.doc-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.doc-card__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text-primary);
}
.doc-card__meta { font-size: 13px; color: var(--text-secondary); }
.doc-card__body .badge { margin-top: 4px; }
.doc-card__chevron {
  margin-left: auto;
  flex: none;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

/* ── Document header ──────────────────────────────────────────────────────── */
.doc-head {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--divider);
}
.doc-head__emoji { font-size: 44px; line-height: 1; }
.doc-head__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.15;
  margin: 10px 0 0;
  color: var(--text-primary);
}
.doc-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
}

/* ── Highlights (front matter) ────────────────────────────────────────────── */
.highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0 4px;
  padding: 0;
  list-style: none;
}
.highlight {
  background: var(--card-bg-subtle);
  border-radius: 16px;
  padding: 16px;
}
.highlight__icon { font-size: 26px; line-height: 1; }
.highlight__title {
  margin: 10px 0 4px;
  font-weight: 800;
  font-size: 16px;
  color: var(--secondary);
}
.highlight__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Sommaire ─────────────────────────────────────────────────────────────── */
/* Ships collapsed (mobile-first); static/toc.js opens it ≥1024px. */
.toc {
  margin: 24px 0 4px;
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
  overflow: hidden;
}
.toc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 800;
  font-size: 15px;
  color: var(--secondary);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "⌄";
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.toc[open] summary::after { transform: rotate(180deg); }

.toc ol {
  list-style: none;
  margin: 0;
  padding: 4px 10px 12px;
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
}
.toc a::before {
  content: counter(toc) ".";
  flex: none;
  font-weight: 800;
  color: var(--text-tertiary);
}
.toc a:hover {
  background: var(--card-bg-subtle);
  color: var(--text-primary);
}
.toc a.is-current {
  background: var(--card-bg-subtle);
  color: var(--accent);
  font-weight: 700;
}
.toc a.is-current::before { color: var(--accent); }

/* ── Document body (rendered Markdown) ────────────────────────────────────── */
.prose {
  min-width: 0; /* lets the grid column shrink so tables can scroll */
  padding-top: 8px;
  color: var(--text-primary);
}

/* The sticky header would otherwise cover an anchor target. */
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { scroll-margin-top: 84px; }

.prose h2 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.25;
  margin: 40px 0 14px;
  color: var(--text-primary);
}
/* Mirrors the recipe page's .section-header__line. */
.prose h2::after {
  content: "";
  display: block;
  height: 1.5px;
  margin-top: 10px;
  background: linear-gradient(to right, var(--card-border), transparent);
}
.prose h3 {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.3;
  margin: 28px 0 10px;
  color: var(--secondary);
}
.prose h4 {
  font-weight: 800;
  font-size: 16px;
  margin: 22px 0 8px;
  color: var(--text-secondary);
}
.prose > *:first-child { margin-top: 0; }

.prose p { margin: 0 0 14px; line-height: 1.7; }
.prose strong { font-weight: 800; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; line-height: 1.65; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose li > ul, .prose li > ol { margin: 6px 0 0; }

.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--card-bg-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
}
.prose blockquote > *:last-child { margin-bottom: 0; }

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--card-bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--secondary);
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 32px 0;
  background: var(--divider);
}

/* Tables (privacy policy carries the widest ones). `display: block` turns the
   table into its own horizontal scroll container so a multi-column table never
   makes the page scroll sideways on a 375 px screen. */
.prose table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--card-bg-subtle);
  color: var(--secondary);
  font-weight: 800;
  white-space: nowrap;
}

.prose img { border-radius: 12px; margin: 8px 0; }

/* ── Desktop: sommaire becomes a sticky sidebar ───────────────────────────── */
@media (min-width: 720px) {
  .highlights { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .doc-body {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    margin-top: 32px;
  }
  /* Always expanded here — toc.js sets `open`, so the disclosure is noise. */
  .toc summary { display: none; }
  .toc ol { padding: 12px 10px; }
}

/* ── Error page ───────────────────────────────────────────────────────────── */
.error-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
}
.error-page__emoji { font-size: 56px; }
.error-page__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 24px;
  margin: 16px 0 8px;
}
.error-page__message {
  font-size: 16px;
  color: var(--text-secondary);
}
.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}
.cta:hover { opacity: 0.92; }

/* ── Footer : badges stores ───────────────────────────────────────────────── */
/* Partagé avec la page de partage de recette (recipes/app/web/static/styles.css)
   — garder les deux copies identiques. Le footer n'est pas rendu du tout quand
   aucune URL de store n'est configurée (cf. youmi_common/web.store_context), et
   l'admin le neutralise en surchargeant son bloc Jinja. */
.site-footer {
  margin-top: 48px;
  padding: 28px 20px 40px;
  border-top: 1px solid var(--divider);
  text-align: center;
}

.site-footer__heading {
  margin: 0 0 16px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

/* `gap` ≥ ¼ de la hauteur du badge : c'est la zone de respiration qu'imposent
   les guidelines Apple et Google autour de leur artwork. Les badges passent
   l'un sous l'autre plutôt que de rétrécir sur un écran étroit. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* 44 px : au-dessus du minimum Apple (40 px) et aligné sur le rythme des
   contrôles du header. Largeur libre — elle varie d'une locale à l'autre
   (« Télécharger dans l'App Store » est bien plus long que « Download on the
   App Store »), donc jamais de largeur fixe qui déformerait l'artwork.

   `max-width: none` neutralise la règle globale `img { max-width: 100% }` : elle
   rognerait la largeur pendant que `height` cloue la hauteur, et l'artwork
   sortirait écrasé (mesuré : 80×44 au lieu de 139,7×44 en FR), ce qu'Apple
   interdit. Le `flex-wrap` du conteneur suffit aux largeurs réelles — cette
   garde couvre le jour où un second badge se pose à côté. */
.store-badge img {
  height: 44px;
  width: auto;
  max-width: none;
}

/* Variante noire sur fond clair, blanche sur fond sombre, comme l'exigent les
   guidelines Apple. Même idiome que le sun/moon du header : deux images, une
   visible par thème — pas de JS, pas de style inline, CSP intacte. */
.store-badge__img--dark { display: none; }
[data-theme="dark"] .store-badge__img--light { display: none; }
[data-theme="dark"] .store-badge__img--dark  { display: block; }

/* Lien vers les documents légaux (page de partage uniquement : sur le site des
   documents, la marque du header y mène déjà). */
.site-footer__links {
  margin: 18px 0 0;
  font-size: 14px;
}
.site-footer__links a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer__links a:hover { color: var(--accent); }

/* ── Admin (triage des feedbacks, /admin) ─────────────────────────────────────
   Protégé au bord par Caddy basic_auth ; réutilise les tokens/chrome publics
   (cartes, badges, pills du sélecteur de langue) pour rester un seul produit. */
.page--admin { max-width: 860px; }

.mono { font-family: var(--font-mono); font-size: 0.92em; word-break: break-all; }

/* Compteur « nouveaux » à côté du sous-titre. */
.badge--new { margin-left: 8px; }

/* Onglets de filtre : barre de pills scrollable horizontalement sur mobile. */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-tab:hover { background: var(--card-bg-subtle); }
.admin-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.admin-tab__count {
  font-size: 12px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--card-bg-subtle);
  color: var(--text-tertiary);
}
.admin-tab.is-active .admin-tab__count {
  background: rgba(255, 255, 255, 0.25);
  color: var(--on-accent);
}

/* Liste des messages. */
.admin-list { display: grid; gap: 12px; }
.admin-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: 0 2px 10px var(--card-shadow);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.admin-row:hover { background: var(--card-bg-subtle); border-color: var(--accent); }
/* Mise en évidence des 'new' : liseré accent à gauche. */
.admin-row--new { border-left: 4px solid var(--accent); }
.admin-row__kind { flex: none; font-size: 26px; line-height: 1.1; }
.admin-row__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.admin-row__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-row__kindname { font-weight: 700; font-size: 13px; color: var(--text-secondary); }
.admin-row__tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--card-bg-subtle);
  color: var(--text-tertiary);
}
.admin-row__mail { font-size: 13px; }
/* Compteur de signalements fusionnés (report recette dédupliqué). */
.admin-row__count { background: rgba(232, 102, 60, 0.14); color: var(--accent); }
.admin-row__excerpt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  /* Deux lignes max, ellipsées. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-row__date { font-size: 12px; color: var(--text-tertiary); }
.admin-row__chevron { margin-left: auto; flex: none; font-weight: 800; color: var(--accent); }

/* Badges de statut (liste + détail). */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.status-badge.is-new      { background: rgba(232, 102, 60, 0.14); color: var(--accent); }
.status-badge.is-progress { background: rgba(59, 130, 246, 0.16); color: #2563EB; }
.status-badge.is-resolved { background: rgba(43, 91, 79, 0.16);   color: var(--secondary); }
.status-badge.is-spam     { background: rgba(220, 38, 38, 0.14);  color: #DC2626; }
.status-badge.is-archived { background: var(--card-bg-subtle);    color: var(--text-tertiary); }
.status-badge.is-other    { background: var(--card-bg-subtle);    color: var(--text-secondary); }
[data-theme="dark"] .status-badge.is-progress { background: rgba(59, 130, 246, 0.24); color: #93C5FD; }
[data-theme="dark"] .status-badge.is-spam     { background: rgba(220, 38, 38, 0.24);  color: #FCA5A5; }

/* Pagination. */
.admin-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.admin-pager__link {
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.admin-pager__link:hover { background: var(--card-bg-subtle); }
.admin-pager__link.is-disabled { color: var(--text-tertiary); pointer-events: none; opacity: 0.6; }
.admin-pager__status { font-size: 13px; color: var(--text-secondary); }

/* ── Détail ─────────────────────────────────────────────────────────────────── */
.admin-back {
  display: inline-block;
  margin: 4px 0 4px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.admin-back:hover { text-decoration: underline; }

.admin-status-form {
  margin: 20px 0 8px;
  padding: 16px;
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg-subtle);
}
.admin-status-form__label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 14px;
  color: var(--secondary);
}
.admin-status-form__row { display: flex; flex-wrap: wrap; gap: 10px; }

.admin-section { margin-top: 28px; }
.admin-section__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--text-primary);
}
.admin-section__subtitle {
  font-weight: 800;
  font-size: 15px;
  margin: 18px 0 8px;
  color: var(--secondary);
}
.admin-message {
  margin: 0;
  padding: 16px;
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  line-height: 1.6;
  white-space: pre-wrap;   /* conserve les retours à la ligne du message */
  word-wrap: break-word;
}
.admin-empty-field { margin: 0; color: var(--text-tertiary); font-style: italic; }
.admin-contact { margin: 12px 0 0; font-size: 14px; color: var(--text-secondary); }

/* Pièce jointe (capture d'écran) : vignette bornée en hauteur, cliquable vers
   l'image plein format. */
.admin-attachment { display: inline-block; }
.admin-attachment__img {
  display: block;
  max-width: 100%;
  max-height: 480px;
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
}

.admin-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
}
.admin-meta dt { font-weight: 700; font-size: 13px; color: var(--text-tertiary); }
.admin-meta dd { margin: 0; font-size: 14px; color: var(--text-primary); }

.admin-json {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--card-bg-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  overflow-x: auto;
}
