/* OOO skin for the two public tools. Loaded AFTER each tool's own styles.css
   (which build/build.py syncs verbatim from the Hub), so every rule here is a
   deliberate override in the design-system language: Helvetica Neue 400 at
   12px/15px, white canvas, black ink, opacity for state, hairline #e4e4e7,
   radius 0, no shadows on chrome. The stage/device surfaces keep their own
   look by decision (a device must read as a device). */

/* ─── Tokens: remap each tool's hub-era variables onto the OOO values ───── */
:root, :root[data-paper="white"] {
  --font-core: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --canvas: #ffffff; --ink: #000000; --canvas-soft: #ededed; --hairline: #e4e4e7;
  --knockout: #ffffff; --paper: #ffffff;
  /* Profile Previews (styles.css :root) */
  --bg: #ededed;            /* stage surround: the one fill, neutral so artwork colour stays true */
  --surface: #ffffff; --field: #ededed; --paper-deep: #ededed; --paper-soft: #f5f5f5;
  --ink-mid: #000000; --ink-soft: #4d4d4d; --ink-faint: rgba(0, 0, 0, 0.3);
  --line: #e4e4e7; --line-soft: #e4e4e7; --rule: #e4e4e7; --rule-soft: #e4e4e7; --backdrop: #ffffff;
  --accent: #000000; --orange: #000000; --alert: #ef4444; --radius: 0px;
  --sans: var(--font-core); --mono: var(--font-core);
  /* Product Mockups (styles.css :root) */
  --pm-bg: #ededed; --pm-tile: #f5f5f5; --pm-track: #e4e4e7;
  --pm-ink: #000000; --pm-ink-2: #4d4d4d; --pm-muted: #4d4d4d; --pm-link-hover: #000000;
  --pm-divider: #e4e4e7; --pm-hover: #f5f5f5; --pm-hover-2: #f5f5f5; --pm-accent: #000000; --pm-drag: #ededed;
  --pm-sans: var(--font-core); --pm-serif: var(--font-core); --pm-hub-mono: var(--font-core); --pm-mono: var(--font-mono);
}
/* The page opens on canvas white, so arriving from the index is white to white. The stage
   surround carries the grey itself instead of borrowing it from the body. */
body { font-family: var(--font-core); background: var(--canvas); }
.main { background: var(--bg); }

/* ─── Shared tool chrome (window.OOC from hub/chrome-ooo.js) ────────────── */
.A-root { background: var(--canvas); color: var(--ink); font-family: var(--font-core); font-size: 12px; line-height: 15px; }
.A-bar { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px 6px; border-bottom: 1px solid var(--hairline); }
.A-bar-left, .A-bar-right { display: flex; align-items: center; gap: 16px; }
.A-wordmark { color: var(--ink); text-decoration: none; text-transform: uppercase; }
.A-back { color: var(--ink); text-decoration: underline; text-underline-offset: 1px; }
.A-meta-k { opacity: 0.3; }
.A-mark { width: 32px; height: auto; display: block; }
.A-page-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 16px 12px 0; }
.A-page-obj { display: flex; align-items: center; gap: 12px; }
.A-page-obj-num { font-size: 12px; line-height: 15px; }
.A-hero-title { margin: 16px 0 0; font-family: var(--font-core); font-weight: 400; font-size: 24px; line-height: 26px; letter-spacing: -0.25px; }
.A-hero-title em { font-style: normal; opacity: 0.3; }
.A-hero-eyebrow { margin-top: 4px; font-size: 12px; line-height: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.A-hero-eyebrow strong, .A-hero-meta strong, .pm-cat { font-weight: 400; color: var(--ink); }
.A-hero-meta { text-align: right; }
.A-hero-meta-row { font-size: 12px; line-height: 15px; opacity: 0.3; }
.A-section-strip { display: flex; align-items: center; gap: 16px; padding: 32px 12px 0; }
.A-section-strip .line { display: none; }
.A-count { margin-left: auto; }
.A-hint { display: block; max-width: 56ch; margin: 0 0 16px; }
.A-foot {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: 32px; padding: 6px 12px 36px;
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  font-size: 12px; line-height: 15px;
}
.A-foot div { padding-right: 12px; }
.A-foot div:last-child { text-align: right; padding-right: 0; }
.A-foot a { color: var(--ink); text-decoration: none; }
.A-foot a:hover, .A-foot a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 768px) {
  .A-foot { grid-template-columns: 1fr 1fr; }
  .A-foot div:last-child { grid-column: 1 / -1; text-align: left; margin-top: 15px; white-space: nowrap; }
}

/* ─── Product Mockups: gallery in the index language, editor keeps its ground ── */
body.pm-editing { background: var(--pm-bg); }
.pm-strip { padding-top: 32px; padding-bottom: 0; }
.pm-pills { border: none; min-height: 0; gap: 16px; }
.pm-pill { padding: 0; font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 0.3; background: none; }
.pm-pill + .pm-pill { border-left: none; }
.pm-pill:hover, .pm-pill.on { opacity: 1; background: none; color: var(--ink); }
.pm-gallery { padding: 16px 12px 0; background: var(--canvas); border-bottom: none; }
.pm-gallery .A-hint { margin: 0 0 16px; min-height: 30px; max-width: 60ch; } /* two 15px lines reserved */
.pm-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); }
@media (max-width: 1100px) { .pm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .pm-grid { grid-template-columns: 1fr; } }
.pm-card { border-radius: 0; box-shadow: none; border: none; background: var(--canvas); transition: none; }
.pm-card:hover, .pm-card.pending, .pm-card.pending:hover { transform: none; box-shadow: none; }
.pm-card:hover .pm-cap .name { text-decoration: underline; text-underline-offset: 1px; }
.pm-thumb { background: #e8e7e2; } /* the tile PNGs' own ground, so a sub-pixel letterbox never shows as a band */
.pm-thumb .soon { font: 400 12px/15px var(--font-core); color: var(--ink); opacity: 0.3; }
.pm-cap { padding: 12px 0 0; border-top: none; min-height: 0; }
.pm-cap .t { gap: 0; }
.pm-cap .name { font: 400 16px/20px var(--font-core); color: var(--ink); }
.pm-cap .sub { font: 400 12px/15px var(--font-core); color: var(--ink); opacity: 0.3; }
.pm-primary { border-radius: 0; box-shadow: none; font-weight: 400; font-size: 12px; background: var(--ink); }
.pm-primary:hover { background: var(--ink); opacity: 0.8; }
.pm-back, .pm-ghost { border-radius: 0; font-weight: 400; font-size: 12px; }

/* ─── Profile Previews: chrome onto the system, stage and tiles untouched ─── */
.group--advanced { display: none; }               /* Region mapping is internal */
.adjust-btn, .adjust-cluster, .relock-btn, .relock, .unlock-overlay { display: none !important; } /* template editing is internal */
.tweaks-fab { display: none; }
.sidebar { background: var(--canvas); border-right: 1px solid var(--hairline); }
/* Sidebar brand = the site header: one 15px line, 31px tall, same hairline as the topbar beside it. */
.brand { border-bottom: 1px solid var(--hairline); min-height: 0; height: 31px; padding: 9px 12px 6px; gap: 16px; align-items: center; }
.brand-mark { display: none; }
.brand-title { font-family: var(--font-core); font-weight: 400; font-size: 12px; line-height: 15px; letter-spacing: 0; text-transform: uppercase; }
.brand-sub { display: none; }
.brand a.hub-back { font-family: var(--font-core); font-size: 12px; line-height: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); border: none; padding: 0; text-decoration: underline; text-underline-offset: 1px; }
.brand a.hub-back:hover { border: none; opacity: 0.8; }
.topbar { background: var(--canvas); border-bottom: 1px solid var(--hairline); min-height: 0; height: 31px; padding: 9px 12px 6px; }
.topbar-mark { width: 32px; height: auto; display: block; margin-left: auto; flex: none; }
.group-title { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 16px; }
.group-title::after { background: var(--hairline); }
.field-label, .switch-label { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink); margin-bottom: 4px; }
.field-foot, .picker-foot, .picker-sub { font-family: var(--font-core); font-size: 12px; line-height: 15px; letter-spacing: 0; color: var(--ink); opacity: 0.3; }
.text-input { font-family: var(--font-core); font-size: 12px; line-height: 15px; padding: 0 4px; height: 20px; border: none; background: var(--canvas-soft); }
.text-input:focus { border: none; outline: none; }
.seg { border: none; gap: 16px; }
.seg-btn, .seg.small .seg-btn { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 0.3; padding: 0; }
.seg-btn + .seg-btn { border-left: none; }
.seg-btn:hover, .seg-btn.active { opacity: 1; background: none; color: var(--ink); }
/* The surface switch (iOS / Desktop) is a boxed control: the two CTA fills side by side,
   active = ink on canvas, inactive = the soft fill. Radius 0, no borders, no gap. */
.seg.small { gap: 0; }
.seg.small .seg-btn { opacity: 1; height: 28px; padding: 0 12px; background: var(--canvas-soft); color: var(--ink); }
.seg.small .seg-btn:hover { opacity: 0.8; background: var(--canvas-soft); }
.seg.small .seg-btn.active, .seg.small .seg-btn.active:hover { opacity: 1; background: var(--ink); color: var(--canvas); }
.tabs { gap: 16px; }
.tab { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 0.3; padding: 0; border-bottom: none; }
.tab:hover, .tab.active { opacity: 1; color: var(--ink); border-bottom: none; }
.adjust-btn, .relock-btn, .zoombar .zoom-reset, .gtile-label, .picker-label, .picker-hub, .picker-item .meta {
  font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none;
}
.adjust-btn, .relock-btn { border: none; background: var(--canvas-soft); color: var(--ink); padding: 0 12px; height: 28px; }
/* Download (single view + gallery): the ink block, as the sidebar's Download all. */
.dl-btn { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; border: none; background: var(--ink); color: var(--canvas); padding: 0 12px; height: 28px; min-height: 28px; }
.dl-btn:hover:not(:disabled) { border: none; color: var(--canvas); opacity: 0.8; }
.dl-btn:disabled { opacity: 0.3; }
.surface-bar .dl-btn { min-height: 28px; }
.adjust-btn:hover, .relock-btn:hover { border: none; color: var(--ink); opacity: 0.8; }
.adjust-btn.on { background: var(--ink); color: var(--canvas); border: none; }
.adjust-btn.locked { color: var(--ink); }
.primary-btn { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; padding: 0 16px; height: 32px; border: none; background: var(--ink); color: var(--canvas); gap: 8px; }
.primary-btn:hover { background: var(--ink); opacity: 0.8; border: none; }
.primary-btn .arrow { color: var(--canvas); }
.ghost-wide { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; padding: 0 12px; height: 28px; border: none; background: var(--canvas-soft); color: var(--ink); }
.ghost-wide:hover { border: none; opacity: 0.8; color: var(--ink); }
.ghost-wide:disabled { opacity: 0.3; cursor: default; }
.share-url { width: 100%; height: 28px; text-overflow: ellipsis; }
.field-foot.share-err { opacity: 1; color: var(--ink); }
.zoombar, .zoombar button { font-family: var(--font-core); font-size: 12px; }
.picker-wrap, :root[data-paper="white"] .picker-wrap { background: var(--canvas); }
.picker-card { border-radius: 0; padding: 16px 12px; background: var(--canvas); }
.picker-title { font-family: var(--font-core); font-weight: 400; font-size: 24px; line-height: 26px; letter-spacing: -0.25px; }
.picker-label { color: var(--ink); opacity: 0.3; margin-bottom: 8px; }
.picker-item { border-radius: 0; }
.picker-item:hover { background: var(--paper-soft); }
.picker-item b { font-weight: 400; font-size: 16px; letter-spacing: 0; }
.picker-item .meta, .picker-hub { color: var(--ink); opacity: 0.3; }
.picker-item .del:hover, .picker-hub:hover { color: var(--ink); opacity: 1; }
.picker-item .del { white-space: nowrap; }
.picker-item .del.pending { opacity: 1; color: var(--accent-alert); }
.picker-hub { text-decoration: underline; text-underline-offset: 1px; }
.shared-badge { font-family: var(--font-core); font-size: 12px; }

/* The picker scopes its own hub tokens (styles.css .picker-wrap): remap those too. */
.picker-wrap, :root[data-paper="white"] .picker-wrap {
  --paper: #ffffff; --paper-deep: #ededed; --paper-soft: #f5f5f5;
  --rule: #e4e4e7; --rule-soft: #e4e4e7; --backdrop: #ffffff;
  --ink: #000000; --ink-mid: #000000; --ink-soft: #4d4d4d; --ink-faint: rgba(0, 0, 0, 0.3);
  --orange: #000000; --sans: var(--font-core); --mono: var(--font-core);
  background: var(--canvas); padding: 16px 12px;
}
.picker-empty { font-family: var(--font-core); font-size: 12px; line-height: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 0.3; padding: 16px 0; }
.picker-item { padding: 12px 0; }
.picker-new { gap: 16px; }
.picker-new .text-input { padding: 0 4px; height: 32px; border: none; background: var(--canvas-soft); font-family: var(--font-core); font-size: 12px; line-height: 15px; }
.picker-new .text-input:focus { border: none; }
.picker-new .text-input::placeholder { color: var(--ink); opacity: 0.3; }
.picker-new .primary-btn { font-family: var(--font-core); font-size: 12px; line-height: 15px; letter-spacing: 0; text-transform: none; padding: 0 16px; height: 32px; border: none; background: var(--ink); color: var(--canvas); gap: 8px; }
.picker-new .primary-btn .arrow { color: var(--canvas); }
.picker-new .primary-btn:hover { background: var(--ink); opacity: 0.8; border: none; }
.picker-new .primary-btn:disabled { background: var(--ink); opacity: 0.3; border: none; }

/* Gallery: the 12px gutter and the 16px row pitch, so three tiles fit without scrolling sideways. */
.gallery-scroll { padding: 16px 12px 56px; }
.gallery { gap: 24px 16px; width: max-content; max-width: 100%; margin: 0 auto; } /* tracks hug the tiles, grid centred, equal margins */
.gallery-bar { max-width: none; margin: 0 0 16px; }
.gallery-group { max-width: none; }
.gallery-group + .gallery-group { margin-top: 32px; }
.gallery-group .group-title { margin-bottom: 16px; }

/* Scrollbars: square thumb at the system's 0.3 tone, track clear, the thumb's 3px
   inset takes the colour of the pane it sits in (sidebar is canvas, stage is --bg). */
.panel-scroll::-webkit-scrollbar-track, .stage-scroll::-webkit-scrollbar-track, .gallery-scroll::-webkit-scrollbar-track { background: transparent; }
.panel-scroll::-webkit-scrollbar-thumb, .stage-scroll::-webkit-scrollbar-thumb, .gallery-scroll::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.3); border-radius: 0; }
.panel-scroll::-webkit-scrollbar-thumb { border: 3px solid var(--canvas); }
.stage-scroll::-webkit-scrollbar-thumb, .gallery-scroll::-webkit-scrollbar-thumb { border: 3px solid var(--bg); }

/* ─── Leftovers from the 2026-09-24 audit ──────────────────────────────── */
.save-dot { font-family: var(--font-core); font-size: 12px; line-height: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 0.3; }
.save-dot.saving { color: var(--ink); opacity: 1; }
.artist-switch { font-family: var(--font-core); font-size: 12px; line-height: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); border: none; background: var(--canvas-soft); padding: 0 12px; height: 28px; }
.artist-switch:hover { border: none; color: var(--ink); opacity: 0.8; }
.lock-card { display: none; }                      /* the layout is always locked on the public build */
.zoom-val { font-family: var(--font-core); font-size: 12px; letter-spacing: 0; }
.dz-remove { border-radius: 0; }
.A-hero-title em { opacity: 1; }                   /* the faded second word is a hub motif, not OOO */

/* Privacy · Disclaimer at the foot of the Profile Previews sidebar and picker */
.pp-legal { margin-top: 32px; color: rgba(0, 0, 0, 0.3); }
.pp-legal a { color: rgba(0, 0, 0, 0.3); text-decoration: none; }
.pp-legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 1px; }

/* Same 1px drop for the tools' filled controls (Helvetica's ink sits above its line centre). */
.dl-btn, .primary-btn, .ghost-wide, .artist-switch, .adjust-btn, .seg.small .seg-btn, .picker-new .primary-btn { padding-top: 2px; }
/* Product Mockups buttons size themselves by padding, so trimming only the top padding left
   the label against the top edge. They are blocks of a set height with the label centred,
   like the index's buttons, and carry the same 1px drop. */
.pm-back, .pm-ghost, .pm-primary { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 2px 16px 0; line-height: 15px; }

/* Phones: 16px in every text field, or iOS zooms the page on focus. */
@media (pointer: coarse), (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="search"], input[type="number"], input:not([type]), textarea, select { font-size: 16px !important; }
}

/* ─── Product Mockups editor on phones: everything in the page flow, nothing fixed.
   Bar = two rows (back + title, then export format + download); artwork tabs two
   across; stage full width; colour panel stacked with its labels back. ─── */
@media (max-width: 768px) {
  .pm-top { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .pm-top .l { flex: 1 1 100%; gap: 12px; }
  .pm-top .r { flex: 1 1 100%; gap: 8px; justify-content: stretch; }
  .pm-top .pm-menu { flex: 1 1 0; min-width: 0; }
  .pm-top .pm-menu > button { width: 100%; justify-content: flex-start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-top .pm-primary { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .pm-top .pm-back, .pm-top .pm-menu > button, .pm-top .pm-primary { height: 36px; padding-top: 2px; padding-bottom: 0; }
  .pm-menu-list { left: 0; right: auto; }

  .pm-artpanel { position: static; transform: none; width: auto; margin: 12px 12px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .pm-artpanel .lead { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: baseline; gap: 8px; padding: 2px 2px 0; }

  .pm-stagewrap { flex: none; padding: 12px; }
  .pm-stage { width: 100%; }

  .pm-colorbar { position: static; transform: none; max-width: none; margin: 0 12px 24px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 16px; padding: 12px; }
  .pm-group { flex-wrap: wrap; gap: 10px; }
  .pm-group > b { display: block; flex: 1 1 100%; margin: 0; }
  .pm-chips { flex: 1 1 100%; margin: 0; gap: 6px; }
  .pm-chip { padding: 8px 12px; }
  .pm-sw { width: 28px; height: 28px; }
  .pm-color { width: 32px; height: 32px; }
  .pm-hex { width: 112px; }
  .pm-check { justify-content: flex-start; min-height: 28px; }
  .pm-toast { bottom: 24px; }
}
