/* 3pp store — App Store-style layout.
   Dark first; the light theme only swaps the colour tokens. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --bg: #000000;
  --sidebar: rgba(22, 22, 24, 0.86);
  --surface: #1c1c1e;
  --surface-hover: #242426;
  --surface-2: #2c2c2e;
  --text: #f5f5f7;
  --secondary: #98989d;
  --tertiary: #6e6e73;
  --hairline: rgba(255, 255, 255, 0.09);
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.16);
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --radius: 12px;
  --max: 1180px;
}

html[data-theme="light"] {
  --bg: #f5f5f7;
  --sidebar: rgba(255, 255, 255, 0.86);
  --surface: #ffffff;
  --surface-hover: #f0f0f2;
  --surface-2: #e6e6ea;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --hairline: rgba(0, 0, 0, 0.09);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --green: #1d9a4b;
  --orange: #c76a00;
  --red: #d70015;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
code, pre { font-family: var(--mono); }

/* ── Moved notice ──────────────────────────────────────────────────────── */
.moved-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: #ff9f0a;
  color: #1d1d1f;
  font-size: 12.5px;
}
.moved-banner[hidden] { display: none; }
.moved-banner a {
  font-weight: 650; text-decoration: underline; text-underline-offset: 2px;
}
body.has-moved-banner .shell { height: calc(100vh - 37px); }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px 14px;
  background: var(--sidebar);
  backdrop-filter: saturate(180%) blur(26px);
  -webkit-backdrop-filter: saturate(180%) blur(26px);
  border-right: 1px solid var(--hairline);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.store-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-logo {
  width: auto; height: 22px; flex: 0 0 auto;
  object-fit: contain;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--secondary); }

.side-search {
  display: flex; align-items: center; gap: 6px;
  margin: 4px 2px 2px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 8px;
  transition: border-color .15s ease, background .15s ease;
}
.side-search:focus-within { border-color: var(--accent); background: var(--surface-hover); }
.side-search svg {
  width: 13px; height: 13px; flex: 0 0 auto;
  fill: none; stroke: var(--tertiary); stroke-width: 2;
}
.side-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 12.5px;
}
.side-search input::placeholder { color: var(--tertiary); }
.side-search input::-webkit-search-cancel-button { display: none; }

.side-cats { display: flex; flex-direction: column; gap: 1px; }
.side-cats a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--secondary);
  transition: background .12s ease;
}
.side-cats a:hover { background: rgba(127, 127, 140, 0.14); }
.side-cats a.active {
  background: rgba(127, 127, 140, 0.22);
  color: var(--text);
}
.side-heading {
  margin: 12px 0 -2px;
  padding: 0 9px;
  font-size: 11px; font-weight: 600;
  color: var(--tertiary);
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 14px; }
.side-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; font-weight: 600;
}
.side-cta svg { width: 14px; height: 14px; }
.side-cta:hover { background: var(--accent); color: #fff; }
.side-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: 7px;
  font-size: 12.5px; color: var(--secondary);
  border: 0; background: none; text-align: left; cursor: pointer;
}
.side-link svg { width: 15px; height: 15px; }
.side-link:hover { background: rgba(127, 127, 140, 0.14); color: var(--text); }

/* ── Main ──────────────────────────────────────────────────────────────── */
.main { overflow-y: auto; scroll-behavior: smooth; }
.view { max-width: var(--max); margin: 0 auto; padding: 30px 40px 90px; }
.page-title {
  margin: 0 0 22px;
  font-size: 30px; font-weight: 700; letter-spacing: -0.025em;
}
.page-sub { margin: -12px 0 22px; font-size: 13px; color: var(--secondary); }

/* ── Category tiles ────────────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cat-card {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background .15s ease, border-color .15s ease;
}
.cat-card:hover { background: var(--surface-hover); border-color: var(--hairline); }
.cat-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.cat-count { margin-left: auto; font-size: 11.5px; color: var(--tertiary); }

/* ── Shelves ───────────────────────────────────────────────────────────── */
.shelf { margin-top: 38px; }
.shelf-head {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 14px;
}
.shelf-head h2 {
  margin: 0;
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
}
.shelf-head svg {
  width: 16px; height: 16px;
  fill: none; stroke: var(--secondary); stroke-width: 2;
}

.cell-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 26px;
  row-gap: 20px;
}
.cell {
  display: flex; align-items: center; gap: 11px;
  min-width: 0;
  cursor: pointer;
}
.cell-icon {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform .15s ease;
}
.cell:hover .cell-icon { transform: scale(1.04); }
.cell-icon img { width: 100%; height: 100%; object-fit: cover; }
.cell-icon .letter { font-size: 19px; font-weight: 700; color: var(--secondary); }
.cell-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.cell-name {
  display: block;
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell-sub {
  display: block;
  font-size: 12px; color: var(--secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell .see {
  flex: 0 0 auto;
  border: 0; cursor: pointer;
  white-space: nowrap;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  transition: opacity .15s ease;
}
.cell .see:hover { opacity: .85; }

.empty { padding: 36px 0; text-align: center; color: var(--secondary); }
.cell[hidden] { display: none; }

/* ── Package page ──────────────────────────────────────────────────────── */
.view-pkg { max-width: none; padding: 0 0 90px; }
.pkg-hero {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  min-height: 290px;
  padding: 44px max(40px, calc((100vw - 238px - var(--max)) / 2 + 40px));
  color: #fff;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #3a3a3c), var(--c2, #1c1c1e));
}
/* A blurred, oversized copy of the app icon: gives the hero its real colour. */
.hero-photo {
  position: absolute;
  inset: -20%;
  z-index: -3;
  width: 140%; height: 140%;
  object-fit: cover;
  filter: blur(72px) saturate(190%);
  transform: scale(1.1);
  opacity: .95;
  pointer-events: none;
}
.pkg-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1, #3a3a3c) 72%, transparent),
              color-mix(in srgb, var(--c2, #1c1c1e) 82%, transparent));
}
.pkg-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 120% at 85% 10%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
}
.pkg-icon {
  width: 148px; height: 148px; flex: 0 0 auto;
  border-radius: 33px;
  overflow: hidden;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.pkg-icon img { width: 100%; height: 100%; object-fit: cover; }
.pkg-icon .letter { font-size: 60px; font-weight: 700; color: rgba(0, 0, 0, 0.55); }
.pkg-head { flex: 1; min-width: 0; }
.pkg-head h1 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08; letter-spacing: -0.035em; font-weight: 700;
}
.pkg-head .pkg-kind {
  display: flex; flex-direction: column;
  margin: 10px 0 0;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
}
.pkg-head .pkg-kind small {
  margin-top: 2px;
  font-size: 11.5px; font-weight: 400; opacity: .72;
  letter-spacing: 0;
  font-family: var(--mono);
}
.pkg-head .pkg-cat { margin: 10px 0 0; font-size: 13px; opacity: .82; }
.pkg-buy { text-align: right; }
.pkg-buy .get {
  border: 0; cursor: pointer;
  min-width: 118px;
  padding: 9px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0a84ff;
  font-size: 13px; font-weight: 700; letter-spacing: .01em;
}
.pkg-buy .get:hover { background: #fff; }
.pkg-buy .get[data-state="update"] { background: var(--accent); color: #fff; }
.pkg-buy small { display: block; margin-top: 8px; font-size: 11.5px; opacity: .75; }

.facts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px max(40px, calc((100vw - 238px - var(--max)) / 2 + 40px));
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
}
.fact { min-width: 0; }
.fact-label {
  margin: 0;
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--tertiary);
  white-space: nowrap;
}
.fact-value {
  margin: 3px 0 0;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fact-value small { display: block; font-size: 11px; font-weight: 400; color: var(--secondary); }
.install-note {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 22px;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  font-size: 12.5px;
}
.install-note strong { font-size: 13px; }
.install-note p { margin: 0; color: var(--secondary); }
.install-note a { color: var(--accent); }
.install-note a:hover { text-decoration: underline; }

.score {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--green);
}
.score::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

.pkg-inner { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.shots {
  display: flex; gap: 16px;
  padding: 28px 0 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.shots img {
  height: 340px; width: auto;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  scroll-snap-align: start;
}
.platform {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px; font-weight: 500;
}
.platform svg { width: 18px; height: 18px; }

.pkg-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 48px;
  padding-top: 26px;
}
.prose { font-size: 14px; color: var(--secondary); }
.pkg-section { margin: 0 0 34px; }
.pkg-section > h2 {
  margin: 0 0 14px;
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text);
}
.prose pre.md-table { margin-bottom: 4px; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 22px 0 8px;
  line-height: 1.25;
}
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 16px; }
.prose h4 { font-size: 14px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 3px 0; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  font-size: 12.5px;
  background: var(--surface-2);
  padding: 1px 5px; border-radius: 5px;
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  margin: 0 0 14px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--surface-2);
  color: var(--secondary);
}
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 20px 0; }
.prose img { border-radius: 10px; margin: 6px 0 14px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-head > h2 { margin: 0; }
.audit {
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
}
.audit-score {
  font-size: 15px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--secondary);
}
.audit-score.ok { background: rgba(48, 209, 88, .14); color: var(--green); }
.audit-meta {
  display: grid; grid-template-columns: auto 1fr;
  gap: 6px 18px;
  margin: 16px 0 0;
  font-size: 12.5px;
}
.audit-meta dt { color: var(--tertiary); }
.audit-meta dd { margin: 0; color: var(--secondary); }
.copy {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}
.copy:hover { border-color: var(--hairline); }
.copy.copied { background: rgba(48, 209, 88, .16); }
.copy.copied code { color: var(--green); }
.copy code {
  flex: 1;
  font-size: 11px;
  overflow: hidden; text-overflow: ellipsis;
}
.copy svg {
  width: 14px; height: 14px; flex: 0 0 auto;
  color: var(--secondary);
}
.side-source { margin: 12px 0 0; }
.side-card dd small {
  display: block;
  font-size: 10px; color: var(--tertiary);
  font-family: var(--mono);
}

.side-card {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 18px;
  font-size: 12.5px;
}
.side-card h3 {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--tertiary);
}
.side-card dl {
  margin: 0;
  display: grid; grid-template-columns: auto 1fr;
  gap: 9px 14px;
}
.side-card dt { color: var(--secondary); }
.side-card dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.side-card .sha { font-family: var(--mono); font-size: 10.5px; }
.side-card .install-cmd {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.side-card .install-cmd p { margin: 0 0 6px; color: var(--secondary); }
.side-card .install-cmd code {
  display: block;
  font-size: 11px;
  background: var(--surface-2);
  border-radius: 7px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px; font-weight: 600;
}
.back {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 22px 0 0;
  color: var(--accent); font-size: 13px;
}
.back svg { width: 15px; height: 15px; }

/* ── Updates ───────────────────────────────────────────────────────────── */
.release-list { display: grid; gap: 1px; border-top: 1px solid var(--hairline); }
.release {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.release:hover { background: var(--surface); }
.release h3 { margin: 0; font-size: 14px; font-weight: 600; }
.release p { margin: 2px 0 0; font-size: 12.5px; color: var(--secondary); }
.release time { font-size: 11.5px; color: var(--tertiary); }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  display: grid; place-items: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 28px;
  max-width: 520px; width: 100%;
}
.modal-card h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.03em; }
.modal-card p { color: var(--secondary); font-size: 13px; }
.modal-card pre {
  background: var(--surface-2);
  padding: 14px; border-radius: 10px;
  font-size: 11.5px; overflow-x: auto; line-height: 1.7;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: var(--surface-2);
  color: var(--secondary); cursor: pointer;
}
.modal-close svg { width: 15px; height: 15px; }
.modal-close:hover { color: var(--text); }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  border: 0; cursor: pointer;
}
.cta:hover { opacity: .9; }
.cta-ghost { background: var(--surface-2); color: var(--text); }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .cell-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: auto; min-height: 100vh; }
  .sidebar {
    position: sticky; top: 0; z-index: 40;
    flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-right: 0; border-bottom: 1px solid var(--hairline);
    overflow: visible;
  }
  .brand-copy { display: none; }
  .side-search { flex: 1; min-width: 140px; margin: 0; }
  .side-cats { flex-direction: row; overflow-x: auto; }
  .side-cats a { white-space: nowrap; }
  .side-cats a.active { background: rgba(127, 127, 140, 0.22); }
  .side-heading, .side-foot { display: none; }
  .main { overflow: visible; }
  .view { padding: 24px 20px 70px; }
  .pkg-hero { padding: 30px 20px; }
  .facts { padding: 14px 20px; }
  .pkg-inner { padding: 0 20px; }
  .pkg-body { grid-template-columns: 1fr; gap: 26px; }
  .pkg-icon { width: 110px; height: 110px; border-radius: 26px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .page-title { font-size: 26px; }
  .cat-grid, .cell-grid { grid-template-columns: 1fr; }
  .pkg-hero { flex-wrap: wrap; gap: 18px; min-height: 0; }
  .pkg-buy { width: 100%; text-align: left; }
  .pkg-buy small { margin-top: 4px; }
  .facts { grid-auto-columns: minmax(118px, 1fr); }
  .shots img { height: 220px; }
}

/* ── Cuenta y publicación ──────────────────────────────────────────────── */
.account-view { max-width: 980px; }
.auth-card {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 38px 28px;
}
.auth-card .auth-icon {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.auth-card h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.auth-card p { margin: 0 auto 20px; color: var(--secondary); font-size: 13px; max-width: 38ch; }
.auth-card .cta { gap: 8px; }
.auth-fine { margin-top: 16px !important; font-size: 11.5px !important; color: var(--tertiary) !important; }

.profile-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--secondary);
  font-weight: 600; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-copy { flex: 1; min-width: 0; }
.profile-copy h2 { margin: 0; font-size: 16px; font-weight: 600; }
.profile-copy p { margin: 2px 0 0; font-size: 12.5px; color: var(--secondary); overflow-wrap: anywhere; }
.profile-card .ghost {
  border: 0; background: var(--surface-2); color: var(--secondary);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer;
}
.profile-card .ghost:hover { color: var(--text); }

.panel {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-head .cta { padding: 6px 14px; font-size: 12px; gap: 6px; }
.panel-body { padding: 18px 20px; }
.panel-body > p { margin: 0; color: var(--secondary); font-size: 13px; }

.sub-list { display: grid; }
.sub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
}
.sub-row:last-child { border-bottom: 0; }
.sub-row h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.sub-row .meta { grid-column: 1; font-size: 11.5px; color: var(--tertiary); }
.sub-row .status { grid-row: 1 / span 2; align-self: center; }
.sub-row a.detail { color: var(--accent); font-size: 12px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--secondary);
  white-space: nowrap;
}
.status-pill svg { width: 12px; height: 12px; }
.status-pill.queued, .status-pill.auditing { color: #b25000; background: rgba(255, 159, 10, .14); }
[data-theme="dark"] .status-pill.queued, [data-theme="dark"] .status-pill.auditing { color: #ffb340; }
.status-pill.approved { color: #1a7f37; background: rgba(48, 209, 88, .14); }
[data-theme="dark"] .status-pill.approved { color: #6ee787; }
.status-pill.rejected, .status-pill.error { color: var(--red); background: rgba(255, 69, 58, .12); }

.form { max-width: 820px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: var(--secondary); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field textarea.tall { min-height: 220px; font-family: var(--mono); font-size: 12px; }
.field .hint { font-size: 11.5px; color: var(--tertiary); }
.field .hint a { color: var(--accent); }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.form-actions .cta { padding: 9px 22px; gap: 7px; }
.form-actions .cta[disabled] { opacity: .55; cursor: not-allowed; }
.form-error {
  display: none;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 9px;
  background: rgba(255, 69, 58, .1);
  border: 1px solid rgba(255, 69, 58, .3);
  color: var(--red);
  font-size: 12.5px;
}
.form-error:not(:empty) { display: block; }

.report { border-top: 1px solid var(--hairline); margin-top: 18px; padding-top: 18px; }
.report h3 { margin: 0 0 10px; font-size: 14px; }
.report .summary { font-size: 13px; color: var(--secondary); }
.checks { display: grid; gap: 8px; margin: 14px 0 0; }
.check {
  display: grid; grid-template-columns: 18px 1fr;
  gap: 9px; align-items: start;
  font-size: 12.5px;
}
.check svg { width: 15px; height: 15px; margin-top: 1px; }
.check.ok svg { color: #30a14e; }
.check.fail svg { color: var(--red); }
.check.warn svg { color: #ff9f0a; }
.check b { font-weight: 600; }
.check span { color: var(--secondary); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero-3pp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin: 0 0 26px;
  padding: 26px 28px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background:
    radial-gradient(120% 150% at 100% 0%, var(--accent-soft), transparent 55%),
    linear-gradient(135deg, var(--surface), var(--surface-2));
}
.hero-kicker {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  font-size: 12px; font-weight: 600; color: var(--secondary);
  letter-spacing: .02em;
}
.hero-kicker img { width: auto; height: 18px; }
.hero-title {
  max-width: 680px;
  margin: 0 0 10px;
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.hero-text { max-width: 600px; margin: 0; font-size: 14px; color: var(--secondary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-actions .cta { padding: 9px 18px; gap: 7px; }
.hero-facts { display: flex; gap: 22px; align-items: end; }
.hero-facts div { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.hero-facts span { font-size: 11px; color: var(--secondary); }

/* ── Announcements ─────────────────────────────────────────────────────── */
.notice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0 6px;
  max-width: var(--max);
}
.notice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.notice-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.notice-copy h2 { margin: 0 0 3px; font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em; }
.notice-copy p { margin: 0; font-size: 12px; color: var(--secondary); }
.notice-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.notice-links a {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--accent);
}
.notice-links a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .notice-grid { grid-template-columns: 1fr; }
  .hero-3pp { grid-template-columns: 1fr; padding: 22px 20px; }
  .hero-facts { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-card { flex-wrap: wrap; }
  .sub-row { grid-template-columns: 1fr; }
  .sub-row .status { grid-row: auto; justify-self: start; }
}
