/* ============================================================
   HIP DESIGN SYSTEM — v1.0
   Source of truth for HIPKit visual styling.
   Import once per page: <link rel="stylesheet" href="/hip-design.css">

   Companion: STYLE-GUIDE.md
   ============================================================ */

/* Secondary display font (Familjen Grotesk) for section headlines + ancillary
   page heros. Loaded here so every consuming page inherits it automatically.
   The home page marquis (.hip-hero-headline) stays on Inter Tight via the
   --font-display-marquis token below. Inter + Inter Tight + JetBrains Mono
   remain in the per-page <link> blocks for parallel-loading the primary
   families with preconnect. */
@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');


/* ============================================================
   1. TOKENS — change values here to retheme the entire site
   ============================================================ */

:root {
  /* Color: surfaces */
  --bg:           #FFFFFF;
  --bg-soft:      #FAFAFA;
  --bg-panel:     #F5F5F4;
  --bg-cream:     #F5F1E8;

  /* Color: ink */
  --ink:          #0A0A0A;
  --ink-2:        #1F1F1F;
  --ink-soft:     #525252;
  --ink-faded:    #A3A3A3;

  /* Color: brand accent (orange) */
  --orange:       #E85D2C;
  --orange-deep:  #C44A1F;
  --orange-soft:  #FEF1EC;
  --orange-edge:  rgba(232, 93, 44, 0.20);
  --orange-glow:  rgba(232, 93, 44, 0.15);

  /* Color: status (green = verified/success only — never decorative) */
  --green:        #16803c;
  --green-soft:   #f0fdf4;
  --green-edge:   #bbf7d0;

  /* Color: secondary accents — used for SURFACE DIFFERENTIATION, not as
     alternates to --orange. Production used these intentionally so each
     surface had its own identity. Teal owns the API surface + Physical
     Creators band; yellow owns the Pricing "Popular" tag + Physical
     Creators badge + warn-callout treatment. Never combine all three
     on a single component — pick the one that owns that surface. */
  --teal:         #0e7c86;
  --teal-deep:    #0a5d65;
  --teal-soft:    rgba(14, 124, 134, 0.08);
  --teal-edge:    rgba(14, 124, 134, 0.25);
  --teal-glow:    rgba(14, 124, 134, 0.15);

  --yellow:       #ef9f1b;
  --yellow-deep:  #c8830d;
  --yellow-soft:  rgba(239, 159, 27, 0.10);
  --yellow-edge:  rgba(239, 159, 27, 0.30);

  /* Color: rules */
  --rule:         #E5E5E5;
  --rule-strong:  #0A0A0A;

  /* Type: families.
     --font-display          → section headlines + ancillary page heros (h1/h2/h3 + .hip-h*)
     --font-display-marquis  → reserved for the home page hero (.hip-hero-headline)
                                in §19 only; preserves the honed Inter Tight tuning.
     Selected S180CC via the /v2/hero-fonts.html exploration. */
  --font-display:         'Familjen Grotesk', 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-display-marquis: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-body:            'Inter', system-ui, sans-serif;
  --font-mono:            'JetBrains Mono', ui-monospace, monospace;

  /* Type: scale (modular, headline-down) */
  --fs-hero:      clamp(48px, 6.5vw, 84px);
  --fs-h1:        clamp(36px, 4.5vw, 56px);
  --fs-h2:        clamp(28px, 3vw, 40px);
  --fs-h3:        22px;
  --fs-lede:      19px;
  --fs-body:      15px;
  --fs-small:     13px;
  --fs-meta:      12px;
  --fs-mono:      11px;

  /* Type: weights */
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-heavy:     800;

  /* Type: tracking */
  --track-tight:  -0.045em;  /* hero */
  --track-snug:   -0.02em;   /* headings */
  --track-normal: -0.005em;
  --track-wide:   0.04em;
  --track-eyebrow:0.10em;    /* uppercase eyebrows */

  /* Spacing scale (4px base) */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* Layout */
  --container-max: 1400px;
  --container-pad: 32px;

  /* Radii */
  --r-sm:  4px;
  --r-md:  6px;
  --r-lg:  8px;
  --r-xl:  10px;
  --r-2xl: 12px;
  --r-pill:100px;

  /* Borders */
  --bw-thin:  1px;
  --bw-thick: 2px;

  /* Shadow */
  --shadow-card:    0 1px 3px rgba(0,0,0,0.04), 0 24px 48px -16px rgba(0,0,0,0.12);
  --shadow-cta:     0 6px 16px -4px rgba(232, 93, 44, 0.40);
  --shadow-cta-rest:0 1px 0 rgba(0,0,0,0.05);

  /* Motion */
  --t-fast:   120ms ease;
  --t-base:   150ms ease;
  --t-slow:   220ms ease;
}


/* ============================================================
   2. BASE — global resets and body defaults
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  font-size: var(--fs-body);
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}


/* ============================================================
   3. LAYOUT — containers, sections, dividers
   ============================================================ */

.hip-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.hip-section {
  padding: var(--s-12) var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
}

.hip-section--tight   { padding-top: var(--s-10); padding-bottom: var(--s-10); }
.hip-section--loose   { padding-top: var(--s-20); padding-bottom: var(--s-20); }
.hip-section--ruled   { border-top: var(--bw-thin) solid var(--rule); }


/* ============================================================
   4. NAV — ported verbatim from production index.html.
   Uses production class names (.nav, .nav-brand, .nav-cta, etc.)
   so v2 nav markup is byte-identical to live. Only token names
   substitute v2 design system variables for production's --c6,
   --accent, --border, etc.
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 var(--container-pad);
  transition: all 0.3s;
}
.nav.scrolled {
  background: rgba(245, 243, 240, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.7; }

.nav-badge { height: 30px; width: auto; }

.nav-wordmark {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.nav-wordmark .kit {
  color: var(--orange);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  background: var(--orange);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all 0.3s ease;
}
.nav-cta:hover {
  background: var(--orange-deep);
  color: #fff !important;
}

.nav-badge-wrap {
  width: 32px;
  height: 38px;
  background: var(--ink);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-badge-wrap img {
  height: 24px;
  width: auto;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 20px var(--container-pad);
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu a:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}


/* ============================================================
   5. EYEBROW — "Powered by HIP" pattern, used above headlines.
   Sans (default) for interior pages. Mono variant for hero pages.
   ============================================================ */

.hip-eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  margin-bottom: var(--s-6);
}

.hip-eyebrow--mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  margin-bottom: var(--s-8);
}

.hip-eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-glow);
  flex-shrink: 0;
}

.hip-eyebrow-name {
  color: var(--orange);
  font-weight: var(--fw-bold);
}


/* ============================================================
   6. HEADLINES — h1, h2, h3 (hero headline lives in section 19)
   ============================================================ */

.hip-h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h1);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--s-6);
}

.hip-h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: var(--s-5);
}

.hip-h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: var(--track-snug);
  color: var(--ink);
  margin-bottom: var(--s-3);
}

/* Hero headline + strikethrough + italic emphasis system → see Section 19 */


/* ============================================================
   7. BODY COPY — lede, paragraph, captions
   ============================================================ */

.hip-lede {
  font-size: var(--fs-lede);
  line-height: 1.4;
  color: var(--ink);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  margin-bottom: var(--s-3);
  max-width: 580px;
}

.hip-body {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: var(--fw-regular);
  margin-bottom: var(--s-6);
  max-width: 580px;
}
.hip-body strong { color: var(--ink); font-weight: var(--fw-semibold); }
.hip-body a { color: var(--orange); text-decoration: none; font-weight: var(--fw-semibold); }
.hip-body a:hover { text-decoration: underline; text-underline-offset: 3px; }

.hip-caption {
  font-size: var(--fs-meta);
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
}

.hip-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0;
}


/* ============================================================
   8. BUTTONS — three primary types: orange, dark, outline
   ============================================================ */

.hip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-xl);
  border: var(--bw-thin) solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
}

.hip-btn--orange {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
  box-shadow: var(--shadow-cta-rest);
}
.hip-btn--orange:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}

.hip-btn--dark {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.hip-btn--dark:hover {
  background: var(--ink-2);
  transform: translateY(-1px);
}

.hip-btn--outline {
  background: white;
  color: var(--orange);
  border-color: var(--orange);
}
.hip-btn--outline:hover {
  background: var(--orange-soft);
}

.hip-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding: var(--s-2) var(--s-3);
  font-weight: var(--fw-medium);
}
.hip-btn--ghost:hover { color: var(--ink); background: var(--bg-soft); }

/* Compact nav-sized button */
.hip-btn--sm {
  padding: var(--s-2) var(--s-4);
  font-size: 13px;
  font-weight: var(--fw-medium);
  border-radius: var(--r-md);
}

/* CTA stack — primary action above, two side-by-side below */
.hip-cta-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 540px;
}
.hip-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
@media (max-width: 700px) {
  .hip-cta-row { grid-template-columns: 1fr; }
}


/* ============================================================
   9. PANEL / CARD — bordered white surface with header + body
   ============================================================ */

.hip-panel {
  background: white;
  border: var(--bw-thin) solid var(--rule);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hip-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-bottom: var(--bw-thin) solid var(--rule);
  background: var(--bg-soft);
}

.hip-panel-title {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}

.hip-panel-body { padding: var(--s-6); }

.hip-panel-foot {
  border-top: var(--bw-thin) solid var(--rule);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-meta);
  color: var(--ink-soft);
}


/* ============================================================
   10. PILLS / TAGS — count badges, status indicators
   ============================================================ */

.hip-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--fs-mono);
  font-weight: var(--fw-semibold);
  padding: 3px var(--s-3);
  border-radius: var(--r-pill);
  border: var(--bw-thin) solid;
}

.hip-pill--orange {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: var(--orange-edge);
}

.hip-pill--green {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-edge);
}
.hip-pill--green::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hip-pill--neutral {
  color: var(--ink);
  background: var(--bg-soft);
  border-color: var(--rule);
}


/* ============================================================
   11. FILE ROW — used in batch attestation lists
   ============================================================ */

.hip-file-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3);
}

.hip-file {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-3);
  border-radius: var(--r-lg);
  background: var(--bg);
  border: var(--bw-thin) solid var(--rule);
  transition: border-color var(--t-base);
}
.hip-file:hover { border-color: var(--ink-faded); }

.hip-file-type {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-wide);
  background: var(--ink);
  color: white;
  padding: 6px var(--s-2);
  border-radius: 5px;
  min-width: 38px;
  text-align: center;
  flex-shrink: 0;
}

.hip-file-info { flex: 1; min-width: 0; }
.hip-file-name {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hip-file-hash {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--ink-soft);
  margin-top: 2px;
}

.hip-file-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  display: grid;
  place-items: center;
  font-size: var(--fs-mono);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  border: var(--bw-thin) solid var(--orange-edge);
}


/* ============================================================
   12. PROGRESS BAR
   ============================================================ */

.hip-progress {
  height: 3px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.hip-progress-bar {
  position: absolute;
  inset: 0;
  background: var(--orange);
  width: var(--progress, 100%);
  transition: width var(--t-slow);
}


/* ============================================================
   13. FORMAT STRIP — bottom-of-page format markers
   ============================================================ */

.hip-formats {
  border-top: var(--bw-thin) solid var(--rule);
  background: var(--bg-soft);
  padding: var(--s-3) var(--container-pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2) var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}
.hip-formats span::before {
  content: "•";
  color: var(--orange);
  margin-right: var(--s-2);
  font-weight: var(--fw-bold);
}


/* ============================================================
   14. FORMS — inputs, labels, fieldsets
   ============================================================ */

.hip-field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}

.hip-label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--ink);
}

.hip-input,
.hip-select,
.hip-textarea {
  font-family: inherit;
  font-size: var(--fs-body);
  padding: var(--s-3) var(--s-4);
  border: var(--bw-thin) solid var(--rule);
  border-radius: var(--r-lg);
  background: white;
  color: var(--ink);
  transition: border-color var(--t-base), box-shadow var(--t-base);
  width: 100%;
}
.hip-input:focus,
.hip-select:focus,
.hip-textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}
.hip-input::placeholder { color: var(--ink-faded); }

.hip-help {
  font-size: var(--fs-meta);
  color: var(--ink-soft);
}
.hip-help--error { color: var(--orange-deep); }


/* ============================================================
   15. TABLES — data display with restrained styling
   ============================================================ */

.hip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.hip-table th {
  text-align: left;
  font-weight: var(--fw-semibold);
  color: var(--ink-soft);
  padding: var(--s-3) var(--s-4);
  border-bottom: var(--bw-thin) solid var(--rule);
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
}
.hip-table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: var(--bw-thin) solid var(--rule);
  color: var(--ink);
  vertical-align: middle;
}
.hip-table tr:hover td { background: var(--bg-soft); }


/* ============================================================
   16. LINKS — inline and standalone
   ============================================================ */

.hip-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  border-bottom: var(--bw-thin) solid transparent;
  transition: border-color var(--t-base);
}
.hip-link:hover { border-bottom-color: var(--orange); }

.hip-link--ink {
  color: var(--ink);
  border-bottom-color: var(--rule);
}
.hip-link--ink:hover { border-bottom-color: var(--ink); }


/* ============================================================
   17. FOOTER — simple site footer
   ============================================================ */

.hip-footer {
  border-top: var(--bw-thin) solid var(--rule);
  padding: var(--s-10) var(--container-pad);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.hip-footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s-10);
}
.hip-footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  margin-bottom: var(--s-3);
}
.hip-footer-col a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  padding: var(--s-1) 0;
  transition: color var(--t-base);
}
.hip-footer-col a:hover { color: var(--ink); }
.hip-footer-bottom {
  max-width: var(--container-max);
  margin: var(--s-10) auto 0;
  padding-top: var(--s-6);
  border-top: var(--bw-thin) solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-meta);
}

@media (max-width: 900px) {
  .hip-footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
}
@media (max-width: 600px) {
  .hip-footer-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}


/* ============================================================
   18. UTILITIES — tiny, intentional set
   ============================================================ */

.hip-stack-3 > * + * { margin-top: var(--s-3); }
.hip-stack-4 > * + * { margin-top: var(--s-4); }
.hip-stack-6 > * + * { margin-top: var(--s-6); }
.hip-stack-8 > * + * { margin-top: var(--s-8); }

.hip-row { display: flex; align-items: center; gap: var(--s-3); }
.hip-row--between { justify-content: space-between; }
.hip-row--wrap { flex-wrap: wrap; }

.hip-hide-mobile { }
@media (max-width: 700px) { .hip-hide-mobile { display: none !important; } }


/* ============================================================
   19. HERO HEADLINE — display type with strikethrough/italic system
   ============================================================ */

.hip-hero-headline {
  font-family: var(--font-display-marquis);
  font-weight: var(--fw-bold);
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: var(--ink);
  margin: 0;
}
/* Narrow-viewport floor reduction — at <=480px the 64px clamp floor is too
   large to fit "Made official with HIP." on one line; without this override
   "with" orphans onto its own line. Lowering the floor lets the line wrap
   to 2 lines ("Made official with" / "HIP." or similar) instead of 3. */
@media (max-width: 480px) {
  .hip-hero-headline {
    font-size: clamp(40px, 12vw, 56px);
  }
}
.hip-hero-headline .hip-line {
  display: block;
  margin-bottom: 0.08em;
}
.hip-hero-headline .hip-line:last-child { margin-bottom: 0; }

/* Strikethrough — used on the negated word (e.g. "machine").
   The wrapper is the positioning anchor for the absolute strike line. */
.hip-strike-wrap {
  position: relative;
  display: inline-block;
}
.hip-strike {
  display: inline-block;
  transition: color 0.4s ease;
}
.hip-strike-line {
  position: absolute;
  left: -1%; right: -1%;
  top: 54%;
  height: 7px;
  background: var(--orange);
  transform-origin: left center;
  pointer-events: none;
}
/* When parent has .hip-struck class, the word fades to grey.
   Font weight stays the same — only color changes. */
.hip-strike-wrap.hip-struck .hip-strike {
  color: var(--ink-faded);
}

/* Italic charcoal emphasis — "the right answer" */
.hip-em-you {
  font-style: italic;
  font-weight: var(--fw-bold);
  color: var(--ink);
}

/* Italic orange emphasis — the brand mark word */
.hip-em-hip {
  font-style: italic;
  font-weight: var(--fw-heavy);
  color: var(--orange);
  display: inline-block;
  margin-left: 0.05em; /* compensates for inline-block whitespace collapse */
}


/* ============================================================
   20. (reserved — eyebrow lives in Section 5 with --mono variant)
   ============================================================ */


/* ============================================================
   21. CREAM CONNECTOR BAR — section divider / rhythm device
   Cream paper, charcoal type, charcoal hairlines top and bottom.
   Used between major page sections to create rhythm and breathing room.
   ============================================================ */

.hip-connector {
  background: var(--bg-cream);
  color: var(--ink);
  padding: 14px var(--container-pad);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  border-top: var(--bw-thin) solid var(--ink);
  border-bottom: var(--bw-thin) solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.hip-connector-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.hip-connector-meta {
  margin-left: auto;
  font-weight: var(--fw-medium);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
@media (max-width: 700px) {
  .hip-connector { padding: 12px var(--container-pad); font-size: 10px; gap: 10px; letter-spacing: 0.12em; }
  .hip-connector-meta { display: none; }
}


/* ============================================================
   22. CTA SPLIT BARS — full-width dual-action row
   Used as the primary conversion moment on the homepage.
   ============================================================ */

.hip-cta-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--bw-thin) solid var(--rule);
}
.hip-cta-bar {
  padding: 28px var(--s-8);
  border: none;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
  transition: background var(--t-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
}
.hip-cta-bar .hip-cta-arrow {
  font-family: var(--font-mono);
  font-weight: var(--fw-regular);
  transition: transform var(--t-base);
  opacity: 0.7;
}
.hip-cta-bar:hover .hip-cta-arrow {
  transform: translateX(4px);
  opacity: 1;
}
.hip-cta-bar--dark { background: var(--ink); color: white; }
.hip-cta-bar--dark:hover { background: var(--ink-2); }
.hip-cta-bar--orange { background: var(--orange); color: white; }
.hip-cta-bar--orange:hover { background: var(--orange-deep); }
.hip-cta-bar--faded {
  background: var(--ink-faded);
  color: white;
  text-decoration: none;
}
.hip-cta-bar--faded:hover { background: #8e8e8e; color: white; }
.hip-cta-bar--faded:visited { color: white; }
.hip-cta-bar--faded em {
  font-style: italic;
  font-weight: var(--fw-bold);
  color: white;
}

.hip-cta-bars--3up { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) {
  .hip-cta-bars--3up { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hip-cta-bars { grid-template-columns: 1fr; }
  .hip-cta-bar { padding: 22px var(--container-pad); font-size: 16px; }
}


/* ============================================================
   23. WHAT IS HIP — promoted dark feature block
   Used as a tertiary CTA that explains the protocol.
   Sits between the conversion CTAs and the marquee.
   ============================================================ */

.hip-feature-block {
  background: var(--ink);
  color: white;
  padding: 56px var(--container-pad);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s-10);
  align-items: end;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background var(--t-slow);
  position: relative;
  overflow: hidden;
}
.hip-feature-block:hover { background: var(--ink-2); }
.hip-feature-block::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--orange);
}
.hip-feature-content {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 800px;
}
.hip-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-bold);
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.hip-feature-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
}
.hip-feature-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: var(--fw-bold);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: white;
}
.hip-feature-headline em {
  font-style: italic;
  color: var(--orange);
}
.hip-feature-sub {
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  font-weight: var(--fw-regular);
  max-width: 320px;
  text-align: right;
}
.hip-feature-sub strong {
  color: var(--orange);
  font-weight: var(--fw-bold);
}
.hip-feature-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-4);
}
.hip-feature-arrow {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  color: var(--orange);
  transition: transform var(--t-base);
}
.hip-feature-block:hover .hip-feature-arrow { transform: translateX(8px); }

@media (max-width: 700px) {
  .hip-feature-block { padding: 32px var(--container-pad); grid-template-columns: 1fr; gap: 20px; }
  .hip-feature-right { align-items: flex-start; }
  .hip-feature-sub { text-align: left; max-width: none; }
  .hip-feature-arrow { display: none; }
}


/* ============================================================
   24. MARQUEE — kinetic dual-stream format reveal
   Two rows scroll opposite directions:
     • TOP — named types in display (Inter Tight via --font-display-marquis,
       same family the hero uses), scrolls forward
     • BOTTOM — file extensions in mono, scrolls reverse
   Hover anywhere on the band pauses both rows.
   Color treatment locked S181CC: monochrome ink-on-white (variant 00).
   ============================================================ */

.hip-marquee-wrap {
  background: var(--bg);
  border-top: var(--bw-thin) solid var(--rule);
  border-bottom: var(--bw-thin) solid var(--rule);
  padding: 28px 0;
  overflow: hidden;
  position: relative;
}
.hip-marquee-wrap::before,
.hip-marquee-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.hip-marquee-wrap::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.hip-marquee-wrap::after  { right: 0; background: linear-gradient(to left, var(--bg), transparent); }

.hip-marquee-row {
  display: flex;
  gap: 0;
  white-space: nowrap;
  width: max-content;
}
.hip-marquee-row.fwd { animation: hip-marquee-fwd 45s linear infinite; }
.hip-marquee-row.rev { animation: hip-marquee-rev 45s linear infinite; }
.hip-marquee-wrap:hover .hip-marquee-row { animation-play-state: paused; }

@keyframes hip-marquee-fwd { to   { transform: translateX(-50%); } }
@keyframes hip-marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.hip-marquee-top { margin-bottom: 10px; }
.hip-marquee-top .hip-marquee-item {
  font-family: var(--font-display-marquis);
  font-size: clamp(17px, 2.2vw, 27px);
  font-weight: var(--fw-regular);
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
}
.hip-marquee-item--italic { font-style: italic; }
.hip-marquee-top .hip-marquee-sep {
  color: var(--ink-faded);
  font-weight: var(--fw-regular);
}

.hip-marquee-bot .hip-marquee-item {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.4vw, 16px);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.hip-marquee-bot .hip-marquee-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  .hip-marquee-row { animation: none; }
}


/* ============================================================
   25. TRUST STAMPS — mono check items, used as a final reassurance row
   ============================================================ */

.hip-stamps {
  padding: var(--s-6) var(--container-pad);
  display: flex;
  justify-content: center;
  gap: var(--s-10);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
  letter-spacing: 0.05em;
}
.hip-stamps span::before {
  content: "✓";
  color: var(--orange);
  margin-right: var(--s-2);
  font-weight: var(--fw-bold);
}
@media (max-width: 700px) {
  .hip-stamps { padding: 20px var(--container-pad); gap: 20px; font-size: 11px; }
}


/* ============================================================
   26. LEDE EMPHASIS — italic charcoal + italic orange in lede copy
   Mirrors the headline's typographic system at lede scale.
   ============================================================ */

.hip-lede em { font-style: italic; font-weight: var(--fw-bold); }
.hip-lede .hip-em-orange {
  font-style: italic;
  font-weight: var(--fw-bold);
  color: var(--orange);
}

/* Phrase highlight blocks — used in ledes where the emphasis should be
   architectural rather than typographic. Cream highlight reads as quiet
   editorial framing; orange highlight reads as the brand-argument anchor.
   box-decoration-break: clone makes the highlight render correctly across
   line wraps. */
.hip-hl-cream {
  background: var(--bg-cream);
  color: var(--ink);
  font-style: italic;
  font-weight: var(--fw-bold);
  padding: 0 8px;
  margin: 0 -2px;
  white-space: nowrap;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hip-hl-orange {
  background: var(--orange);
  color: white;
  font-style: italic;
  font-weight: var(--fw-bold);
  padding: 0 8px;
  margin: 0 -2px;
  white-space: nowrap;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


/* ============================================================
   27. WHY BAND — mirrors production .why-band scales (clamp-based
   fluid padding + headline; fixed card properties).
   ============================================================ */

.hip-why-band {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) clamp(24px, 6vw, 80px) clamp(40px, 6vw, 60px);
  background: var(--bg-soft);
}
.hip-why-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  max-width: 1100px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  letter-spacing: var(--track-snug);
}
.hip-why-headline em {
  font-style: italic;
  color: var(--orange);
}
/* 4-line staircase: alternating alignments + the two orange exclamations
   on their own lines using the marquis font (Inter Tight) for visual
   continuity with the home hero's italic-orange "HIP" treatment. */
.hip-why-l1 {
  display: block;
  text-align: left;
}
.hip-why-l3 {
  display: block;
  text-align: center;
}
.hip-why-congrats,
.hip-why-youmade {
  display: block;
  font-family: var(--font-display-marquis);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hip-why-congrats {
  text-align: right;
  font-size: 2em;
  margin: 0.05em 0 0.15em;
}
.hip-why-youmade {
  text-align: left;
  font-size: 1.6em;
  margin: 0.05em 0 0;
}
/* Mobile: regular ink lines hit the 26px clamp floor (still readable);
   keep the orange phrases proportional but cap their growth so they don't
   eat the whole viewport on narrow screens. */
@media (max-width: 600px) {
  .hip-why-congrats { font-size: 1.7em; }
  .hip-why-youmade  { font-size: 1.4em; }
}
.hip-why-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hip-why-card {
  background: var(--bg);
  border: var(--bw-thin) solid var(--rule);
  border-radius: var(--r-2xl);
  padding: 28px 24px;
}
.hip-why-card-icon {
  font-size: 24px;
  margin-bottom: 14px;
}
.hip-why-card .hip-h3 {
  font-size: 15px;
  font-weight: var(--fw-bold);
  margin-bottom: 10px;
}
.hip-why-card .hip-body {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.hip-why-link {
  text-align: center;
  margin-top: 28px;
}
.hip-why-link .hip-link {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--orange);
}

@media (max-width: 768px) {
  .hip-why-cards { grid-template-columns: 1fr; }
}


/* ============================================================
   28. FINGERPRINT BAND — mirrors production .fp-band scales
   (fluid container pad; fixed inner + card values).
   ============================================================ */

.hip-fp-band {
  background: var(--ink);
  color: var(--bg);
  padding: 90px clamp(24px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}
/* Decorative fingerprint, pinned right & partially off-canvas (matches
   production .fp-bg). Invert filter is needed because the webp is encoded
   as pure-black pixels with varying alpha — without inversion it would
   be invisible on the dark bg. */
.hip-fp-bg {
  position: absolute;
  right: -220px;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: auto;
  opacity: 0.18;
  filter: invert(1);
  pointer-events: none;
  user-select: none;
}
.hip-fp-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  position: relative;
}
.hip-fp-head .hip-h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: var(--fw-semibold);
  line-height: 1.08;
  margin-bottom: 20px;
  color: var(--bg);
  letter-spacing: var(--track-snug);
}
.hip-fp-head .hip-h2 em {
  font-style: italic;
  color: var(--orange);
}
.hip-fp-lede {
  font-size: 15px;
  color: var(--ink-faded);
  line-height: 1.75;
  max-width: 440px;
}
.hip-fp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hip-fp-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.04);
  border: var(--bw-thin) solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hip-fp-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(232, 93, 44, 0.2);
  transform: translateX(4px);
}
.hip-fp-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--fw-bold);
  background: var(--yellow);
  color: var(--ink);
}
.hip-fp-txt {
  font-size: 13px;
  color: var(--ink-faded);
  line-height: 1.55;
}
.hip-fp-txt strong {
  color: var(--bg);
  font-weight: var(--fw-semibold);
}

@media (max-width: 768px) {
  .hip-fp-inner { grid-template-columns: 1fr; gap: 40px; }
}


/* ============================================================
   29. REVEAL — IntersectionObserver-driven fade-up on scroll.
   Lifted verbatim from production (uses cubic-bezier easing matching
   the rest of the system). Paired with a small IO script in v2/index.html.
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* ============================================================
   30. FEATURES — Capture-One-style horizontal scrolling cards.
   Mirrors production .feat-band scales (clamp container pad, fixed
   card sizes that auto-scroll horizontally on touch + mouse drag).
   ============================================================ */

.hip-feat-band {
  padding: 90px clamp(24px, 6vw, 80px);
  max-width: var(--container-max);
  margin: 0 auto;
}
.hip-feat-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.hip-feat-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: var(--fw-semibold);
  line-height: 1.08;
  letter-spacing: var(--track-snug);
  color: var(--ink);
}
.hip-feat-header h2 em { color: var(--orange); font-style: italic; }
.hip-feat-header p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.75;
}
.hip-feat-scroll {
  overflow: hidden;
  margin: 0 calc(clamp(24px, 6vw, 80px) * -1);
  padding: 0;
}
.hip-feat-scroll::-webkit-scrollbar { display: none; }
.hip-feat-track {
  display: flex;
  gap: 14px;
  padding: 0 clamp(24px, 6vw, 80px);
  will-change: transform;
}
.hip-feat-card {
  min-width: 260px;
  max-width: 300px;
  flex-shrink: 0;
  border-radius: var(--r-2xl);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  background: var(--bg-panel);
  border: var(--bw-thin) solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.hip-feat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(10, 10, 10, 0.08);
}
.hip-feat-card-bar { height: 4px; width: 100%; background: var(--ink); }
.hip-feat-card-bar.b1 { background: var(--ink); }
.hip-feat-card-bar.b2 { background: var(--ink-2); }
.hip-feat-card-bar.b3 { background: var(--orange); }
.hip-feat-card-bar.b4 { background: var(--ink-soft); }
.hip-feat-card-bar.b5 { background: var(--orange-deep); }
.hip-feat-card-bar.b6 { background: var(--ink-faded); }
.hip-feat-card-bar.b7 { background: var(--ink); }
.hip-feat-card-bar.b8 { background: var(--ink-2); }
.hip-feat-card-bar.b9 { background: var(--orange); }
.hip-feat-card-body { padding: 24px 22px; }
.hip-feat-card-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--fw-bold);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hip-feat-card-body p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.hip-feat-card-soon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange);
  margin-top: 10px;
  opacity: 0.7;
}
.hip-feat-card-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-top: 10px;
}
.hip-feat-card-live::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-size: 11px;
  font-weight: var(--fw-heavy);
  flex-shrink: 0;
  line-height: 1;
}

@media (max-width: 1024px) {
  .hip-feat-header { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .hip-feat-card { min-width: 240px; }
}
@media (max-width: 480px) {
  .hip-feat-card { min-width: 220px; }
}


/* ============================================================
   31. CRYPTOGRAPH DONUT — interactive file-type wheel.
   Block lifted intact from production; only the tagline H2 font
   swaps from production --serif (Instrument Serif) to v2's
   --font-display (Inter Tight) per S179 brief.
   ============================================================ */

.hip-cg-band {
  background: var(--ink);
  padding: clamp(40px, 8vw, 80px) 16px clamp(32px, 6vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  overflow: hidden;
}
.hip-cg-donut-wrap {
  width: 100%;
  max-width: 580px;
  aspect-ratio: 1;
  margin: 0 auto;
}
.hip-cg-tagline {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}
.hip-cg-tagline h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: var(--fw-semibold);
  line-height: 1.15;
  color: var(--bg);
  margin-bottom: 10px;
  text-wrap: balance;
  letter-spacing: var(--track-snug);
}
.hip-cg-tagline h2 em { font-style: italic; color: var(--orange); }
.hip-cg-tagline p {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--ink-faded);
  line-height: 1.6;
}


/* ============================================================
   32. HOW IT WORKS — 3-step explainer, 2-col header + 3-col steps.
   Mirrors production .how-band scales.
   ============================================================ */

.hip-how-band {
  padding: 90px clamp(24px, 6vw, 80px);
  max-width: var(--container-max);
  margin: 0 auto;
}
.hip-how-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.hip-how-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: var(--fw-semibold);
  line-height: 1.08;
  letter-spacing: var(--track-snug);
  color: var(--ink);
}
.hip-how-header h2 em { color: var(--orange); font-style: italic; }
.hip-how-header p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.75;
}
.hip-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.hip-step {
  padding: 0 28px;
  position: relative;
}
.hip-step::after {
  content: '';
  position: absolute;
  right: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--rule);
}
.hip-step:first-child { padding-left: 0; }
.hip-step:last-child::after { display: none; }
.hip-step-n {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: var(--fw-semibold);
  font-style: italic;
  color: var(--orange);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 12px;
}
.hip-step h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-bold);
  margin-bottom: 8px;
  color: var(--ink);
}
.hip-step p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 300px;
}

@media (max-width: 1024px) {
  .hip-how-header { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .hip-steps { grid-template-columns: 1fr; }
  .hip-step::after { display: none; }
  .hip-step { padding: 20px 0; border-bottom: var(--bw-thin) solid var(--rule); }
  .hip-step:first-child { padding-top: 0; }
  .hip-step:last-child { border-bottom: none; }
}


/* ============================================================
   33. PRICING — dark band with toggle, packs grid (4col), plans grid (3col).
   Mirrors production .price-band scales.
   ============================================================ */

.hip-price-band {
  background: var(--ink);
  color: var(--bg);
  padding: 90px clamp(24px, 6vw, 80px);
}
.hip-price-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}
.hip-price-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 48px;
}
.hip-price-header h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: var(--fw-semibold);
  line-height: 1.1;
  color: var(--bg);
  letter-spacing: var(--track-snug);
}
.hip-price-header h2 em { color: var(--orange); font-style: italic; }
.hip-price-header p {
  color: var(--ink-faded);
  font-size: 15px;
  line-height: 1.7;
  margin-top: 12px;
}

.hip-ptoggle {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-pill);
  padding: 4px;
  border: var(--bw-thin) solid rgba(255, 255, 255, 0.1);
}
.hip-ptoggle button {
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--ink-faded);
}
.hip-ptoggle button.active {
  background: var(--orange);
  color: white;
}
.hip-ptoggle button:not(.active):hover { color: var(--bg); }

.hip-pview { display: none; }
.hip-pview.active { display: block; }

.hip-packs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.hip-pk {
  background: rgba(255, 255, 255, 0.04);
  border: var(--bw-thick) solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-2xl);
  padding: 28px 22px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}
.hip-pk:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--orange);
}
.hip-pk-name {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faded);
  font-weight: var(--fw-bold);
  margin-bottom: 14px;
}
.hip-pk-credits {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--bg);
  margin-bottom: 2px;
}
.hip-pk-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--fw-bold);
  color: var(--bg);
  margin-bottom: 4px;
}
.hip-pk-unit { font-size: 11px; color: var(--ink-faded); }

.hip-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hip-pl {
  background: rgba(255, 255, 255, 0.04);
  border: var(--bw-thick) solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-2xl);
  padding: 28px 24px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}
.hip-pl:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--orange);
}
.hip-pl.ft { border-color: rgba(255, 255, 255, 0.12); }
.hip-pl.ft:hover { border-color: var(--orange); }
.hip-pl.ft::after {
  content: 'Popular';
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 0 0 8px 8px;
}
.hip-pl-name {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faded);
  font-weight: var(--fw-bold);
  margin-bottom: 10px;
}
.hip-pl-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: var(--fw-bold);
  color: var(--bg);
  margin-bottom: 2px;
}
.hip-pl-price span {
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: var(--ink-faded);
}
.hip-pl-desc {
  font-size: 13px;
  color: var(--ink-faded);
  margin-bottom: 20px;
}
.hip-pl-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.hip-pl-list li {
  font-size: 13px;
  color: var(--ink-faded);
  padding: 5px 0;
  border-bottom: var(--bw-thin) solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hip-pl-list li:last-child { border-bottom: none; }
.hip-pl-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.hip-pl-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all 0.3s;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--ink-faded);
}
.hip-pl-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
/* Featured plan keeps the "Popular" tag (.hip-pl.ft::after) but its CTA button
   no longer pre-lights orange — only the universal hover state above applies. */
.hip-pnote {
  font-size: 11px;
  color: var(--ink-faded);
  margin-top: 14px;
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .hip-price-header { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  .hip-packs { grid-template-columns: repeat(2, 1fr); }
  .hip-plans { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hip-packs { grid-template-columns: 1fr; }
}


/* ============================================================
   34. PHYSICAL CREATORS — dark band with wireframe-3D bg image.
   Mirrors production .phys-band scales; bg uses --teal (production's
   surface-identifying color for this section, restored S180CC after
   prior over-collapse to --ink). Badge uses --yellow (production accent).
   ============================================================ */

.hip-phys-band {
  padding: 90px clamp(24px, 6vw, 80px);
  position: relative;
  overflow: hidden;
  background: var(--teal-deep);
  color: var(--bg);
}
.hip-wireframe-bg {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 770px;
  height: auto;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: screen;
}
.hip-phys-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hip-phys-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--yellow);
  margin-bottom: 14px;
}
.hip-phys-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: var(--fw-semibold);
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--bg);
  letter-spacing: var(--track-snug);
}
.hip-phys-head h2 em { color: var(--orange); font-style: italic; }
.hip-phys-head p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.75;
  max-width: 420px;
}
.hip-phys-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  background: white;
  color: var(--ink);
  border: var(--bw-thick) solid rgba(255, 255, 255, 0.3);
  padding: 11px 24px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hip-phys-cta:hover {
  background: var(--bg-soft);
  border-color: var(--bg-soft);
  transform: translateY(-2px);
}
.hip-phys-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hip-phys-feat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.08);
  border: var(--bw-thin) solid rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hip-phys-feat:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}
.hip-phys-feat-ic {
  width: 36px;
  height: 36px;
  border-radius: var(--r-lg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.1);
}
.hip-phys-feat h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: var(--fw-bold);
  margin-bottom: 2px;
  color: var(--bg);
}
.hip-phys-feat p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}
.hip-phys-feat-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  vertical-align: middle;
}
.hip-phys-feat-badge--now {
  background: rgba(232, 93, 44, 0.15);
  color: var(--orange);
  border: var(--bw-thin) solid rgba(232, 93, 44, 0.3);
}
.hip-phys-feat-badge--soon {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: var(--bw-thin) solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 1024px) {
  .hip-phys-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .hip-wireframe-bg { right: -150px; width: 500px; }
}
@media (max-width: 480px) {
  .hip-wireframe-bg { right: -180px; width: 420px; }
}


/* ============================================================
   35. API & INTEGRATIONS — light cream band, two-col layout.
   Mirrors production .api-band scales; teal/build accent → ink.
   ============================================================ */

.hip-api-band {
  background: var(--bg-soft);
  padding: 90px clamp(24px, 6vw, 80px);
  border-top: var(--bw-thin) solid var(--rule);
  border-bottom: var(--bw-thin) solid var(--rule);
}
.hip-api-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.hip-api-header h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: var(--fw-semibold);
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: var(--track-snug);
}
.hip-api-header h2 em { font-style: italic; color: var(--teal); }
.hip-api-header p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 28px;
}
.hip-api-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  background: var(--ink);
  color: white;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hip-api-cta:hover {
  background: var(--ink-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 10, 10, 0.2);
}
.hip-api-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hip-api-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: var(--r-2xl);
  background: white;
  border: var(--bw-thin) solid var(--rule);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hip-api-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: var(--orange-edge);
}
.hip-api-card-ic {
  width: 40px;
  height: 40px;
  border-radius: var(--r-xl);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.hip-api-card-ic.ic-verify { background: var(--orange-soft); color: var(--orange); }
.hip-api-card-ic.ic-attest { background: var(--bg-panel); color: var(--ink); }
.hip-api-card-ic.ic-query { background: var(--bg-panel); color: var(--ink-soft); }
.hip-api-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin-bottom: 3px;
}
.hip-api-card p {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.hip-api-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1.6;
}
.hip-api-badge--live {
  background: var(--orange-soft);
  color: var(--orange);
  border: var(--bw-thin) solid var(--orange-edge);
}
.hip-api-badge--soon {
  background: var(--bg-panel);
  color: var(--ink-soft);
  border: var(--bw-thin) solid var(--rule);
}
.hip-api-code {
  margin-top: 16px;
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d4d4d4;
  line-height: 1.7;
  overflow-x: auto;
  border: var(--bw-thin) solid rgba(255, 255, 255, 0.06);
}
.hip-api-code .c-method { color: #4ec9b0; font-weight: var(--fw-semibold); }
.hip-api-code .c-url { color: #9cdcfe; }
.hip-api-code .c-comment { color: #6a9955; }

@media (max-width: 1024px) {
  .hip-api-inner { grid-template-columns: 1fr; gap: 40px; }
}


/* ============================================================
   36. CTA ACCENT BLOCK — closing orange conversion band.
   Mirrors production .cta-band scales.
   ============================================================ */

.hip-cta-band-accent {
  background: var(--orange);
  color: white;
  padding: 80px clamp(24px, 6vw, 80px);
  text-align: center;
}
.hip-cta-band-accent h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: var(--fw-semibold);
  line-height: 1.08;
  margin-bottom: 16px;
  color: white;
  letter-spacing: var(--track-snug);
}
.hip-cta-band-accent p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 440px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hip-cta-actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hip-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  border: var(--bw-thick) solid transparent;
}
.hip-cta-btn--white {
  background: white;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.3);
}
.hip-cta-btn--white:hover {
  background: var(--bg-soft);
  border-color: var(--bg-soft);
  transform: translateY(-2px);
}
.hip-cta-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
}
.hip-cta-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 480px) {
  .hip-cta-actions-row { flex-direction: column; align-items: center; }
  .hip-cta-btn { width: 100%; max-width: 300px; justify-content: center; }
}


/* ============================================================
   37. LEGAL / LONG-FORM PAGES — shared template for
   privacy.html, terms.html, dmca.html (and similar text-heavy
   terminal pages). Mirrors production .legal-* / prose CSS;
   only swaps tokens (--serif → display, --build → ink for inline
   links, --card → bg-soft, etc.). Uses a simplified back-nav and
   simplified footer rather than the full home-page nav, matching
   production's per-page choice.
   ============================================================ */

/* Simplified back-nav (logo + single back link) */
.hip-back-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 clamp(24px, 6vw, 80px);
  background: rgba(245, 243, 240, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--bw-thin) solid var(--rule);
}
.hip-back-nav-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.hip-back-nav .hip-logo-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: opacity var(--t-base);
}
.hip-back-nav .hip-logo-mini:hover { opacity: 0.7; }
.hip-back-nav .hip-wordmark-mini {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 18px;
  letter-spacing: -0.04em;
}
.hip-back-nav .hip-wordmark-mini .hip-kit-mini {
  color: var(--orange);
  font-weight: var(--fw-medium);
}
.hip-back-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--t-base);
}
.hip-back-link:hover { color: var(--ink); }

/* Long-form text container */
.hip-legal-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px clamp(24px, 6vw, 80px) 80px;
}
.hip-legal-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-soft);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}
.hip-legal-main h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--ink);
}
.hip-legal-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faded);
  margin-bottom: 36px;
}

/* Long-form prose (h2/h3/p/ul/li/code/a/.callout) */
.hip-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--ink);
}
.hip-prose h3 {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: var(--fw-semibold);
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--ink-soft);
}
.hip-prose p {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.2vw, 19px);
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 14px;
}
.hip-prose ul {
  margin: 8px 0 18px 22px;
}
.hip-prose li {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.2vw, 19px);
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.6;
}
.hip-prose strong {
  color: var(--ink);
  font-weight: var(--fw-semibold);
}
.hip-prose a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: var(--bw-thin) solid var(--orange-edge);
  transition: border-color var(--t-base);
}
.hip-prose a:hover { border-bottom-color: var(--orange); }
.hip-prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-panel);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  color: var(--ink);
}
.hip-callout {
  background: var(--bg-soft);
  border-left: 3px solid var(--orange);
  padding: 16px 20px;
  border-radius: var(--r-lg);
  margin: 18px 0;
}
.hip-callout p { margin-bottom: 0; }

/* Simplified footer for terminal pages */
.hip-legal-footer {
  background: var(--bg-soft);
  border-top: var(--bw-thin) solid var(--rule);
  padding: 32px clamp(24px, 6vw, 80px);
  margin-top: 60px;
}
.hip-legal-footer .hip-legal-footer-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.hip-legal-footer .hip-footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-faded);
}
.hip-legal-footer .hip-footer-hip {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--ink-faded);
}
.hip-legal-footer .hip-footer-hip span { color: var(--orange); }
.hip-legal-footer .hip-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.hip-legal-footer .hip-footer-links a {
  font-size: 13px;
  color: var(--ink-faded);
  text-decoration: none;
  border-bottom: none;
  transition: color var(--t-base);
}
.hip-legal-footer .hip-footer-links a:hover { color: var(--ink-soft); }
.hip-legal-footer .hip-footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: var(--ink-faded);
}

@media (max-width: 640px) {
  .hip-legal-main { padding: 32px clamp(24px, 6vw, 80px) 60px; }
  .hip-prose h2 { font-size: 18px; margin-top: 28px; }
  .hip-prose h3 { font-size: 14px; }
  .hip-prose p, .hip-prose li { font-size: 14px; }
}


/* ============================================================
   38. COMING-SOON PAGE — centered card with feature-key reveal.
   Mirrors production .card / .actions / .feature-detail; tokens
   swapped per system. Uses the back-nav from section 37.
   ============================================================ */

.hip-coming-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(24px, 6vw, 80px);
  min-height: 60vh;
}
.hip-coming-card {
  max-width: 540px;
  width: 100%;
  text-align: center;
}
.hip-coming-card .hip-coming-icon {
  font-size: 56px;
  margin-bottom: 24px;
  opacity: 0.8;
}
.hip-coming-card .hip-coming-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 28px;
}
.hip-coming-card .hip-coming-tag .hip-coming-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: hip-coming-pulse 2s ease-in-out infinite;
}
@keyframes hip-coming-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hip-coming-card h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--ink);
}
.hip-coming-card h1 em { font-style: italic; color: var(--orange); }
.hip-coming-card .hip-coming-sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.hip-coming-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hip-coming-detail {
  margin-top: 40px;
  padding-top: 32px;
  border-top: var(--bw-thin) solid var(--rule);
  text-align: left;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.hip-coming-detail h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faded);
  margin-bottom: 16px;
}
.hip-coming-detail p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .hip-coming-actions { flex-direction: column; align-items: center; }
  .hip-coming-actions .hip-cta-btn { width: 100%; max-width: 300px; justify-content: center; }
}


/* ============================================================
   39. RESPONSIVE — global breakpoints
   ============================================================ */

@media (max-width: 1024px) {
  :root { --container-pad: 24px; }
}
@media (max-width: 700px) {
  :root { --container-pad: 20px; }
}


/* ============================================================
   40. APP CHROME — sticky dark navbar + tab bar + credential
        load screen + content shell + .btn family + .hidden util.
   Cosmetic-only port from production app-styles.css (S181CC).
   Production token names (--accent / --text / --c1..--c6 / --serif
   / --radius / --ease / etc.) are aliased to v2 tokens via the
   body.app-page wrapper, so all production inline `style="..."`
   attributes in v2/app.html resolve correctly without rewrite.
   Attest tab + 6 remaining tab panels port lands S182.
   ============================================================ */

body.app-page {
  --accent:        var(--orange);
  --text:          var(--ink);
  --text-soft:     var(--ink-soft);
  --text-muted:    var(--ink-faded);
  --card:          #FFFFFF;
  --surface:       var(--bg-soft);
  --border:        var(--rule);
  --radius:        var(--r-2xl);
  --radius-sm:     var(--r-lg);
  --radius-pill:   var(--r-pill);
  --serif:         var(--font-display);  /* S186CC: was --font-display-marquis; swapped so in-app section heads (.cred-box h1, .mend-intro h2, .phys-wizard-header h2, etc.) match .hip-h2 (Familjen Grotesk) from home/learn/api section heads instead of the Inter Tight marquis. */
  --sans:          var(--font-body);
  --mono:          var(--font-mono);
  --c1:            var(--bg);
  --c2:            var(--ink-faded);
  --c3:            var(--ink-faded);
  --c4:            var(--ink-soft);
  --c5:            var(--ink-soft);
  --c6:            var(--ink);
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm:     var(--shadow-cta-rest);
  --shadow-md:     var(--shadow-card);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.app-page * { box-sizing: border-box; }
body.app-page ::selection { background: rgba(232, 93, 44, 0.15); }

/* ── App navbar — sticky dark band ── */
.app-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
  background: var(--c6); color: var(--c1);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.app-nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-nav-badge { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-nav-badge img { height: 28px; width: auto; }
.app-nav-wordmark { font-weight: 700; font-size: 17px; letter-spacing: -.03em; color: #fff; }
.app-nav-wordmark .kit { color: var(--yellow); font-weight: 500; }
.app-nav-right { display: flex; align-items: center; gap: 16px; }
.app-nav-cred { font-size: 11px; font-family: var(--mono); color: var(--c2); letter-spacing: .02em; }
.app-nav-cred .tier { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(232,93,44,.15); color: var(--yellow); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-left: 6px; }
.app-nav-btn { background: none; border: 1px solid rgba(255,255,255,.15); color: var(--c2); padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; font-family: var(--sans); font-weight: 500; cursor: pointer; transition: all .2s; }
.app-nav-btn:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.app-nav-credits { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(255,255,255,.1); color: var(--yellow); font-size: 11px; font-weight: 600; font-family: var(--mono); letter-spacing: .02em; margin-left: 8px; }

/* ── Tab bar ── */
.tab-bar {
  display: flex; gap: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
}
.tab-btn {
  padding: 14px 22px; font-size: 14px; font-weight: 700; font-family: var(--sans);
  color: var(--text-soft); background: none; border: none; cursor: pointer;
  position: relative; transition: color .2s; letter-spacing: -.01em;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 8px; right: 8px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.tab-btn .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; margin-left: 6px; }

/* ── App content container ── */
.app-content { max-width: 1100px; margin: 0 auto; padding: 28px 24px 80px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Credential load screen ── */
.cred-screen { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 56px); padding: 40px 24px; }
.cred-box { max-width: 480px; width: 100%; text-align: center; }
/* S186CC: cred-box h1 adopts .hip-h2 treatment (Familjen Grotesk
   semibold + -0.025em tracking + line-height 1.1) so the cred-gate
   reads as the same typographic family as home/learn/api section
   heros (e.g. "The professional workshop"). Was briefly mini-marquis
   (Inter Tight bold) earlier in S186 before peter's visual review
   surfaced that the home-section style was the intended target, not
   the home marquis. Production parity diverges intentionally — prod
   used Instrument Serif at weight 400; v2 uses Familjen Grotesk
   semibold which matches the v2 design-system section-hero idiom. */
.cred-box h1 { font-family: var(--serif); font-size: clamp(32px, 4.5vw, 56px); font-weight: var(--fw-semibold); letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 12px; color: var(--text); }
.cred-box h1 em { font-style: italic; color: var(--accent); }
.cred-box .sub { font-size: clamp(15px, 1.2vw, 18px); color: var(--text-soft); line-height: 1.7; margin-bottom: 32px; }
.cred-drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 24px; margin-bottom: 20px; cursor: pointer;
  transition: all .3s var(--ease); background: var(--card);
}
.cred-drop:hover, .cred-drop.drag-over { border-color: var(--accent); background: rgba(232,93,44,.03); }
.cred-drop .icon { font-size: 32px; margin-bottom: 12px; }
.cred-drop .label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cred-drop .hint { font-size: 12px; color: var(--text-muted); }
.cred-error { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.15); color: #dc2626; font-size: 13px; text-align: left; }
.cred-divider { display: flex; align-items: center; gap: 12px; margin: 28px 0 20px; color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.cred-divider::before, .cred-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Buttons (production .btn family — used in cred screen + tabs) ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; font-family: var(--sans);
  cursor: pointer; transition: all .3s var(--ease); text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--text-soft); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text-soft); color: var(--text); }
.btn-sm { padding: 7px 16px; font-size: 12px; }
.btn-dark { background: var(--c6); color: #fff; border-color: var(--c6); }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); }

/* ── Utility ── */
.hidden { display: none; }

/* ── Responsive — mobile chrome ── */
@media (max-width: 768px) {
  .app-nav { padding: 0 12px; height: 50px; }
  .app-nav-wordmark { font-size: 15px; }
  .app-nav-cred { font-size: 10px; }
  .app-nav-credits { font-size: 10px; padding: 2px 8px; }
  .app-nav-btn { padding: 5px 10px; font-size: 11px; }
  .app-content { padding: 16px 14px 60px; }
  .tab-bar { padding: 0 14px; overflow-x: auto; }
  .tab-btn { padding: 12px 14px; font-size: 13px; white-space: nowrap; }
  .cred-screen { padding: 20px 16px; min-height: calc(100vh - 50px); }
  .cred-box { max-width: 100%; }
  .cred-drop { padding: 20px 16px; margin-bottom: 14px; }
  .cred-drop .icon { font-size: 24px; margin-bottom: 8px; }
  .cred-drop .label { font-size: 13px; }
  .cred-drop .hint { font-size: 11px; }
  .cred-box .sub { font-size: 13px; margin-bottom: 20px; }
}

/* ============================================================
   §41 Attest tab — production-mirror CSS
   Lifted verbatim from main:app-styles.css (S178CC #58
   production-mirror pattern). Tokens resolve through body.app-page
   alias scaffold defined in §40. Skips .btn / .hidden which v2
   already defines redesigned in earlier blocks.
   ============================================================ */

/* ── Drop zone ── */
.drop-zone {
  border: 2px dashed var(--text-muted); border-radius: var(--radius);
  padding: 60px 32px; text-align: center; cursor: pointer;
  transition: all .3s var(--ease); background: var(--card); margin-bottom: 24px;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--accent); background: rgba(224,90,0,.04); }
.drop-zone .dz-icon { font-size: 48px; margin-bottom: 16px; opacity: .75; }
.drop-zone .dz-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.drop-zone .dz-hint { font-size: 14px; color: var(--text-soft); }
.drop-zone .dz-types { font-size: 12px; color: var(--text-muted); margin-top: 14px; font-family: var(--mono); }

/* ── Batch controls ── */
.batch-controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 16px 20px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px;
}
.batch-controls label { font-size: 12px; font-weight: 600; color: var(--text-soft); margin-right: 4px; }
.batch-controls select, .batch-controls input[type="text"] {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--sans); background: var(--bg); color: var(--text);
  outline: none; transition: border-color .2s;
}
.batch-controls select:focus, .batch-controls input[type="text"]:focus { border-color: var(--accent); }
.batch-info { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--text-muted); }
.batch-info .count { font-weight: 700; color: var(--accent); }

/* ── File queue + file row ── */
.file-queue { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all .2s;
}
.file-item:hover { border-color: var(--c2); }
.file-item .fi-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.file-item .fi-icon {
  width: 36px; height: 36px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: .02em;
}
.fi-icon.img { background: var(--teal); }
.fi-icon.doc { background: var(--c5); }
.fi-icon.aud { background: #7c3aed; }
.fi-icon.vid { background: var(--accent); }
.fi-icon.oth { background: var(--c3); }
.file-item .fi-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.file-item .fi-info { flex: 1; min-width: 0; }
.file-item .fi-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fi-meta { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.file-item .fi-status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); flex-shrink: 0; }
.fi-status.queued { background: var(--surface); color: var(--text-muted); }
.fi-status.hashing { background: rgba(37,99,235,.08); color: #2563eb; }
.fi-status.ready { background: rgba(22,163,74,.08); color: #16a34a; }
.fi-status.signing { background: rgba(224,90,0,.08); color: var(--accent); }
.fi-status.done { background: rgba(22,163,74,.1); color: #16a34a; }
.fi-status.error { background: rgba(220,38,38,.08); color: #dc2626; }
.fi-status.duplicate { background: rgba(217,119,6,.08); color: #d97706; }
.file-item .fi-class {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 11px; font-family: var(--sans); background: var(--bg); color: var(--text);
  outline: none; cursor: pointer; flex-shrink: 0;
}

/* ── Action bar (button row at panel bottom) ── */
.action-bar {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 20px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 24px;
}
.action-bar .spacer { flex: 1; }

/* ── Progress bar ── */
.progress-wrap { margin-bottom: 24px; }
.progress-bar { height: 4px; background: var(--surface); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s var(--ease); width: 0%; }
.progress-text { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; }

/* ── Results panel ── */
.results-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px;
}
.result-card {
  padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center;
}
.result-card .rc-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.result-card .rc-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: 2px; }
.rc-num.success { color: #16a34a; }
.rc-num.dup { color: #d97706; }
.rc-num.err { color: #dc2626; }
.rc-num.skip { color: var(--c3); }

/* ── Batch templates ── */
.tpl-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tpl-select { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--sans); background: var(--bg); color: var(--text); outline: none; cursor: pointer; min-width: 140px; }
.tpl-select:focus { border-color: var(--accent); }
.tpl-btn { padding: 5px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); font-size: 11px; font-weight: 600; font-family: var(--sans); color: var(--text-muted); cursor: pointer; transition: all .15s; }
.tpl-btn:hover { border-color: var(--accent); color: var(--accent); }
.tpl-save-form { display: flex; gap: 6px; align-items: center; }
.tpl-save-input { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--sans); background: var(--card); color: var(--text); outline: none; width: 160px; }
.tpl-save-input:focus { border-color: var(--accent); }

/* ── Collection metadata (S108CW Phase 3) ── */
.cm-header { margin-bottom: 20px; }
.cm-title { font-family: var(--serif); font-size: 26px; font-weight: 400; color: var(--text); letter-spacing: -.01em; margin-bottom: 6px; }
.cm-subtitle { font-size: 13px; color: var(--text-soft); line-height: 1.65; max-width: 720px; }
.cm-link { color: var(--accent); text-decoration: none; font-weight: 600; border-bottom: 1px dotted var(--accent); }
.cm-link:hover { opacity: .75; }
.cm-sub-action { margin-top: 8px; font-size: 13px; color: var(--text-soft); line-height: 1.65; }

.cm-tooltip-host { position: relative; display: inline; }
.cm-tooltip-host:hover .cm-tooltip-bubble,
.cm-tooltip-host:focus-within .cm-tooltip-bubble { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.cm-tooltip-bubble { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%) translateY(4px); width: 320px; max-width: 90vw; background: #1f2937; color: #f9fafb; font-size: 13px; line-height: 1.55; padding: 12px 14px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; pointer-events: none; z-index: 50; font-weight: 400; text-align: left; white-space: normal; }
.cm-tooltip-bubble strong { color: #fff; font-weight: 600; }
.cm-tooltip-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1f2937; }

.cm-card {
  padding: 20px 22px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px;
}
.cm-field { margin-bottom: 18px; }
.cm-field:last-child { margin-bottom: 0; }
.cm-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); margin-bottom: 8px; }
.cm-opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-size: 11px; }
.cm-input, .cm-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--sans); background: var(--bg); color: var(--text);
  outline: none; transition: border-color .2s;
}
.cm-textarea { font-size: 13px; line-height: 1.6; resize: vertical; min-height: 72px; }
.cm-input:focus, .cm-textarea:focus { border-color: var(--accent); }
.cm-counter { font-size: 11px; color: var(--text-muted); font-family: var(--mono); text-align: right; margin-top: 4px; }
.cm-counter.over { color: #dc2626; font-weight: 600; }

.cm-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-radios-3col { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 680px) { .cm-radios-3col { grid-template-columns: 1fr; } }
.cm-radio {
  display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; transition: all .2s;
}
.cm-radio:hover { border-color: var(--text-soft); }
.cm-radio input { margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.cm-radio:has(input:checked) { border-color: var(--accent); background: rgba(224,90,0,.04); }
.cm-radio-body { flex: 1; min-width: 0; }
.cm-radio-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.cm-radio-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.cm-cover-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px;
}
.cm-cover-thumb {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--border); cursor: pointer; background: var(--surface); transition: all .2s;
}
.cm-cover-thumb:hover { border-color: var(--text-soft); }
.cm-cover-thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(224,90,0,.25); }
.cm-cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-cover-thumb .cm-cover-mark {
  position: absolute; top: 4px; right: 4px; background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px; border-radius: var(--radius-pill); display: none;
}
.cm-cover-thumb.selected .cm-cover-mark { display: block; }
.cm-cover-empty { font-size: 12px; color: var(--text-muted); font-style: italic; padding: 8px 0; }

.cm-members { display: flex; flex-direction: column; gap: 4px; }
.cm-member {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all .2s;
}
.cm-member.set-mode { opacity: .85; }
.cm-member-idx {
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-soft); font-family: var(--mono); flex-shrink: 0;
}
.cm-member-thumb { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.cm-member-icon {
  width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: .02em;
}
.cm-member-info { flex: 1; min-width: 0; }
.cm-member-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-member-meta { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.cm-member-arrows { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.cm-arrow-btn {
  width: 22px; height: 18px; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 4px;
  font-size: 10px; color: var(--text-soft); cursor: pointer; transition: all .15s; padding: 0; line-height: 1;
}
.cm-arrow-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cm-arrow-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ── Collection review summary (S108CW §5-6) ── */
.cs-card {
  padding: 0; margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(224,90,0,.04), rgba(224,90,0,.01));
  border: 1px solid rgba(224,90,0,.25); border-radius: var(--radius); overflow: hidden;
}
.cs-main { padding: 16px 20px; }
.cs-head { display: flex; gap: 14px; align-items: center; }
.cs-cover {
  width: 60px; height: 60px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 20px;
}
.cs-cover.empty::before { content: "📚"; }
.cs-body { flex: 1; min-width: 0; }
.cs-title { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--text); letter-spacing: -.01em; line-height: 1.2; margin-bottom: 2px; }
.cs-title.untitled { color: var(--text-muted); font-style: italic; }
.cs-desc { font-size: 12px; color: var(--text-soft); line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-desc:empty { display: none; }
.cs-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: rgba(224,90,0,.1); color: var(--accent);
}
.cs-chip.neutral { background: var(--surface); color: var(--text-soft); }

/* ── Per-member aliased pill on Progress + Results (S108 §5-8) ── */
.fi-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--radius-pill); margin-right: 6px; white-space: nowrap;
}
.fi-pill-aliased { background: rgba(224,90,0,.08); color: var(--accent); border: 1px solid rgba(224,90,0,.18); }

/* ── Drop-time affiliation chips on file rows (S126CW Candidate S) ── */
.fi-affiliations { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.fi-affil-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 10px; font-size: 11px; line-height: 1.4;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  text-decoration: none;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fi-affil-chip:hover { border-color: var(--accent); color: var(--accent); }
.fi-affil-series { border-color: #7c3aed33; background: #7c3aed10; color: #5b21b6; }
.fi-affil-series:hover { border-color: #7c3aed; color: #5b21b6; }
.fi-affil-collection { border-color: #0e7490; }
.fi-affil-collection:hover { border-color: #0e7490; color: #0e7490; }
.fi-affil-more { color: var(--text-muted); font-style: italic; }

/* ── Concept-intro blurb (S133CW Candidate F) — combined with .pf-subtab-intro
   per production app-styles.css (Portfolio sub-tab share same visual treatment) ── */
.pf-subtab-intro, .concept-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
}
.pf-subtab-intro strong, .concept-intro strong { color: var(--text); font-weight: 600; }
.pf-subtab-intro em, .concept-intro em { font-style: italic; color: var(--text); }

/* ============================================================
   §42 Account tab — production-mirror CSS
   Lifted from main:app-styles.css lines 205-253 (S72 Revamp v2).
   Same pattern as §41: tokens resolve via body.app-page aliases.
   ============================================================ */

/* ── 2-col card grid (Credits / Usage / Subscription / History) ── */
.acct-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
.acct-card { padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); position: relative; overflow: hidden; }
.acct-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.acct-card.c-orange::before { background: var(--accent); }
.acct-card.c-teal::before { background: var(--teal); }
.acct-card.c-gold::before { background: var(--yellow); }
.acct-card.c-green::before { background: #16a34a; }
.acct-card h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.acct-card .big-num { font-size: 36px; font-weight: 700; color: var(--text); letter-spacing: -.02em; line-height: 1; }
.acct-card .big-num span { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.acct-card p { font-size: 13px; color: var(--text-soft); margin-top: 8px; line-height: 1.6; }

/* ── Credential + Trust hero (full width, 2-col with gradient accent) ── */
.acct-top { display: grid; grid-template-columns: 1fr minmax(200px, 260px); gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; }
.acct-top::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--yellow), var(--teal)); }
.cred-main { padding: 24px; border-right: 1px solid var(--border); }
.cred-tier-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.cred-tier-badge.t1 { background: rgba(224,90,0,.12); color: var(--accent); }
.cred-tier-badge.t2 { background: rgba(59,130,246,.12); color: #3b82f6; }
.cred-tier-badge.t3 { background: rgba(128,133,132,.12); color: var(--text-muted); }
.cred-meta { font-size: 12px; color: var(--text-muted); line-height: 1.9; margin-top: 12px; }
.cred-meta strong { color: var(--text-soft); font-weight: 600; }
.cred-id-mono { font-family: var(--mono); font-size: 10px; word-break: break-all; color: var(--text-muted); margin-top: 12px; padding: 8px 10px; background: var(--surface); border-radius: var(--radius-sm); }

/* ── Trust-score ring panel ── */
.trust-panel { padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: rgba(224,90,0,.02); }
.trust-ring { position: relative; width: 100px; height: 100px; margin-bottom: 10px; }
.trust-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.trust-ring-bg { fill: none; stroke: var(--surface); stroke-width: 5; }
.trust-ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.trust-ring-score { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.trust-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 4px; }
.trust-meta { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.trust-breakdown { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; justify-content: center; }
.trust-chip { font-size: 9px; font-family: var(--mono); padding: 2px 7px; border-radius: var(--radius-pill); background: rgba(224,90,0,.08); color: var(--accent); white-space: nowrap; }

/* ── Manage Credential expandable section ── */
.cred-manage-toggle { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 0 0; border: none; background: none; cursor: pointer; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--accent); transition: opacity .15s; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 14px; }
.cred-manage-toggle:hover { opacity: .7; }
.cred-manage-toggle .chevron { font-size: 10px; transition: transform .2s; }
.cred-manage-toggle.open .chevron { transform: rotate(180deg); }
.cred-manage-body { display: none; margin-top: 14px; }
.cred-manage-body.open { display: block; }
.cred-manage-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.cred-manage-section:last-child { border-bottom: none; padding-bottom: 0; }
.cred-manage-section h4 { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.cred-manage-section p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.upgrade-prompt { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(224,90,0,.05); border: 1px solid rgba(224,90,0,.12); font-size: 12px; color: var(--text-soft); line-height: 1.6; display: flex; align-items: flex-start; gap: 8px; }
.upgrade-prompt svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.upgrade-prompt a { color: var(--accent); font-weight: 600; text-decoration: none; }
.upgrade-prompt a:hover { text-decoration: underline; }

/* ============================================================
   §43 Portfolio tab — production-mirror CSS
   Lifted from main:app-styles.css lines 255-323 + 358-363
   + 452-456 + 1113-1127 + Portfolio @media block.
   Same pattern as §41 / §42: tokens resolve via body.app-page
   aliases defined in §40 (incl. --shadow-sm added this commit).
   .pf-subtab-intro is combined with .concept-intro in §41 per
   production combined-selector form.
   ============================================================ */

/* ── Portfolio empty state ── */
.portfolio-empty { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.portfolio-empty .pe-icon { font-size: 48px; opacity: .3; margin-bottom: 16px; }
.portfolio-empty p { font-size: 15px; }

/* ── Portfolio toolbar — filters + search + view toggle + export ── */
.pf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.pf-filters { display: flex; gap: 4px; }
.pf-filter { padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--card); font-size: 12px; font-weight: 600; font-family: var(--sans); color: var(--text-muted); cursor: pointer; transition: all .2s; }
.pf-filter:hover { border-color: var(--c2); color: var(--text-soft); }
.pf-filter.active { background: var(--c6); color: #fff; border-color: var(--c6); }
.pf-toolbar-right { display: flex; gap: 8px; align-items: center; }
.pf-search { padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--sans); background: var(--card); color: var(--text); outline: none; width: 220px; transition: border-color .2s; }
.pf-search:focus { border-color: var(--accent); }
.pf-view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.pf-view-btn { padding: 6px 10px; border: none; background: var(--card); color: var(--text-muted); cursor: pointer; font-size: 14px; transition: all .2s; min-width: 36px; text-align: center; flex-shrink: 0; }
.pf-view-btn.active { background: var(--c6); color: #fff; }
.pf-view-btn:hover:not(.active) { background: var(--surface); }
.pf-export-btn { padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text-muted); cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .03em; transition: all .2s; white-space: nowrap; }
.pf-export-btn:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }

/* ── Stats + loading + error states ── */
.pf-stats { display: flex; gap: 20px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.pf-stats .pf-stat-val { font-weight: 700; color: var(--text); margin-right: 4px; }
.pf-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--text-muted); font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.pf-error { padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.15); color: #dc2626; font-size: 13px; margin-bottom: 16px; }

/* ── Portfolio list view (one row per proof) ── */
.pf-list { display: flex; flex-direction: column; gap: 3px; }
.pf-row {
  display: grid; grid-template-columns: 36px 1fr 120px 100px 210px; gap: 12px; align-items: center;
  padding: 10px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .15s; cursor: default; font-size: 13px;
}
.pf-row:hover { border-color: var(--c2); box-shadow: var(--shadow-sm); }
.pf-row .fi-icon { width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: .02em; }
.pf-row .pf-hash { font-family: var(--mono); font-size: 11px; color: var(--text-muted); cursor: pointer; }
.pf-row .pf-hash:hover { color: var(--accent); }
.pf-row .pf-class { font-size: 11px; font-weight: 600; }
.pf-row .pf-date { font-size: 11px; color: var(--text-muted); }
.pf-row .pf-actions { display: grid; grid-template-columns: repeat(4, 46px); gap: 4px; justify-content: end; }
.pf-row .pf-act { padding: 0; height: 26px; line-height: 26px; width: 46px; text-align: center; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--card); font-size: 10px; font-weight: 600; font-family: var(--sans); color: var(--text-muted); cursor: pointer; transition: all .2s; text-decoration: none; display: block; box-sizing: border-box; }
.pf-row .pf-act:hover { border-color: var(--accent); color: var(--accent); }
.pf-act-cert { background: rgba(224,90,0,.06) !important; border-color: rgba(224,90,0,.2) !important; color: var(--accent) !important; }
.pf-act-cert:hover { background: var(--accent) !important; color: #fff !important; }

/* ── Portfolio grid view (one card per proof) ── */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pf-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: all .2s; cursor: default;
}
.pf-card:hover { border-color: var(--c2); box-shadow: var(--shadow-md); }
.pf-card .pf-card-icon { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.pf-card .pf-card-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 10px; border: 1px solid var(--border); }
.pf-row .pf-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.pf-card .pf-card-hash { font-family: var(--mono); font-size: 10px; color: var(--text-muted); margin-bottom: 6px; word-break: break-all; }
.pf-card .pf-card-class { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.pf-card .pf-card-date { font-size: 10px; color: var(--text-muted); margin-bottom: 10px; }
.pf-card .pf-card-actions { display: flex; gap: 6px; }

/* ── Bitcoin Durability Anchor pill (S154CW B-followup) ── */
.pf-anchor-pill { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: var(--radius-pill); letter-spacing: .02em; line-height: 1.6; margin-top: 2px; }
.pf-anchor-confirmed { background: rgba(45,212,191,.12); color: #0d9488; border: 1px solid rgba(45,212,191,.3); }
.pf-anchor-pending { background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3); }

/* ── Pagination ── */
.pf-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 20px 0; }
.pf-page-btn { padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); font-size: 12px; font-weight: 600; font-family: var(--sans); color: var(--text-soft); cursor: pointer; transition: all .2s; }
.pf-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.pf-page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pf-page-btn:disabled { opacity: .3; cursor: not-allowed; }
.pf-page-info { font-size: 12px; color: var(--text-muted); }

/* ── Action button tooltips (.pf-tip-wrap) ── */
.pf-tip-wrap { position: relative; }
.pf-tip-wrap .pf-tip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 240px; padding: 10px 12px; background: var(--c6); color: var(--c1); font-size: 11px; line-height: 1.6; border-radius: var(--radius-sm); box-shadow: 0 4px 20px rgba(0,0,0,.25); z-index: 200; font-weight: 400; pointer-events: none; }
.pf-tip-wrap .pf-tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--c6); }
.pf-tip-wrap:hover .pf-tip { display: block; }
.pf-tip strong { color: var(--yellow); font-weight: 600; }

/* ── Portfolio sub-tabs (S126CW Candidate R + S132CW E-1) ── */
.pf-subtab-nav { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 0 0 16px; padding: 0; }
.pf-subtab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 16px; margin: 0; font: inherit; font-size: 14px; color: var(--text-muted);
  cursor: pointer; transition: color .12s, border-color .12s;
  border-radius: 0;
}
.pf-subtab:hover { color: var(--text); }
.pf-subtab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pf-subtab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pf-subpanel-hidden { display: none; }
.pf-series-embed .sms-list { margin-top: 0; }

/* ── Portfolio mobile responsive (production @media max-width:768px) ── */
@media (max-width: 768px) {
  .pf-toolbar { flex-direction: column; align-items: stretch; }
  .pf-filters { overflow-x: auto; padding-bottom: 4px; }
  .pf-search { width: 100%; }
  .pf-row { display: block !important; font-size: 12px; padding: 12px 14px; overflow: hidden; }
  .pf-row .fi-icon { display: inline-flex; vertical-align: middle; width: 32px; height: 32px; font-size: 9px; margin-right: 8px; }
  .pf-row .pf-thumb { width: 32px; height: 32px; display: inline-flex; vertical-align: middle; margin-right: 8px; }
  .pf-row .pf-class, .pf-row .pf-date, .pf-row .pf-hash { display: none; }
  .pf-row .pf-actions { display: flex !important; grid-template-columns: none !important; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
  .pf-row .pf-actions > * { width: auto !important; min-width: 0 !important; }
  .pf-row .pf-act { width: auto !important; padding: 0 12px !important; font-size: 10px; height: 28px; line-height: 28px; }
  .pf-tip-wrap { position: static !important; display: inline-block !important; }
  .pf-tip-wrap .pf-tip { display: none !important; }
}

/* ============================================================
   §44 — Mend tab — production-mirror CSS (S186CC)
   Production source: main:app-styles.css lines 410-440 (.mend-*
   + .md-* + .mi-* surface). HTML host: v2/app.html #panelMend.
   All var(--*) refs resolve through §40 body.app-page alias
   scaffold (no scaffold extension needed — pre-scan per #70
   confirmed). Hardcoded rgba kept verbatim per #58 (lock S178CC):
   rgba(224,90,0,.02) drop-zone hover tint, rgba(22,163,74,.08)
   found-badge bg, rgba(37,99,235,.08) checking-badge bg,
   rgba(220,38,38,.08) error-badge bg. Verbatim status colors
   #16a34a/#2563eb/#dc2626 also kept per #58.
   ============================================================ */

/* ── Mend intro ── */
.mend-intro { max-width: 620px; margin: 0 auto 28px; text-align: center; }
.mend-intro h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); font-weight: 400; margin-bottom: 8px; color: var(--text); }
.mend-intro h2 em { font-style: italic; color: var(--accent); }
.mend-intro p { font-size: 14px; color: var(--text-soft); line-height: 1.7; }

/* ── Mend drop zone ── */
.mend-drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 48px 32px; text-align: center; cursor: pointer;
  transition: all .3s var(--ease); background: var(--card); margin-bottom: 20px;
}
.mend-drop:hover, .mend-drop.drag-over { border-color: var(--accent); background: rgba(224,90,0,.02); }
.mend-drop .md-icon { font-size: 36px; margin-bottom: 12px; opacity: .6; }
.mend-drop .md-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.mend-drop .md-hint { font-size: 12px; color: var(--text-muted); }

/* ── Mend results list ── */
.mend-results { display: flex; flex-direction: column; gap: 6px; }
.mend-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all .15s;
}
.mend-item:hover { border-color: var(--c2); box-shadow: var(--shadow-sm); }
.mend-item .mi-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: .02em;
}
.mend-item .mi-info { flex: 1; min-width: 0; }
.mend-item .mi-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mend-item .mi-hash { font-family: var(--mono); font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.mend-item .mi-status { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }

/* ── Mend item status badges ── */
.mi-badge { padding: 5px 12px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.mi-badge.found { background: rgba(22,163,74,.08); color: #16a34a; }
.mi-badge.notfound { background: var(--surface); color: var(--text-muted); }
.mi-badge.checking { background: rgba(37,99,235,.08); color: #2563eb; }
.mi-badge.error { background: rgba(220,38,38,.08); color: #dc2626; }

/* ── Mend item actions ── */
.mend-item .mi-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mend-item .mi-act {
  padding: 5px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card);
  font-size: 10px; font-weight: 600; font-family: var(--sans);
  color: var(--text-muted); cursor: pointer; transition: all .2s; text-decoration: none;
}
.mend-item .mi-act:hover { border-color: var(--accent); color: var(--accent); }

/* ── Mend summary bar ── */
.mend-summary {
  display: flex; gap: 20px; padding: 14px 18px;
  background: var(--surface); border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 13px; color: var(--text-soft); flex-wrap: wrap;
}
.mend-summary .ms-val { font-weight: 700; margin-right: 4px; }
.mend-summary .ms-val.found { color: #16a34a; }
.mend-summary .ms-val.notfound { color: var(--text-muted); }

/* ============================================================
   §45 — Physical tab — production-mirror CSS (S186CC)
   Production source: main:app-styles.css lines 462-580 (.phys-*
   wizard + angle-grid + drop + form + collection + progress +
   success) + lines 610-622 (.cm-radios + .cm-radio* for Step 3
   grouping radio). HTML host: v2/app.html #panelPhysical wizard.
   All var(--*) refs resolve through §40 body.app-page alias
   scaffold (S181CC #66; extended S185CC with --shadow-sm).
   Pre-scan per NEW S185CC #70 confirmed no scaffold gaps for
   Physical. Note: production var(--bg) (#f6f5f4) resolves to v2
   native --bg (#FFFFFF) inside body.app-page — input/radio
   backgrounds render pure white in v2; intentional per #66.
   Hardcoded rgba kept verbatim per #58: rgba(224,90,0,.03/.04/.1)
   accent tints, rgba(220,38,38,.06/.15) error tint,
   rgba(0,0,0,.04/.5) hairline + remove-button overlay,
   #16a34a/#dc2626 status colors.
   ============================================================ */

/* ── Physical wizard container ── */
.phys-wizard { max-width: 760px; margin: 0 auto; }

/* ── Wizard header (used on every step) ── */
.phys-wizard-header { text-align: center; margin-bottom: 28px; }
.phys-wizard-header h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); font-weight: 400; margin-bottom: 8px; }
.phys-wizard-header h2 em { font-style: italic; color: var(--accent); }
.phys-wizard-header p { font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.phys-wizard-header .phys-sub-note { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-style: italic; }

/* ── Step progress bar (dots + labels + connectors) ── */
.phys-steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin-bottom: 36px; }
.phys-step-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.phys-step-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--card); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all .3s; flex-shrink: 0;
}
.phys-step-dot.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.phys-step-dot.done { border-color: var(--accent); background: var(--accent); color: #fff; }
.phys-step-dot.done span { display: none; }
.phys-step-dot.done::after { content: '\2713'; font-size: 13px; }
.phys-step-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center; white-space: nowrap; }
.phys-step-label.active { color: var(--accent); }
.phys-step-connector { width: 48px; height: 2px; background: var(--border); flex-shrink: 0; margin-top: 16px; }
.phys-step-connector.done { background: var(--accent); }

/* ── Step 0: Method picker cards ── */
.phys-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.phys-method-card {
  padding: 22px 20px; background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: all .3s var(--ease);
  text-align: left; position: relative; overflow: hidden;
}
.phys-method-card:hover { border-color: var(--c2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.phys-method-card.selected { border-color: var(--accent); background: rgba(224,90,0,.03); }
.phys-method-card .pm-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.phys-method-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.phys-method-card p { font-size: 12px; color: var(--text-soft); line-height: 1.5; margin: 0; }
.phys-method-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: var(--radius-pill);
  background: rgba(224,90,0,.1); color: var(--accent);
}
.phys-method-card.selected .phys-method-badge { display: none; }
.phys-method-card.selected::after {
  content: '\2713'; position: absolute; top: 10px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  line-height: 22px; text-align: center;
}
.phys-method-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 20px; font-style: italic; }

/* ── Step 1 (generic mode): 3D tool links ── */
.phys-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.phys-tool-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
  font-size: 13px; font-weight: 600; transition: all .2s;
}
.phys-tool-link:hover { border-color: var(--accent); color: var(--accent); background: rgba(224,90,0,.03); }
.ptl-icon { font-size: 18px; }

/* ── Step 1 (photo mode): angle grid slots ── */
.angle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.angle-slot {
  border: 2px dashed var(--border); border-radius: var(--radius-sm); background: var(--card);
  padding: 14px 8px; text-align: center; cursor: pointer; transition: all .2s;
  position: relative; overflow: hidden; min-height: 88px;
}
.angle-slot:hover { border-color: var(--c2); background: var(--surface); }
.angle-slot.has-file { border-color: var(--accent); border-style: solid; }
.angle-slot .as-icon { font-size: 20px; margin-bottom: 6px; }
.angle-slot .as-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.angle-slot .as-label.has-file { color: var(--accent); }
.angle-slot .as-thumb { width: 100%; height: 52px; object-fit: cover; border-radius: 4px; display: block; margin-bottom: 4px; }
.angle-slot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.angle-slot .as-remove {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 10px;
  border: none; cursor: pointer; display: none; align-items: center; justify-content: center;
  z-index: 2; padding: 0; line-height: 1;
}
.angle-slot.has-file .as-remove { display: flex; }
.angle-slot .as-check { position: absolute; bottom: 4px; right: 4px; font-size: 10px; color: var(--accent); }
.phys-angle-counter { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; text-align: center; min-height: 18px; }
.phys-angle-counter.has-files { color: var(--accent); font-weight: 600; }

/* ── Step 1 (generic mode): drop zone + file list ── */
.phys-drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 32px; text-align: center; cursor: pointer;
  transition: all .3s var(--ease); background: var(--card); margin-bottom: 12px;
}
.phys-drop:hover, .phys-drop.drag-over { border-color: var(--accent); background: rgba(224,90,0,.03); }
.phys-drop .pd-icon { font-size: 36px; margin-bottom: 12px; opacity: .7; }
.phys-drop .pd-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.phys-drop .pd-hint { font-size: 12px; color: var(--text-muted); }
.phys-file-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.phys-file-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 12px;
}
.phys-file-row .pfr-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.phys-file-row .pfr-size { color: var(--text-muted); font-family: var(--mono); flex-shrink: 0; }
.phys-file-row .pfr-remove {
  padding: 2px 8px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: none; color: var(--text-muted); cursor: pointer; font-size: 10px;
  font-family: var(--sans); transition: all .2s;
}
.phys-file-row .pfr-remove:hover { border-color: #dc2626; color: #dc2626; }

/* ── Step 2: Details form ── */
.phys-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.phys-form-full { grid-column: 1/-1; }
.phys-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 5px; }
.phys-field input, .phys-field select, .phys-field textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-family: var(--sans);
  background: var(--card); color: var(--text); outline: none;
  transition: border-color .2s; line-height: 1.5;
}
.phys-field input:focus, .phys-field select:focus, .phys-field textarea:focus { border-color: var(--accent); }
.phys-field textarea { resize: vertical; min-height: 80px; }
.phys-field select { cursor: pointer; }
.phys-field .phys-optional { font-size: 10px; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; margin-left: 4px; }

/* ── Step 3: Review summary card ── */
.phys-review-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.phys-review-card h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.phys-review-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,.04); }
.phys-review-row:last-child { border-bottom: none; }
.phys-review-row .prr-label { color: var(--text-muted); }
.phys-review-row .prr-val { font-weight: 600; color: var(--text); text-align: right; max-width: 60%; word-break: break-word; }
.phys-file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.phys-file-chip { font-size: 10px; font-family: var(--mono); padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface); color: var(--text-soft); border: 1px solid var(--border); }

/* ── Step 3: Collection grouping card + name row + legacy toggle ── */
.phys-collection-card { background: var(--card); border: 2px solid rgba(224,90,0,.2); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.phys-collection-card h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }
.phys-collection-card p { font-size: 12px; color: var(--text-soft); line-height: 1.6; margin-bottom: 12px; }
.phys-collection-name-row { display: flex; gap: 8px; align-items: center; }
.phys-collection-name-row input {
  flex: 1; padding: 9px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-family: var(--sans);
  background: var(--bg); color: var(--text); outline: none; transition: border-color .2s;
}
.phys-collection-name-row input:focus { border-color: var(--accent); }
.phys-collection-toggle { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; cursor: pointer; font-size: 13px; color: var(--text-soft); }
.phys-collection-toggle input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* ── Step 3 grouping: 3-way radio (S139CW K-new-revised; from .cm-radio
   family). .cm-radio* rules already defined upstream in this file
   (introduced earlier for tier-claim radios) — Physical reuses them.
   Pre-scan per NEW S185CC #70 missed this class-collision case;
   evolve #70 to also scan class-name reuse, not just var(--*) refs. ── */
.phys-progress-wrap { margin: 20px 0; }
.phys-progress-bar { height: 4px; background: var(--surface); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.phys-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s var(--ease); width: 0; }
.phys-progress-text { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; }

/* ── Step 3: Success state + proof links ── */
.phys-success { text-align: center; padding: 32px 20px; }
.phys-success .ps-icon { font-size: 48px; margin-bottom: 16px; }
.phys-success h3 { font-family: var(--serif); font-size: 26px; font-weight: 400; margin-bottom: 8px; }
.phys-success h3 em { font-style: italic; color: var(--accent); }
.phys-success p { font-size: 14px; color: var(--text-soft); line-height: 1.7; margin-bottom: 16px; }
.phys-success-section { margin-bottom: 20px; text-align: left; max-width: 500px; margin-left: auto; margin-right: auto; }
.phys-success-section h5 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px; }
.phys-success-links { display: flex; flex-direction: column; gap: 6px; }
.phys-proof-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 11px; font-family: var(--mono); color: var(--text-soft);
}
.phys-proof-link a { color: var(--accent); text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phys-proof-link button {
  flex-shrink: 0; padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card); font-size: 10px;
  font-family: var(--sans); cursor: pointer; color: var(--text-muted); transition: all .15s;
}
.phys-proof-link button:hover { border-color: var(--accent); color: var(--accent); }
.phys-proof-link button.copied { border-color: #16a34a; color: #16a34a; }

/* ── Wizard nav bar (Back / spacer / Continue, used on every step) ── */
.phys-nav { display: flex; gap: 10px; align-items: center; margin-top: 24px; flex-wrap: wrap; }

/* ── Physical mobile responsive (production @media max-width:640px) ── */
@media (max-width: 640px) {
  .phys-methods { grid-template-columns: 1fr; }
  .angle-grid { grid-template-columns: repeat(2, 1fr); }
  .phys-form { grid-template-columns: 1fr; }
  .phys-tools { grid-template-columns: 1fr; }
  .phys-nav { flex-direction: column; align-items: stretch; }
  .phys-nav .spacer { display: none; }
  .phys-nav .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   §46 — Series tab — production-mirror CSS (S187CC R-JS-CSS-PORT)
   Production source: main:app-styles.css lines 747-797, 947-1107
   (.series-form/success/empty + .sf-* + .sba-* + .sms-* surface,
   plus the .sf-nav + .sf-cover-* + .sf-cp-* sub-surfaces from
   S123CW). HTML host: v2/app.html #panelSeries (JS-rendered at
   runtime by hip-series.js — production-placeholder pattern
   #72-aware: empty <div> is HTML-port-complete, but runtime
   styling lives here). All var(--*) refs resolve through §40
   body.app-page alias scaffold (no scaffold extension needed —
   pre-scan per #70 + #71 confirmed). Hardcoded rgba/hex literals
   kept verbatim per #58 (lock S178CC). The .ss-* "Success card"
   utility surface used by .series-success view is ported in §49.
   ============================================================ */

/* ── Series creation outer containers (.series-form/-success/-empty) ── */
.series-form, .series-success, .series-empty { max-width: 720px; margin: 0 auto; }
.sf-header, .ss-head { margin-bottom: 20px; }
.sf-header h2, .series-success h2, .series-empty h2 {
  font-family: var(--serif); font-size: 28px; font-weight: 400;
  color: var(--text); margin-bottom: 8px;
}
.sf-header h2 em, .series-success h2 em { font-style: italic; color: var(--accent); }
.sf-header p, .series-empty p, .series-success p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 560px;
}

/* ── Series-form card + fields ── */
.sf-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.sf-field { margin-bottom: 18px; }
.sf-field:last-child { margin-bottom: 0; }
.sf-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.sf-req { color: var(--accent); font-weight: 600; font-size: 10px; margin-left: 4px; text-transform: uppercase; letter-spacing: .06em; }
.sf-opt { color: var(--text-muted); font-weight: 500; font-size: 10px; margin-left: 4px; text-transform: uppercase; letter-spacing: .06em; }
.sf-input, .sf-textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 14px; background: var(--surface); color: var(--text);
  outline: none; transition: border-color .15s; box-sizing: border-box;
}
.sf-input:focus, .sf-textarea:focus { border-color: var(--accent); }
.sf-input:disabled, .sf-textarea:disabled { opacity: .6; cursor: not-allowed; }
.sf-textarea { resize: vertical; min-height: 96px; font-family: var(--sans); line-height: 1.5; }
.sf-counter { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; font-family: var(--mono); }
.sf-note {
  margin-top: 4px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(58,83,86,.04); border: 1px solid rgba(58,83,86,.15);
  font-size: 12px; line-height: 1.6; color: var(--text-muted);
}
.sf-note strong { color: var(--text-soft); }
.sf-error {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.2);
  color: #b91c1c; font-size: 13px; line-height: 1.5; margin-bottom: 14px;
}
.sf-fine { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 12px; line-height: 1.6; }

/* ── S123CW — Series view nav (Publish a series | My series) ── */
.sf-nav {
  max-width: 720px; margin: 0 auto 16px; display: flex; gap: 6px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.sf-nav-btn {
  background: transparent; border: none; padding: 10px 14px; cursor: pointer;
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.sf-nav-btn:hover { color: var(--text); }
.sf-nav-active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── S123CW — Cover selection row (inside create form) ── */
.sf-cover-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.sf-cover-hash { font-family: var(--mono); font-size: 12px; color: var(--text); background: rgba(0,0,0,.04); padding: 4px 8px; border-radius: 3px; }
.sf-cover-empty { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* ── S123CW — Cover picker modal (depends on @keyframes kmFade defined in §47) ── */
.sf-cp-modal {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: kmFade .15s ease-out;
}
.sf-cp-card {
  width: 100%; max-width: 520px; max-height: 80vh; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.sf-cp-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.sf-cp-head h3 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--text); }
.sf-cp-close {
  background: transparent; border: none; font-size: 24px; line-height: 1; cursor: pointer;
  color: var(--text-muted); padding: 0 4px;
}
.sf-cp-close:hover { color: var(--text); }
.sf-cp-body { padding: 16px 18px; overflow-y: auto; flex: 1; min-height: 0; }
.sf-cp-status { font-size: 13px; color: var(--text-muted); padding: 20px 0; text-align: center; line-height: 1.6; }
.sf-cp-error { color: #b91c1c; }
.sf-cp-list { display: flex; flex-direction: column; gap: 4px; }
.sf-cp-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color .12s, background .12s;
}
.sf-cp-row:hover { border-color: var(--accent); background: rgba(58,83,86,.04); }
.sf-cp-row-sel { border-color: var(--accent); background: rgba(58,83,86,.06); }
.sf-cp-hash { font-family: var(--mono); font-size: 12px; color: var(--text); }
.sf-cp-when { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }

/* ── S123CW — Series batch add view (.series-batch-add + .sba-*) ── */
.series-batch-add { max-width: 720px; margin: 0 auto; }
.sba-header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.sba-back { flex-shrink: 0; }
.sba-head-text { flex: 1; }
.sba-head-text h2 { font-family: var(--serif); font-size: 24px; font-weight: 400; color: var(--text); margin: 0 0 6px; }
.sba-target { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.sba-target-title { color: var(--text); font-weight: 600; }
.sba-target-id { font-family: var(--mono); font-size: 11px; color: var(--text-muted); background: rgba(0,0,0,.04); padding: 2px 6px; border-radius: 3px; }
.sba-target-status {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 7px; border-radius: 999px;
}
.sba-target-status-open { background: rgba(34,197,94,.12); color: #166534; }
.sba-target-status-closed { background: rgba(107,114,128,.12); color: #374151; }
.sba-target-count { font-size: 12px; color: var(--text-muted); }
.sba-explain {
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
  padding: 10px 12px; background: rgba(58,83,86,.04); border-left: 3px solid var(--accent);
  border-radius: 3px; margin-bottom: 14px;
}

/* ── Series batch add — drop zone ── */
.sba-drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; margin-bottom: 14px;
  transition: border-color .12s, background .12s;
  background: var(--surface);
}
.sba-drop-over { border-color: var(--accent); background: rgba(58,83,86,.06); }
.sba-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sba-drop-icon { font-size: 28px; }
.sba-drop-text { font-size: 14px; color: var(--text); font-weight: 500; }
.sba-drop-or { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.sba-drop-browse { cursor: pointer; display: inline-flex; align-items: center; }

/* ── Series batch add — file-row list ── */
.sba-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sba-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 18px 0; font-style: italic; }
.sba-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); transition: border-color .12s;
}
.sba-row-posted { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.03); }
.sba-row-failed { border-color: rgba(220,38,38,.35); background: rgba(220,38,38,.03); }
.sba-row-main { flex: 1; min-width: 0; }
.sba-row-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sba-row-meta { display: flex; gap: 10px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.sba-row-size { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.sba-row-hash { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.sba-row-err { font-size: 12px; color: #b91c1c; margin-top: 4px; line-height: 1.4; }
.sba-row-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.sba-row-x {
  background: transparent; border: none; font-size: 18px; line-height: 1; cursor: pointer;
  color: var(--text-muted); padding: 0 4px;
}
.sba-row-x:hover { color: #b91c1c; }

/* ── Series batch add — status pills ── */
.sba-pill {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  background: rgba(107,114,128,.12); color: #374151;
}
.sba-pill-queued { background: rgba(107,114,128,.12); color: #374151; }
.sba-pill-hashing, .sba-pill-consuming, .sba-pill-signing, .sba-pill-posting {
  background: rgba(245,158,11,.16); color: #92400e;
}
.sba-pill-posted { background: rgba(34,197,94,.16); color: #166534; }
.sba-pill-failed { background: rgba(220,38,38,.12); color: #b91c1c; }

/* ── Series batch add — credit hint + summary ── */
.sba-credit-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin: 8px 0 10px; line-height: 1.6; }
.sba-credit-warn { color: #b91c1c; font-weight: 600; }
.sba-summary { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }

/* ── My series list view (.series-my + .sms-*) ── */
.series-my { max-width: 720px; margin: 0 auto; }
.sms-list { display: flex; flex-direction: column; gap: 8px; }
.sms-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card);
}
.sms-row-main { flex: 1; min-width: 0; }
.sms-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-meta { font-size: 12px; color: var(--text-muted); line-height: 1.6; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sms-id { font-family: var(--mono); font-size: 11px; color: var(--text-muted); background: rgba(0,0,0,.04); padding: 2px 6px; border-radius: 3px; }
.sms-status { font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: .04em; }
.sms-status-open { color: #166534; }
.sms-status-closed { color: #374151; }
.sms-members { color: var(--text-soft); }
.sms-when { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.sms-row-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.sms-row-actions .btn { text-decoration: none; }
.sms-closed-note { font-size: 11px; color: var(--text-muted); font-style: italic; padding: 0 8px; }
.sms-status-msg, .sms-empty { text-align: center; padding: 24px 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.sms-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sms-error { color: #b91c1c; }

/* ── Series mobile responsive (production @media max-width:600px) ── */
@media (max-width: 600px) {
  .sba-header { flex-direction: column; }
  .sba-row { flex-direction: column; align-items: stretch; }
  .sba-row-right { justify-content: space-between; margin-top: 6px; }
  .sms-row { flex-direction: column; align-items: stretch; }
  .sms-row-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }
  .sf-cp-card { max-height: 90vh; }
}

/* ============================================================
   §47 — Keys tab — production-mirror CSS (S187CC R-JS-CSS-PORT)
   Production source: main:app-styles.css lines 799-935 (.keys-panel
   + .keys-empty + .ke-icon + .kp-* table/list surface + .km-* modal
   surface, shared by create/reveal/confirm-revoke flows). HTML host:
   v2/app.html #panelKeys (JS-rendered at runtime by hip-keys.js).
   All var(--*) refs resolve through §40 body.app-page alias scaffold
   (no scaffold extension needed — pre-scan per #70 + #71 confirmed).
   Hardcoded rgba/hex literals kept verbatim per #58 (lock S178CC).
   Includes @keyframes kmFade (referenced by .sf-cp-modal in §46).
   ============================================================ */

/* ── Keys panel containers + empty state ── */
.keys-panel { max-width: 920px; margin: 0 auto; }
.keys-empty { max-width: 720px; margin: 0 auto; }
.keys-empty h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; color: var(--text); margin-bottom: 8px; }
.keys-empty p { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 560px; }
.keys-empty p code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,.04); padding: 1px 5px; border-radius: 3px; color: var(--text-soft); }
.ke-icon { font-size: 32px; color: var(--accent); margin-bottom: 6px; }

/* ── Keys panel loading + error states ── */
.kp-loading { padding: 40px 0; text-align: center; font-size: 13px; color: var(--text-muted); }
.kp-error {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.2);
  color: #b91c1c; font-size: 13px; line-height: 1.6;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.kp-error strong { font-weight: 700; margin-right: 4px; }

/* ── Keys panel header ── */
.kp-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; margin-bottom: 18px; flex-wrap: wrap;
}
.kp-header h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; color: var(--text); margin-bottom: 8px; }
.kp-header h2 em { font-style: italic; color: var(--accent); }
.kp-header p { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 560px; margin: 0; }
.kp-create-btn { flex-shrink: 0; white-space: nowrap; }

/* ── Keys panel table ── */
.kp-table-wrap {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto; margin-bottom: 14px;
}
.kp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kp-table th {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em;
}
.kp-table td { padding: 13px 14px; border-bottom: 1px solid rgba(0,0,0,.04); vertical-align: middle; }
.kp-table tr:last-child td { border-bottom: none; }
.kp-cell-label { color: var(--text); font-weight: 500; }
.kp-cell-id code { font-family: var(--mono); font-size: 12px; color: var(--text-soft); }
.kp-cell-date { font-family: var(--mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.kp-cell-status { white-space: nowrap; }
.kp-cell-action { text-align: right; white-space: nowrap; }
.kp-unlabeled { color: var(--text-muted); font-style: italic; font-size: 12px; }
.kp-action-empty { color: var(--text-muted); }
.kp-empty-row { padding: 32px 14px !important; text-align: center; color: var(--text-muted); font-size: 13px; }
.kp-empty-row strong { color: var(--text-soft); font-weight: 600; }

/* ── Keys panel status badges ── */
.kp-badge {
  display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.kp-badge-active { background: rgba(22,163,74,.08); color: #15803d; }
.kp-badge-revoked { background: rgba(0,0,0,.06); color: var(--text-muted); }
.kp-fine { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.6; margin-top: 6px; }
.kp-fine code { font-family: var(--mono); font-size: 11px; background: rgba(0,0,0,.04); padding: 1px 5px; border-radius: 3px; }

/* ── Keys modal (shared by create / reveal / confirm-revoke) ── */
.km-overlay {
  position: fixed; inset: 0; background: rgba(15,15,15,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 9000;
  animation: kmFade .15s ease-out;
}
@keyframes kmFade { from { opacity: 0; } to { opacity: 1; } }
.km-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.km-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.km-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--text); margin: 0; }
.km-close {
  background: none; border: none; font-size: 24px; line-height: 1; color: var(--text-muted);
  cursor: pointer; padding: 0 4px; border-radius: 4px;
}
.km-close:hover { color: var(--text); }
.km-close:disabled { opacity: .4; cursor: not-allowed; }
.km-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.km-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.km-opt { color: var(--text-muted); font-weight: 500; font-size: 10px; margin-left: 4px; text-transform: uppercase; letter-spacing: .06em; }
.km-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 14px; background: var(--surface); color: var(--text);
  outline: none; transition: border-color .15s; box-sizing: border-box;
}
.km-input:focus { border-color: var(--accent); }
.km-input:disabled { opacity: .6; cursor: not-allowed; }
.km-counter { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; font-family: var(--mono); }
.km-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 10px; }
.km-error {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.2);
  color: #b91c1c; font-size: 12px; line-height: 1.5;
}
.km-warn {
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
  color: #92400e; font-size: 13px; line-height: 1.55;
}
.km-warn strong { color: #7c2d12; font-weight: 700; }
.km-reveal {
  display: flex; gap: 10px; align-items: stretch;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 14px;
}
.km-key {
  flex: 1; font-family: var(--mono); font-size: 12px; color: var(--text);
  /* S119CW production note: nowrap + horizontal scroll prevents triple-click
     soft-line-break + character-corruption paste bug surfaced in S117 + S118
     live smokes. user-select:all keeps the entire key as a single selection
     unit on a single click. min-width:0 lets overflow:auto reach inside the
     flex parent. */
  white-space: nowrap; overflow-x: auto; line-height: 1.4;
  user-select: all; min-width: 0;
}
.km-meta { font-size: 12px; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }
.km-meta div { display: flex; gap: 10px; align-items: baseline; }
.km-meta-label {
  display: inline-block; min-width: 72px; font-size: 11px; font-weight: 700;
  color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em;
}
.km-meta code { font-family: var(--mono); font-size: 12px; color: var(--text); }
.km-confirm-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(58,83,86,.04); font-size: 13px; color: var(--text); cursor: pointer;
}
.km-confirm-row input { margin-top: 2px; cursor: pointer; }
.km-confirm-text { font-size: 13px; color: var(--text); line-height: 1.6; margin: 0; }
.km-confirm-text code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,.04); padding: 1px 5px; border-radius: 3px; }
.km-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface);
}

/* ── Keys mobile responsive (production @media max-width:600px) ── */
@media (max-width: 600px) {
  .kp-header { flex-direction: column; align-items: stretch; }
  .kp-create-btn { align-self: flex-start; }
  .kp-cell-date { font-size: 11px; }
  .km-card { max-width: 100%; }
}

/* ============================================================
   §48 — Embed badge modal — production-mirror CSS (S187CC R-JS-CSS-PORT)
   Production source: main:app-styles.css lines 324-355 (.embed-*
   surface, plus @keyframes embedIn). HTML host: dynamically injected
   by hip-ui.js / proof.html embed-badge flow when "Embed" CTA is
   clicked from a proof landing page. Modal contains a style picker
   (badge variants), preview area (with .dark-bg / .light-bg backdrops),
   tab-switched code snippets (HTML / Markdown / etc.), and a
   copy-to-clipboard button. All var(--*) refs resolve through §40
   body.app-page alias scaffold (no scaffold extension needed —
   pre-scan per #70 + #71 confirmed). Hardcoded rgba/hex literals
   kept verbatim per #58 (lock S178CC).
   ============================================================ */

/* ── Embed modal overlay + card animation ── */
.embed-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  z-index: 500; display: none; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; transition: opacity .2s;
}
.embed-overlay.open { opacity: 1; }
.embed-modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  max-width: 580px; width: 100%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
  animation: embedIn .25s var(--ease) both;
}
@keyframes embedIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ── Embed modal header + close ── */
.embed-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0; margin-bottom: 16px;
}
.embed-header h3 { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--text); }
.embed-header h3 em { font-style: italic; color: var(--accent); }
.embed-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--surface); color: var(--text-muted); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.embed-close:hover { background: var(--border); color: var(--text); }

/* ── Embed modal body + file-info row ── */
.embed-body { padding: 0 24px 24px; }
.embed-file-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm);
  margin-bottom: 20px; font-size: 12px; color: var(--text-soft);
}
.embed-file-info .efi-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.embed-file-info .efi-hash { font-family: var(--mono); font-size: 10px; color: var(--text-muted); }

/* ── Embed style picker (badge variant buttons) ── */
.embed-styles { display: flex; gap: 8px; margin-bottom: 16px; }
.embed-style-btn {
  padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card);
  font-size: 11px; font-weight: 600; font-family: var(--sans);
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.embed-style-btn:hover { border-color: var(--text-soft); color: var(--text-soft); }
.embed-style-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(224,90,0,.04); }

/* ── Embed preview area (with dark/light backdrop variants) ── */
.embed-preview {
  display: flex; align-items: center; justify-content: center;
  padding: 24px; margin-bottom: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); min-height: 80px; transition: background .2s;
}
.embed-preview.dark-bg { background: #1a1a1a; border-color: #333; }
.embed-preview.light-bg { background: #f9f9f9; }

/* ── Embed code-snippet tabs + content ── */
.embed-tabs { display: flex; gap: 0; margin-bottom: 2px; }
.embed-tab-btn {
  padding: 8px 16px; font-size: 11px; font-weight: 600; font-family: var(--sans);
  color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); border-bottom: none;
  cursor: pointer; transition: all .15s; position: relative;
}
.embed-tab-btn:first-child { border-radius: var(--radius-sm) 0 0 0; }
.embed-tab-btn:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.embed-tab-btn.active { color: var(--accent); background: var(--card); border-bottom-color: var(--card); z-index: 1; }
.embed-code-wrap {
  position: relative; border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  background: var(--card); margin-bottom: 16px;
}
.embed-code {
  display: block; padding: 14px 16px; font-family: var(--mono); font-size: 11px;
  color: var(--text-soft); line-height: 1.7; white-space: pre-wrap; word-break: break-all;
  max-height: 180px; overflow-y: auto;
}
.embed-copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card);
  font-size: 10px; font-weight: 700; font-family: var(--sans);
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.embed-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.embed-copy-btn.copied { border-color: #16a34a; color: #16a34a; background: rgba(22,163,74,.04); }
.embed-note { font-size: 11px; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   §49 — Misc panel-content CSS — production-mirror (S187CC R-JS-CSS-PORT)
   Production source: main:app-styles.css lines 62-103 (.cred-tiers
   + .cred-tier-card + .ctc-*), 711-744 (.collection-banner + .cb-*),
   781-796 (.ss-* / .se-icon). HTML host: emitted at runtime by
   multiple JS modules — cred-tiers/.ctc-* by hip-ui.js cred-gate
   tier picker; .ss-* by hip-attest.js / hip-series.js success
   views; .cb-* by hip-collection.js collection results banner;
   .collection-banner by hip-collection.js. All var(--*) refs
   resolve through §40 body.app-page alias scaffold (no scaffold
   extension needed — pre-scan per #70 + #71 confirmed).
   Hardcoded rgba/hex literals kept verbatim per #58 (lock S178CC).
   26 rule-start selectors (10 cb-* + 7 ss-* + 6 ctc-* + 2 cred-* +
   1 collection-*) finishing the S186CC late-EOS-discovered 169-class
   prod-only surface.
   ============================================================ */

/* ── Credential tier picker (3-up cards on cred-gate) ── */
.cred-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: left; }
.cred-tier-card {
  display: flex; flex-direction: column;
  padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); transition: all .3s var(--ease); position: relative; overflow: hidden;
}
.cred-tier-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cred-tier-card.tier1 { border-color: rgba(224,90,0,.25); }
.cred-tier-card.tier1:hover { border-color: var(--accent); }

/* ── .ctc-* — Cred-tier-card child elements ── */
.ctc-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent); color: #fff;
}
.ctc-tier { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 2px; }
.ctc-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.ctc-desc { font-size: 11px; color: var(--text-soft); line-height: 1.5; flex: 1; margin-bottom: 10px; }
.ctc-price { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.ctc-arrow { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ── Cred-tiers responsive (production @media max-width:600px) ── */
@media (max-width: 600px) {
  .cred-tiers { grid-template-columns: 1fr; }
}

/* ── .collection-banner — S108 §5-8 — collection-level success/error banner on Results screen ── */
.collection-banner {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: 13px; line-height: 1.55;
}
.collection-banner.ok { background: rgba(22,163,74,.06); border: 1px solid rgba(22,163,74,.22); color: #14532d; }
.collection-banner.err { background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.22); color: #991b1b; }

/* ── .cb-* — Confirmation-banner subselectors (S108 §5-8) ── */
.cb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cb-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.cb-badge.ok { background: rgba(22,163,74,.15); color: #14532d; }
.cb-badge.err { background: rgba(220,38,38,.15); color: #991b1b; }
.cb-short {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  text-decoration: none; border-bottom: 1px dashed rgba(224,90,0,.35);
}
.cb-short:hover { border-bottom-color: var(--accent); }
.cb-copy-btn {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border: 1px solid rgba(224,90,0,.35); border-radius: var(--radius-sm);
  background: #fff; color: var(--accent); cursor: pointer; transition: all .15s;
}
.cb-copy-btn:hover { background: rgba(224,90,0,.08); }
.cb-row { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.cb-label { font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; min-width: 110px; }
.cb-mono { font-family: var(--mono); font-size: 12px; color: var(--text); }
.cb-val { font-size: 13px; color: var(--text); }
.cb-alias-note {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(224,90,0,.15);
  font-size: 12px; color: var(--text-soft); font-style: italic;
}
.cb-errmsg { font-size: 12px; color: #991b1b; font-family: var(--mono); word-break: break-word; }

/* ── .ss-* / .se-icon — Success card (shared by .series-success view + others) ── */
.ss-icon, .se-icon { font-size: 32px; color: var(--accent); margin-bottom: 6px; }
.ss-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin: 18px 0;
}
.ss-row { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.04); }
.ss-row:last-child { border-bottom: none; }
.ss-label { font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; min-width: 100px; }
.ss-mono { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-all; flex: 1; }
.ss-pill {
  display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill);
  background: rgba(22,163,74,.08); color: #15803d;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.ss-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.ss-actions .btn { text-decoration: none; }
