/* card-chrome.css — THE canonical chrome shared by every Unbanned Reality CARD (D31).
 *
 * A Card is ONE shared product, not a per-app copy — so the parts every card wears
 * identically live HERE and are SYNCED in (D23: canonical file in assets/brand/,
 * consumers copy it via their own scripts/sync-card-chrome.mjs on predev/prebuild).
 * Never hand-copy these rules into a card; add to this file instead.
 *
 * Consumers today: reality-details/ (Reality Card) · experience-card/ (Experience Card).
 *
 * What lives here = what is genuinely IDENTICAL across cards:
 *   .uc-close      the close control (immersive's panel X: 40x20 pill, flat #161616,
 *                  no border, 16px chrome-close glyph, RED fill on hover/active)
 *   .uc-sep        the ruled section label (line · LABEL · line), 11px .18em caps
 *   .detail-dialog the dialog anatomy (native <dialog>, glass panel + sheens, ruled
 *                  header, scrolling content, footer, --dialog-pad token, .dialog-x)
 *   .about-*       the About content (docs panel, tab chips, text block) — driven by
 *                  card-chrome.mjs renderAboutDocs()/bindAboutTabs()
 *   .field / dt/dd the detail-row anatomy (label column left, value right, divider)
 *                  + .detail-preview (the clickable row: standing underline + chevron)
 *   .info-link*    the LINK-ROW anatomy inside a popup body — driven by
 *                  card-chrome.mjs renderLinkRows()
 *
 * What does NOT belong here: anything a card owns alone (its stage, its image
 * lightbox — and the capsule, its own canonical pair capsule.mjs/css).
 * (Link rows USED to be on that list; two cards render them now, so they moved in.)
 */

/* ── the close control ─────────────────────────────────────────────────────────── */
.uc-close {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background-color: #161616;
  color: #e5e5e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* the glyph is pinned to 16px here — an icon component's own size prop must not win */
.uc-close > svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
  color: #e5e5e5;
}

/* hover FILLS the pill red and keeps the glyph light — never a red glyph on dark.
   Gated to real pointers so a touch tap can never leave it stuck red. */
@media (hover: hover) and (pointer: fine) {
  .uc-close:hover {
    background-color: #ff3838;
    color: #e5e5e5;
  }
}

.uc-close:active {
  background-color: #ff3838;
  color: #e5e5e5;
}

.uc-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 255, 56, .7);
}

/* ── the ruled section label ───────────────────────────────────────────────────── */
.uc-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.uc-sep .uc-sep-line {
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, .14);
}

.uc-sep .uc-sep-label {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent, #38ff38);
  text-shadow: 0 0 12px rgba(var(--accent-rgb, 56, 255, 56), .4);
}


/* ── the DIALOG anatomy ────────────────────────────────────────────────────────────
 * Every Card opens the same dialog: a native <dialog> holding a glass panel with a
 * ruled header, a scrolling content area and the platform footer. It was defined only
 * inside the Reality Card; it now lives here so the Experience Card's About is the
 * SAME dialog rather than a lookalike. Card-specific variants (the Reality Card's
 * image lightbox, its About tabs, its link rows) stay in that card.
 * ---------------------------------------------------------------------------------- */
.detail-dialog {
  width: min(34rem, calc(100% - 16px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
  color: #e5e5e5;
  outline: 0;
}

/* A modal <dialog> is centred by the UA's own `dialog:modal { margin: auto }`. That is a
   USER-AGENT rule, so any author reset beats it — Tailwind's preflight zeroes the margin
   on every element, and in a Tailwind app (express) the popup pinned itself to the top-left
   of the viewport instead of centring. Re-assert it at author level so the dialog centres
   in every host, framework or not. Costs the static Cards nothing: it is what they already do. */
.detail-dialog:modal { margin: auto; }

.detail-dialog::backdrop {
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog-panel {
  /* ONE padding token: the X is placed from it, so the close control can never drift
     out of line with the content no matter what a card sets. */
  --dialog-pad: 12px;
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.105);
  border-radius: 16px;
  padding: var(--dialog-pad);
  background: linear-gradient(180deg,rgba(255,255,255,.042) 0%,rgba(26,31,27,.90) 18%,rgba(16,20,17,.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), inset 0 -1px 0 rgba(0,0,0,.38), 0 18px 54px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dialog-liquid-sheen,
.dialog-liquid-hairline {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 16px;
}

.dialog-liquid-sheen {
  inset: 0;
  background: radial-gradient(80% 54% at 18% 0%,rgba(255,255,255,.11),transparent 58%), radial-gradient(54% 42% at 92% 18%,rgba(255,255,255,.06),transparent 62%);
}

.dialog-liquid-hairline {
  inset: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.035);
}

.dialog-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  max-height: calc(100dvh - 56px);
  flex-direction: column;
}

.dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  /* STOP the rule before the close X. The X is absolutely positioned 8px from the panel's
     padding-box edge and is 40px wide + opaque, so without this the right-hand rule runs
     UNDERNEATH it and dies inside the pill instead of meeting it. The header's own right
     edge is --dialog-pad in from that same edge, so the X eats (48px - pad); clear that
     plus a 10px breath. */
  padding-right: calc(58px - var(--dialog-pad));
}

.dialog-header > span {
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,.14);
}

.dialog-header h2 {
  margin: 0;
  color: #38ff38;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.dialog-content {
  min-height: 0;
  /* was 164 when a footer sat below this scroller; the footer is gone, so its ~39px
     (20 margin + line + 4 padding) come back to the content. */
  max-height: calc(100dvh - 125px);
  overflow: auto;
  margin-top: 14px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(56,255,56,.35) transparent;
}

.info-section {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: var(--dialog-pad);
  background: #101312;
}

/* ── the LINK-ROW anatomy ─────────────────────────────────────────────────────────
 * A list of links inside a popup body. Promoted here 2026-07-29: it lived in
 * reality-details/styles.css while only that card had links, but the Contact Card needs the
 * same rows, and a second consumer is exactly the trigger for this file (D23) — the header
 * note above used to exclude "its link rows", which is no longer true.
 * Row look is project-wide, matching immersive's content.css: a bottom rule rather than a
 * box, a tick before the label, and a ↗ that leans on hover.
 * Markup (build it with renderLinkRows in card-chrome.mjs, don't hand-type it):
 *   <section class="info-section about-docs links-section" aria-label="…">
 *     <div class="info-links">
 *       <a class="info-link" href="…" target="_blank" rel="noopener noreferrer">
 *         <span class="info-link-label">Label</span></a>
 *     </div></section>                                             */
.dialog-empty { margin: 0; color: rgba(255,255,255,.52); }
.links-section { display: flex; justify-content: center; }
.info-links {
  display: grid;
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}
.info-link {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 0;
  border-bottom: 1.5px solid #577757;
  border-radius: 0;
  margin-bottom: .5rem;
  padding: .5rem;
  background: #161616;
  box-shadow: none;
  color: #e5e5e5;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.0625rem, 1.1vw, 1.125rem);
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .2s ease, transform .1s ease;
}
.info-link::before {
  width: 3px;
  height: 1.1em;
  flex: 0 0 3px;
  border-radius: 2px;
  margin-right: .5rem;
  background: rgba(255,255,255,.18);
  content: "";
}
.info-link::after {
  flex: 0 0 auto;
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  opacity: .9;
  content: "\2197";
  transform: translateY(-1px);
  transition: transform .15s ease, opacity .15s ease;
}
.info-link-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* the host/secondary line, when a card has one to show — quieter than the label, and it
   must NOT push the ↗ around, so it never grows */
.info-link-host {
  flex: 0 0 auto;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.info-link:hover,
.info-link:focus-visible {
  outline: 0;
  border-color: #38ff38;
  background: rgba(255,255,255,.07);
  color: #e5e5e5;
  text-decoration: underline;
}
.info-link:hover::after,
.info-link:focus-visible::after {
  opacity: 1;
  transform: translate(2px,-3px);
}

/* The close X sits ON the header's rule, so it is CENTRED on that rule — the line must run
   through its middle, not clip its bottom edge.
   Superseded 2026-07-29: this was `top: 8px`, fixed on the reasoning that "a corner must not
   move with the padding". But the rule's own position DOES follow --dialog-pad (the header
   starts at pad, its 1px line lands at pad + 5.5), so a fixed X drifts off the line the moment
   the padding steps 12→20 at 400px — i.e. on every desktop-width popup, where the X sat 7.5px
   ABOVE the line. That is what the owner saw. Now: rule centre (pad + 5.5) minus half the
   20px pill = pad - 4.5. Placement lives here, never re-typed per card. */
.dialog-x {
  position: absolute;
  top: calc(var(--dialog-pad) - 4.5px);
  right: 8px;
  z-index: 20;
}

/* the roomier padding every Card uses above the narrow breakpoint (was only in the
   Reality Card, which is exactly why the two cards' dialogs disagreed) */
@media (min-width: 400px) {
  .dialog-panel { --dialog-pad: 20px; }
}

/* NO footer in a dialog. "Experienced through © Unbanned Reality" belongs on a surface
   a visitor ARRIVES at, not on a popup they opened from a card that already said it —
   inside a popup it is a second signature on the same page (owner, 2026-07-26). */


/* ── the ABOUT content anatomy ─────────────────────────────────────────────────────
 * The About dialog's CONTENT is the same in every Card: the lighter .about-docs glass
 * panel holding the tab chips and the dark text block with the green section label.
 * (It was only in the Reality Card, so the Experience Card's About looked like a
 * different product. renderAboutDocs()/bindAboutTabs() in card-chrome.mjs drive it.)
 * ---------------------------------------------------------------------------------- */
.about-docs {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
}
.about-docs::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(80% 54% at 18% 0%,rgba(255,255,255,.11),transparent 58%), radial-gradient(54% 42% at 92% 18%,rgba(255,255,255,.06),transparent 62%);
}
.about-docs > * { position: relative; z-index: 1; }

/* Tabs FIT, never clip. auto-fit reflows to fewer columns (4 → 3 → 2) as the embed
   narrows instead of squeezing a long label like "Backstory" past the tab's edge —
   there are only ever ≤4 tabs, so a wide card still lays them out in one row. */
.about-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 12px;
}
.about-tab {
  display: flex;
  width: 100%;
  height: 86px;
  min-height: 86px;
  max-height: 86px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #577757;
  border-radius: 8px;
  padding: 12px 10px;
  background: #101312;
  color: #fff;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  /* last-resort guard: a single long word breaks rather than getting clipped */
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: background .3s, border-color .3s, transform .2s;
}
.about-tab:hover,
.about-tab:active,
.about-tab.is-active {
  border-color: #577757;
  background: linear-gradient(0deg,rgba(56,255,56,.15),rgba(56,255,56,.15)), rgba(255,255,255,.08);
}
.about-tab:focus-visible {
  outline: 2px solid rgba(56,255,56,.70);
  outline-offset: 2px;
  background: linear-gradient(0deg,rgba(56,255,56,.15),rgba(56,255,56,.15)), rgba(255,255,255,.08);
}
.about-panel { margin-top: 16px; }
.about-swap {
  display: grid;
  gap: 16px;
  animation: docs-overview-swap-in 420ms cubic-bezier(.22,1,.36,1);
}
@keyframes docs-overview-swap-in {
  from { opacity: 0; transform: translateY(8px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.about-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}
.about-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.75);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.35;
}
.about-text-block {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 16px;
  background: rgba(22,22,22,.53);
}
.about-section-label {
  color: #38ff38;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.about-copy { margin-top: 12px; }
.about-copy p {
  margin: 0;
  color: #e5e5e5;
  font-size: 16px;
  line-height: 1.625;
}
.about-copy p + p { margin-top: 12px; }

/* placed AFTER the .about-text-block base rule on purpose: same specificity, so source
   order decides — earlier in the file this bump was dead and the two cards' About
   text blocks disagreed (16px vs 20px). */
@media (min-width: 400px) {
  .about-text-block { padding: 20px; }
}

/* ── the DETAIL-ROW anatomy ────────────────────────────────────────────────────────
 * The rows every Card lists its fields in: label column LEFT (96px, Poppins caps),
 * value RIGHT, hairline divider between rows. .detail-preview is the CLICKABLE row
 * value (opens a dialog): a standing WHITE underline + a chevron at rest; on hover/focus
 * the underline brightens to #fff and only the CHEVRON takes the accent.
 * The underline never takes the accent — no surface in the family accents an underline
 * (business-space .linkish pins its underline neutral precisely so it will NOT follow the
 * text green; both .info-link implementations route the green to the border), and on a
 * Card --accent is the plugged reality's OWN brand hue sitting on glass already tinted
 * with it, so an accent hairline can vanish for an arbitrary brand. White always reads.
 * Lived separately in both cards (self-declared copies); one definition now.
 * ---------------------------------------------------------------------------------- */
.field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.16);
  /* the ink shadow the Reality Card carried on its <dl> — keeps copy legible on glass */
  text-shadow: 0 0 3px #0d100e, 0 0 6px #0d100e;
}
.field:first-child { border-top: 0; }
.field dt {
  width: 96px;
  flex: 0 0 96px;
  padding-top: 2px;
  color: rgba(255,255,255,.65);
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.field dd {
  min-width: 0;
  flex: 1;
  margin: 0;
  color: rgba(255,255,255,.90);
  font-size: 14px;
  line-height: 1.5;
}
/* PHONES — the label column is fixed, so every pixel it holds is taken from the VALUE,
   which is the part people actually read. At 360px the 96px label + 12px gap left the
   value 102px and wrapped a one-sentence summary onto EIGHT lines. Tightening the label
   (it still fits "LAST EDITED" and "SHOWCASED BY" at this tracking) hands ~30px back. */
@media (max-width: 430px) {
  .field { gap: 10px; }
  .field dt { width: 74px; flex-basis: 74px; letter-spacing: .06em; }
}
.detail-preview {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 5px;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
/* hover AND focus-visible — a keyboard user gets the same bloom a mouse does.
   The row answers in ONE colour: underline and chevron both take the accent. They used
   to disagree (white underline beside a green chevron), which read as two different
   states on one control. Neutral at rest, accent on interaction — the green law. */
.detail-preview:hover .preview-copy,
.detail-preview:focus-visible .preview-copy {
  color: #fff;
  /* set EXPLICITLY: this used to ride on the `text-decoration` shorthand resetting
     decoration-color to currentColor — correct, but invisible to anyone editing here. */
  text-decoration-color: var(--accent, #38ff38);
}
.detail-preview:hover .preview-arrow,
.detail-preview:focus-visible .preview-arrow { color: var(--accent, #38ff38); transform: translateX(2px); }
.detail-preview:focus-visible {
  outline: 1px solid rgba(56,255,56,.72);
  outline-offset: 3px;
}
.preview-copy {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* a STANDING underline: the row must read as clickable before you hover it */
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.32);
  text-underline-offset: 3px;
}
.preview-arrow {
  flex: 0 0 auto;
  color: rgba(255,255,255,.42);
  font-size: 20px;
  line-height: 1;
  transition: color .18s, transform .18s;
}
.preview-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 0 5px;
  background: rgba(0,0,0,.26);
  color: rgba(255,255,255,.58);
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  line-height: 1;
}
