/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --glass: rgb(255 255 255 / 0.68);
  --hairline: rgb(0 0 0 / 0.09);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --on-accent: #ffffff;
  --tint: rgb(0 113 227 / 0.1);
  --series-1: #0071e3;
  --good: #248a3d;
  --good-mark: #34c759;
  --bad: #d70015;
  --warn: #b25000;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 20px rgb(0 0 0 / 0.05);
  --shadow-high: 0 24px 70px rgb(0 0 0 / 0.22);
  --r-lg: 22px;
  --r-md: 14px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --glass: rgb(28 28 30 / 0.66);
  --hairline: rgb(255 255 255 / 0.11);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --on-accent: #ffffff;
  --tint: rgb(10 132 255 / 0.18);
  --series-1: #0a84ff;
  --good: #30d158;
  --good-mark: #30d158;
  --bad: #ff6961;
  --warn: #ffb340;
  --shadow: 0 0 0 1px rgb(255 255 255 / 0.05);
  --shadow-high: 0 24px 70px rgb(0 0 0 / 0.6);
}

  :root[data-theme="dark"]:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --glass: rgb(28 28 30 / 0.66);
    --hairline: rgb(255 255 255 / 0.11);
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --on-accent: #ffffff;
    --tint: rgb(10 132 255 / 0.18);
    --series-1: #0a84ff;
    --good: #30d158;
    --good-mark: #30d158;
    --bad: #ff6961;
    --warn: #ffb340;
    --shadow: 0 0 0 1px rgb(255 255 255 / 0.05);
    --shadow-high: 0 24px 70px rgb(0 0 0 / 0.6);
  }


/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 88% -8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    radial-gradient(900px 560px at 2% 104%, color-mix(in srgb, #af52de 7%, transparent), transparent 70%);
  background-attachment: fixed;
  font: 15px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, p { margin: 0; }
h1 { font-size: 34px; font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
h2 { font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
code { font: 12.5px ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.min0 { min-width: 0; }
.truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.prewrap { white-space: pre-line; margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.stack { display: grid; gap: 14px; }
.narrow { max-width: 640px; margin: 0 auto; }
.eyebrow { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

/* ---------- Buttons ---------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; letter-spacing: inherit;
  padding: 8px 17px; min-height: 36px; border: 0; border-radius: 980px; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  transition: background-color 0.15s, transform 0.2s var(--spring), opacity 0.15s;
}
button:hover, .button:hover { background: var(--accent-hover); text-decoration: none; }
button:active, .button:active { transform: scale(0.97); }
button:disabled { opacity: 0.5; cursor: default; }
button.ghost, .button.ghost { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
button.ghost:hover, .button.ghost:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
button.danger { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
button.small { padding: 3px 12px; min-height: 28px; font-size: 13px; }
button.large, .button.large { padding: 12px 24px; font-size: 17px; }
button.full { width: 100%; }
button.plain { display: flex; background: none; color: inherit; padding: 0; border-radius: 0; min-height: 0; font-weight: inherit; text-align: left; }
button.plain:hover { background: none; }
button.plain:active { transform: none; }
.icon-btn { width: 30px; height: 30px; min-height: 0; padding: 0; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted); }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 13%, transparent); }
.spinner { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 18px 12px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; color: var(--text); padding: 0 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { border-radius: 22%; display: block; }
.side-link { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--text); font-size: 14px; }
.side-link:hover { background: color-mix(in srgb, var(--text) 7%, transparent); text-decoration: none; }
.side-link .icon { color: var(--accent); }
.side-label { font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 8px 4px; }
.side-sites { flex: 1; min-height: 0; overflow: auto; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 0 8px; }
.side-foot form { margin: 0; }
.search-btn { align-items: center; gap: 7px; width: 100%; padding: 6px 9px !important; border-radius: 9px !important; font-size: 13px; color: var(--muted) !important; background: color-mix(in srgb, var(--text) 6%, transparent) !important; }
.search-btn span { flex: 1; }
.search-btn kbd { font: inherit; font-size: 11px; opacity: 0.8; }
.content { padding: 36px 40px 72px; max-width: 1080px; width: 100%; margin: 0 auto; min-width: 0; }
.topbar, .tabbar { display: none; }

@media (max-width: 820px) {
  .app { display: block; }
  .sidebar { display: none; }
  .topbar {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
    background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-bottom: 1px solid var(--hairline);
  }
  .topbar .brand { padding: 0; white-space: nowrap; }
  .topbar .search-btn { width: auto; }
  .topbar .search-btn span, .topbar .search-btn kbd { display: none; }
  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-top: 1px solid var(--hairline);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .tabbar a:hover { text-decoration: none; }
  .content { padding: 22px 16px 100px; }
  h1 { font-size: 30px; }
}

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin-top: 4px; }
.section { margin: 36px 0 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.more { display: flex; justify-content: center; margin-top: 16px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 18px; margin-bottom: 14px; border-radius: var(--r-md); background: var(--tint); color: var(--text); }
.banner .spinner { color: var(--accent); }
.note { padding: 9px 14px; margin-bottom: 14px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--muted); overflow-wrap: anywhere; }
.alert { padding: 11px 16px; margin-bottom: 16px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 11%, transparent); color: var(--bad); font-size: 14px; }
.alert.ok { background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good); }
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }
.status.warn { color: var(--warn); }
.pill { display: inline-flex; flex: none; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted); }
.pill.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

/* ---------- Ring ---------- */
.ring { position: relative; flex: none; }
.ring svg { display: block; }
.ring circle { fill: none; }
.ring-track { stroke: color-mix(in srgb, var(--text) 9%, transparent); }
.ring-value { stroke: var(--good-mark); stroke-linecap: round; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; line-height: 1.05; font-size: 13px; color: var(--muted); }
.ring-center b { font-size: 38px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-center b.ring-small, .ring-small { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }

/* ---------- Overview ---------- */
.overview { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ring-card { display: flex; gap: 22px; align-items: center; }
.ring-title { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.ring-card p { margin-top: 6px; }
.upnext { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 11%, var(--surface)), var(--surface) 70%); }
.upnext h2 { font-size: 21px; }
.upnext p { margin-bottom: 8px; }
.upnext form { margin: 0; }
.upnext .eyebrow { color: var(--accent); }
@media (max-width: 960px) { .overview { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .ring-card { flex-direction: column; align-items: flex-start; } }

/* ---------- Daily loop ---------- */
.loop { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.loop-step { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 1px; }
.loop-tile { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 9px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted); }
.loop-step.done .loop-tile { background: var(--good-mark); color: #fff; }
.loop-step.ready .loop-tile { background: var(--accent); color: #fff; }
.loop-title { font-weight: 600; font-size: 14px; }
.loop-state { margin-top: auto; padding-top: 6px; }
@media (max-width: 960px) {
  .loop { grid-template-columns: 1fr; gap: 0; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
  .loop-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; box-shadow: none; border-radius: 0; padding: 10px 14px; }
  .loop-step + .loop-step { border-top: 1px solid var(--hairline); }
  .loop-tile { grid-row: 1 / span 2; margin: 0; }
  .loop-state { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; }
  .loop-step > .muted { grid-column: 2; }
}

/* ---------- Grouped lists ---------- */
.list { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.list-row { display: flex !important; align-items: center; gap: 12px; width: 100%; padding: 11px 14px !important; min-height: 56px !important; position: relative; }
button.list-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent) !important; }
.list > * + *::before, .sheet-list > li + li::before { content: ""; position: absolute; top: 0; right: 0; left: 58px; height: 1px; background: var(--hairline); }
.list > * { position: relative; }
.sheet-list > li + li::before { left: 14px; }
.list-row.static { padding: 10px 14px !important; }
.tile { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); }
.tile.ai { background: var(--accent); color: #fff; }
.tile.on { background: var(--good-mark); color: #fff; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-title { font-weight: 500; font-size: 15px; }
.row-side { display: inline-flex; flex: none; align-items: center; gap: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-side b { color: var(--text); font-weight: 600; }
.meter { display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 2px; background: var(--series-1); }
.history-row { align-items: flex-start; }
pre.log { white-space: pre-wrap; overflow-wrap: anywhere; font: 11.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; max-height: 260px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 10px; margin: 6px 0 0; }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* ---------- Group titles ---------- */
.group { margin-top: 26px; scroll-margin-top: 70px; }
.group-title { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin: 0 0 7px 14px; }
.group-note { margin: 7px 14px 0; }

/* ---------- Sheet ---------- */
dialog { color: var(--text); border: 0; padding: 0; }
.sheet {
  width: min(600px, 100vw); max-width: none; max-height: min(86dvh, 760px);
  margin: auto auto 0; background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-high); overflow: auto;
}
@media (min-width: 821px) { .sheet { margin: auto; border-radius: 26px; } }
.sheet[open] { animation: rise 0.42s var(--spring); }
.sheet::backdrop, .palette::backdrop { background: rgb(0 0 0 / 0.35); backdrop-filter: blur(3px); animation: fade 0.25s ease; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-body { padding: 22px; display: grid; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head p { margin-top: 4px; font-size: 14px; }
.callout { padding: 11px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.callout.ai { background: var(--tint); }
.callout.good { background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good); }
.callout.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.help a { font-weight: 500; }
.howto { margin: 0; padding-left: 18px; display: grid; gap: 5px; }

/* ---------- Command palette ---------- */
.palette {
  width: min(560px, calc(100vw - 24px)); max-width: none; margin: 14vh auto auto; padding: 0; border-radius: 18px; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-high);
}
.palette[open] { animation: pop 0.26s var(--spring); }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--muted); border-bottom: 1px solid var(--hairline); }
.palette-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: var(--text); }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow: auto; }
.palette-item { width: 100%; align-items: center; gap: 10px; padding: 8px 10px !important; border-radius: 9px !important; }
.palette-item span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item.active { background: var(--accent) !important; color: #fff; }
.palette-hint { font-size: 12px; opacity: 0.65; }
.palette-empty { padding: 18px; text-align: center; color: var(--muted); }

/* ---------- Fixes ---------- */
.change-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.change-stack { display: grid; gap: 12px; }
.change { display: flex; flex-direction: column; gap: 14px; }
.change-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.compare { display: grid; gap: 12px; justify-items: start; }
.serp { margin: 0; width: 100%; padding: 14px; border-radius: 14px; background: var(--surface-2); min-height: 158px; animation: fade 0.25s ease; }
.serp-url { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.serp-title { font-size: 18px; line-height: 1.28; color: var(--accent); margin: 3px 0 4px; letter-spacing: -0.015em; }
.serp-desc { font-size: 13px; color: var(--muted); }
.serp figcaption { font-size: 12px; font-weight: 500; margin-top: 8px; }
.segmented { display: inline-flex; padding: 2px; border-radius: 9px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.segmented button { padding: 4px 16px; min-height: 28px; font-size: 13px; background: transparent; color: var(--text); border-radius: 7px; }
.segmented button:hover { background: transparent; }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.16); }

/* ---------- Search data ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.stat { padding: 16px 18px; }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.chart { margin-top: 12px; display: grid; gap: 12px; }
.chart-plot { position: relative; min-width: 0; overflow: hidden; }
.chart-plot svg { display: block; touch-action: pan-y; }
.chart-grid { stroke: var(--hairline); stroke-width: 1; }
.axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.series-line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.series-line.sample { stroke: var(--muted); stroke-dasharray: 5 5; opacity: 0.6; }
.series-area { fill: var(--series-1); opacity: 0.1; }
.series-dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.crosshair { stroke: var(--muted); stroke-width: 1; }
.tooltip { position: absolute; transform: translate(-50%, -100%); padding: 7px 11px; border-radius: 10px; font-size: 13px; background: var(--surface); box-shadow: 0 6px 20px rgb(0 0 0 / 0.2); pointer-events: none; white-space: nowrap; }
.table-scroll { max-height: 260px; overflow: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--hairline); }
th { color: var(--muted); font-weight: 500; }
.locked-card { display: grid; gap: 20px; grid-template-columns: 1fr minmax(180px, 300px); align-items: center; }
.locked-card p { margin: 6px 0 14px; }
.locked-sample { margin: 0; text-align: right; }
@media (max-width: 640px) { .locked-card { grid-template-columns: 1fr; } }

/* ---------- Dashboard ---------- */
.setup { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 11%, var(--surface)), var(--surface) 70%); }
.setup-text { flex: 1; min-width: 200px; }
.setup .eyebrow { color: var(--accent); }
.setup p { margin-top: 3px; }
.site-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.site-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; color: inherit; transition: transform 0.25s var(--spring), box-shadow 0.25s; }
.site-card > .min0 { flex: 1; }
.site-card > .icon { color: var(--muted); }
.site-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow), 0 12px 28px rgb(0 0 0 / 0.08); }
.site-card-line { margin-top: 5px; }
.website-workspace { display: grid; gap: 26px; }
.website-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.website-section-head h2 { margin: 0; font-size: 20px; }
.website-google-account { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.website-google-account strong { display: flex; align-items: center; gap: 8px; }
.website-google-account p { margin: 5px 0 0; overflow-wrap: anywhere; }
.website-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.website-card-main .ring { flex-shrink: 0; }
.website-card-main h3 { margin: 0; font-size: 16px; }
.website-card-main:hover { box-shadow: none; transform: none; background: color-mix(in srgb, var(--accent) 4%, transparent); }
.website-google { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--hairline); display: grid; gap: 8px; }
.website-google p { margin: 0; }
.website-google-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.website-google-row form { margin: 0; }
.website-google-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.website-google-state.on { color: var(--good, var(--accent)); }
.website-google-options { font-size: 13px; }
.website-google-options summary { cursor: pointer; color: var(--muted); }
.website-google-options[open] summary { margin-bottom: 12px; }
.website-google-form { gap: 12px; min-width: 0; }
.website-google-form label { gap: 5px; }
.website-google-form select { width: 100%; min-width: 0; font-size: 13px; }
.website-google-form button { align-self: flex-start; }
.website-discovered { padding: 18px; gap: 18px; }
.website-discovered-head { display: flex; align-items: center; gap: 10px; }
.website-discovered-head h3 { margin: 0; font-size: 16px; }

/* ---------- Forms ---------- */
.form { display: block; }
.form-row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 14px; font-size: 15px; position: relative; }
.form .list > * + *::before { left: 14px; }
.form-row > span { flex: none; max-width: 55%; }
.form-row input:not([type="checkbox"]), .form-row select {
  flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; font: inherit; color: var(--muted); text-align: right; padding: 6px 0;
}
.form-row input:focus { color: var(--text); }
.form-row select { text-align: end; cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; margin-left: auto; width: 46px; height: 28px; flex: none; border-radius: 99px; background: color-mix(in srgb, var(--text) 18%, transparent); position: relative; cursor: pointer; transition: background-color 0.25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.3s var(--spring); }
.switch:checked { background: var(--good-mark); }
.switch:checked::after { transform: translateX(18px); }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.choice { display: grid; gap: 3px; align-content: start; padding: 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; outline: 2px solid transparent; transition: outline-color 0.15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { outline-color: var(--accent); }
.choice:has(input:focus-visible) { outline-color: var(--accent); outline-offset: 2px; }
.disclosure { margin-top: 26px; }
.disclosure > summary { cursor: pointer; color: var(--accent); font-size: 15px; font-weight: 500; padding-left: 14px; }
.area-label { display: block; margin: 14px 0 6px 14px; }
textarea.field, input.field { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 0; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); outline: 0; }
textarea.field { min-height: 110px; font: 12.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; resize: vertical; }
input.field:focus, textarea.field:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.form-actions { display: flex; justify-content: flex-end; margin-top: 22px; }

/* ---------- Auth & landing ---------- */
.auth { min-height: 100dvh; max-width: 372px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; }
.auth h1 { font-size: 28px; margin-top: 8px; }
.auth form { width: 100%; margin-top: 10px; }
.auth .list input { display: block; width: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--text); padding: 14px; }
.auth .list input + input { border-top: 1px solid var(--hairline); }
.auth .list::before { display: none; }
.auth .alert { width: 100%; margin: 4px 0 0; }
.landing { max-width: 760px; margin: 0 auto; padding: 72px 16px 80px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.landing h1 { font-size: clamp(40px, 8vw, 64px); line-height: 1.05; letter-spacing: -0.035em; margin-top: 6px; }
.landing-sub { font-size: clamp(18px, 3vw, 22px); line-height: 1.35; color: var(--muted); max-width: 560px; }
.landing-demo { width: 100%; max-width: 560px; margin-top: 30px; text-align: left; }
.landing-demo .eyebrow { margin-bottom: 12px; color: var(--accent); }
.landing-points { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 22px; width: 100%; padding: 0; margin: 36px 0 0; }
.landing-points li { display: grid; justify-items: center; align-content: start; gap: 4px; }
.landing-points .icon { color: var(--accent); margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .spinner { animation-duration: 1.6s !important; }
}

/* ---------- Site tabs ---------- */
.tabs { display: inline-flex; margin: -6px 0 20px; }
.tabs a { padding: 5px 18px; font-size: 14px; color: var(--text); border-radius: 7px; }
.tabs a:hover { text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.16); font-weight: 500; }

/* ---------- Research ---------- */
.source-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.source { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); min-width: 0; }
.source .row-title { font-size: 14px; }
.explorer-tools { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.explorer-search { display: flex; flex: 1 1 200px; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); min-width: 0; }
.explorer-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.switch.small-switch { width: 34px; height: 21px; margin: 0; }
.switch.small-switch::after { width: 17px; height: 17px; }
.switch.small-switch:checked::after { transform: translateX(13px); }
.explorer-count { margin: 12px 0 -14px 14px; }
.explorer .group { margin-top: 22px; }
.explorer h3.group-title { line-height: 1.3; }
.keyword-row { min-height: 50px !important; }
.keyword-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions { display: inline-flex; flex: none; align-items: center; gap: 8px; }
.row-actions form, .keyword-row form { margin: 0; }
.more-link { color: var(--accent) !important; margin: 8px 0 0 14px; }
.table-card { padding: 6px 12px; }
.table-scroll.tall { max-height: 460px; margin: 0; }
.research-note { margin: 22px 14px 0; }
.source-name { display: block; line-height: 1.25; }

/* ==========================================================================
   TengrX identity: a star chart. Ink on paper by day, starlight at night.
   Surfaces are drawn, not floated: hairlines, survey ticks, dials.
   ========================================================================== */
:root {
  --bg: #f3f2ee;
  --surface: #fbfaf7;
  --surface-2: #f0efe9;
  --hairline: rgb(28 26 20 / 0.13);
  --tick: rgb(28 26 20 / 0.38);
  --ink: #15171f;
  --on-ink: #fbfaf7;
  --accent: #3345c9;
  --accent-hover: #2a3ab0;
  --tint: rgb(51 69 201 / 0.09);
  --series-1: #2a78d6;
  --gold: #a87400;
  --star: #e8b23e;
  --shadow: none;
  --r-lg: 16px;
  --r-md: 13px;
}
:root[data-theme="dark"] {
  --bg: #090a12;
  --surface: #11131d;
  --surface-2: #1a1d2b;
  --hairline: rgb(226 230 255 / 0.13);
  --tick: rgb(226 230 255 / 0.42);
  --ink: #eef0ff;
  --on-ink: #0b0d18;
  --text: #eef0fb;
  --muted: #a4a8bd;
  --accent: #93a2ff;
  --accent-hover: #aab6ff;
  --tint: rgb(147 162 255 / 0.13);
  --series-1: #3987e5;
  --gold: #ffd66b;
  --star: #ffd66b;
  --shadow: none;
}

  :root[data-theme="dark"]:not([data-theme="light"]) {
    --bg: #090a12;
    --surface: #11131d;
    --surface-2: #1a1d2b;
    --hairline: rgb(226 230 255 / 0.13);
    --tick: rgb(226 230 255 / 0.42);
    --ink: #eef0ff;
    --on-ink: #0b0d18;
    --text: #eef0fb;
    --muted: #a4a8bd;
    --accent: #93a2ff;
    --accent-hover: #aab6ff;
    --tint: rgb(147 162 255 / 0.13);
    --series-1: #3987e5;
    --gold: #ffd66b;
    --star: #ffd66b;
    --shadow: none;
  }

body {
  background-image:
    radial-gradient(circle at 12% 18%, var(--tick) 0.6px, transparent 1px),
    radial-gradient(circle at 68% 42%, var(--tick) 0.5px, transparent 1px),
    radial-gradient(circle at 34% 78%, var(--tick) 0.5px, transparent 1px),
    radial-gradient(circle at 88% 88%, var(--tick) 0.7px, transparent 1.1px);
  background-size: 310px 310px, 430px 430px, 270px 270px, 520px 520px;
  background-attachment: fixed;
}

/* Survey-tick card: two opposite corner marks instead of a drop shadow. */
.card, .list, .loop-step, .source, .choice, .facts, textarea.field, input.field {
  border: 1px solid var(--hairline);
  box-shadow: none;
}
.card {
  border-radius: var(--r-lg);
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-size: 11px 1px, 1px 11px, 11px 1px, 1px 11px;
  background-position: 9px 9px, 9px 9px, calc(100% - 9px) calc(100% - 9px), calc(100% - 9px) calc(100% - 9px);
}
.upnext, .setup { background-color: var(--surface); }
.upnext::before, .setup::before { content: none; }
.upnext .eyebrow, .setup .eyebrow { color: var(--gold); }
.eyebrow { letter-spacing: 0.01em; }

/* Ink buttons: squared-off and quiet, so data keeps the colour. */
button, .button { border-radius: 10px; background: var(--ink); color: var(--on-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14); }
button:hover, .button:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
button.ghost, .button.ghost { box-shadow: inset 0 0 0 1px var(--hairline); background: transparent; }
button.ghost:hover, .button.ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
button.danger { box-shadow: none; }
button.plain, .icon-btn, .segmented button { box-shadow: none; }
.icon-btn { border-radius: 8px; }
.segmented { border-radius: 10px; }
.segmented button[aria-pressed="true"], .tabs a[aria-current="page"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.segmented button[aria-pressed="true"]:hover { background: var(--ink); }
.small-btn { padding: 5px 13px; min-height: 30px; font-size: 13px; white-space: nowrap; }

/* Tiles become printed icons rather than coloured squares. */
.tile, .loop-tile { background: transparent !important; color: var(--muted); border: 1px solid var(--hairline); border-radius: 9px; }
.tile.ai, .loop-step.ready .loop-tile { color: var(--accent); border-color: currentColor; }
.tile.on, .loop-step.done .loop-tile { color: var(--good); border-color: currentColor; }
.side-link .icon { color: var(--text); }
.pill { border-radius: 7px; }
.meter { height: 3px; border-radius: 0; }
.meter span { border-radius: 0; }

/* Dial */
.tick { stroke: var(--hairline); stroke-linecap: round; }
.tick.on { stroke: var(--good-mark); }
.ring-mid { font-size: 26px !important; }

/* Favicons */
.site-icon { display: inline-grid; place-items: center; flex: none; border-radius: 22%; object-fit: cover; background: #fff; box-shadow: 0 0 0 1px var(--hairline); }
.site-icon.monogram { background: var(--ink); color: var(--on-ink); font-weight: 650; }
.site-name, .site-title { display: flex; align-items: center; gap: 9px; min-width: 0; }

/* Sky map */
.sky-panel { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); border-radius: var(--r-lg); overflow: hidden; color: #eef0ff; background: radial-gradient(120% 130% at 32% 40%, #1b2257 0%, #0c0f28 52%, #070815 100%); }
.skymap { margin: 0; min-width: 0; padding: 8px; }
.skymap svg { display: block; width: 100%; height: auto; }
.sky-orbit { fill: none; stroke: rgb(255 255 255 / 0.16); stroke-dasharray: 2 6; }
.sky-beam { stroke: rgb(255 255 255 / 0.1); }
.sky-beam.confirmed { stroke: rgb(255 214 107 / 0.65); }
.sky-beam.reachable { stroke: rgb(147 162 255 / 0.4); }
.sky-beam.blocked { stroke: rgb(255 120 120 / 0.5); stroke-dasharray: 3 5; }
.sky-letter { font: 700 22px -apple-system, sans-serif; fill: #0b0e22; }
.sky-dot { fill: #0c0f28; stroke: rgb(255 255 255 / 0.55); stroke-width: 1.500; }
.sky-star.confirmed .sky-dot { fill: #ffd66b; stroke: #ffd66b; }
.sky-star.reachable .sky-dot { fill: #aab6ff; stroke: #aab6ff; }
.sky-star.check .sky-dot { stroke: #ffb340; }
.sky-star.blocked .sky-dot { stroke: #ff8a80; }
.sky-glow { fill: rgb(170 182 255 / 0.2); }
.sky-star.confirmed .sky-glow { fill: rgb(255 214 107 / 0.26); }
.sky-mark { font: 700 12px -apple-system, sans-serif; fill: #fff; }
.sky-star.confirmed .sky-mark { fill: #0b0e22; }
.sky-label { font: 500 15px -apple-system, sans-serif; fill: #eef0ff; }
.sky-side { display: flex; flex-direction: column; gap: 18px; justify-content: center; padding: 22px; border-left: 1px solid rgb(255 255 255 / 0.1); }
.sky-stat { display: flex; align-items: center; gap: 14px; }
.sky-stat strong { font-size: 15px; display: block; }
.sky-stat p { margin-top: 3px; font-size: 13px; color: #b6bbdc; }
.sky-panel .ring-center { color: #b6bbdc; }
.sky-panel .ring-center b { color: #fff; }
.sky-panel .tick { stroke: rgb(255 255 255 / 0.16); }
.sky-panel .tick.on { stroke: #ffd66b; }
.sky-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.sky-legend li { display: grid; grid-template-columns: 10px 76px 1fr; gap: 8px; align-items: center; }
.sky-legend b { font-weight: 550; }
.sky-legend span:last-child { color: #b6bbdc; }
.sky-pip { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.55); }
.sky-pip.confirmed { background: #ffd66b; border-color: #ffd66b; }
.sky-pip.reachable { background: #aab6ff; border-color: #aab6ff; }
.sky-pip.check { border-color: #ffb340; }
.sky-pip.blocked { border-color: #ff8a80; }
.sky-caption { margin: 8px 4px 0; }
@media (max-width: 900px) { .sky-panel { grid-template-columns: 1fr; } .sky-side { border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.1); } }

/* Issues: a ruled worklist, not a pile of cards */
.issue-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.issue { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 15px 4px 15px 16px; border-bottom: 1px solid var(--hairline); }
.issue-rail { position: absolute; left: 0; top: 15px; bottom: 15px; width: 3px; background: var(--hairline); }
.issue.bad .issue-rail { background: var(--bad); }
.issue.warn .issue-rail { background: var(--warn); }
.issue.ai .issue-rail { background: var(--accent); }
.issue-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.issue-main strong { font-size: 15.5px; font-weight: 600; letter-spacing: -0.012em; }
.issue-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.status.ai { color: var(--accent); }
.issue-action { display: flex; flex: none; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.issue-action form { margin: 0; }
@media (max-width: 640px) { .issue { flex-direction: column; gap: 10px; } .issue-action { justify-content: flex-start; } }
.snippet { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-top: 8px; padding: 9px 10px; border-radius: 9px; background: var(--surface-2); }
.snippet pre { margin: 0; font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }

/* Fact sheets */
.two-col { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
.facts { list-style: none; margin: 0; padding: 4px 16px; }
.fact { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.fact + .fact { border-top: 1px solid var(--hairline); }
.fact-icon { color: var(--muted); flex: none; }
.fact-title { font-weight: 500; font-size: 14px; display: block; }
.fact-value { flex: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.fact.answer { align-items: flex-start; }
.fact.answer summary { cursor: pointer; display: grid; gap: 2px; list-style: none; }
.fact.answer summary::-webkit-details-marker { display: none; }
.answer-text { margin: 8px 0 6px; }
.section-head.minor { margin: 18px 4px 8px; align-items: center; }
.section-head.minor h3 { margin: 0; }
.section-head.minor form { margin: 0; }
.state-mark { flex: none; width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 1px solid var(--hairline); border-radius: 50%; color: var(--muted); }
.state-mark.good { color: var(--good); border-color: currentColor; }
.state-mark.bad { color: var(--bad); border-color: currentColor; }
.state-mark.warn { color: var(--warn); border-color: currentColor; }
.page-row { min-height: 52px !important; }
.page-list { margin-top: 18px; }

/* Refinements */
:root { --dust: rgb(28 26 20 / 0.1); }
:root[data-theme="dark"] { --dust: rgb(226 230 255 / 0.32); }
 :root[data-theme="dark"]:not([data-theme="light"]) { --dust: rgb(226 230 255 / 0.32); } 
body {
  background-image:
    radial-gradient(circle at 12% 18%, var(--dust) 0.6px, transparent 1px),
    radial-gradient(circle at 68% 42%, var(--dust) 0.5px, transparent 1px),
    radial-gradient(circle at 34% 78%, var(--dust) 0.5px, transparent 1px),
    radial-gradient(circle at 88% 88%, var(--dust) 0.7px, transparent 1.1px);
}
.card { background-position: 5px 5px, 5px 5px, calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) calc(100% - 5px); background-size: 9px 1px, 1px 9px, 9px 1px, 1px 9px; }
.alert { overflow-wrap: anywhere; }
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; white-space: nowrap; }
@media (max-width: 480px) { .tabs a { padding: 5px 12px; } }

/* Guides */
.guide { max-width: 720px; margin: 0 auto; padding: 32px 16px 80px; }
.guide-back { display: inline-block; margin-bottom: 20px; }
.guide header { display: grid; gap: 10px; margin-bottom: 22px; }
.guide p { margin: 8px 0; }
.guide-note, .guide-warn { margin: 14px 0; }
.guide-warn { background: color-mix(in srgb, var(--warn) 13%, transparent); }
.guide-steps { list-style: none; counter-reset: step; margin: 30px 0 0; padding: 0; display: grid; gap: 40px; }
.guide-steps > li { counter-increment: step; position: relative; padding-left: 44px; min-width: 0; }
.guide-steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hairline); font-weight: 650; font-size: 14px; }
.guide-steps ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }
.guide-shot { margin: 14px 0; }
.guide-shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--hairline); }
.guide-shot figcaption { margin-top: 6px; }
.guide-more { margin-top: 10px; padding: 10px 14px; border: 1px solid var(--hairline); border-radius: 12px; }
.guide-more summary { cursor: pointer; font-weight: 500; }
.guide-faq { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.guide-faq dt { font-weight: 600; margin-top: 14px; }
.guide-faq dd { margin: 3px 0 0; color: var(--muted); }
.howto-link { list-style: none; margin-left: -18px; font-weight: 550; }
@media (max-width: 520px) { .guide-steps > li { padding-left: 0; padding-top: 38px; } }
.issue-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.issue-links a { display: inline-flex; align-items: center; gap: 4px; }

/* Connections */
.plogo { display: inline-grid; place-items: center; flex: none; border-radius: 15px; background: radial-gradient(120% 120% at 20% 10%, color-mix(in srgb, var(--plogo) 24%, var(--surface)), color-mix(in srgb, var(--plogo) 9%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--plogo) 30%, transparent); }
.plogo b { font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.power-panel { display: grid; gap: 16px; grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 18px 22px; border-radius: var(--r-lg); color: #eef0ff; background: radial-gradient(120% 180% at 12% 0%, #1b2257 0%, #0c0f28 60%, #070815 100%); }
.power-head { display: grid; font-size: 13px; color: #b6bbdc; padding-right: 20px; border-right: 1px solid rgb(255 255 255 / 0.12); }
.power-count { font-size: 40px; font-weight: 700; line-height: 1; color: #fff; letter-spacing: -0.03em; }
.power-count small { font-size: 18px; font-weight: 450; color: #b6bbdc; }
.power-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); }
.power { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; color: #d8dbf1; border: 1px solid rgb(255 255 255 / 0.1); }
.power:hover { text-decoration: none; border-color: rgb(255 255 255 / 0.3); }
.power.on { border-color: rgb(255 214 107 / 0.5); background: rgb(255 214 107 / 0.07); color: #fff; }
.power b { font-size: 13.5px; font-weight: 550; }
.power-logos { display: flex; gap: 4px; margin-bottom: 4px; }
.power-logos .plogo { border-radius: 9px; background: #fff; }
.power:not(.on) .power-logos .plogo { opacity: 0.55; }
.power-state { font-size: 12px; color: #b6bbdc; }
.power.on .power-state { color: #ffd66b; }
.connect-group { margin-top: 34px; scroll-margin-top: 20px; }
.connect-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.connect-head .eyebrow { margin: 0 0 2px; color: var(--gold); }
.connect-head h2 { margin: 0; }
.connect-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
button.connect-card { display: flex !important; flex-direction: column; gap: 6px; width: 100%; min-height: 248px; padding: 18px !important; text-align: left; border-radius: var(--r-lg) !important; background: var(--surface) !important; border: 1px solid var(--hairline); transition: transform 0.25s var(--spring), border-color 0.2s; }
button.connect-card:hover { transform: translateY(-2px); border-color: var(--tick); background: var(--surface) !important; }
button.connect-card.on { border-color: color-mix(in srgb, var(--good) 45%, var(--hairline)); }
.connect-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.connect-status { font-size: 12px; color: var(--muted); }
.connect-status.on { color: var(--good); font-weight: 550; }
.connect-name { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.connect-purpose { font-size: 13.5px; line-height: 1.42; }
.connect-gives { display: grid; gap: 3px; margin-top: 4px; font-size: 12.5px; }
.connect-gives span { display: flex; align-items: center; gap: 5px; }
.connect-gives .icon { color: var(--good); }
.connect-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.connect-cta { display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; font-weight: 550; color: var(--accent); }
@media (max-width: 640px) { .power-panel { grid-template-columns: 1fr; } .power-head { border-right: 0; padding-right: 0; } }

/* Overview */
.next { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border-radius: var(--r-lg); overflow: hidden; color: #eef0ff; background: radial-gradient(130% 180% at 8% 0%, #1b2257 0%, #0c0f28 62%, #070815 100%); }
.next.bad { background: radial-gradient(130% 180% at 8% 0%, #4a1c2b 0%, #1b0f24 62%, #0c0815 100%); }
.next-main { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 24px; }
.next .eyebrow { color: #ffd66b; }
.next-main h2 { font-size: 26px; letter-spacing: -0.025em; color: #fff; margin: 0; }
.next-main p { color: #c6cae4; margin: 0 0 8px; max-width: 54ch; }
.next-main form { margin: 0; }
.next-main .button, .next-main button { background: #fff; color: #0b0e22; box-shadow: none; }
.next-main .button:hover, .next-main button:hover { background: #e7e9fb; }
.next-more { padding: 24px; border-left: 1px solid rgb(255 255 255 / 0.1); }
.next-more ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.next-more a, .next-plain { display: flex; align-items: center; gap: 9px; padding: 8px 0; color: #eef0ff; font-size: 14px; line-height: 1.3; }
.next-more li + li { border-top: 1px solid rgb(255 255 255 / 0.09); }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } .next-more { border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.1); } }
.kpis { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 15px 16px 13px; color: inherit; min-height: 118px; transition: border-color 0.2s; }
.kpi:hover { text-decoration: none; border-color: var(--tick); }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-value small { font-size: 16px; font-weight: 450; color: var(--muted); letter-spacing: -0.01em; }
.kpi-spark { width: 100%; height: 28px; margin-top: auto; display: block; }
.kpi-spark polyline { fill: none; stroke: var(--series-1); stroke-width: 1.5; stroke-linejoin: round; }
.kpi > .muted:last-child { margin-top: auto; }
.overview-cols .section { margin-top: 30px; }
.overview-cols .list-row { min-height: 54px !important; }
.visitors .chart { margin-top: 0; }
.visitors { scroll-margin-top: 20px; }
.stats-row { display: grid; gap: 10px; margin-top: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stats-row > div { display: grid; padding: 12px 16px; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.stats-row b { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.setup-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.setup-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.setup-strip li > * { display: inline-flex; align-items: center; gap: 6px; }
.setup-strip .state-mark { width: 18px; height: 18px; font-size: 11px; }
.setup-note { margin-top: 8px; overflow-wrap: anywhere; }
button.connect-card { align-items: stretch; justify-content: flex-start; }
@media (max-width: 640px) { .power-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Research */
.section.first { margin-top: 2px; }
.section-note { margin: -6px 0 12px; }
.warn-callout { background: color-mix(in srgb, var(--warn) 12%, transparent); margin-bottom: 14px; }
.research-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
.research-main { min-width: 0; }
.research-side { display: grid; gap: 12px; position: sticky; top: 16px; min-width: 0; }
.side-card { padding: 16px 16px 14px; }
.side-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.side-card p { margin: 0; }
.queue, .side-list, .source-list { list-style: none; margin: 0; padding: 0; display: grid; }
.queue { counter-reset: q; }
.queue li, .side-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 13.5px; }
.queue li:first-child, .side-list li:first-child { border-top: 0; }
.queue form, .side-list form { margin: 0; }
.queue .icon-btn, .side-list .icon-btn { width: 26px; height: 26px; flex: none; }
.queue-limit { margin-top: 8px !important; padding-top: 8px; border-top: 1px solid var(--hairline); }
.side-list b { display: block; font-weight: 500; font-size: 13.5px; }
.source-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.source-list li > .min0 { flex: 1; }
.source-list { margin-bottom: 8px; }
.source-icon { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--hairline); border-radius: 7px; color: var(--muted); }
.pick-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.pick { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; padding: 15px; min-height: 142px; }
.pick .eyebrow { margin: 0; color: var(--gold); }
.pick strong { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.pick form { margin-top: auto; padding-top: 8px; }
.topic-rail { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
button.topic { min-height: 30px; padding: 4px 11px; font-size: 13px; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); border-radius: 99px; }
button.topic span { color: var(--muted); font-size: 12px; margin-left: 2px; }
button.topic:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
button.topic[aria-pressed="true"], button.topic[aria-pressed="true"]:hover { background: var(--ink); color: var(--on-ink); }
button.topic[aria-pressed="true"] span { color: inherit; opacity: 0.7; }
.explorer-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 2px; }
.idea-list { margin-top: 0; }
@media (max-width: 980px) { .research-grid { grid-template-columns: 1fr; } .research-side { position: static; order: -1; } }

/* Settings */
.settings-layout { display: grid; gap: 28px; grid-template-columns: 158px minmax(0, 680px); align-items: start; }
.settings-nav { position: sticky; top: 16px; display: grid; gap: 1px; }
.settings-nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.settings-nav a:hover { color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--text) 5%, transparent); }
.settings-nav a[aria-current] { color: var(--text); font-weight: 550; background: color-mix(in srgb, var(--text) 7%, transparent); }
.settings-body { min-width: 0; }
.settings-new { max-width: 680px; margin: 0 auto; }
.settings-section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--hairline); scroll-margin-top: 16px; }
.settings-section > header { margin-bottom: 12px; }
.settings-section > header h2 { margin: 0 0 2px; }
.form-row { padding: 8px 14px; min-height: 48px; }
.form-label { display: grid; flex: none; max-width: 55%; }
.form-label small { font-size: 12px; font-weight: 400; }
.form-row select { width: auto; margin-left: auto; flex: 0 1 auto; }
.prompt-heading { margin: 22px 0 2px; font-size: 16px; font-weight: 600; }
.prompt-stack { display: grid; gap: 12px; margin-top: 12px; }
.prompt-field { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface); }
.prompt-field > label { display: grid; font-size: 14px; }
.prompt-templates { display: flex; flex-wrap: wrap; gap: 6px; }
textarea.field.prompt-text { min-height: 84px; font: inherit; font-size: 14px; background: var(--bg); border: 1px solid var(--hairline); }
textarea.field.prompt-text.mono { font: 12.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; }
.prompt-test { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.prompt-test .alert { width: 100%; margin: 0; }
.prompt-result { width: 100%; display: grid; gap: 6px; margin-top: 4px; }
.prompt-result .serp { min-height: 0; }
.save-bar { position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 8px; padding: 9px 10px 9px 16px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.2s, transform 0.3s var(--spring), visibility 0.2s; }
.save-bar .small { margin-right: auto; }
.save-bar.show { opacity: 1; visibility: visible; transform: none; }
.danger-zone { border-bottom: 0; margin-bottom: 0; }
@media (max-width: 820px) {
  .settings-layout { grid-template-columns: 1fr; gap: 14px; }
  .settings-nav { display: flex; overflow-x: auto; top: 58px; z-index: 6; padding: 6px; margin: 0 -4px; background: var(--bg); scrollbar-width: none; }
  .settings-nav a { flex: none; }
  .save-bar { bottom: 74px; }
}
/* On small screens: queue first, then ideas, then the supporting panels. */
@media (max-width: 980px) {
  .research-grid { display: flex; flex-direction: column; }
  .research-side { display: contents; }
  .research-side > :first-child { order: -1; width: 100%; }
  .research-main { order: 0; width: 100%; }
  .research-side > :not(:first-child) { order: 1; width: 100%; }
}

/* One-click fixes */
.fix-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fix-action form, form.fix-action { margin: 0; }
.fix-safety { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.fix-safety li { display: flex; align-items: center; gap: 7px; }
.sheet-field { display: grid; gap: 5px; }
textarea.field.fix-note { min-height: 70px; font: inherit; font-size: 14px; }
.sheet-allow { color: var(--text); padding: 2px 0; }
.sheet-allow input { width: 17px; height: 17px; flex: none; }
.code-edit { display: grid; gap: 2px; border-radius: 10px; overflow: hidden; border: 1px solid var(--hairline); }
.code-edit-path { padding: 5px 10px; background: var(--surface-2); overflow-wrap: anywhere; }
.code-edit pre { margin: 0; padding: 7px 10px; font: 11.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.code-del { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.code-add { background: color-mix(in srgb, var(--good) 11%, transparent); }
.manual-steps { margin: 0; padding-left: 18px; }
.queue li > .min0 { flex: 1; }
button.queue-write { padding: 2px 10px; min-height: 26px; flex: none; }

/* Subdomains */
.subdomains { scroll-margin-top: 72px; }
.sub-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.sub-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.sub-card form { margin: 0; flex: none; }
.sub-main { display: grid; flex: 1; }
.sub-stats { margin-top: 2px; }
.side-link.child { padding-left: 22px; font-size: 13.5px; }
.child-of { margin: -8px 0 14px; }

/* Chat */
.chat { max-width: 760px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; min-height: calc(100dvh - 96px); }
.chat-new { justify-content: center; gap: 18px; padding-bottom: 8vh; }
.chat-hello { display: grid; justify-items: center; gap: 14px; text-align: center; }
.chat-hello h1 { margin: 0; font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -0.025em; }
.chat-hello p { margin: 0; }
.chat-hello .ring { color: var(--text); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; }
.msg-user { align-self: flex-end; max-width: min(82%, 560px); background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 18px 18px 5px 18px; padding: 10px 15px; overflow-wrap: anywhere; }
.msg-step { display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; margin-block: -6px; }
.msg-step.error { color: var(--bad); }
.pulse-tick { width: 10px; height: 2px; flex: none; background: currentColor; animation: tick-pulse 1.1s ease-in-out infinite; }
@keyframes tick-pulse { 50% { transform: scaleX(0.3); opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .pulse-tick { animation: none; } }

.composer { padding: 12px 12px 10px 16px; display: grid; gap: 6px; }
.composer:focus-within { border-color: var(--text); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; padding: 4px 0; min-height: 30px; box-shadow: none; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.send-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; }
.send-btn:disabled { opacity: 0.3; }
.stop-mark { width: 12px; height: 12px; border-radius: 2px; background: currentColor; }
.content:has(.chat) { padding-bottom: 0; padding-top: 24px; }
.composer-dock { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 22px); padding: 22px 0 10px; }
.composer-note { text-align: center; margin: 6px 0 0; font-size: 12px; }
.chat-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
button.suggest { font-size: 13.5px; font-weight: 450; min-height: 34px; padding: 6px 13px; background: transparent; color: var(--muted); border: 1px solid var(--hairline); border-radius: 999px; }
button.suggest:hover { color: var(--text); border-color: var(--text); }

.model-picker { position: relative; min-width: 0; }
button.model-btn { display: inline-flex; align-items: center; gap: 7px; max-width: 240px; min-height: 34px; padding: 4px 10px 4px 5px; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 10px; font-size: 13.5px; font-weight: 500; }
button.model-btn:hover, button.model-btn[aria-expanded="true"] { background: var(--surface-2); }
.model-btn > svg { transform: rotate(90deg); flex: none; color: var(--muted); }
.model-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; width: min(300px, calc(100vw - 48px)); max-height: 340px; overflow-y: auto; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: 0 16px 44px rgb(0 0 0 / 0.28); }
.chat-new .model-menu { bottom: auto; top: calc(100% + 8px); }
.model-group-name { display: flex; align-items: center; gap: 7px; padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
button.model-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 34px; padding: 6px 10px; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; font-weight: 450; text-align: left; border: 0; }
button.model-item:hover, button.model-item.on { background: var(--surface-2); }
.model-add { display: block; padding: 8px 10px 4px; color: var(--muted); border-top: 1px solid var(--hairline); margin-top: 6px; }

.approval { padding: 14px 16px; display: grid; gap: 10px; }
.approval.pending { border-color: var(--text); }
.approval-title { display: flex; align-items: center; gap: 8px; }
.approval ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; color: var(--muted); }
.approval .row { gap: 8px; justify-content: flex-start; }
button.approve-btn { background: var(--text); color: var(--bg); }

.md { line-height: 1.62; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 0.8em; }
.md h1, .md h2, .md h3 { margin: 1.1em 0 0.45em; font-size: 1.08em; letter-spacing: -0.01em; }
.md ul, .md ol { margin: 0 0 0.8em; padding-left: 1.4em; }
.md li { margin-bottom: 0.3em; }
.md a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.md code { font: 0.88em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
.md pre { background: var(--surface-2); padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 0 0 0.9em; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 0.8em; padding-left: 12px; border-left: 2px solid var(--hairline); color: var(--muted); }
.md-table { overflow-x: auto; margin: 0 0 0.9em; }
.md table { border-collapse: collapse; font-size: 0.93em; font-variant-numeric: tabular-nums; }
.md th, .md td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.md th { font-weight: 600; }
.side-chats { display: grid; gap: 1px; min-height: 0; overflow-y: auto; margin-top: 14px; }
.side-chats .side-link { font-size: 13.5px; }
@media (max-width: 760px) {
  .chat { min-height: calc(100dvh - 170px); }
  .content:has(.chat) { padding-bottom: 72px; }
  .composer-dock { bottom: 72px; }
  .msg-user { max-width: 90%; }
}
.side-chat { position: relative; min-width: 0; }
.side-chat .side-link { padding-right: 30px; }
.side-chat form { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); margin: 0; opacity: 0; }
.side-chat button.icon-btn { width: 24px; height: 24px; min-height: 24px; }
.side-chat:hover form, .side-chat form:focus-within { opacity: 1; }

/* Settings */
.app-settings { display: grid; gap: 12px; margin-bottom: 30px; max-width: 680px; }
.app-settings h2 { margin: 0; }
.settings-facts { margin: 0; padding: 6px 20px; }
.settings-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.settings-facts > div:last-child { border-bottom: 0; }
.settings-facts dt { color: var(--muted); flex: none; }
.settings-facts dd { margin: 0; text-align: right; min-width: 0; }
.settings-facts .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upgrade-alert { margin-bottom: 0; }
.upgrade-wait { display: flex; align-items: flex-start; gap: 12px; }
.upgrade-wait .spinner { margin-top: 3px; color: var(--accent); }
.upgrade-wait p { margin-top: 3px; }
.upgrade-credit-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.upgrade-options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.upgrade-card { display: grid; gap: 14px; align-content: space-between; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hairline); }
.upgrade-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.upgrade-card-head h3 { margin: 0 0 3px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.upgrade-price { display: flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.upgrade-price s { font-size: 13.5px; }
.upgrade-price strong { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.upgrade-manual-key { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--hairline); }
.upgrade-manual-key code { flex: 1 1 200px; background: none; padding: 0; }

/* ---------- Desktop updates ---------- */
.app-update { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; gap: 10px; width: min(350px, calc(100vw - 24px)); padding: 13px 14px; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: 15px; box-shadow: 0 16px 44px rgb(0 0 0 / 0.3); animation: rise 0.42s var(--spring); }
.app-update-head { display: flex; align-items: flex-start; gap: 10px; }
.app-update-head .min0 { display: grid; flex: 1; gap: 1px; font-size: 12.5px; color: var(--muted); }
.app-update-head b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.app-update-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: linear-gradient(135deg, #5468ff, #8b5cf6); border-radius: 9px; }
.app-update-mark.bad { background: var(--bad); }
button.app-update-close { flex: none; display: grid; place-items: center; width: 24px; height: 24px; min-height: 0; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
button.app-update-close:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.app-update-notes { max-height: 150px; overflow: auto; margin: 0; padding: 9px 10px; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; background: color-mix(in srgb, var(--text) 5%, transparent); border-radius: 10px; }
.app-update-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
button.app-update-link { margin-right: auto; min-height: 0; padding: 2px 0; font: inherit; font-size: 12.5px; color: var(--accent); background: none; border: 0; box-shadow: none; cursor: pointer; }
button.app-update-link:hover { background: none; text-decoration: underline; }
button.app-update-go { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 13px; font: inherit; font-size: 13px; font-weight: 550; color: #fff; background: linear-gradient(135deg, #5468ff, #8b5cf6); border: 0; border-radius: 10px; box-shadow: none; cursor: pointer; }
button.app-update-go:hover { background: linear-gradient(135deg, #5468ff, #8b5cf6); filter: brightness(1.09); }
button.app-update-go:disabled { opacity: 0.65; cursor: default; }
.app-update-row { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
@media (max-width: 820px) { .app-update { right: 12px; bottom: 76px; } }

/* ---------- App Store optimization ---------- */
.content:has(.aso-page) { max-width: 1120px; padding: 18px 26px 56px; }
.content:has(.aso-page-full) { max-width: none; }
.aso-page { --aso-control: color-mix(in srgb, var(--text) 5.5%, var(--surface)); --aso-line: var(--hairline); --aso-amber: #e7a22a; --aso-brand: linear-gradient(135deg, #5468ff, #8b5cf6); --aso-warm: linear-gradient(135deg, #f7a62b, #f0762d); display: grid; gap: 14px; }
.aso-page :is(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.aso-flag { flex: none; display: inline-block; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgb(127 127 127 / 0.28); vertical-align: -2px; }
.aso-icon-empty { flex: none; display: block; width: 46px; height: 46px; border-radius: 22%; background: var(--aso-control); }
.aso-none { color: var(--muted); opacity: 0.8; font-size: 12.5px; }

/* Controls */
.aso-input { width: 100%; min-height: 36px; padding: 7px 11px; font: inherit; font-size: 13.5px; color: var(--text); background: var(--aso-control); border: 1px solid var(--aso-line); border-radius: 10px; outline: 0; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.aso-input::placeholder { color: var(--muted); }
.aso-input:hover { border-color: color-mix(in srgb, var(--text) 26%, transparent); }
.aso-page .aso-input:focus, .aso-popover .aso-input:focus, .aso-dialog .aso-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); background: var(--surface); }
textarea.aso-input { display: block; line-height: 1.5; resize: vertical; }
select.aso-input { appearance: none; padding-right: 30px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.500 6 7.500 9 4.500'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input[type="number"].aso-input { -moz-appearance: textfield; appearance: textfield; }
input[type="number"].aso-input::-webkit-inner-spin-button { display: none; }
.aso-btn, button.aso-btn, a.aso-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 550; white-space: nowrap; color: var(--text); background: var(--aso-control); border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--aso-line); cursor: pointer; transition: transform 0.12s var(--spring), filter 0.15s, background 0.15s; }
.aso-btn:hover, button.aso-btn:hover, a.aso-btn:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface)); text-decoration: none; }
.aso-btn:active { transform: scale(0.97); }
.aso-btn:disabled { opacity: 0.45; cursor: default; }
.aso-btn.small { min-height: 30px; padding: 4px 11px; }
.aso-btn.full { width: 100%; }
button.aso-btn.primary, a.aso-btn.primary { color: #fff; background: var(--aso-brand); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), 0 3px 12px rgb(84 104 255 / 0.3); }
button.aso-btn.primary:hover { background: var(--aso-brand); filter: brightness(1.09); }
button.aso-btn.warm { color: #fff; background: var(--aso-warm); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 3px 12px rgb(240 118 45 / 0.28); }
button.aso-btn.warm:hover { background: var(--aso-warm); filter: brightness(1.07); }
.aso-link-danger, button.aso-link-danger { padding: 2px 0; min-height: 0; font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; box-shadow: none; cursor: pointer; }
button.aso-link-danger:hover { color: var(--bad); background: none; text-decoration: underline; }
.aso-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.aso-tool, button.aso-tool, a.aso-tool { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; min-height: 0; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 9px; box-shadow: none; cursor: pointer; transition: background 0.15s, color 0.15s; }
.aso-tool:hover, button.aso-tool:hover { color: var(--text); background: var(--aso-control); }
.aso-tool.on, button.aso-tool.on { color: var(--accent); background: var(--tint); }
.aso-tool.small, button.aso-tool.small { width: 26px; height: 26px; border-radius: 7px; }
.aso-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--aso-control); box-shadow: inset 0 0 0 1px var(--aso-line); }
.aso-seg button { min-height: 28px; padding: 3px 11px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted); background: transparent; border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
.aso-seg button:hover { color: var(--text); background: transparent; }
.aso-seg button[aria-pressed="true"], .aso-seg button[aria-pressed="true"]:hover { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25), inset 0 0 0 1px var(--aso-line); }
.aso-search { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; min-height: 34px; padding: 5px 10px; color: var(--muted); background: var(--aso-control); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--aso-line); transition: box-shadow 0.15s; }
.aso-search:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--tint); }
.aso-search input { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0 !important; background: none; font: inherit; font-size: 13.5px; color: var(--text); }
.aso-search.large { min-height: 44px; padding: 8px 14px; border-radius: 13px; }
.aso-search.large input { font-size: 15px; }
.aso-check { appearance: none; flex: none; width: 16px; height: 16px; margin: 0; vertical-align: middle; background: var(--aso-control) center/11px no-repeat; border: 1px solid color-mix(in srgb, var(--text) 30%, transparent); border-radius: 5px; cursor: pointer; transition: background-color 0.12s, border-color 0.12s; }
.aso-check:hover { border-color: var(--accent); }
.aso-check:checked { border-color: transparent; background-color: #5468ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 12'%3E%3Cpath d='M2.500 6.500 5 9l4.500-5.500'/%3E%3C/svg%3E"); }

/* Popovers and menus */
.aso-popover { position: fixed; z-index: 60; --aso-amber: #e7a22a; max-height: min(84vh, 720px); overflow: auto; color: var(--text); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); border: 1px solid var(--aso-line, var(--hairline)); border-radius: 14px; box-shadow: 0 18px 50px rgb(0 0 0 / 0.38); animation: aso-pop 0.16s var(--spring); --aso-control: color-mix(in srgb, var(--text) 5.5%, var(--surface)); --aso-line: var(--hairline); --aso-brand: linear-gradient(135deg, #5468ff, #8b5cf6); }
@keyframes aso-pop { from { opacity: 0; transform: translateY(-4px) scale(0.985); } }
.aso-menu-list { display: grid; gap: 1px; padding: 5px; }
.aso-menu-list button, .aso-menu-list a { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-height: 32px; padding: 5px 9px; font: inherit; font-size: 13px; font-weight: 450; text-align: left; color: var(--text); background: none; border: 0; border-radius: 8px; box-shadow: none; cursor: pointer; }
.aso-menu-list button:hover:not(:disabled), .aso-menu-list a:hover { background: var(--tint); text-decoration: none; }
.aso-menu-list button:disabled { opacity: 0.45; cursor: default; }
.aso-menu-list button > .icon:last-child:not(:first-child) { margin-left: auto; color: var(--accent); }
.aso-menu-list .bad { color: var(--bad); }
.aso-filter-panel { display: grid; gap: 9px; padding: 12px; }
.aso-filter-title { font-size: 12px; font-weight: 600; color: var(--muted); }
.aso-filter-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: center; }

/* Filters panel */
.aso-tool-group { display: inline-flex; align-items: center; padding: 1px; background: var(--aso-control); border-radius: 11px; box-shadow: inset 0 0 0 1px var(--aso-line); }
.aso-tool-group .aso-tool { position: relative; }
.aso-tool-badge { position: absolute; top: 1px; right: 0; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; font-size: 10px; font-weight: 700; line-height: 1; color: #fff; background: #5468ff; border-radius: 99px; }
.aso-filters-panel { display: grid; padding: 14px 16px 12px; }
.aso-filters-panel h3 { margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.aso-source-filter { display: grid; gap: 6px; padding-bottom: 11px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--hairline); }
.aso-source-filter .aso-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.aso-range-row { display: grid; gap: 7px; padding: 11px 0 10px; border-bottom: 1px solid var(--hairline); }
.aso-range-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aso-range-head label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; cursor: pointer; }
.aso-range-head output { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.aso-range-row.on .aso-range-head output { color: var(--text); font-weight: 550; }
.aso-range { position: relative; height: 20px; }
.aso-range-track { position: absolute; top: 8px; left: 0; right: 0; height: 4px; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--text) 12%, transparent) var(--from), var(--range-color) var(--from), var(--range-color) var(--to), color-mix(in srgb, var(--text) 12%, transparent) var(--to)); --range-color: color-mix(in srgb, #5468ff 45%, transparent); }
.aso-range-row.on .aso-range-track { --range-color: #5468ff; }
.aso-range input { position: absolute; inset: 0; width: 100%; height: 20px; margin: 0; appearance: none; -webkit-appearance: none; background: none; pointer-events: none; outline: 0 !important; }
.aso-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; pointer-events: auto; cursor: grab; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(0 0 0 / 0.08); transition: transform 0.12s var(--spring); }
.aso-range input::-moz-range-thumb { width: 18px; height: 18px; pointer-events: auto; cursor: grab; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(0 0 0 / 0.08); }
.aso-range input::-webkit-slider-runnable-track { background: none; }
.aso-range input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.12); }
.aso-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, #5468ff 55%, transparent); }
.aso-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, #5468ff 55%, transparent); }
.aso-range-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.aso-range-extra { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; }
.aso-filters-foot { display: flex; justify-content: center; padding-top: 11px; }

/* Store picker */
.aso-store { display: inline-flex; flex: none; min-width: 0; }
button.aso-store-button { display: inline-flex; align-items: center; gap: 8px; max-width: 230px; min-height: 36px; padding: 5px 11px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--aso-control); border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--aso-line); cursor: pointer; }
button.aso-store-button:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface)); }
button.aso-store-button > .icon:last-child { flex: none; color: var(--muted); transform: rotate(90deg); }
.aso-store-search { position: sticky; top: 0; z-index: 1; display: flex; gap: 6px; padding: 9px; background: color-mix(in srgb, var(--surface) 96%, transparent); border-bottom: 1px solid var(--hairline); }
button.aso-icon-toggle { flex: none; width: 34px; min-height: 0; padding: 0; display: grid; place-items: center; color: var(--muted); background: var(--aso-control); border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--aso-line); cursor: pointer; }
button.aso-icon-toggle:hover { color: var(--text); background: var(--aso-control); }
button.aso-icon-toggle.on { color: var(--accent); background: var(--tint); }
.aso-store-list { margin: 0; padding: 5px; list-style: none; }
.aso-store-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 5px 9px; font: inherit; font-size: 13.5px; font-weight: 450; text-align: left; color: var(--text); background: none; border: 0; border-radius: 8px; box-shadow: none; cursor: pointer; }
.aso-store-list button:hover { background: var(--tint); }
.aso-store-list button[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 20%, transparent); font-weight: 550; }
.aso-store-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aso-store-count { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.aso-store-empty { padding: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* Header */
.aso-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.aso-head-app { display: flex; flex: 1 1 220px; align-items: center; gap: 10px; min-width: 0; }
.aso-head-app img { flex: none; border-radius: 22%; }
.aso-head h1 { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; }
.aso-head p { margin: 0; font-size: 12px; color: var(--muted); }
.aso-tabs { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--aso-control); box-shadow: inset 0 0 0 1px var(--aso-line); }
.aso-tabs a { padding: 5px 14px; font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 8px; }
.aso-tabs a:hover { color: var(--text); text-decoration: none; }
.aso-tabs a[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25), inset 0 0 0 1px var(--aso-line); }

/* Workspace toolbar */
.aso-workspace { display: grid; gap: 10px; min-width: 0; }
.aso-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.aso-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.aso-count b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.aso-views { display: flex; flex-wrap: wrap; gap: 2px; }
.aso-views button { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 10px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted); background: transparent; border: 0; border-radius: 8px; box-shadow: none; cursor: pointer; }
.aso-views button:hover { color: var(--text); background: var(--aso-control); }
.aso-views button[aria-pressed="true"], .aso-views button[aria-pressed="true"]:hover { color: var(--text); background: var(--tint); }
.aso-views button span { font-size: 11px; color: var(--muted); }
.aso-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.aso-actions .aso-btn { margin-left: 4px; }
.aso-table-search { flex: 0 1 210px; width: 210px; }
.aso-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
button.aso-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 2px 9px; font: inherit; font-size: 12px; font-weight: 500; color: var(--accent); background: var(--tint); border: 0; border-radius: 99px; box-shadow: none; cursor: pointer; }
button.aso-chip:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
button.aso-chip-clear { min-height: 0; padding: 2px 6px; font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; box-shadow: none; cursor: pointer; }
button.aso-chip-clear:hover { color: var(--text); background: none; }
.aso-progress-bar { position: relative; display: flex; align-items: center; gap: 9px; overflow: hidden; padding: 8px 12px; font-size: 12.5px; color: var(--muted); background: var(--aso-control); border-radius: 10px; }
.aso-progress-bar i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--aso-brand); transition: width 0.4s; }
.aso-summary { display: flex; align-items: center; gap: 5px; color: var(--good); }
.aso-bulk { position: sticky; top: 6px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 7px 5px 12px; font-size: 12.5px; color: #fff; background: var(--aso-brand); border-radius: 11px; box-shadow: 0 8px 24px rgb(84 104 255 / 0.32); }
.aso-bulk b { margin-right: 6px; font-weight: 600; }
.aso-bulk button { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 2px 9px; font: inherit; font-size: 12.5px; color: inherit; background: rgb(255 255 255 / 0.14); border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
.aso-bulk button:hover { background: rgb(255 255 255 / 0.26); }
.aso-bulk .aso-tag { color: #fff; background: rgb(0 0 0 / 0.2); }
.aso-bulk-clear { margin-left: auto; }

/* Keyword table */
.aso-table-wrap { overflow: auto; max-height: calc(100dvh - 176px); min-height: 220px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; }
.aso-table-wrap.short { max-height: 44vh; min-height: 0; }
.aso-table { width: 100%; min-width: 1010px; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.aso-table-wrap.short .aso-table, .aso-ratings .aso-table { min-width: 0; }
.aso-table thead th { position: sticky; top: 0; z-index: 2; padding: 8px 9px; font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.aso-table td { height: 37px; padding: 3px 9px; text-align: left; white-space: nowrap; border: 0; vertical-align: middle; }
.aso-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--text) 2.6%, transparent); }
.aso-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.aso-table tbody tr.is-checked td { background: color-mix(in srgb, #5468ff 20%, transparent); }
.aso-col-check { width: 30px; padding-right: 2px !important; }
.aso-col-star { width: 28px; padding: 0 !important; }
.aso-col-more { width: 32px; padding: 0 4px !important; }
.aso-table td.aso-col-more .aso-tool { opacity: 0; }
.aso-table tr:hover .aso-col-more .aso-tool, .aso-table .aso-col-more .aso-tool:focus-visible { opacity: 1; }
@media (hover: none) { .aso-table td.aso-col-more .aso-tool { opacity: 1; } }
.aso-th { display: inline-flex; align-items: center; gap: 3px; }
button.aso-sort { min-height: 0; padding: 2px 3px; font: inherit; font-weight: 500; color: inherit; background: none; border: 0; border-radius: 5px; box-shadow: none; white-space: nowrap; cursor: pointer; }
button.aso-sort:hover { color: var(--text); background: none; }
th[aria-sort="ascending"] button.aso-sort, th[aria-sort="descending"] button.aso-sort { color: var(--text); font-weight: 600; }
button.aso-filter-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; min-height: 0; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 6px; box-shadow: none; opacity: 0.55; cursor: pointer; }
button.aso-filter-btn:hover { opacity: 1; color: var(--text); background: var(--aso-control); }
button.aso-filter-btn.on { opacity: 1; color: #fff; background: #5468ff; }
.aso-term { font-size: 13.5px; font-weight: 500; }
.aso-term > * + * { margin-left: 6px; }
.aso-muted-cell { font-size: 12px; color: var(--muted); }
button.aso-star { display: inline-grid; place-items: center; width: 26px; height: 26px; min-height: 0; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
button.aso-star svg { opacity: 0.4; transition: opacity 0.12s, transform 0.18s var(--spring); }
button.aso-star:hover { background: var(--aso-control); }
button.aso-star:hover svg { opacity: 1; }
button.aso-star:active svg { transform: scale(0.8); }
button.aso-star.on { color: var(--aso-amber); }
button.aso-star.on svg { opacity: 1; fill: currentColor; }
.aso-note { width: 100%; min-width: 92px; padding: 3px 6px; border: 0; border-radius: 6px; font: inherit; font-size: 12.5px; color: var(--text); background: transparent; outline: 0; }
.aso-note:hover, .aso-note:focus { background: var(--aso-control); }
.aso-note::placeholder { color: transparent; }
.aso-note:hover::placeholder, .aso-note:focus::placeholder { color: var(--muted); }
.aso-score { display: inline-flex; align-items: center; gap: 7px; }
.aso-bar { display: inline-flex; align-items: center; gap: 7px; }
.aso-bar b { width: 22px; font-weight: 550; text-align: left; }
.aso-bar-track { display: block; width: 58px; height: 4px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--text) 11%, transparent); }
.aso-bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--tone); }
.aso-bar[data-tone="good"] { --tone: #38c172; }
.aso-bar[data-tone="mid"] { --tone: #eab82f; }
.aso-bar[data-tone="bad"] { --tone: #e8554e; }
.aso-bar[data-tone="neutral"] { --tone: var(--muted); }
.aso-bar[data-tone="neutral"] b { font-weight: 450; color: var(--muted); }
.aso-table tr.aso-group td { position: sticky; top: 33px; z-index: 1; height: 28px; padding: 4px 11px; font-size: 11.5px; color: var(--muted); background: color-mix(in srgb, var(--text) 5%, var(--surface)); border-block: 1px solid var(--hairline); }
.aso-table tbody tr.aso-group:hover td { background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
.aso-group b { font-weight: 650; color: var(--text); }
.aso-group small { margin-left: 8px; font-size: 11px; }
.aso-source { padding: 0 5px; font-size: 10px; font-weight: 600; line-height: 16px; letter-spacing: 0.01em; color: var(--muted); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hairline); }
.aso-source.insight { color: var(--good); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 40%, transparent); }
.aso-opportunity { font-weight: 600; }
button.aso-position { display: inline-flex; align-items: baseline; min-height: 26px; padding: 3px 6px; margin-left: -6px; font: inherit; font-size: 13px; color: var(--text); background: none; border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
button.aso-position:hover { background: var(--aso-control); }
.aso-position b { font-weight: 550; }
.aso-hash { margin-right: 1px; font-weight: 400; color: var(--muted); }
.aso-change { margin-left: 3px; font-size: 10px; font-weight: 600; line-height: 1; white-space: nowrap; }
.aso-change.up { color: var(--good); }
.aso-change.down { color: var(--bad); }
button.aso-top-apps { display: inline-flex; align-items: center; gap: 3px; min-height: 0; padding: 2px 4px; margin-left: -4px; color: var(--muted); font: inherit; font-size: 11px; background: none; border: 0; border-radius: 8px; box-shadow: none; cursor: pointer; }
button.aso-top-apps:hover { background: var(--aso-control); }
.aso-top-apps img { flex: none; border-radius: 22%; box-shadow: 0 0 0 1px rgb(127 127 127 / 0.2); }
.aso-top-apps span { margin-left: 3px; }
.aso-tag { display: inline-flex; align-items: center; padding: 0 7px; font-size: 11px; font-weight: 550; line-height: 18px; white-space: nowrap; color: var(--tag, var(--muted)); background: color-mix(in srgb, var(--tag, var(--muted)) 17%, transparent); border-radius: 99px; }
.tag-red { --tag: #e5574f; } .tag-orange { --tag: #ea812f; } .tag-yellow { --tag: #cfa10f; } .tag-green { --tag: #3bb26b; } .tag-blue { --tag: #4a8dff; } .tag-purple { --tag: #9a6dfb; } .tag-gray { --tag: #8d92a0; }
.aso-tags-panel { display: grid; gap: 2px; padding: 11px; }
.aso-tags-head, .aso-tags-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 38px 28px; align-items: center; gap: 6px; }
.aso-tags-head { padding: 0 5px 5px; font-size: 11.5px; color: var(--muted); }
.aso-tags-row { min-height: 34px; padding: 2px 5px; border-radius: 8px; }
.aso-tags-row:nth-child(even) { background: color-mix(in srgb, var(--text) 3%, transparent); }
.aso-tags-row .aso-tag { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.aso-tags-panel > p { margin: 4px 5px 8px; }
.aso-tags-new { display: grid; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.aso-tags-colors { display: flex; align-items: center; gap: 7px; }
.aso-tags-colors [role="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; background: var(--tag); border: 0; border-radius: 50%; box-shadow: none; cursor: pointer; transition: transform 0.12s; }
.aso-tags-colors [role="radio"]:hover { background: var(--tag); transform: scale(1.12); }
.aso-tags-colors [role="radio"][aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tag); }
.aso-tags-colors .aso-btn { margin-left: auto; }
.aso-empty { display: grid; justify-items: center; gap: 6px; padding: 48px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--hairline); border-radius: 14px; }
.aso-empty h2 { margin: 4px 0 0; font-size: 16px; color: var(--text); }
.aso-empty p { margin: 0; }
.aso-empty .aso-btn { margin-top: 8px; }
.aso-empty.small { padding: 22px; }
.aso-danger { margin-top: 4px; text-align: right; }

/* Dialogs */
dialog.aso-dialog { width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow: hidden; padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; --aso-control: color-mix(in srgb, var(--text) 5.5%, var(--surface)); --aso-line: var(--hairline); --aso-brand: linear-gradient(135deg, #5468ff, #8b5cf6); --aso-warm: linear-gradient(135deg, #f7a62b, #f0762d); }
dialog.aso-dialog.wide { width: min(780px, calc(100vw - 24px)); }
dialog.aso-dialog[open] { display: flex; flex-direction: column; }
.aso-dialog-body { display: grid; gap: 11px; min-height: 0; overflow: auto; padding: 18px; }
.aso-dialog-title h2 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.aso-dialog-title p { margin: 2px 0 0; }
.aso-dialog-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--hairline); }
.aso-dialog-foot.end { justify-content: flex-end; }
.aso-foot-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.aso-suggest-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.aso-suggest-head .aso-search { flex: 0 1 220px; }
.aso-inline-form { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.aso-inline-form.top { grid-template-columns: 76px minmax(0, 1fr); align-items: start; }
.aso-inline-form.top > .aso-field-label { padding-top: 8px; }
.aso-rivals { display: grid; gap: 6px; min-width: 0; }
.aso-rival-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.aso-rival-chips .aso-chip { max-width: 240px; padding-right: 3px; }
.aso-rival-chips img { flex: none; border-radius: 22%; }
.aso-audit-language { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aso-audit-language select { width: auto; max-width: 100%; }
.aso-audit-row.current td { background: var(--tint); }
.aso-field-label { font-size: 12.5px; color: var(--muted); }
.aso-app-search { display: grid; gap: 5px; min-width: 0; }
.aso-app-search .aso-btn { margin: -3px -5px -3px 0; }
.aso-app-options { max-height: 288px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: var(--aso-control); border: 1px solid var(--hairline); border-radius: 12px; }
.aso-app-options li[role="option"] { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; cursor: pointer; }
.aso-app-options li.active { background: var(--tint); }
.aso-app-options img, .aso-app-options .aso-icon-empty { flex: none; width: 36px; height: 36px; border-radius: 22%; }
.aso-app-options .min0, .aso-picked-app .min0 { display: grid; flex: 1; gap: 0; }
.aso-app-options b, .aso-picked-app b { font-size: 13.5px; font-weight: 600; }
.aso-app-options small, .aso-picked-app small { font-size: 11.5px; color: var(--muted); }
.aso-app-none { padding: 12px; font-size: 12.5px; text-align: center; color: var(--muted); }
.aso-picked-app { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 36px; padding: 4px 6px 4px 8px; background: var(--tint); border-radius: 10px; }
.aso-picked-app img, .aso-picked-app .aso-icon-empty { flex: none; width: 28px; height: 28px; border-radius: 22%; }
.aso-dialog .aso-table-wrap { background: transparent; }
.aso-ranking { display: grid; margin: 0; padding: 0; list-style: none; }
.aso-ranking li { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--hairline); }
.aso-ranking li:last-child { border-bottom: 0; }
.aso-ranking li.mine { margin: 0 -6px; padding-inline: 10px; background: var(--tint); border-radius: 12px; border-bottom: 0; }
.aso-ranking img, .aso-ranking .aso-icon-empty { flex: none; width: 52px; height: 52px; border-radius: 22%; }
.aso-ranking-text { display: grid; flex: 1; gap: 3px; min-width: 0; }
.aso-app-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; font-weight: 600; }
.aso-app-name i { flex: none; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; font-style: normal; color: var(--muted); background: var(--aso-control); border-radius: 5px; }
.aso-ranking-actions { display: inline-flex; flex: none; gap: 1px; }
.aso-chart-block { display: grid; gap: 10px; }
.aso-chart-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aso-chart-latest { display: grid; justify-items: end; line-height: 1.1; }
.aso-chart-latest small { font-size: 11px; color: var(--muted); }
.aso-chart-latest b { font-size: 20px; color: var(--good); }
.aso-chart { width: 100%; min-width: 0; }

/* Apps page */
.aso-index { gap: 18px; }
.aso-index-head h1 { margin: 6px 0 2px; font-size: 26px; letter-spacing: -0.02em; }
.aso-index-head p { margin: 0; }
.aso-note-bar { display: flex; align-items: center; gap: 8px; padding: 9px 13px; font-size: 13px; background: color-mix(in srgb, var(--aso-amber) 11%, transparent); border-radius: 11px; }
.aso-note-bar span { flex: 1; }
.aso-note-bar .icon { color: var(--aso-amber); }
.aso-note-bar a { font-weight: 600; }
.aso-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; }
.aso-find .aso-search { flex: 1 1 280px; background: transparent; box-shadow: none; }
.aso-find .aso-search:focus-within { box-shadow: none; }
.aso-find .aso-btn.primary { min-height: 38px; padding-inline: 18px; }
.aso-section-title { display: flex; align-items: baseline; gap: 7px; margin: 2px 0 9px; font-size: 13px; font-weight: 600; }
.aso-section-title span { font-weight: 400; color: var(--muted); }
.aso-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 9px; }
.aso-app-card { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; padding: 11px 13px; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: 15px; transition: border-color 0.15s, transform 0.18s var(--spring); }
a.aso-app-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration: none; transform: translateY(-1px); }
.aso-app-card img { flex: none; border-radius: 22%; }
.aso-app-card > .icon { flex: none; color: var(--muted); }
.aso-app-card-text { display: grid; flex: 1; gap: 1px; min-width: 0; }
.aso-app-card-text b { font-size: 14px; font-weight: 600; }
.aso-app-card-text span { font-size: 12px; color: var(--muted); }

/* Listing page */
.aso-panel { display: grid; gap: 9px; padding: 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 15px; }
.aso-panel h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.aso-panel p { margin: 0; }
.aso-section-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.aso-section-row .aso-section-title { margin: 0; }
.aso-locales { gap: 12px; }
.aso-locales h2 { margin: 0 0 2px; font-size: 15px; }
.aso-locales-controls { flex: none; }
.aso-locale-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.aso-locale-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-height: 42px; padding: 4px 0; border-top: 1px solid var(--hairline); }
.aso-locale-name { display: grid; flex: 1 1 110px; }
.aso-locale-status { color: var(--muted); }
.aso-locale-status.good { color: var(--aso-green, #1f9d55); }
.aso-locale-status.bad { color: var(--aso-red, #d64545); }
.aso-locale-note { flex-basis: 100%; }
.aso-app-card-main { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.aso-app-card-main:hover { text-decoration: none; }
.aso-app-card-main > .icon { flex: none; color: var(--muted); }
.aso-app-card.is-picked { border-color: color-mix(in srgb, #5468ff 60%, transparent); }
.aso-text-btn { padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.aso-text-btn:hover { color: var(--text); }
.aso-remove-list { display: grid; gap: 3px; margin: 0; padding-left: 18px; font-size: 13px; }
.aso-board-page { display: grid; gap: 10px; min-width: 0; }
.aso-board-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aso-board-add .aso-search { flex: 1 1 240px; }
.aso-board-ai { flex: 0 0 auto; width: auto; }
.aso-board-views { display: inline-flex; margin-left: auto; padding: 2px; background: var(--aso-control); border-radius: 9px; }
.aso-board-views button { padding: 4px 12px; font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
.aso-board-views button[aria-pressed="true"] { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.1); }
.aso-board-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aso-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font: inherit; font-size: 12px; color: var(--text); background: var(--aso-control); border: 1px solid transparent; border-radius: 99px; box-shadow: none; }
button.aso-chip { cursor: pointer; }
button.aso-chip:hover { background: var(--aso-control); border-color: var(--hairline); }
.aso-chip b { font-weight: 600; }
.aso-chip[data-tone="top"] b { color: #1f9d55; }
.aso-chip[data-tone="mid"] b { color: #c98a12; }
.aso-chip[data-tone="miss"] b { color: #d64545; }
.aso-board-wrap { overflow: auto; max-height: calc(100dvh - 190px); background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; }
.aso-board { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.aso-board thead th { position: sticky; top: 0; z-index: 2; min-width: 88px; padding: 7px 3px 5px; font-size: 11px; font-weight: 500; color: var(--muted); text-align: center; background: var(--surface); }
.aso-board thead th span:not(.sr-only) { display: block; margin-top: 3px; white-space: nowrap; }
th.aso-board-term { position: sticky; left: 0; z-index: 1; min-width: 170px; max-width: 190px; padding: 0 8px; font-weight: 550; text-align: left; background: var(--surface); }
thead th.aso-board-term { z-index: 3; }
.aso-board th.aso-board-term .truncate { display: block; }
td.aso-board-score { min-width: 48px; padding: 0 6px; white-space: nowrap; text-align: right; }
.aso-board thead th.aso-board-score { min-width: 48px; }
.aso-board-score b { font-weight: 600; color: #1f9d55; }
.aso-board-score span { font-size: 11px; color: var(--muted); }
.aso-board-group td { position: sticky; left: 0; padding: 12px 8px 3px; font-size: 12px; background: var(--surface); }
.aso-board-group span { color: var(--muted); }
.aso-cell { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; min-height: 28px; padding: 3px 6px; font: inherit; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--aso-control); border: 1px solid transparent; border-radius: 6px; box-shadow: none; cursor: default; color: var(--text); }
.aso-cell[data-tone="top"], .aso-cell[data-tone="top"]:hover { background: color-mix(in srgb, #1f9d55 26%, var(--surface)); }
.aso-cell[data-tone="mid"], .aso-cell[data-tone="mid"]:hover { background: color-mix(in srgb, #e7a22a 28%, var(--surface)); }
.aso-cell[data-tone="miss"], .aso-cell[data-tone="miss"]:hover { background: color-mix(in srgb, #d64545 24%, var(--surface)); }
.aso-cell[data-tone="quiet"], .aso-cell[data-tone="waiting"] { font-weight: 500; color: var(--muted); }
.aso-cell:hover, .aso-cell:focus-visible { border-color: var(--text); outline: none; }
.aso-cell-empty { font-size: 11px; color: var(--muted); text-align: center; }
.aso-cell-slot { position: relative; }
.aso-board .aso-cell { flex-wrap: wrap; min-width: 112px; padding-bottom: 4px; }
.aso-cell-term { flex: 1 0 100%; max-width: 100%; padding-right: 16px; font-size: 11px; font-weight: 450; text-align: left; opacity: 0.85; }
button.aso-cell-star { width: 18px; height: 18px; }
.aso-cell-slot button.aso-cell-star { position: absolute; right: 2px; bottom: 2px; }
.aso-board-primary-term { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--text); }
.aso-board-idea { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 450; line-height: 1.25; color: var(--muted); }
.aso-board-expand-term { display: grid; gap: 1px; min-width: 0; text-align: left; }
.aso-board-pending, .aso-thin-store { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.aso-head-views { display: inline-flex; gap: 2px; padding: 3px; font-size: 13px; background: var(--aso-control); border-radius: 10px; }
.aso-head-views a { padding: 4px 10px; color: var(--muted); text-decoration: none; border-radius: 7px; }
.aso-head-views a:hover { color: var(--text); }
.aso-head-views a[aria-current="page"] { color: var(--text); background: var(--surface); }
.aso-cell-empty .spinner, .aso-audit-table .spinner { display: inline-block; flex: none; margin-right: 5px; vertical-align: middle; }
.aso-volume { display: inline-flex; align-items: flex-end; gap: 1px; }
.aso-volume i { width: 2px; height: 5px; background: currentColor; opacity: 0.25; border-radius: 1px; }
.aso-volume i:nth-child(2) { height: 7px; }
.aso-volume i:nth-child(3) { height: 9px; }
.aso-volume i.on { opacity: 0.85; }
.aso-volume b { margin-left: 3px; font-weight: 600; line-height: 1; }
.aso-volume.world { opacity: 0.55; }
.aso-volume.world b { font-weight: 450; }
.aso-cell-pop { position: fixed; z-index: 60; display: grid; gap: 8px; width: min(400px, calc(100vw - 16px)); padding: 12px; font-size: 12.5px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 13px; box-shadow: 0 14px 40px rgb(0 0 0 / 0.22); }
.aso-cell-pop p { margin: 0; }
.aso-cell-pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.aso-cell-pop-store { display: flex; align-items: center; gap: 5px; }
.aso-cell-pop-term { margin-top: 5px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.aso-cell-pop dl { display: flex; flex: none; gap: 11px; margin: 0; text-align: center; }
.aso-cell-pop dd { margin: 0; font-size: 14px; font-weight: 650; }
.aso-cell-pop dt { font-size: 10px; color: var(--muted); }
.aso-cell-pop-apps { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.aso-cell-pop-apps li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 3px 5px; border-radius: 7px; }
.aso-cell-pop-apps li.own { background: color-mix(in srgb, #5468ff 14%, transparent); }
.aso-cell-pop-apps img { flex: none; border-radius: 22%; }
.aso-cell-pop-apps b { flex: 1; font-weight: 500; }
.aso-cell-pop-apps .muted { flex: none; font-size: 11px; }
.aso-cell-pop-rank { flex: none; width: 26px; font-size: 11px; color: var(--muted); text-align: center; }
.aso-icon-empty.small { flex: none; width: 26px; height: 26px; }
.aso-board-wrap.list { padding: 0; box-shadow: 0 2px 12px rgb(0 0 0 / 0.03); }
.aso-board-list { table-layout: fixed; min-width: 820px; }
.aso-board-list th.aso-col-keyword { width: 34%; padding-left: 16px; }
.aso-board-list th.aso-col-stat { width: 12%; }
.aso-board-list th.aso-col-bar { width: 15%; }
.aso-board-list th.aso-col-countries { width: 10%; }
.aso-board-list th.aso-col-actions { width: 76px; text-align: right; padding-right: 14px; }
.aso-board-list thead th { height: 38px; padding: 8px 14px; font-size: 12px; font-weight: 600; letter-spacing: -0.005em; color: var(--muted); text-align: left; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.aso-board-list tbody tr:nth-child(even) td { background: transparent; }
.aso-board-list tbody tr.aso-board-list-row { cursor: pointer; }
.aso-board-list tbody tr.aso-board-list-row td { height: 50px; padding: 8px 14px; vertical-align: middle; text-align: left; border-bottom: 1px solid var(--hairline); transition: background-color 0.14s; }
.aso-board-list tbody tr.aso-board-list-row td.aso-term { padding-left: 14px; }
.aso-board-list tbody tr.aso-board-list-row:hover td { background: color-mix(in srgb, var(--text) 2.8%, var(--surface)); }
.aso-board-list tbody tr.aso-board-list-row.is-expanded td { background: color-mix(in srgb, var(--accent) 4.5%, var(--surface)); border-bottom-color: transparent; }
.aso-board-list tr.aso-group td { position: sticky; top: 38px; z-index: 1; height: 34px; padding: 6px 16px; font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--text) 4%, var(--surface)); border-block: 1px solid var(--hairline); }
.aso-board-list tbody tr.aso-group:hover td { background: color-mix(in srgb, var(--text) 4%, var(--surface)); }
.aso-board-list .aso-group-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; margin-left: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--text) 7%, transparent); border-radius: 99px; }
.aso-board-expand { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 2px 0; font: inherit; color: inherit; background: none; border: 0; box-shadow: none; cursor: pointer; }
.aso-board-expand:hover { background: none; }
.aso-board-chevron { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; color: var(--muted); background: color-mix(in srgb, var(--text) 5%, transparent); border-radius: 6px; transition: transform 0.16s ease, background-color 0.15s, color 0.15s; }
.aso-board-list-row:hover .aso-board-chevron { color: var(--text); background: color-mix(in srgb, var(--text) 9%, transparent); }
.aso-board-chevron.open { transform: rotate(90deg); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.aso-board-list td.aso-board-score { min-width: 0; padding: 8px 14px; text-align: left; }
.aso-board-metric { display: inline-flex; align-items: baseline; gap: 1px; font-variant-numeric: tabular-nums; }
.aso-board-list td.aso-board-score.has-value .aso-board-metric { padding: 2px 9px; background: color-mix(in srgb, #1f9d55 13%, transparent); border-radius: 99px; }
.aso-board-list td.aso-board-score.has-value b { font-size: 13px; font-weight: 650; color: #1f9d55; }
.aso-board-list td.aso-board-score.has-value span { font-size: 11.5px; color: color-mix(in srgb, #1f9d55 75%, var(--muted)); }
.aso-board-list td.aso-board-score.is-zero b { font-size: 13px; font-weight: 500; color: var(--muted); opacity: 0.7; }
.aso-board-list td.aso-board-score.is-zero span { font-size: 11.5px; color: var(--muted); opacity: 0.65; }
.aso-board-bar-cell .aso-bar b { width: 24px; font-size: 13px; font-weight: 600; color: var(--text); }
.aso-board-bar-cell .aso-bar-track { width: 64px; height: 5px; }
.aso-board-countries { display: inline-flex; align-items: baseline; gap: 1px; padding: 2px 8px; font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--text) 5%, transparent); border-radius: 99px; font-variant-numeric: tabular-nums; }
.aso-board-countries b { font-weight: 600; color: var(--text); }
.aso-board-actions { white-space: nowrap; text-align: right !important; padding-right: 12px !important; }
.aso-board-list .aso-board-actions .aso-tool { width: 28px; height: 28px; border-radius: 7px; opacity: 0.65; transition: opacity 0.14s, background-color 0.14s; }
.aso-board-list-row:hover .aso-board-actions .aso-tool { opacity: 1; }
.aso-board-chips-row td { height: auto !important; padding: 0 16px 14px 44px !important; white-space: normal !important; background: color-mix(in srgb, var(--accent) 4.5%, var(--surface)) !important; border-bottom: 1px solid var(--hairline) !important; }
.aso-board-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 0; }
.aso-board-store-chip { padding: 4px 8px 4px 10px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 99px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); cursor: default; transition: border-color 0.14s, transform 0.14s; }
.aso-board-store-chip:hover { border-color: color-mix(in srgb, var(--text) 28%, transparent); }
.aso-chip-term { font-weight: 500; color: var(--text); }
.aso-audit { display: grid; gap: 12px; }
.aso-audit-start { gap: 12px; }
.aso-audit-start h2 { margin: 0 0 2px; font-size: 15px; }
.aso-audit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.aso-audit-run { display: inline-flex; gap: 6px; }
.aso-audit-run .aso-input { width: auto; }
.aso-audit-done { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1f9d55; }
.aso-version-pop { display: grid; gap: 8px; padding: 10px; font-size: 13px; }
.aso-version-pop p { margin: 0; }
.aso-version-pop label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aso-version-pop .aso-input { width: 72px; }
.aso-version-pop .aso-foot-actions { display: flex; justify-content: flex-end; gap: 6px; }
.aso-audit-step { gap: 11px; }
.aso-audit-step h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; font-size: 14px; }
.aso-step { display: inline-grid; place-items: center; width: 19px; height: 19px; font-size: 11px; font-weight: 600; color: #5468ff; background: color-mix(in srgb, #5468ff 15%, transparent); border-radius: 50%; }
.aso-audit-tabs { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; background: var(--aso-control); border-radius: 10px; }
.aso-audit-tabs button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; border-radius: 7px; box-shadow: none; cursor: pointer; }
.aso-audit-tabs button:hover { color: var(--text); background: none; }
.aso-audit-tabs button[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.1); }
.aso-audit-star { display: inline-flex; color: #e7a22a; }
.aso-delta { font-weight: 600; }
.aso-delta.good { color: #1f9d55; }
.aso-delta.bad { color: #d64545; }
.aso-audit-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
.aso-audit-fields { display: grid; gap: 7px; min-width: 0; }
.aso-audit-field { display: grid; grid-template-columns: 62px minmax(0, 1fr) 52px; align-items: center; gap: 8px; }
.aso-audit-label { font-size: 12px; color: var(--muted); }
.aso-audit-value { min-height: 32px; padding: 6px 10px; font-size: 13px; overflow-wrap: anywhere; background: var(--aso-control); border: 1px solid transparent; border-radius: 8px; }
.aso-audit-value.changed { border-color: color-mix(in srgb, #e7a22a 60%, transparent); }
.aso-audit-value mark { padding: 0 2px; color: inherit; background: color-mix(in srgb, #1f9d55 26%, transparent); border-radius: 3px; }
.aso-audit-field > .small { text-align: right; white-space: nowrap; }
.aso-audit-scores { display: grid; align-content: start; gap: 10px; min-width: 118px; margin: 0; }
.aso-audit-scores div { display: grid; }
.aso-audit-scores dd { margin: 0; font-size: 21px; font-weight: 650; line-height: 1.1; }
.aso-audit-scores dt { font-size: 11px; color: var(--muted); }
.aso-audit-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; }
.aso-audit-more summary { padding-top: 7px; color: var(--muted); cursor: pointer; }
.aso-audit-more[open] { flex-basis: 100%; }
.aso-audit-more p { margin: 6px 0 0; }
.aso-audit-phrases { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.aso-audit-terms { display: grid; gap: 3px; margin: 8px 0 0; padding: 0; list-style: none; }
.aso-audit-continue { justify-self: start; }
.aso-audit-table td { max-width: 190px; }
.aso-audit-table td .truncate { display: block; }
.aso-audit-table td.changed { color: #c98a12; }
.aso-audit-lang { white-space: nowrap; }
.aso-audit-row { cursor: pointer; }
.aso-audit-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; font-size: 11px; font-weight: 600; color: #c98a12; background: color-mix(in srgb, #e7a22a 20%, transparent); border-radius: 6px; }
@media (max-width: 640px) {
  .aso-audit-compare { grid-template-columns: minmax(0, 1fr); }
  .aso-audit-scores { display: flex; gap: 22px; }
  .aso-audit-field { grid-template-columns: minmax(0, 1fr) auto; }
  .aso-audit-label { grid-column: 1 / -1; }
  .aso-board-views { margin-left: 0; }
}
.aso-verdict { font-size: 12px; font-weight: 600; }
.aso-verdict.keep { color: var(--aso-green, #1f9d55); }
.aso-verdict.weak, .aso-verdict.wasted { color: var(--aso-red, #d64545); }
.aso-verdict.unknown { color: var(--muted); }
.aso-about summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13.5px; cursor: pointer; }
.aso-about form { display: grid; justify-items: start; gap: 8px; margin-top: 10px; }
.aso-generate { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 16px; background: linear-gradient(120deg, color-mix(in srgb, #5468ff 13%, var(--surface)), color-mix(in srgb, #8b5cf6 9%, var(--surface))); border: 1px solid color-mix(in srgb, #5468ff 26%, var(--hairline)); border-radius: 16px; }
.aso-generate-intro { display: flex; flex: 1 1 250px; align-items: center; gap: 11px; min-width: 0; }
.aso-generate-mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--aso-brand); border-radius: 11px; }
.aso-generate h2 { margin: 0; font-size: 15px; }
.aso-generate p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.aso-generate-controls { display: flex; flex: 3 1 460px; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.aso-generate-controls label { display: grid; flex: 0 1 140px; gap: 3px; font-size: 11.5px; color: var(--muted); }
.aso-generate-controls label.grow { flex: 1 1 170px; }
.aso-generate-controls .aso-input { background-color: var(--surface); }
.aso-generate-controls .aso-btn { min-height: 36px; }
.aso-draft-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 9px; }
.aso-draft-head h2 { margin: 0; font-size: 15px; }
.aso-versions { display: inline-flex; gap: 2px; }
.aso-versions a { display: grid; place-items: center; min-width: 22px; height: 22px; font-size: 11.5px; color: var(--muted); border-radius: 6px; }
.aso-versions a:hover { background: var(--aso-control); text-decoration: none; }
.aso-versions a[aria-current="page"] { color: #fff; background: #5468ff; }
.aso-listing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 14px; }
.aso-editor { display: grid; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 15px; }
.aso-field { display: grid; gap: 5px; }
.aso-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aso-field-head label { font-size: 12.5px; font-weight: 550; }
.aso-field-meta { display: inline-flex; align-items: center; gap: 4px; }
.aso-limit { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.aso-limit.near { color: var(--warn); }
.aso-limit.over { color: var(--bad); font-weight: 600; }
.aso-issue { font-size: 12px; }
.aso-issue.error { color: var(--bad); }
.aso-issue.warn { color: var(--warn); }
.aso-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }
.aso-listing-side { position: sticky; top: 14px; display: grid; gap: 10px; }
.aso-preview { display: flex; align-items: center; gap: 11px; min-width: 0; }
.aso-preview img, .aso-preview .aso-icon-empty { flex: none; width: 58px; height: 58px; border-radius: 22%; }
.aso-preview > .min0 { display: grid; flex: 1; gap: 1px; }
.aso-preview b { font-size: 14px; font-weight: 600; }
.aso-preview .truncate:not(b) { font-size: 12.5px; color: var(--muted); }
.aso-preview-get { flex: none; padding: 3px 15px; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--aso-control); border-radius: 99px; }
.aso-meter { height: 6px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--text) 10%, transparent); }
.aso-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5468ff, #38c172); transition: width 0.3s; }
.aso-missing { display: flex; flex-wrap: wrap; gap: 4px; }
.aso-facts { display: grid; gap: 5px; margin: 0; }
.aso-facts > div { display: flex; justify-content: space-between; gap: 10px; }
.aso-facts dt { color: var(--muted); }
.aso-facts dd { margin: 0; font-weight: 550; text-align: right; }
.aso-send { display: grid; gap: 9px; }
.aso-send label { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); }
.aso-pushes summary { cursor: pointer; color: var(--muted); }
.aso-pushes ul { display: grid; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.aso-pushes p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.aso-steps { padding-left: 18px; gap: 8px; }

/* Ratings page */
.aso-ratings { display: grid; gap: 12px; }
.aso-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 8px; }
.aso-stat { display: grid; align-content: start; gap: 1px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; }
.aso-stat span { font-size: 11.5px; color: var(--muted); }
.aso-stat b { font-size: 23px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.aso-stat .aso-change { margin: 0; }
.aso-stat-action { display: grid; justify-items: start; align-content: center; gap: 5px; padding: 8px 4px 8px 8px; }
.aso-stat-action small { font-size: 11.5px; color: var(--muted); }
.aso-ratings .aso-table-wrap { max-height: none; min-height: 0; }

@media (max-width: 1040px) { .aso-listing-grid { grid-template-columns: minmax(0, 1fr); } .aso-listing-side { position: static; } }
@media (max-width: 820px) {
  .content:has(.aso-page) { padding: 12px 12px 96px; }
  .aso-head-app { flex-basis: 100%; }
  .aso-actions { width: 100%; margin-left: 0; }
  .aso-actions .aso-btn { flex: 1; }
  .aso-table-wrap { max-height: 70dvh; }
  .aso-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aso-stat-action { grid-column: 1 / -1; padding: 2px; }
  .aso-inline-form { grid-template-columns: minmax(0, 1fr) auto; }
  .aso-inline-form .aso-field-label { grid-column: 1 / -1; }
  .aso-inline-form.top { grid-template-columns: minmax(0, 1fr); }
  .aso-inline-form.top > .aso-field-label { padding-top: 0; }
  .aso-app-grid { grid-template-columns: minmax(0, 1fr); }
  .tabbar a { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .aso-popover, a.aso-app-card, .aso-btn { animation: none; transition: none; } }

/* Research workspace */
.rx-page { --rx-tile: var(--surface); --rx-lift: 0 1px 2px rgb(20 22 40 / 0.04), 0 14px 36px rgb(20 22 40 / 0.06); --rx-fill: color-mix(in srgb, var(--text) 6%, transparent); --rx-line: color-mix(in srgb, var(--text) 9%, transparent); --rx-guide: #3345c9; --rx-compare: #0b8f86; --rx-list: #c98a00; --rx-other: #c2417c; display: grid; gap: 30px; min-width: 0; }
:root[data-theme="dark"] .rx-page { --rx-tile: #171922; --rx-lift: inset 0 0 0 1px rgb(255 255 255 / 0.07); --rx-guide: #6f80f5; --rx-compare: #1fa797; --rx-list: #bb8a22; --rx-other: #d95f90; }
 :root[data-theme="dark"]:not([data-theme="light"]) .rx-page { --rx-tile: #171922; --rx-lift: inset 0 0 0 1px rgb(255 255 255 / 0.07); --rx-guide: #6f80f5; --rx-compare: #1fa797; --rx-list: #bb8a22; --rx-other: #d95f90; } 

/* Search: an ordinary card, so it sits with the rest of the app. */
.rx-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 26px; align-items: center; padding: 16px 18px; }
.rx-hero-search { display: grid; gap: 10px; min-width: 0; }
.rx-search { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 13px; border-radius: 12px; color: var(--muted); background: var(--rx-fill); transition: box-shadow 0.2s; }
.rx-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.rx-search input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--text); font-size: 15px; }
.rx-search button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 15px; border-radius: 9px; font-size: 14px; }
.rx-seeds { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.rx-seeds-label { margin-right: 3px; }
.rx-seeds button.topic { min-height: 26px; padding: 2px 10px; font-size: 12.5px; }
.rx-hero-status { grid-column: 1 / -1; }
.rx-stats { display: grid; grid-template-columns: repeat(4, minmax(84px, auto)); }
.rx-stat { display: flex; flex-direction: column; min-width: 0; padding: 2px 15px; }
.rx-stat + .rx-stat { border-left: 1px solid var(--rx-line); }
.rx-stat-value { font-size: 25px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.rx-stat.gold .rx-stat-value { color: var(--gold); }
.rx-stat-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1040px) { .rx-hero { grid-template-columns: minmax(0, 1fr); } .rx-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rx-stat:first-child { padding-left: 2px; } }
@media (max-width: 520px) { .rx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; } .rx-stat:nth-child(3) { border-left: 0; padding-left: 2px; } }

/* Topic map: a printed star chart on the card's paper, with no glow. */
.rx-map { container: rx-map / inline-size; grid-column: 1 / -1; min-width: 0; padding-top: 12px; border-top: 1px solid var(--rx-line); }
.rx-sky { position: relative; margin: 0; min-width: 0; }
.rx-sky svg { display: block; width: 100%; height: auto; }
.rx-sky-chart { position: relative; }
.rx-sky-compact { display: none; }
@container rx-map (max-width: 680px) { .rx-sky-wide { display: none; } .rx-sky-compact { display: block; } }
.rx-sky-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 14px; padding-bottom: 6px; }
.rx-sky-head b { font-size: 14px; font-weight: 600; }
.rx-sky-legend { display: flex; flex-wrap: wrap; gap: 3px 13px; font-size: 12px; color: var(--muted); }
.rx-sky-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rx-sky-legend i { width: 8px; height: 8px; border-radius: 50%; }
.rx-sky-legend i.open { background: var(--accent); }
.rx-sky-legend i.picked { background: var(--ink); box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 2.5px var(--ink); }
.rx-sky-legend i.queued { background: var(--star); }
.rx-sky-legend i.covered { background: color-mix(in srgb, var(--muted) 40%, transparent); }
.rx-dust { fill: var(--dust); }
.rx-orbit { fill: color-mix(in srgb, var(--accent) 3.5%, transparent); stroke: var(--rx-line); stroke-width: 1; }
.rx-cluster { transition: opacity 0.25s; }
.rx-cluster.dim { opacity: 0.28; }
.rx-line { stroke: color-mix(in srgb, var(--accent) 28%, transparent); stroke-width: 1; }
.rx-star { cursor: pointer; }
.rx-star-dot { fill: var(--accent); transition: fill 0.15s; }
.rx-star-tint { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.rx-star.covered .rx-star-dot { fill: color-mix(in srgb, var(--muted) 42%, var(--surface)); }
.rx-star.covered .rx-star-tint { fill: transparent; }
.rx-star.queued .rx-star-dot { fill: var(--star); }
.rx-star.queued .rx-star-tint { fill: color-mix(in srgb, var(--star) 30%, transparent); }
.rx-star.picked .rx-star-dot { fill: var(--ink); }
.rx-star-ring { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.rx-star:hover .rx-star-dot { fill: var(--ink); }
.rx-topic { cursor: pointer; outline: none; }
.rx-topic-name { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.rx-topic-count { font-size: 11px; fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.rx-topic[aria-pressed="true"] .rx-topic-name, .rx-topic:hover .rx-topic-name, .rx-topic:focus-visible .rx-topic-name { fill: var(--accent); }
.rx-sky-tip, .rx-scatter-tip { position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 1px; max-width: 250px; padding: 7px 11px; border-radius: 11px; font-size: 12px; color: var(--on-ink); background: var(--ink); transform: translate(-50%, calc(-100% - 11px)); pointer-events: none; }
.rx-sky-tip b, .rx-scatter-tip b { font-size: 13px; font-weight: 600; }
.rx-sky-tip span { opacity: 0.75; }

/* Prompt sheet */
.rx-kinds { align-self: flex-start; flex-wrap: wrap; }
.rx-note { min-height: 62px; }
.rx-prompt-preview { margin: 0; max-height: 300px; overflow: auto; padding: 13px; border-radius: 11px; background: color-mix(in srgb, var(--text) 5%, transparent); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Layout */
.rx-grid { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); align-items: start; }
.rx-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; min-width: 0; }
.rx-main > section { min-width: 0; }
.rx-side { position: sticky; top: 16px; display: grid; gap: 14px; min-width: 0; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.rx-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.15; }
.rx-subtitle { margin: 3px 0 15px; font-size: 15px; color: var(--muted); }

/* Tiles: no borders or survey ticks, just soft depth. */
.rx-tile, .rx-page .side-card, .rx-page .idea-list { border: 0; border-radius: 26px; background-color: var(--rx-tile); background-image: none; box-shadow: var(--rx-lift); }

/* Good places to start: a gallery that peeks past the edge. */
.rx-rail { list-style: none; display: flex; gap: 14px; margin: 0 -2px; padding: 2px 2px 22px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.rx-rail::-webkit-scrollbar { display: none; }
.rx-rail-tile { --tint: var(--rx-guide); flex: 0 0 min(76%, 258px); scroll-snap-align: start; display: flex; flex-direction: column; min-height: 226px; padding: 19px 19px 15px; border-radius: 26px; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tint) 24%, transparent), transparent 70%), radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--tint) 9%, transparent), transparent 70%), var(--rx-tile); box-shadow: var(--rx-lift); transition: transform 0.35s var(--spring), box-shadow 0.25s; }
.rx-rail-tile:hover { transform: translateY(-3px) scale(1.012); }
.rx-rail-tile.rx-i-compare { --tint: var(--rx-compare); }
.rx-rail-tile.rx-i-list { --tint: var(--rx-list); }
.rx-rail-tile.rx-i-other { --tint: var(--rx-other); }
.rx-rail-kicker { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rx-rail-tile strong { margin-top: 7px; font-size: 21px; font-weight: 650; line-height: 1.17; letter-spacing: -0.022em; text-wrap: pretty; overflow-wrap: anywhere; }
.rx-rail-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 14px; }
.rx-rail-foot form { margin: 0; }
.rx-rail-foot button.small { min-height: 34px; padding: 0 14px; border-radius: 99px; background: var(--ink); color: var(--on-ink); font-size: 13.5px; font-weight: 550; }
.rx-rail-foot .icon-btn { width: 34px; height: 34px; border-radius: 50%; }

/* Idea list: an inset grouped list. */
.rx-page .explorer { display: grid; gap: 12px; }
.rx-page .topic-rail { flex-wrap: nowrap; margin: 0 -2px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.rx-page .topic-rail::-webkit-scrollbar { display: none; }
.rx-page button.topic { flex: none; min-height: 32px; padding: 4px 13px; border-radius: 99px; background: var(--rx-fill); box-shadow: none; font-weight: 500; white-space: nowrap; }
.rx-page button.topic:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.rx-page button.topic[aria-pressed="true"], .rx-page button.topic[aria-pressed="true"]:hover { background: var(--ink); color: var(--on-ink); }
.rx-page .explorer-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rx-page .explorer-search { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--rx-fill); color: var(--muted); }
.rx-page .explorer-search input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--text); font-size: 15px; }
.rx-page .explorer-tools .segmented { padding: 2px; border-radius: 11px; background: var(--rx-fill); }
.rx-page .explorer-tools .segmented button { min-height: 32px; padding: 3px 13px; border-radius: 9px; font-weight: 500; }
.rx-page .explorer-tools .segmented button[aria-pressed="true"], .rx-page .explorer-tools .segmented button[aria-pressed="true"]:hover { background: var(--rx-tile); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.14), 0 0 0 0.5px rgb(0 0 0 / 0.05); }
.rx-page .explorer-meta { margin: 0 4px; }
.rx-meta-left { display: inline-flex; align-items: center; gap: 14px; }
.rx-page .idea-list { overflow: hidden; }
.rx-page .idea-list > * + *::before { left: 52px; background: var(--rx-line); }
.rx-page .keyword-row { gap: 13px; min-height: 62px !important; padding: 10px 14px 10px 16px !important; transition: background 0.2s; }
.rx-page .keyword-row:hover { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.rx-page .keyword-row.picked { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.rx-page .keyword-row .row-title { font-size: 15.5px; letter-spacing: -0.01em; }
.rx-page .row-actions { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.rx-page .row-actions form { margin: 0; }
.rx-page .row-actions .icon-btn { width: 30px; height: 30px; border-radius: 50%; }
.rx-quiet { display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 0.18s; }
.keyword-row:hover .rx-quiet, .keyword-row:focus-within .rx-quiet { opacity: 1; }
@media (hover: none) { .rx-quiet { opacity: 1; } }
button.rx-add { display: grid; place-items: center; width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
button.rx-add:hover { background: var(--accent); color: var(--on-accent); }
button.rx-add .spinner { width: 13px; height: 13px; }
button.rx-add:disabled .icon { display: none; }
.rx-pick, .rx-meta-left input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 26%, transparent); cursor: pointer; transition: background 0.18s, box-shadow 0.18s, transform 0.25s var(--spring); }
.rx-pick:hover, .rx-meta-left input[type="checkbox"]:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.rx-pick:checked, .rx-meta-left input[type="checkbox"]:checked { background: var(--accent); box-shadow: none; transform: scale(1.04); }
.rx-pick:checked::after, .rx-meta-left input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 5px; margin-top: -2px; border: solid var(--on-accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.rx-pick:focus-visible, .rx-meta-left input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rx-page .more { margin-top: 12px; text-align: center; }

/* Chat */
.rx-chat { display: flex; flex-direction: column; gap: 11px; padding: 17px; min-width: 0; border: 0; border-radius: 26px; background-color: var(--rx-tile); background-image: none; box-shadow: var(--rx-lift); }
.rx-chat-off { align-items: flex-start; }
.rx-chat-off p { margin: 0; }
.rx-chat h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.rx-chat h3 .icon { color: #7c6cff; }
.rx-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.rx-chat-tools { display: inline-flex; align-items: center; gap: 8px; }
.rx-chat-tools .icon-btn { width: 28px; height: 28px; border-radius: 50%; }
.rx-chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 90px; max-height: min(46vh, 480px); overflow-y: auto; scrollbar-width: thin; font-size: 14px; }
.rx-chat-empty p { margin: 0 0 12px; font-size: 14px; }
.rx-starters { display: grid; gap: 6px; }
.rx-starters button.suggest { width: 100%; min-height: 40px; padding: 8px 13px; border: 0; border-radius: 13px; background: var(--rx-fill); color: var(--text); font-size: 13.5px; font-weight: 450; text-align: left; justify-content: flex-start; transition: background 0.2s; }
.rx-starters button.suggest:hover { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
.rx-chat .msg-user { max-width: 88%; padding: 8px 13px; border: 0; border-radius: 19px 19px 5px 19px; background: var(--accent); color: var(--on-accent); font-size: 14px; }
.rx-answer .md { font-size: 14px; }
.rx-answer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.rx-answer-actions button { min-height: 30px; padding: 0 12px; border-radius: 99px; }
.rx-composer { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 11px 12px 9px 14px; border-radius: 21px; background: var(--rx-tile); box-shadow: inset 0 0 0 1px var(--rx-line); isolation: isolate; }
.rx-composer::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: 22.5px; background: conic-gradient(from var(--rx-glow, 210deg), #5b7cff, #a06bff, #ff6fb1, #ffb35c, #5b7cff); opacity: 0; transition: opacity 0.3s; }
.rx-composer::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 21px; background: var(--rx-tile); }
.rx-composer:focus-within { box-shadow: none; }
.rx-composer:focus-within::before { opacity: 0.85; }
.rx-composer.busy { box-shadow: none; }
.rx-composer.busy::before { opacity: 1; animation: rx-glow 3s linear infinite; }
@property --rx-glow { syntax: "<angle>"; inherits: false; initial-value: 210deg; }
@keyframes rx-glow { to { --rx-glow: 570deg; } }
@media (prefers-reduced-motion: reduce) { .rx-composer.busy::before { animation: none; } .rx-rail-tile, .rx-rail-tile:hover { transition: none; transform: none; } }
.rx-composer textarea { width: 100%; border: 0; outline: 0; padding: 0; resize: none; background: transparent; color: var(--text); box-shadow: none; font: inherit; font-size: 15px; min-height: 42px; }
.rx-context { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.rx-composer .model-menu { top: auto; bottom: calc(100% + 6px); }
.rx-composer .send-btn { width: 32px; height: 32px; min-height: 32px; background: var(--ink); color: var(--on-ink); }

/* Current results */
.rx-serp { padding: 22px 24px; }
.rx-serp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; margin-top: 12px; }
.rx-serp-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.rx-serp-list li > * { display: block; }
.rx-sub { margin: 0 0 6px; font-size: 14px; font-weight: 650; }
.rx-questions { margin: 0; padding-left: 16px; display: grid; gap: 5px; }

/* Insights: a bento grid where each tile leads with its conclusion. */
.rx-bento { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
.rx-cell { display: flex; flex-direction: column; min-width: 0; padding: 22px 24px; }
.rx-w8 { grid-column: span 8; }
.rx-w5 { grid-column: span 5; }
.rx-w4 { grid-column: span 4; }
.rx-w3 { grid-column: span 3; }
.rx-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rx-statement { margin: 6px 0 0; font-size: 25px; font-weight: 700; line-height: 1.14; letter-spacing: -0.028em; text-wrap: balance; }
.rx-statement.small { font-size: 21px; }
.rx-cell-note { margin: 5px 0 0; font-size: 14px; color: var(--muted); }
.rx-cell-body { margin-top: 16px; min-width: 0; }
.rx-cell-body.end { margin-top: auto; padding-top: 16px; }
.rx-scatter { position: relative; margin: 0; }
.rx-scatter svg { display: block; width: 100%; height: auto; }
.rx-band { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
.rx-grid-line { stroke: var(--rx-line); stroke-width: 1; }
.rx-axis { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.rx-axis-strong { font-size: 11px; font-weight: 600; fill: var(--text); }
.rx-point { cursor: pointer; }
.rx-point-dot { fill: color-mix(in srgb, var(--muted) 45%, transparent); stroke: var(--rx-tile); stroke-width: 2; transition: fill 0.15s; }
.rx-point.near .rx-point-dot { fill: var(--accent); }
.rx-point.on .rx-point-dot { fill: var(--gold); }
.rx-point:hover .rx-point-dot { fill: var(--ink); }
.rx-scatter-tip { color: var(--on-ink); background: var(--ink); box-shadow: 0 10px 30px rgb(0 0 0 / 0.2); }
.rx-table-toggle { margin-top: 12px; }
.rx-table-toggle summary { cursor: pointer; color: var(--muted); }
.rx-table-toggle .icon-btn { width: 26px; height: 26px; border-radius: 50%; }
.rx-rising { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rx-rising li { display: grid; gap: 4px; }
.rx-rising-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rx-rising-head b { font-weight: 550; font-size: 14px; }
.rx-rising-actions { display: inline-flex; align-items: center; gap: 4px; }
.rx-rising-actions form { margin: 0; }
.rx-rising-actions .icon-btn, .rx-rising-actions .rx-add { width: 26px; height: 26px; border-radius: 50%; }
.rx-meter { display: block; height: 5px; border-radius: 99px; background: var(--rx-fill); overflow: hidden; }
.rx-meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.rx-capsules { list-style: none; display: grid; gap: 3px; margin: 0; padding: 0; }
button.rx-capsule { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: 6px; width: 100%; min-height: 0; padding: 8px 10px; border-radius: 13px; background: transparent; color: var(--text); font-weight: 400; text-align: left; transition: background 0.2s; }
button.rx-capsule:hover { background: var(--rx-fill); }
button.rx-capsule[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rx-capsule-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.rx-capsule-label b { font-weight: 550; }
.rx-capsule-label .muted { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.rx-capsule-track { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--rx-fill); }
.rx-capsule-track i { display: block; }
.rx-capsule-track i.open { background: var(--accent); }
.rx-capsule-track i.covered { background: color-mix(in srgb, var(--muted) 48%, transparent); }
.rx-storage { display: flex; gap: 2px; height: 26px; border-radius: 9px; overflow: hidden; background: var(--rx-fill); }
.rx-storage i { display: block; min-width: 3px; }
.rx-storage .rx-i-guide, .rx-storage-key .rx-i-guide { background: var(--rx-guide); }
.rx-storage .rx-i-compare, .rx-storage-key .rx-i-compare { background: var(--rx-compare); }
.rx-storage .rx-i-list, .rx-storage-key .rx-i-list { background: var(--rx-list); }
.rx-storage .rx-i-other, .rx-storage-key .rx-i-other { background: var(--rx-other); }
.rx-storage-key { list-style: none; display: grid; gap: 8px; margin: 13px 0 0; padding: 0; font-size: 14px; }
.rx-storage-key li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.rx-storage-key i { width: 10px; height: 10px; border-radius: 3px; }
.rx-storage-key .muted { font-variant-numeric: tabular-nums; }
.rx-cell .source-list { margin: 0; }
.rx-cell .source-list li { padding: 7px 0; font-size: 13.5px; }
.rx-cell .source-icon { border: 0; background: var(--rx-fill); border-radius: 8px; }
.rx-side .side-card { padding: 17px; }
.rx-side .side-card h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.rx-page .queue .icon-btn { border-radius: 50%; }
.rx-page .queue li { border-color: var(--rx-line); }

/* Competing articles */
button.rx-open { text-align: left; font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); overflow-wrap: anywhere; }
button.rx-open:hover, button.rx-rail-open:hover { background: none; color: var(--accent); }
.rx-read-tag { color: var(--accent); }
button.rx-rail-open { margin-top: 7px; font-size: 21px; font-weight: 650; line-height: 1.17; letter-spacing: -0.022em; text-wrap: pretty; overflow-wrap: anywhere; color: var(--text); }
.sheet.rx-read { width: min(720px, 100vw); }
.rx-read h2 { margin-top: 2px; font-size: 24px; font-weight: 700; letter-spacing: -0.024em; }
.rx-read h3 { margin: 0 0 7px; font-size: 14px; font-weight: 650; }
.rx-read-start { display: grid; justify-items: start; gap: 11px; padding: 6px 0 10px; }
.rx-read-start p { margin: 0; font-size: 15px; }
.rx-read-loading { display: flex; align-items: center; gap: 13px; padding: 18px; border-radius: 16px; background: var(--rx-fill, color-mix(in srgb, var(--text) 6%, transparent)); }
.rx-read-loading p { margin: 2px 0 0; }
.rx-read-angle { padding: 14px 16px; border-radius: 16px; background: var(--tint); }
.rx-read-angle .eyebrow { color: var(--accent); }
.rx-read-angle p { margin: 0; font-size: 15.5px; font-weight: 500; line-height: 1.35; }
.rx-read-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rx-read-gaps, .rx-read-covered { list-style: none; margin: 0; padding: 0; }
.rx-read-gaps { display: grid; gap: 7px; font-size: 14px; }
.rx-read-gaps li { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 7px; align-items: start; }
.rx-read-gaps .icon { margin-top: 3px; color: var(--accent); }
.rx-read-covered { display: flex; flex-wrap: wrap; gap: 5px; }
.rx-read-covered li { padding: 3px 10px; border-radius: 99px; font-size: 12.5px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.rx-read-title { margin-bottom: 8px !important; }
.rx-read-list { margin: 0; padding: 0; list-style: none; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; counter-reset: read; }
.rx-read-list > li { display: grid; gap: 3px; padding: 13px 15px; }
.rx-read-list > li + li { border-top: 1px solid var(--hairline); }
.rx-read-list p { margin: 3px 0 0; }
.rx-read-link { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.rx-read-link .icon { display: inline-block; vertical-align: -1px; color: var(--muted); }
.rx-read-outline { margin-top: 3px; }
.rx-read-outline summary { cursor: pointer; color: var(--muted); }
.rx-read-outline ul { margin: 6px 0 2px; padding-left: 17px; display: grid; gap: 3px; }
.rx-read-actions { flex-wrap: wrap; gap: 8px; }
button.rx-read-primary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.rx-read-actions .ghost.small { min-height: 36px; padding: 0 13px; border-radius: 10px; }
@media (max-width: 620px) { .rx-read-compare { grid-template-columns: 1fr; } }

/* Plain bars, shared with Site health. */
.rx-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 8px; color: var(--muted); }
.rx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rx-legend i { width: 9px; height: 9px; border-radius: 50%; }
.rx-legend i.open, .rx-bar i.open { background: var(--accent); }
.rx-legend i.covered, .rx-bar i.covered { background: color-mix(in srgb, var(--muted) 42%, transparent); }
.rx-bars { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 9px; }
.rx-bar-static { display: grid; gap: 4px; }
.rx-bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; min-width: 0; }
.rx-bar-label .muted { flex: none; font-variant-numeric: tabular-nums; }
.rx-bar { display: flex; gap: 2px; height: 8px; }
.rx-bar i { display: block; min-width: 3px; border-radius: 2px 4px 4px 2px; }

/* Prompt bar: a floating capsule that appears only while something is selected. */
.rx-tray { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 8px; justify-self: center; width: fit-content; max-width: min(100%, 720px); padding: 7px 8px 7px 9px; border-radius: 999px; color: #fff; background: #0a0b14; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 18px 46px rgb(5 6 20 / 0.42); animation: rx-island 0.5s var(--spring); }
@keyframes rx-island { from { opacity: 0; transform: translateY(14px) scale(0.86); } }
.rx-tray-count { flex: none; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 650; }
.rx-tray-words { flex: 0 1 240px; min-width: 0; padding: 0 4px; font-size: 13.5px; color: rgb(255 255 255 / 0.72); }
.rx-tray > button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 99px; background: rgb(255 255 255 / 0.13); color: #fff; font-size: 13.5px; font-weight: 550; }
.rx-tray > button:hover { background: rgb(255 255 255 / 0.2); }
.rx-tray > button.small-btn { background: #fff; color: #0a0b14; }
.rx-tray > button.small-btn:hover { background: #e7eaff; }
.rx-tray > button.icon-btn { width: 30px; min-height: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 50%; color: rgb(255 255 255 / 0.8); }
.rx-tray .sheet { color: var(--text); }
.rx-tray .sheet button.button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.ghost.small, .hx-actions .ghost { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 1180px) { .rx-grid { grid-template-columns: 1fr; } .rx-side { position: static; max-height: none; overflow: visible; order: -1; } .rx-w8, .rx-w5, .rx-w4 { grid-column: span 6; } .rx-w8 { grid-column: 1 / -1; } .rx-w3 { grid-column: span 6; } }
@media (max-width: 820px) { .rx-tray { bottom: calc(66px + env(safe-area-inset-bottom)); } }
@media (max-width: 640px) { .rx-search input { font-size: 16px; } .rx-w8, .rx-w5, .rx-w4, .rx-w3 { grid-column: 1 / -1; } .rx-cell { padding: 19px; } .rx-serp-grid { grid-template-columns: 1fr; } .rx-tray-words { display: none; } .rx-title { font-size: 23px; } }

/* Site health */
.hx-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; padding: 26px; margin-bottom: 14px; border-radius: var(--r-lg); color: #eef0ff; background: radial-gradient(90% 150% at 20% 40%, #1b2257 0%, #0c0f28 58%, #070815 100%); }
.hx-score { display: flex; align-items: center; gap: 26px; min-width: 0; }
.hx-score .ring { flex: none; }
.hx-score .tick { stroke: rgb(255 255 255 / 0.17); }
.hx-score .tick.on { stroke: #ffd66b; }
.hx-score .ring-center { display: flex; flex-direction: column; align-items: center; }
.hx-score-value { font-size: 50px; font-weight: 650; letter-spacing: -0.035em; line-height: 1; color: #fff; }
.hx-score-of { font-size: 12px; color: #c5cbef; }
.hx-score-text { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.hx-score-text h2 { margin: 0; font-size: 25px; font-weight: 650; letter-spacing: -0.02em; color: #fff; }
.hx-score-text p { margin: 0; font-size: 13.5px; color: #c5cbef; }
.hx-counts { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; font-size: 13.5px; color: #dfe3ff; }
.hx-counts b { font-weight: 650; color: #fff; }
.hx-spark polyline { fill: none; stroke: #aab6ff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hx-spark circle { fill: #ffd66b; stroke: #0c0f28; stroke-width: 2; }
button.hx-copy-all { display: inline-flex; align-items: center; gap: 7px; margin-top: 3px; min-height: 36px; padding: 0 14px; border-radius: 10px; background: #fff; color: #0b0e22; font-size: 13.5px; font-weight: 600; }
button.hx-copy-all:hover { background: #e6e9ff; }
.hx-score-text .hx-hero-note { font-size: 12px; color: #a8aed8; }
.hx-areas { list-style: none; display: grid; align-content: center; gap: 9px; margin: 0; padding: 0; min-width: 0; }
.hx-areas li { display: grid; grid-template-columns: minmax(0, 128px) minmax(0, 1fr) 26px; align-items: center; gap: 10px; font-size: 13px; }
.hx-area-name { color: #dfe3ff; }
.hx-area-meter { display: block; height: 6px; border-radius: 99px; background: rgb(255 255 255 / 0.12); overflow: hidden; }
.hx-area-meter i { display: block; height: 100%; border-radius: 99px; background: rgb(255 255 255 / 0.4); }
.hx-area-meter i.good { background: #30d158; }
.hx-area-meter i.warn { background: #ffb340; }
.hx-area-meter i.bad { background: #ff6961; }
.hx-area-score { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; color: #fff; }
.hx-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; margin-bottom: 14px; }
.hx-panel { min-width: 0; padding: 18px; }
.hx-panel > p { margin: 3px 0 0; }
.hx-big { font-size: 30px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.hx-big small { font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.hx-hist { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0 0; padding: 0; }
.hx-hist li { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.hx-hist-count { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hx-hist-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 76px; border-bottom: 1px solid var(--hairline); }
.hx-hist-track i { display: block; width: min(24px, 80%); border-radius: 4px 4px 0 0; }
.hx-hist-track i.good { background: var(--good-mark); }
.hx-hist-track i.warn { background: var(--warn); }
.hx-hist-track i.bad { background: var(--bad); }
.hx-hist-label { font-size: 10.5px; line-height: 1.2; text-align: center; color: var(--muted); }
.hx-mini-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.hx-mini-list li { display: flex; justify-content: space-between; gap: 10px; }
.hx-mini-list .muted { flex: none; font-variant-numeric: tabular-nums; }
.hx-vitals { display: grid; gap: 13px; }
.hx-vitals > .eyebrow { margin: 0; }
.hx-vitals > p { margin: 0; }
.hx-vitals > .button { justify-self: start; }
.hx-vital { display: grid; gap: 3px; }
.hx-vital-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.hx-vital-head b { font-weight: 600; }
.hx-vital-value { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.hx-scale { position: relative; display: flex; gap: 2px; height: 6px; }
.hx-scale i { display: block; height: 100%; }
.hx-scale i.good { background: var(--good-mark); border-radius: 3px 0 0 3px; }
.hx-scale i.warn { background: color-mix(in srgb, var(--warn) 72%, transparent); }
.hx-scale i.bad { flex: 1; background: color-mix(in srgb, var(--bad) 72%, transparent); border-radius: 0 3px 3px 0; }
.hx-scale b { position: absolute; top: -3px; width: 4px; height: 12px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.hx-scale-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.hx-formats { margin-top: 12px; }
.hx-speedfixes { margin-bottom: 14px; }
.hx-speedfixes ul { list-style: none; display: grid; margin: 4px 0 0; padding: 0; }
.hx-speedfixes li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.hx-speedfixes li:first-child { border-top: 0; }
.hx-speedfixes b { font-weight: 550; font-size: 14px; }
.hx-speedfixes p { margin: 2px 0 0; }
.hx-checks { list-style: none; margin: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.hx-checks > li + li { border-top: 1px solid var(--hairline); }
.hx-check summary { display: flex; align-items: center; gap: 11px; padding: 13px 16px; cursor: pointer; list-style: none; }
.hx-check summary::-webkit-details-marker { display: none; }
.hx-check summary:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.hx-check summary > .icon { flex: none; color: var(--muted); transition: transform 0.2s var(--spring); }
.hx-check[open] summary > .icon { transform: rotate(90deg); }
.hx-check .state-mark { flex: none; }
.hx-state.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.hx-state.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.hx-state.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.hx-check-body { display: grid; gap: 13px; padding: 2px 16px 17px 49px; }
.hx-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hx-why p { margin: 0; font-size: 14px; }
.hx-pages { list-style: none; display: grid; gap: 5px; margin: 0; padding: 10px 12px; max-height: 220px; overflow-y: auto; border-radius: 10px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.hx-pages li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.hx-actions { gap: 8px; flex-wrap: wrap; }
@media (max-width: 1080px) { .hx-hero { grid-template-columns: 1fr; } .hx-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .hx-hero { padding: 20px 16px; } .hx-score { flex-direction: column; align-items: flex-start; } .hx-panels { grid-template-columns: 1fr; } .hx-why { grid-template-columns: 1fr; } .hx-check-body { padding-left: 16px; } .hx-state { display: none; } }

/* ASO workflow screens */
.feature-panel { padding: 24px; margin: 20px 0; }
.feature-panel h2 { margin-top: 0; }
.feature-form { display: grid; gap: 16px; max-width: 840px; margin: 20px 0; }
.feature-form label { display: grid; gap: 6px; }
.feature-form input:not([type=checkbox]):not([type=color]):not([type=range]), .feature-form select, .feature-form textarea { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font: inherit; }
.feature-form fieldset, .feature-panel fieldset { border: 1px solid var(--hairline); padding: 14px; border-radius: 10px; margin: 12px 0; }
.feature-checkboxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; max-height: 280px; overflow: auto; padding: 10px 0; }
.feature-checkboxes label { display: flex; gap: 7px; align-items: center; font-size: 13px; }
.feature-code, .feature-token { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 500px; overflow: auto; padding: 14px; background: var(--bg); border: 1px solid var(--hairline); border-radius: 8px; display: block; }
.feature-message { padding: 16px; margin: 12px 0; border: 1px solid var(--hairline); border-radius: 12px; }
.feature-message.user { margin-left: 24px; }
.screenshot-studio { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(220px, 420px); gap: 32px; align-items: start; }
.screenshot-canvas { max-width: 100%; max-height: 680px; object-fit: contain; width: auto; height: auto; display: block; margin: 16px auto; border-radius: 12px; box-shadow: 0 8px 28px #0002; }
.aso-tabs { flex-wrap: wrap; }
@media (max-width: 760px) { .screenshot-studio { grid-template-columns: 1fr; } .feature-panel { padding: 16px; } }
.aso-popularity-hover { display: inline-flex; position: relative; }
.aso-popularity-tooltip { display: grid; gap: 6px; position: absolute; bottom: 100%; left: -60px; width: 250px; padding: 14px; z-index: 30; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px #0002; font-size: 12px; white-space: normal; }
.aso-head { flex-wrap: wrap; }
.aso-head > .aso-tabs { flex: 1 1 100%; max-width: 100%; height: auto; flex-wrap: wrap; justify-content: flex-start; }
.feature-panel { min-width: 0; }
.feature-panel .aso-audit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.feature-panel select { max-width: 100%; border: 1px solid var(--hairline); border-radius: 7px; background: var(--surface); color: var(--text); padding: 7px; }
.screenshot-studio { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
.screenshot-studio > * { min-width: 0; }
.screenshot-canvas { width: 100%; max-width: 420px; height: auto; max-height: none; }
@media (max-width: 1100px) { .screenshot-studio { grid-template-columns: minmax(0, 1fr); } .screenshot-studio > :last-child { grid-row: 1; } .screenshot-canvas { max-height: 480px; width: auto; max-width: 100%; } }
.feature-panel { display: block; }
.feature-form { width: 100%; min-width: 0; }
.screenshot-studio { width: 100%; }
.feature-panel > .aso-table { min-width: 0; width: 100%; table-layout: fixed; }
.feature-panel > .aso-table th, .feature-panel > .aso-table td { overflow-wrap: anywhere; }

/* ==========================================================================
   App Store Connect / Apple HIG Design System for ASO Audit
   Light & Dark adaptive. Keeps all Audit content and workflows intact.
   ========================================================================== */

body:has(.aso-audit-premium) {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --hairline: rgb(0 0 0 / 0.08);
  --text: #1d1d1f;
  --muted: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  background-color: #f5f5f7 !important;
  background-image: none !important;
}

:root[data-theme="dark"] body:has(.aso-audit-premium) {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --hairline: rgb(255 255 255 / 0.12);
  --text: #f5f5f7;
  --muted: #86868b;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  background-color: #000000 !important;
  background-image: none !important;
}


  :root[data-theme="dark"]:not([data-theme="light"]) body:has(.aso-audit-premium) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --hairline: rgb(255 255 255 / 0.12);
    --text: #f5f5f7;
    --muted: #86868b;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    background-color: #000000 !important;
    background-image: none !important;
  }


.aso-page:has(.aso-audit-premium) {
  --asc-canvas: #f5f5f7;
  --asc-sheet: #ffffff;
  --asc-elevated: #f5f5f7;
  --asc-row-hover: #f9f9fb;
  --asc-fill: rgb(118 118 128 / 0.12);
  --asc-fill-hover: rgb(118 118 128 / 0.18);
  --asc-segment-active: #ffffff;
  --asc-segment-shadow: 0 3px 8px rgb(0 0 0 / 0.12), 0 3px 1px rgb(0 0 0 / 0.04);
  --asc-border: #d2d2d7;
  --asc-hairline: rgb(0 0 0 / 0.08);
  --asc-text: #1d1d1f;
  --asc-secondary: #6e6e73;
  --asc-muted: #86868b;
  --asc-blue: #0071e3;
  --asc-blue-hover: #0077ed;
  --asc-link: #0066cc;
  --asc-tint: rgb(0 113 227 / 0.1);
  --asc-focus: rgb(0 113 227 / 0.26);
  --asc-green: #248a3d;
  --asc-green-dot: #28cd41;
  --asc-amber: #b25000;
  --asc-amber-dot: #ff9500;
  --asc-red: #d70015;
  --asc-card-shadow: 0 2px 12px rgb(0 0 0 / 0.04), 0 0 0 1px rgb(0 0 0 / 0.06);
  gap: 20px;
}

:root[data-theme="dark"] .aso-page:has(.aso-audit-premium) {
  --asc-canvas: #000000;
  --asc-sheet: #1c1c1e;
  --asc-elevated: #242426;
  --asc-row-hover: #242426;
  --asc-fill: rgb(118 118 128 / 0.24);
  --asc-fill-hover: rgb(118 118 128 / 0.34);
  --asc-segment-active: #323236;
  --asc-segment-shadow: 0 2px 6px rgb(0 0 0 / 0.4), inset 0 0 0 0.5px rgb(255 255 255 / 0.12);
  --asc-border: #3a3a3c;
  --asc-hairline: rgb(255 255 255 / 0.1);
  --asc-text: #f5f5f7;
  --asc-secondary: #a1a1a6;
  --asc-muted: #86868b;
  --asc-blue: #0a84ff;
  --asc-blue-hover: #409cff;
  --asc-link: #2997ff;
  --asc-tint: rgb(10 132 255 / 0.16);
  --asc-focus: rgb(10 132 255 / 0.32);
  --asc-green: #30d158;
  --asc-green-dot: #30d158;
  --asc-amber: #ffb340;
  --asc-amber-dot: #ff9f0a;
  --asc-red: #ff6961;
  --asc-card-shadow: 0 4px 20px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.09);
}


  :root[data-theme="dark"]:not([data-theme="light"]) .aso-page:has(.aso-audit-premium) {
    --asc-canvas: #000000;
    --asc-sheet: #1c1c1e;
    --asc-elevated: #242426;
    --asc-row-hover: #242426;
    --asc-fill: rgb(118 118 128 / 0.24);
    --asc-fill-hover: rgb(118 118 128 / 0.34);
    --asc-segment-active: #323236;
    --asc-segment-shadow: 0 2px 6px rgb(0 0 0 / 0.4), inset 0 0 0 0.5px rgb(255 255 255 / 0.12);
    --asc-border: #3a3a3c;
    --asc-hairline: rgb(255 255 255 / 0.1);
    --asc-text: #f5f5f7;
    --asc-secondary: #a1a1a6;
    --asc-muted: #86868b;
    --asc-blue: #0a84ff;
    --asc-blue-hover: #409cff;
    --asc-link: #2997ff;
    --asc-tint: rgb(10 132 255 / 0.16);
    --asc-focus: rgb(10 132 255 / 0.32);
    --asc-green: #30d158;
    --asc-green-dot: #30d158;
    --asc-amber: #ffb340;
    --asc-amber-dot: #ff9f0a;
    --asc-red: #ff6961;
    --asc-card-shadow: 0 4px 20px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.09);
  }


/* App Header bar in App Store Connect style */
.aso-page:has(.aso-audit-premium) > .aso-head {
  padding: 6px 0 18px;
  border-bottom: 1px solid var(--asc-hairline);
}

.aso-page:has(.aso-audit-premium) > .aso-head img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), 0 0 0 0.5px rgb(0 0 0 / 0.08);
}

.aso-page:has(.aso-audit-premium) > .aso-head h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--asc-text);
}

.aso-page:has(.aso-audit-premium) > .aso-head p {
  font-size: 13px;
  color: var(--asc-muted);
}

.aso-page:has(.aso-audit-premium) > .aso-head .aso-tabs {
  padding: 2px;
  background: var(--asc-fill);
  border-radius: 9px;
  box-shadow: none;
}

.aso-page:has(.aso-audit-premium) > .aso-head .aso-tabs a {
  padding: 5px 15px;
  font-size: 13px;
  font-weight: 500;
  color: var(--asc-secondary);
  border-radius: 7px;
}

.aso-page:has(.aso-audit-premium) > .aso-head .aso-tabs a[aria-current="page"] {
  color: var(--asc-text);
  background: var(--asc-segment-active);
  box-shadow: var(--asc-segment-shadow);
}

/* Unified App Store Connect Console Sheet */
.aso-audit-premium {
  --accent: var(--asc-blue);
  --accent-hover: var(--asc-blue-hover);
  --on-accent: #ffffff;
  --tint: var(--asc-tint);
  display: grid;
  gap: 0;
  padding: 0;
  color: var(--asc-text);
  background: var(--asc-sheet);
  border-radius: 16px;
  box-shadow: var(--asc-card-shadow);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  letter-spacing: -0.01em;
}

/* ---------- App Store Connect Version Top Header ---------- */
.aso-audit-premium .aso-audit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 28px;
  padding: 24px 28px 0;
  background: var(--asc-sheet);
  border-bottom: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-eyebrow {
  display: none;
}

.aso-audit-premium .aso-audit-heading h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.15;
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--asc-secondary);
  background: var(--asc-elevated);
  border: 1px solid var(--asc-border);
  border-radius: 980px;
}

.aso-audit-premium .aso-audit-version::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--asc-green-dot);
}

.aso-audit-premium .aso-audit-heading p {
  margin-top: 5px;
  max-width: 540px;
  color: var(--asc-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.aso-audit-premium .aso-audit-bar {
  justify-content: flex-end;
  max-width: 520px;
  gap: 10px;
}

/* ---------- Apple HIG Pill Buttons & Form Controls ---------- */
.aso-audit-premium .aso-btn,
.aso-audit-premium button.aso-btn,
.aso-audit-premium a.aso-btn {
  min-height: 34px;
  padding: 6px 16px;
  border-radius: 980px;
  color: var(--asc-link);
  background: var(--asc-fill);
  border: 0;
  box-shadow: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s, transform 0.12s;
}

.aso-audit-premium .aso-btn:hover:not(:disabled),
.aso-audit-premium button.aso-btn:hover:not(:disabled),
.aso-audit-premium a.aso-btn:hover {
  background: var(--asc-fill-hover);
  color: var(--asc-link);
  box-shadow: none;
  filter: none;
}

.aso-audit-premium .aso-btn.primary,
.aso-audit-premium button.aso-btn.primary,
.aso-audit-premium a.aso-btn.primary {
  color: #ffffff;
  background: var(--asc-blue);
  border: 0;
  box-shadow: 0 1px 2px rgb(0 113 227 / 0.2);
}

.aso-audit-premium .aso-btn.primary:hover:not(:disabled),
.aso-audit-premium button.aso-btn.primary:hover:not(:disabled),
.aso-audit-premium a.aso-btn.primary:hover {
  background: var(--asc-blue-hover);
  color: #ffffff;
  filter: none;
}

.aso-audit-premium .aso-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.aso-audit-premium .aso-btn:disabled {
  opacity: 0.42;
  box-shadow: none;
  transform: none;
}

.aso-audit-premium .aso-text-btn,
.aso-audit-premium button.aso-text-btn {
  min-height: 0;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--asc-link);
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

.aso-audit-premium .aso-text-btn:hover,
.aso-audit-premium button.aso-text-btn:hover {
  color: var(--asc-blue-hover);
  background: transparent;
  text-decoration: underline;
}

.aso-audit-premium .aso-input {
  min-height: 36px;
  padding: 6px 12px;
  color: var(--asc-text);
  background-color: var(--asc-sheet);
  border: 1px solid var(--asc-border);
  border-radius: 8px;
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.aso-audit-premium select.aso-input {
  padding-right: 30px;
}

.aso-audit-premium .aso-input:hover:not(:disabled) {
  border-color: var(--asc-muted);
}

.aso-audit-premium .aso-input:focus {
  outline: none;
  background-color: var(--asc-sheet);
  border-color: var(--asc-blue);
  box-shadow: 0 0 0 3px var(--asc-focus);
}

.aso-audit-premium .aso-audit-run {
  align-items: center;
  gap: 8px;
}

.aso-audit-premium .aso-audit-run .aso-input {
  max-width: 170px;
  min-height: 34px;
  font-size: 13px;
}

/* ---------- App Store Connect Sub-Navigation Tabs ---------- */
.aso-audit-premium .aso-audit-workflow {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  padding: 12px 0;
  border-top: 1px solid var(--asc-hairline);
  border-bottom: 0;
}

.aso-audit-premium .aso-audit-workflow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--asc-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.aso-audit-premium .aso-audit-workflow a + a {
  border-left: 0;
}

.aso-audit-premium .aso-audit-workflow a > span:first-child {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--asc-muted);
  background: var(--asc-fill);
  border: 0;
  border-radius: 50%;
}

.aso-audit-premium .aso-audit-workflow a > span.complete {
  color: #ffffff;
  background: var(--asc-green-dot);
}

.aso-audit-premium .aso-audit-workflow a > span:last-child {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.aso-audit-premium .aso-audit-workflow small {
  display: inline;
  margin-top: 0;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--asc-muted);
}

.aso-audit-premium .aso-audit-workflow small::before {
  content: "· ";
}

.aso-audit-premium .aso-audit-workflow a:hover > span:last-child {
  color: var(--asc-link);
}

.aso-audit-premium .aso-audit-workflow a[aria-disabled="true"] {
  cursor: default;
  opacity: 0.48;
}

.aso-audit-premium .aso-audit-done {
  max-width: 380px;
  color: var(--asc-green);
  font-size: 13px;
  line-height: 1.45;
}

/* ---------- App Store Connect Localization Bar ---------- */
.aso-audit-premium .aso-audit-locale-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 28px;
  background: var(--asc-elevated);
  border-bottom: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-locale-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--asc-secondary);
}

.aso-audit-premium .aso-audit-locale-label > .icon {
  color: var(--asc-muted);
}

.aso-audit-premium .aso-audit-locale-picker b {
  font-size: 13px;
  font-weight: 600;
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-locale-total {
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--asc-muted);
  background: var(--asc-fill);
  border-radius: 980px;
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium .aso-audit-locale-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.aso-audit-premium button.aso-locale-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--asc-secondary);
  background: transparent;
  border: 1px solid var(--asc-border);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.14s, color 0.14s, border-color 0.14s;
}

.aso-audit-premium button.aso-locale-back-btn:hover {
  color: var(--asc-text);
  background: var(--asc-sheet);
  border-color: var(--asc-muted);
}

.aso-audit-premium button.aso-locale-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 340px;
  min-height: 36px;
  padding: 5px 12px 5px 11px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--asc-text);
  background: var(--asc-sheet);
  border: 1px solid var(--asc-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.aso-audit-premium button.aso-locale-select-btn:hover {
  background: var(--asc-sheet);
  border-color: var(--asc-muted);
}

.aso-audit-premium button.aso-locale-select-btn[aria-expanded="true"] {
  border-color: var(--asc-blue);
  box-shadow: 0 0 0 3px var(--asc-focus);
}

.aso-audit-premium .aso-locale-select-name {
  min-width: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.aso-locale-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 2px 8px;
  border-radius: 980px;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.aso-locale-badge.primary {
  color: var(--accent, #0071e3);
  background: color-mix(in srgb, var(--accent, #0071e3) 12%, transparent);
}

.aso-locale-badge.changed {
  color: #248a3d;
  background: color-mix(in srgb, #28cd41 14%, transparent);
}

:root[data-theme="dark"] .aso-locale-badge.changed {
  color: #30d158;
  background: color-mix(in srgb, #30d158 16%, transparent);
}


  :root[data-theme="dark"]:not([data-theme="light"]) .aso-locale-badge.changed {
    color: #30d158;
    background: color-mix(in srgb, #30d158 16%, transparent);
  }


.aso-locale-badge.working {
  color: var(--accent, #0071e3);
  background: color-mix(in srgb, var(--accent, #0071e3) 12%, transparent);
}

.aso-locale-badge.bad {
  color: #d70015;
  background: color-mix(in srgb, #d70015 12%, transparent);
}

:root[data-theme="dark"] .aso-locale-badge.bad {
  color: #ff6961;
  background: color-mix(in srgb, #ff6961 16%, transparent);
}

.aso-locale-badge.muted {
  color: var(--muted, #86868b);
  background: color-mix(in srgb, var(--text, #1d1d1f) 7%, transparent);
}

.aso-popover:has(.aso-locale-popover) {
  max-height: min(440px, 76vh);
  border-radius: 13px;
}

.aso-locale-menu-list {
  display: grid;
  gap: 2px;
  padding: 6px;
}

.aso-locale-menu-list button {
  min-height: 42px;
  padding: 6px 10px;
  border-radius: 9px;
  gap: 10px;
}

.aso-locale-menu-list button[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent, #0071e3) 13%, transparent);
}

.aso-locale-menu-text {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.aso-locale-menu-text .aso-store-name {
  font-size: 13.5px;
  font-weight: 550;
}

.aso-locale-menu-sub {
  font-size: 11px;
  font-weight: 450;
  color: var(--muted, #86868b);
}

.aso-locale-menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--hairline);
}

/* ---------- App Store Connect Continuous Document Sections ---------- */
.aso-audit-premium > .aso-panel {
  padding: 28px;
  gap: 20px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--asc-hairline);
  border-radius: 0;
  box-shadow: none;
}

.aso-audit-premium > .aso-panel:last-child {
  border-bottom: 0;
}

.aso-audit-premium .aso-audit-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.aso-audit-premium .aso-audit-section-head h2 {
  gap: 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-section-note {
  color: var(--asc-muted);
  font-size: 13px;
  text-align: right;
}

/* ---------- Apple macOS / iOS Segmented Control ---------- */
.aso-audit-premium .aso-audit-tabs {
  gap: 2px;
  padding: 2px;
  width: fit-content;
  max-width: 100%;
  background: var(--asc-fill);
  border: 0;
  border-radius: 9px;
}

.aso-audit-premium .aso-audit-tabs button {
  gap: 6px;
  min-height: 28px;
  padding: 4px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--asc-secondary);
  transition: color 0.14s, background-color 0.14s, box-shadow 0.14s;
}

.aso-audit-premium .aso-audit-tabs button:hover {
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-tabs button[aria-selected="true"] {
  color: var(--asc-text);
  background: var(--asc-segment-active);
  box-shadow: var(--asc-segment-shadow);
}

.aso-audit-premium .aso-audit-star {
  color: var(--asc-blue);
}

.aso-audit-premium .aso-delta {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 980px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium .aso-delta.good {
  color: var(--asc-green);
  background: color-mix(in srgb, var(--asc-green) 12%, transparent);
}

.aso-audit-premium .aso-delta.bad {
  color: var(--asc-red);
  background: color-mix(in srgb, var(--asc-red) 12%, transparent);
}

/* ---------- App Store Connect Metadata Fields & App Analytics Strip ---------- */
.aso-audit-premium .aso-audit-compare {
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 24px;
  align-items: stretch;
}

.aso-audit-premium .aso-audit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-content: start;
}

.aso-audit-premium .aso-audit-field {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 0;
  border-bottom: 0;
}

.aso-audit-premium .aso-audit-field:last-child {
  grid-column: 1 / -1;
}

.aso-audit-premium .aso-audit-label {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-field > .small {
  grid-column: 2;
  grid-row: 1;
  font-size: 12px;
  color: var(--asc-muted);
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium .aso-audit-value {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 40px;
  padding: 9px 13px;
  color: var(--asc-text);
  background: var(--asc-sheet);
  border: 1px solid var(--asc-border);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.aso-audit-premium .aso-audit-field:last-child .aso-audit-value {
  min-height: 58px;
  font-size: 13.5px;
  line-height: 1.55;
}

.aso-audit-premium .aso-audit-value.changed {
  border-color: color-mix(in srgb, var(--asc-blue) 42%, var(--asc-border));
}

.aso-audit-premium .aso-audit-value mark {
  padding: 1px 5px;
  margin-inline: -1px;
  color: var(--asc-link);
  background: var(--asc-tint);
  border-radius: 5px;
  font-weight: 500;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.aso-audit-premium .aso-audit-scores {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  padding: 12px 18px;
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 12px;
}

.aso-audit-premium .aso-audit-scores > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 8px;
  padding: 9px 0;
}

.aso-audit-premium .aso-audit-scores > div + div {
  border-top: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-scores dd {
  grid-column: 1;
  grid-row: 1;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--asc-text);
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium .aso-audit-scores dt {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 12px;
  font-weight: 500;
  color: var(--asc-muted);
  line-height: 1.3;
}

.aso-audit-premium .aso-audit-scores .small {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  font-size: 11.5px;
  text-align: right;
}

.aso-audit-premium .aso-audit-actions {
  align-items: center;
  gap: 8px 10px;
  padding-top: 6px;
}

.aso-audit-premium .aso-audit-actions .aso-btn.primary:disabled {
  opacity: 1;
  color: var(--asc-green);
  background: color-mix(in srgb, var(--asc-green) 13%, transparent);
  box-shadow: none;
}

.aso-audit-premium .aso-audit-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--asc-link);
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 980px;
  list-style: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.aso-audit-premium .aso-audit-more > summary::-webkit-details-marker {
  display: none;
}

.aso-audit-premium .aso-audit-more > summary::after {
  content: "›";
  font-size: 14px;
  line-height: 1;
  color: var(--asc-muted);
  transition: transform 0.15s ease;
}

.aso-audit-premium .aso-audit-more[open] > summary {
  color: var(--asc-blue);
  background: var(--asc-tint);
  border-color: color-mix(in srgb, var(--asc-blue) 22%, transparent);
}

.aso-audit-premium .aso-audit-more[open] > summary::after {
  transform: rotate(90deg);
  color: var(--asc-blue);
}

.aso-audit-premium .aso-audit-more > summary:hover {
  background: var(--asc-fill);
  text-decoration: none;
}

.aso-audit-premium .aso-audit-more p {
  max-width: 780px;
  line-height: 1.6;
}

.aso-audit-premium .aso-audit-phrases {
  gap: 6px;
  margin-top: 10px;
}

.aso-audit-premium .aso-chip {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 980px;
}

/* ---------- Version Information / Release Text (AsoAuditCopy) ---------- */
.aso-audit-premium .aso-copy-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--asc-muted);
  background: transparent;
  border: 0;
}

.aso-audit-premium .aso-copy-status > span {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}

.aso-audit-premium .aso-copy-status.saved {
  color: var(--asc-secondary);
}

.aso-audit-premium .aso-copy-status.saved > span {
  background: var(--asc-green-dot);
}

.aso-audit-premium .aso-copy-status.unsaved {
  color: var(--asc-amber);
}

.aso-audit-premium .aso-copy-status.unsaved > span {
  background: var(--asc-amber-dot);
}

.aso-audit-premium .aso-audit-copy > p {
  max-width: 780px;
  margin-top: -10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--asc-muted);
}

.aso-audit-premium .aso-copy-fieldset {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  min-width: 0;
  border: 0;
}

.aso-audit-premium .aso-copy-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas:
    "promo notes"
    "description notes";
  gap: 18px 24px;
}

.aso-audit-premium .aso-copy-field-description { grid-area: description; }
.aso-audit-premium .aso-copy-field-promotionalText { grid-area: promo; }
.aso-audit-premium .aso-copy-field-whatsNew { grid-area: notes; }

.aso-audit-premium .aso-copy-fields .aso-field {
  gap: 6px;
  grid-template-rows: auto 1fr;
}

.aso-audit-premium .aso-field-head label {
  font-size: 13px;
  font-weight: 600;
  color: var(--asc-text);
}

.aso-audit-premium .aso-limit {
  font-size: 12px;
  color: var(--asc-muted);
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium .aso-copy-fields textarea {
  width: 100%;
  padding: 10px 12px;
  resize: vertical;
  color: var(--asc-text);
  background: var(--asc-sheet);
  border: 1px solid var(--asc-border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.52;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.aso-audit-premium .aso-copy-fields textarea:hover {
  border-color: var(--asc-muted);
}

.aso-audit-premium .aso-copy-fields textarea:focus {
  outline: none;
  background: var(--asc-sheet);
  border-color: var(--asc-blue);
  box-shadow: 0 0 0 3px var(--asc-focus);
}

.aso-audit-premium .aso-copy-field-promotionalText textarea { min-height: 86px; }
.aso-audit-premium .aso-copy-field-description textarea { min-height: 230px; }
.aso-audit-premium .aso-copy-field-whatsNew textarea { height: 100%; min-height: 230px; }

.aso-audit-premium .aso-copy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
}

.aso-audit-premium .aso-copy-footer .small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--asc-muted);
}

.aso-audit-premium .aso-copy-footer b {
  font-weight: 600;
  color: var(--asc-text);
}

.aso-audit-premium .aso-copy-assistant {
  border-top: 1px solid var(--asc-hairline);
  padding-top: 14px;
}

.aso-audit-premium .aso-copy-assistant summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--asc-link);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  list-style: none;
}

.aso-audit-premium .aso-copy-assistant summary::-webkit-details-marker { display: none; }
.aso-audit-premium .aso-copy-assistant summary > span { display: flex; align-items: center; gap: 6px; }
.aso-audit-premium .aso-copy-assistant[open] summary > .icon { transform: rotate(90deg); }
.aso-audit-premium .aso-copy-assistant .aso-generate-controls { margin-top: 14px; gap: 12px; }

/* ---------- Localizations Table (App Store Connect style) ---------- */
.aso-audit-premium .aso-audit-localizations > .small {
  max-width: 780px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--asc-muted);
}

.aso-audit-premium .aso-table-wrap {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--asc-hairline);
  border-radius: 0;
}

.aso-audit-premium .aso-audit-table thead th {
  padding: 10px 12px;
  color: var(--asc-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  background: var(--asc-sheet);
  border-bottom: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-table thead th:first-child,
.aso-audit-premium .aso-audit-table tbody tr td:first-child {
  padding-left: 0;
}

.aso-audit-premium .aso-audit-table thead th:last-child,
.aso-audit-premium .aso-audit-table tbody tr td:last-child {
  padding-right: 0;
  text-align: right;
}

.aso-audit-premium .aso-audit-table tbody tr td,
.aso-audit-premium .aso-audit-table tbody tr:nth-child(even) td {
  height: 50px;
  padding: 10px 12px;
  background: transparent;
  border-bottom: 1px solid var(--asc-hairline);
  font-size: 13.5px;
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-table tbody tr:last-child td {
  border-bottom: 0;
}

.aso-audit-premium .aso-audit-table tbody tr.aso-audit-row:hover td {
  background: var(--asc-row-hover);
}

.aso-audit-premium .aso-audit-table tbody tr.aso-audit-row.current td {
  background: var(--asc-tint);
}

.aso-audit-premium .aso-audit-table tbody tr td.changed {
  color: var(--asc-text);
  font-weight: 500;
}

.aso-audit-premium .aso-audit-language-link {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 0;
  color: var(--asc-link);
  background: none;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  font-size: 13.5px;
  font-weight: 400;
}

.aso-audit-premium .aso-audit-language-link:hover {
  background: none;
  color: var(--asc-blue-hover);
  text-decoration: underline;
}

.aso-audit-premium .aso-audit-language-link > .icon {
  opacity: 0.5;
  margin-left: 2px;
}

.aso-audit-premium .aso-audit-count {
  color: var(--asc-link);
  background: var(--asc-tint);
  border-radius: 980px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 500;
}

.aso-audit-premium > .aso-progress-bar,
.aso-audit-premium > .aso-push-banner,
.aso-audit-premium > .callout,
.aso-audit-premium > .alert {
  margin: 14px 28px 0;
}

.aso-audit-premium .aso-progress-bar {
  min-height: 42px;
  padding: 10px 16px;
  color: var(--asc-secondary);
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
}

.aso-audit-premium .aso-progress-bar .spinner {
  color: var(--asc-blue);
}

.aso-audit-premium .callout,
.aso-audit-premium .alert {
  padding: 11px 14px;
  border: 1px solid var(--asc-hairline);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Version Push Popover & Live Progress ---------- */
.aso-popover:has(.aso-version-pop) {
  width: min(370px, calc(100vw - 24px));
  padding: 16px 18px;
  border-radius: 12px;
}

.aso-version-pop {
  display: grid;
  gap: 12px;
}

.aso-version-pop > b {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.aso-version-pop .aso-btn.primary {
  color: #ffffff;
  background: #0071e3;
  border-color: transparent;
  box-shadow: none;
  border-radius: 980px;
}

.aso-version-pop .aso-btn.primary:hover:not(:disabled) {
  background: #0077ed;
}

.aso-version-pop .aso-btn:not(.primary) {
  border-radius: 980px;
}

.aso-push-progress {
  display: grid;
  gap: 8px;
  padding: 4px 0 2px;
}

.aso-push-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.aso-push-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.aso-push-pct {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0071e3;
}

:root[data-theme="dark"] .aso-push-pct {
  color: #0a84ff;
}

.aso-push-track {
  position: relative;
  width: 100%;
  height: 7px;
  background: rgba(120, 120, 128, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.aso-push-track > i,
.aso-push-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0071e3 0%, #2997ff 100%);
  transition: width 140ms linear;
}

.aso-push-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.aso-push-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aso-audit-premium .aso-push-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 10px;
}

.aso-audit-premium .aso-push-banner > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  color: var(--asc-text);
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium .aso-push-banner > i {
  height: 3px;
  background: linear-gradient(90deg, #0071e3 0%, #2997ff 100%);
  transition: width 140ms linear;
}

/* ---------- Empty / Start State (Apple Console Sheet) ---------- */
.aso-audit-premium.aso-audit-start {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  background: var(--asc-sheet);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--asc-card-shadow);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: center;
  padding: 36px 28px;
  background:
    radial-gradient(560px 280px at 18% 0%, color-mix(in srgb, var(--asc-blue) 7%, transparent), transparent 72%),
    var(--asc-sheet);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-lead {
  display: grid;
  justify-items: start;
  gap: 16px;
  min-width: 0;
}

.aso-audit-premium.aso-audit-start .aso-audit-emblem {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--asc-blue);
  background: linear-gradient(180deg, color-mix(in srgb, var(--asc-blue) 14%, var(--asc-sheet)), var(--asc-tint));
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--asc-blue) 20%, transparent),
    0 6px 18px color-mix(in srgb, var(--asc-blue) 12%, transparent);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--asc-secondary);
}

.aso-audit-premium.aso-audit-start h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--asc-text);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-lead p {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--asc-secondary);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-cta .aso-btn {
  min-height: 38px;
  padding: 8px 20px;
  font-size: 14px;
}

.aso-audit-premium.aso-audit-start .aso-audit-live-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 4px 0 0;
  padding: 12px 14px 12px 16px;
  background: var(--asc-elevated);
  border: 1px solid color-mix(in srgb, var(--asc-blue) 24%, var(--asc-hairline));
  border-radius: 14px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--asc-blue) 8%, transparent);
}

.aso-audit-premium.aso-audit-start .aso-audit-live-stage-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.aso-audit-premium.aso-audit-start .aso-audit-live-stage-text b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--asc-text);
}

.aso-audit-premium.aso-audit-start .aso-audit-live-stage-text small {
  font-size: 12px;
  color: var(--asc-muted);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-preview {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 14px;
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--asc-muted);
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-store {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--asc-secondary);
}

.aso-audit-premium.aso-audit-start .aso-audit-start-preview .aso-audit-search-preview {
  max-width: none;
  margin-top: 0;
  padding: 14px 16px;
  background: var(--asc-sheet);
  border: 1px solid var(--asc-hairline);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-fields {
  display: grid;
  gap: 0;
  background: var(--asc-sheet);
  border: 1px solid var(--asc-hairline);
  border-radius: 12px;
  overflow: hidden;
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 10px 14px;
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-row + .aso-audit-preview-row {
  border-top: 1px solid var(--asc-hairline);
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-row > span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--asc-muted);
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-row > small {
  font-size: 11.5px;
  color: var(--asc-muted);
  font-variant-numeric: tabular-nums;
}

.aso-audit-premium.aso-audit-start .aso-audit-preview-row > p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--asc-text);
}

.aso-audit-premium [id] {
  scroll-margin-top: 20px;
}

/* ---------- Supporting Facts & Historical Records (Apple Inset Grouped List) ---------- */
.aso-audit-premium .aso-audit-search-preview {
  max-width: 450px;
  margin-top: 14px;
  padding: 18px;
  background: var(--asc-elevated);
  border: 1px solid var(--asc-hairline);
  border-radius: 12px;
}

.aso-audit-premium.aso-audit-support {
  padding: 0;
  gap: 0;
  background: var(--asc-sheet);
  border-radius: 16px;
  box-shadow: var(--asc-card-shadow);
  overflow: hidden;
}

.aso-audit-premium .aso-audit-disclosure {
  color: var(--asc-text);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.aso-audit-premium .aso-audit-disclosure + .aso-audit-disclosure {
  border-top: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s;
}

.aso-audit-premium .aso-audit-disclosure > summary:hover {
  background: var(--asc-row-hover);
}

.aso-audit-premium .aso-audit-disclosure > summary::-webkit-details-marker {
  display: none;
}

.aso-audit-premium .aso-audit-disclosure > summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.aso-audit-premium .aso-audit-disclosure > summary b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--asc-text);
}

.aso-audit-premium .aso-audit-disclosure > summary small {
  display: block;
  margin-top: 2px;
  color: var(--asc-muted);
  font-size: 12.5px;
}

.aso-audit-premium .aso-audit-disclosure > summary > .icon {
  color: var(--asc-muted);
  transition: transform 0.18s ease;
}

.aso-audit-premium .aso-audit-disclosure[open] > summary > .icon {
  transform: rotate(90deg);
}

.aso-audit-premium .aso-audit-disclosure-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--asc-blue);
  background: var(--asc-tint);
  border-radius: 10px;
}

.aso-audit-premium .aso-audit-facts-form,
.aso-audit-premium .aso-audit-history-body {
  display: grid;
  gap: 14px;
  padding: 4px 24px 24px 74px;
}

.aso-audit-premium .aso-audit-facts-form > .aso-btn {
  justify-self: start;
}

.aso-audit-premium .aso-audit-facts-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--asc-elevated);
  border: 1px solid var(--asc-border);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
}

.aso-audit-premium .aso-audit-facts-form textarea:focus {
  background: var(--asc-sheet);
  border-color: var(--asc-blue);
  box-shadow: 0 0 0 3px var(--asc-focus);
}

.aso-audit-premium .aso-audit-history-body h3 {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--asc-muted);
}

.aso-audit-premium .aso-audit-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-history-list > li {
  border-bottom: 1px solid var(--asc-hairline);
}

.aso-audit-premium .aso-audit-history-list > li:last-child {
  border-bottom: 0;
}

.aso-audit-premium .aso-audit-history-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  color: var(--asc-text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.aso-audit-premium .aso-audit-history-list a:hover > span:first-child {
  color: var(--asc-link);
}

.aso-audit-premium .aso-audit-history-list a > span:last-child {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--asc-link);
  font-size: 13px;
  font-weight: 400;
}

.aso-audit-premium .aso-audit-history-list small {
  display: block;
  margin-top: 2px;
  color: var(--asc-muted);
  font-size: 12px;
  font-weight: 400;
}

.aso-audit-premium .aso-audit-history-list details > summary {
  padding: 12px 0;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.aso-audit-premium .aso-audit-previous-text {
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--asc-elevated);
  border-radius: 8px;
  font-size: 12.5px;
}

.aso-audit-premium .aso-audit-previous-text p {
  margin-top: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--asc-secondary);
  font-size: 12.5px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .aso-audit-premium .aso-audit-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .aso-audit-premium .aso-audit-bar {
    justify-content: flex-start;
    max-width: none;
  }
  .aso-audit-premium.aso-audit-start .aso-audit-start-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 700px) {
  .aso-audit-premium .aso-audit-hero {
    padding: 18px 18px 0;
  }
  .aso-audit-premium .aso-audit-locale-picker {
    padding: 10px 18px;
  }
  .aso-audit-premium > .aso-panel {
    padding: 20px 18px;
    gap: 16px;
  }
  .aso-audit-premium.aso-audit-start .aso-audit-start-grid {
    padding: 24px 18px;
  }
  .aso-audit-premium .aso-audit-disclosure > summary {
    padding: 16px 18px;
  }
  .aso-audit-premium .aso-audit-facts-form,
  .aso-audit-premium .aso-audit-history-body {
    padding: 0 18px 18px;
  }
  .aso-audit-premium .aso-audit-section-head {
    align-items: flex-start;
  }
  .aso-audit-premium .aso-audit-compare {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .aso-audit-premium .aso-audit-fields {
    grid-template-columns: 1fr;
  }
  .aso-audit-premium .aso-audit-scores {
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 0 0;
    gap: 12px;
    border-left: 0;
    border-top: 1px solid var(--asc-hairline);
  }
  .aso-audit-premium .aso-audit-scores > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    padding: 0;
    gap: 4px;
  }
  .aso-audit-premium .aso-audit-scores > div + div {
    padding-left: 12px;
    border-top: 0;
    border-left: 1px solid var(--asc-hairline);
  }
  .aso-audit-premium .aso-audit-scores dd {
    font-size: 20px;
  }
  .aso-audit-premium .aso-copy-fields {
    grid-template-columns: 1fr;
    grid-template-areas:
      "description"
      "promo"
      "notes";
  }
  .aso-audit-premium .aso-copy-field-description textarea,
  .aso-audit-premium .aso-copy-field-whatsNew textarea {
    min-height: 200px;
  }
  .aso-audit-premium .aso-audit-workflow {
    gap: 16px;
  }
  .aso-audit-premium button.aso-locale-select-btn {
    max-width: min(260px, 72vw);
  }
}

@media (max-width: 430px) {
  .aso-audit-premium .aso-audit-workflow small {
    display: none;
  }
  .aso-audit-premium .aso-audit-tabs button {
    padding: 4px 10px;
    font-size: 12px;
  }
  .aso-audit-premium .aso-copy-footer {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aso-audit-premium *,
  .aso-audit-premium *::before,
  .aso-audit-premium *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.aso-final-review { padding: 24px; }
.aso-final-review > .aso-audit-actions { margin: 16px 0; flex-wrap: wrap; }
.aso-review-table { min-width: 1050px; width: 100%; }
.aso-review-table caption { text-align: left; padding: 12px 0; }
.aso-review-table td, .aso-review-table th { vertical-align: top; min-width: 145px; }
.aso-review-table td details { margin-top: 8px; }
.aso-review-table td details p { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 280px; max-height: 260px; overflow: auto; }

/* Editing a proposed listing in place */
.aso-audit-edit { width: 100%; font: inherit; font-size: 15px; }
textarea.aso-audit-edit { resize: vertical; min-height: 72px; line-height: 1.5; }
.aso-audit-edit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aso-over { color: var(--bad); font-weight: 600; }

/* New release: one sheet with a numbered release line, and a ticket that sums it up.
   The big version numbers are printed slightly off-register, like the product's icons. */
.rl {
  --rl-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --rl-rule: var(--hairline);
  --rl-rule-strong: color-mix(in srgb, var(--text) 18%, transparent);
  --rl-accent: var(--text);
  --rl-on-accent: var(--surface);
  --rl-ring: color-mix(in srgb, var(--text) 12%, transparent);
  --rl-soft: color-mix(in srgb, var(--text) 4%, var(--surface));
  --rl-ghost: color-mix(in srgb, var(--text) 16%, transparent);
  --rl-lift: 0 1px 2px rgb(0 0 0 / .04), 0 22px 48px -24px rgb(0 0 0 / .22);
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 6px;
}
:root[data-theme="dark"] .rl { --rl-lift: inset 0 1px 0 rgb(255 255 255 / .05), 0 24px 48px -24px rgb(0 0 0 / .7); }
 :root[data-theme="dark"]:not([data-theme="light"]) .rl { --rl-lift: inset 0 1px 0 rgb(255 255 255 / .05), 0 24px 48px -24px rgb(0 0 0 / .7); } 

.rl-mono { font-family: var(--rl-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Plain buttons inside the page drop the global pill style. */
.rl button:not(.aso-btn) { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; box-shadow: none; cursor: pointer; transform: none; }
.rl button:not(.aso-btn):disabled { cursor: default; opacity: .45; }
.rl button:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 2px; }

/* ---------- The release line ---------- */
.rl-seq { list-style: none; margin: 0; padding: 6px 28px; border: 1px solid var(--rl-rule); border-radius: 20px; background: var(--surface); min-width: 0; }
.rl-step { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 20px; }
.rl-step::before { content: ""; position: absolute; left: 14.5px; top: 0; bottom: 0; width: 1px; background: var(--rl-rule-strong); }
.rl-step:first-child::before { top: 32px; }
.rl-step:last-child::before { bottom: auto; height: 32px; }
.rl-step[data-mark="done"]::before { background: color-mix(in srgb, var(--text) 45%, transparent); }
.rl-step:last-child[data-mark="done"]::before { background: var(--rl-rule-strong); }
.rl-step + .rl-step .rl-step-body { border-top: 1px solid var(--rl-rule); }

.rl-node { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; margin-top: 20px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rl-rule-strong); color: var(--muted); font: 600 12px/1 var(--rl-mono); transition: background-color .2s, color .2s, box-shadow .2s; }
.rl-step[data-mark="done"] .rl-node { background: var(--rl-accent); color: var(--rl-on-accent); box-shadow: 0 0 0 4px var(--surface); }
.rl-node .icon path:last-child, .rl-tick .icon path:last-child { stroke-width: 2.6; }
.rl-node .icon path:first-child:not(:last-child), .rl-tick .icon path:first-child:not(:last-child) { display: none; }
.rl-step[data-mark="warn"] .rl-node { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent), 0 0 0 4px var(--surface); }
.rl-step[data-mark="skip"] .rl-node { background: var(--surface); box-shadow: none; outline: 1px dashed var(--rl-rule-strong); outline-offset: -1px; }

.rl-step-body { display: grid; gap: 14px; min-width: 0; padding: 22px 0 24px; }
.rl-step-head { display: grid; gap: 4px; }
.rl-step-head h3 { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.rl-step-no { font: 500 11px/1 var(--rl-mono); color: var(--muted); letter-spacing: .02em; }
.rl-step-head p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.rl-step-head p .rl-mono { color: var(--text); font-weight: 600; }

/* ---------- Choices ---------- */
.rl-opts { display: grid; gap: 10px; }
.rl-opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rl-opt { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rl-rule); color: var(--text); cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.rl-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.rl-opt:hover { box-shadow: inset 0 0 0 1px var(--rl-rule-strong); }
.rl-opt:has(input:checked) { background: var(--rl-soft); box-shadow: inset 0 0 0 1.5px var(--rl-accent); }
.rl-opt:has(input:focus-visible) { outline: 2px solid var(--rl-accent); outline-offset: 2px; }
.rl-opt:has(input:disabled) { cursor: default; opacity: .5; }
.rl-dot { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--rl-rule-strong); transition: box-shadow .18s var(--spring); }
.rl-opt:has(input:checked) .rl-dot { box-shadow: inset 0 0 0 5.5px var(--rl-accent); }
.rl-opt-text { display: grid; gap: 3px; min-width: 0; }
.rl-opt-text b { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 600; }
.rl-opt-text small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.rl-opt-aside { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.rl-callout { display: grid; gap: 12px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 7%, var(--surface)); box-shadow: inset 2px 0 0 var(--warn); }
.rl-callout p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.rl-callout-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Version ---------- */
.rl-version { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.rl-version-field { display: block; }
.aso-page .rl-version-field input { width: 176px; height: 58px; min-height: 0; padding: 0 16px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rl-rule-strong); color: var(--text); font: 600 28px/1 var(--rl-mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; outline: none; transition: box-shadow .15s; }
.aso-page .rl-version-field input::placeholder { color: color-mix(in srgb, var(--text) 25%, transparent); }
.aso-page .rl-version-field input:focus { box-shadow: inset 0 0 0 1.5px var(--rl-accent), 0 0 0 4px var(--rl-ring); }
.aso-page .rl-version-field[data-invalid] input { box-shadow: inset 0 0 0 1.5px var(--bad); }
.aso-page .rl-version-field[data-invalid] input:focus { box-shadow: inset 0 0 0 1.5px var(--bad), 0 0 0 4px color-mix(in srgb, var(--bad) 14%, transparent); }
.rl-bumps { display: flex; gap: 8px; flex-wrap: wrap; }
.rl .rl-bumps button { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-width: 76px; padding: 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rl-rule); transition: box-shadow .15s, color .15s; }
.rl .rl-bumps button span { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rl .rl-bumps button b { font: 600 14px/1 var(--rl-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rl .rl-bumps button:hover { box-shadow: inset 0 0 0 1px var(--rl-rule-strong); }
.rl .rl-bumps button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--rl-accent); color: var(--rl-accent); background: var(--rl-soft); }
.rl-field-msg { margin: -4px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.rl-field-msg[data-error] { color: var(--bad); }

/* ---------- Builds: one joined list ---------- */
.rl-builds { display: grid; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rl-rule); overflow: hidden; }
.rl-builds .rl-opt { align-items: center; border-radius: 0; box-shadow: none; background: none; padding: 12px 16px; }
.rl-builds .rl-opt + .rl-opt, .rl-builds .rl-more + .rl-opt, .rl-builds .rl-opt + .rl-more { border-top: 1px solid var(--rl-rule); }
.rl-builds .rl-opt:hover { background: color-mix(in srgb, var(--text) 3%, transparent); box-shadow: none; }
.rl-builds .rl-opt:has(input:checked) { background: var(--rl-soft); box-shadow: inset 3px 0 0 var(--rl-accent); }
.rl-builds .rl-opt:has(input:focus-visible) { outline-offset: -2px; }
.rl-builds .rl-opt-text b .rl-mono { font-size: 14px; }
.rl-build-ver { font-size: 12px; font-weight: 500; color: var(--muted); }
.rl-builds .rl-opt:last-child .rl-opt-text b { font-weight: 550; }
.rl-tag { font-style: normal; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--rl-accent); }
.rl button.rl-more { justify-content: center; width: 100%; padding: 10px 16px; font-size: 12px; font-weight: 500; color: var(--muted); }
.rl button.rl-more:hover { color: var(--rl-accent); background: color-mix(in srgb, var(--text) 3%, transparent); }

/* ---------- What's New ---------- */
.rl-notes { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 16px; align-items: start; }
.rl-editor { display: grid; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rl-rule-strong); overflow: hidden; transition: box-shadow .15s; }
.rl-editor:focus-within { box-shadow: inset 0 0 0 1.5px var(--rl-accent), 0 0 0 4px var(--rl-ring); }
.rl-editor[data-disabled] { opacity: .55; }
.rl-editor-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--rl-rule); font-size: 11.5px; color: var(--muted); }
.rl-editor-bar > span { margin-right: 4px; }
.rl .rl-editor-bar button { padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rl-rule); font-size: 12px; color: var(--text); transition: box-shadow .15s, color .15s; }
.rl .rl-editor-bar button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--rl-accent); color: var(--rl-accent); }
.rl .rl-editor-bar button[aria-pressed="true"] { background: var(--text); color: var(--surface); box-shadow: none; }
.aso-page .rl-editor textarea { display: block; width: 100%; min-height: 150px; margin: 0; padding: 14px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); font: inherit; font-size: 14px; line-height: 1.6; resize: vertical; outline: none; }
.rl-editor-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 12px; font: 11px/1 var(--rl-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.rl-meter { width: 64px; height: 3px; border-radius: 2px; background: var(--rl-rule); overflow: hidden; }
.rl-meter i { display: block; height: 100%; background: var(--rl-accent); border-radius: inherit; transition: width .2s; }

.rl-preview { display: grid; gap: 8px; margin: 0; }
.rl-preview figcaption { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.rl-store { padding: 16px 18px 18px; border-radius: 16px; background: var(--surface-2); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
.rl-store-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rl-store-head b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.rl-store-head span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rl-store-meta { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 10px; font-size: 12.5px; color: var(--muted); }
.rl-store p { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }

/* ---------- The ticket ---------- */
.rl-ticket { position: sticky; top: 20px; display: grid; min-width: 0; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rl-rule), var(--rl-lift); overflow: hidden; }
.rl-tk-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 22px 0; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.rl-tk-head .rl-mono { letter-spacing: .06em; font-weight: 500; }

.rl-transit { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); align-items: end; gap: 10px; padding: 18px 22px 24px; }
.rl-port { display: grid; gap: 6px; min-width: 0; }
.rl-port.to { justify-items: end; text-align: right; }
.rl-port small { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.rl-print { font: 650 30px/1 var(--rl-mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: var(--muted); }
.rl-port.to .rl-print { color: var(--rl-accent); text-shadow: 2.5px 2.5px 0 var(--rl-ghost); }
.rl-print[data-empty] { font-size: 20px; color: var(--muted); }
.rl-port span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.rl-live { width: 6px; height: 6px; border-radius: 50%; background: var(--good-mark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good-mark) 20%, transparent); }
.rl-route { width: 40px; height: 16px; margin-bottom: 30px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.rl-perf { position: relative; height: 0; margin: 0 20px; border-top: 1.5px dashed var(--rl-rule-strong); }
.rl-perf::before, .rl-perf::after { content: ""; position: absolute; top: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--rl-rule); }
.rl-perf::before { left: -30px; } .rl-perf::after { right: -30px; }

.rl-manifest { display: grid; gap: 2px; margin: 0; padding: 16px 22px; }
.rl-manifest > div { display: flex; align-items: center; gap: 0; padding: 6px 0; }
.rl-manifest dt { flex: none; font-size: 12.5px; color: var(--muted); }
.rl-manifest dd { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.rl-manifest dd::before { content: ""; flex: 1; min-width: 12px; margin: 0 4px 0 10px; border-bottom: 1px dotted var(--rl-rule-strong); transform: translateY(3px); }
.rl-manifest dd .rl-mono { font-size: 12.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.rl-tick { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font: 700 10px/1 var(--rl-mono); }
.rl-manifest [data-mark="done"] .rl-tick { background: var(--good-mark); color: #fff; }
.rl-manifest [data-mark="todo"] .rl-tick, .rl-manifest [data-mark="warn"] .rl-tick { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.rl-manifest [data-mark="todo"] .rl-mono, .rl-manifest [data-mark="warn"] .rl-mono { color: var(--warn); }
.rl-manifest [data-mark="skip"] .rl-tick { color: var(--muted); box-shadow: inset 0 0 0 1px var(--rl-rule-strong); }
.rl-manifest [data-mark="skip"] .rl-mono { color: var(--muted); }

.rl-stub { display: grid; gap: 10px; padding: 18px 22px 22px; }
.aso-page .rl .rl-btn { width: 100%; justify-content: center; gap: 8px; min-height: 44px; font-size: 13px; border-radius: 12px; }
.aso-page .rl .rl-go { min-height: 48px; font-size: 14px; font-weight: 600; }
.aso-page .rl .rl-btn:disabled { opacity: .45; cursor: not-allowed; }
.rl-fine { margin: 2px 0 0; font-size: 11.5px; line-height: 1.5; text-align: center; color: var(--muted); text-wrap: balance; }
.rl-fine[data-warn] { color: var(--warn); }

.rl-confirm { display: grid; gap: 8px; animation: rl-rise .22s var(--spring); }
.rl-confirm b { font-size: 14px; letter-spacing: -.01em; }
.rl-confirm p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.rl-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.rl-done { display: grid; gap: 12px; justify-items: center; text-align: center; }
.rl-stamp { --c: var(--good); display: inline-grid; justify-items: center; gap: 2px; margin: 4px 0; padding: 8px 16px 7px; border: 2px solid var(--c); border-radius: 8px; color: var(--c); font: 700 15px/1.1 var(--rl-mono); text-transform: uppercase; letter-spacing: .16em; transform: rotate(-4deg); animation: rl-stamp .42s var(--spring) both; }
.rl-stamp[data-kind="prepared"] { --c: var(--rl-accent); }
.rl-stamp small { text-transform: none; font-size: 11px; letter-spacing: .06em; font-weight: 500; }
.rl-done p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.rl-done ul { display: grid; gap: 6px; justify-self: stretch; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--rl-rule); list-style: none; text-align: left; }
.rl-done li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.45; }
.rl-done li .icon { margin-top: 2px; color: var(--good); }

/* ---------- Loading ---------- */
.rl-loading .rl-step-body { gap: 10px; }
.rl-skel { display: block; height: 14px; border-radius: 6px; background: color-mix(in srgb, var(--text) 7%, transparent); animation: rl-pulse 1.4s ease-in-out infinite; }
.rl-skel.tall { height: 48px; width: 100%; border-radius: 12px; }
.rl-ticket-ghost { min-height: 380px; place-items: center; }
.rl-reading { margin: 0; font-size: 12.5px; color: var(--muted); }

@keyframes rl-pulse { 50% { opacity: .5; } }
@keyframes rl-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes rl-stamp { from { opacity: 0; transform: rotate(-4deg) scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .rl *, .rl *::before { animation: none !important; transition: none !important; } }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .rl { grid-template-columns: minmax(0, 1fr); }
  .rl-ticket { position: static; max-width: 520px; width: 100%; justify-self: center; }
  .rl-ticket-ghost { display: none; }
}
@media (max-width: 760px) {
  .rl-seq { padding: 2px 16px; border-radius: 16px; }
  .rl-step { grid-template-columns: 26px minmax(0, 1fr); gap: 14px; }
  .rl-step::before { left: 12.5px; }
  .rl-node { width: 26px; height: 26px; margin-top: 20px; font-size: 11px; }
  .rl-step:first-child::before { top: 30px; } .rl-step:last-child::before { height: 30px; }
  .rl-opts.two, .rl-notes { grid-template-columns: minmax(0, 1fr); }
  .rl-version { flex-direction: column; }
  .aso-page .rl-version-field input { width: 100%; }
  .rl-bumps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rl .rl-bumps button { min-width: 0; min-height: 54px; padding: 0 12px; }
  .rl-opt-aside time { display: none; }
}

/* Ink-only primary actions: no brand blue on this page. */
.aso-page .rl .aso-btn.primary { background: var(--rl-accent); color: var(--rl-on-accent); }
.aso-page .rl .aso-btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--rl-accent) 86%, var(--surface)); }
.aso-page .rl .aso-btn.primary:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 2px; }

/* Quiet surfaces, clear hierarchy and consistent controls across the workspace. */
:root {
  --bg: #f5f5f7; --surface: #fff; --surface-2: #f5f5f7; --text: #1d1d1f; --muted: #6e6e73;
  --accent: #0071e3; --accent-hover: #0077ed; --on-accent: #fff; --tint: rgb(0 113 227 / .08);
  --hairline: rgb(0 0 0 / .09); --ink: #1d1d1f; --on-ink: #fff; --tick: transparent; --gold: var(--accent);
  --series-1: var(--accent); --shadow: 0 2px 8px rgb(0 0 0 / .025); --r-lg: 20px; --r-md: 12px;
}
:root[data-theme="dark"] {
  --bg: #161617; --surface: #1c1c1e; --surface-2: #262628; --text: #f5f5f7; --muted: #a1a1a6;
  --accent: #0a84ff; --accent-hover: #409cff; --tint: rgb(10 132 255 / .14); --hairline: rgb(255 255 255 / .1);
  --ink: #f5f5f7; --on-ink: #1d1d1f; --shadow: 0 2px 8px rgb(0 0 0 / .08);
}

  :root[data-theme="dark"]:not([data-theme="light"]) {
    --bg: #161617; --surface: #1c1c1e; --surface-2: #262628; --text: #f5f5f7; --muted: #a1a1a6;
    --accent: #0a84ff; --accent-hover: #409cff; --tint: rgb(10 132 255 / .14); --hairline: rgb(255 255 255 / .1);
    --ink: #f5f5f7; --on-ink: #1d1d1f; --shadow: 0 2px 8px rgb(0 0 0 / .08);
  }

body { background-image: none; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
.card { background-image: none; box-shadow: var(--shadow); }
.card::before, .card::after { display: none; }
.app { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: var(--surface); padding: 28px 16px 18px; border-right: 1px solid var(--hairline); gap: 22px; overflow-y: auto; }
.sidebar .brand { font-size: 19px; letter-spacing: -.6px; padding: 0 10px; }
.sidebar .side-label { font-size: 11px; letter-spacing: .035em; font-weight: 600; text-transform: none; margin: 0 12px 7px; }
.workspace-sidebar-nav { display: grid; gap: 3px; }
.sidebar .side-link { min-height: 40px; border-radius: 9px; padding: 9px 12px; color: var(--muted); font-size: 13px; gap: 11px; }
.sidebar .side-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sidebar .side-link[aria-current="page"] { color: var(--accent); background: var(--tint); font-weight: 600; }
.sidebar .side-sites, .sidebar .side-chats { flex: none; max-height: 210px; overflow-y: auto; }
.sidebar .side-foot { margin-top: auto; padding: 16px 10px 0; }
.workspace-sidebar-more { font-size: 13px; color: var(--muted); }
.workspace-sidebar-more summary { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 9px 12px; cursor: pointer; border-radius: 9px; list-style: none; }
.workspace-sidebar-more summary > .icon:last-child { margin-left: auto; transform: rotate(90deg); }
.workspace-sidebar-more[open] summary > .icon:last-child { transform: rotate(-90deg); }
.workspace-sidebar-more .side-link { padding-left: 41px; font-size: 12px; }
summary::-webkit-details-marker { display: none; }
.content:has(.aso-page) { padding: 32px 36px 64px; max-width: 1400px; width: 100%; min-width: 0; }
.aso-page { --aso-brand: var(--accent); --aso-warm: var(--accent); --aso-control: var(--surface-2); --aso-line: var(--hairline); gap: 24px; }
.aso-head { gap: 20px; padding: 0; margin: 0; }
.aso-head h1 { font-size: 23px; letter-spacing: -.6px; }
.aso-head p { font-size: 12px; color: var(--muted); }
.workspace-navigation { display: flex; align-items: center; gap: 16px; width: 100%; border-bottom: 1px solid var(--hairline); margin-top: 3px; }
.workspace-tabs { display: flex; align-items: center; gap: 26px; min-width: 0; }
.workspace-tabs > a, .workspace-more > summary { position: relative; min-height: 48px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; list-style: none; }
.workspace-tabs > a:hover { color: var(--text); text-decoration: none; }
.workspace-tabs > a[aria-current="page"], .workspace-more.selected > summary { color: var(--text); font-weight: 600; }
.workspace-tabs > a[aria-current="page"]::after, .workspace-more.selected > summary::after { position: absolute; content: ""; height: 2px; background: var(--text); bottom: -1px; inset-inline: 0; border-radius: 2px; }
.workspace-more { position: relative; }
.workspace-more > summary .icon { transform: rotate(90deg); }
.workspace-more-menu { position: absolute; top: calc(100% + 7px); left: -12px; z-index: 70; width: 310px; padding: 6px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: 0 12px 40px rgb(0 0 0 / .14); border-radius: 16px; }
.workspace-more-menu a { display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--text); border-radius: 10px; }
.workspace-more-menu a:hover { background: var(--surface-2); text-decoration: none; }
.workspace-more-menu a[aria-current] { background: var(--tint); }
.workspace-more-menu a > .icon:first-child { color: var(--muted); }
.workspace-more-menu b { display: block; font-size: 13px; font-weight: 600; }
.workspace-more-menu small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.workspace-assistant { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 8px 10px; border-radius: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.workspace-assistant:hover, .workspace-assistant.selected { color: var(--accent); background: var(--tint); text-decoration: none; }
.workspace-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 8px 0 0; }
.workspace-intro h2 { font-size: 28px; font-weight: 650; letter-spacing: -.9px; line-height: 1.2; }
.workspace-intro p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 9px 0 0; max-width: 650px; }
.workspace-eyebrow { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.workspace-intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
.aso-page .aso-btn, .aso-page button.aso-btn, .aso-page a.aso-btn { min-height: 38px; border-radius: 9px; padding: 8px 14px; font-size: 12px; font-weight: 550; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.aso-page .aso-btn:hover { background: var(--surface-2); }
.aso-page button.aso-btn.primary, .aso-page a.aso-btn.primary, .aso-page button.aso-btn.warm { background: var(--accent); color: #fff; box-shadow: none; }
.aso-page .aso-btn.primary:hover { background: var(--accent-hover); filter: none; }
.aso-page .aso-btn:disabled { opacity: .45; cursor: not-allowed; }
.aso-page .aso-btn.subtle { box-shadow: none; color: var(--accent); background: transparent; }
.aso-page .aso-check:checked { background-color: var(--accent); }
.aso-page .aso-tool-badge { background: var(--accent); }
.aso-page .aso-panel, .aso-page .feature-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }
.aso-page .feature-panel { margin: 0; padding: 28px; }
.aso-page .feature-panel > h2 { font-size: 18px; margin-bottom: 10px; }
.aso-page .feature-panel > p { color: var(--muted); font-size: 13px; line-height: 1.65; margin-bottom: 16px; max-width: 760px; }
.feature-form { max-width: none; margin: 20px 0 0; gap: 20px; font-size: 13px; }
.feature-form label { color: var(--text); font-size: 12px; font-weight: 550; gap: 8px; }
.feature-form label small, .workspace-help { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.aso-page .feature-form :is(input:not([type=checkbox]):not([type=color]):not([type=range]),select,textarea), .aso-page .studio select { min-height: 42px; border-radius: 9px; padding: 10px 12px; font-size: 13px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); }
.feature-form textarea { resize: vertical; line-height: 1.6; }
.feature-form label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 9px; min-height: 38px; font-weight: 400; }
.aso-page input[type=checkbox], .aso-page input[type=range] { accent-color: var(--accent); }
.feature-form fieldset, .feature-panel fieldset { margin: 0; border-radius: 12px; padding: 18px; border-color: var(--hairline); }
.feature-checkboxes { grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); max-height: 240px; gap: 2px 16px; padding: 10px 0; }
.feature-checkboxes label { min-height: 36px; font-size: 12px; }
.workspace-disclosure { border-top: 1px solid var(--hairline); padding-top: 18px; margin-top: 20px; }
.workspace-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.workspace-disclosure > summary::after { content: "+"; color: var(--muted); font-size: 19px; font-weight: 400; }
.workspace-disclosure[open] > summary::after { content: "−"; }
.workspace-disclosure > p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 12px; }
.workspace-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.workspace-section { display: grid; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--hairline); }
.workspace-section:first-of-type { padding-top: 4px; }
.workspace-section h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.25px; }
.workspace-section h3 span { font-size: 11px; color: var(--muted); margin-right: 12px; font-variant-numeric: tabular-nums; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; }
.workspace-footer p { font-size: 12px; color: var(--muted); margin: 0; }
.workspace-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.workspace-choice .aso-btn[aria-pressed=true] { color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 30%,transparent); }
.workspace-empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 44px 24px; }
.workspace-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--muted); }
.workspace-empty h3 { font-size: 18px; margin: 4px 0 0; font-weight: 600; }
.workspace-empty p { font-size: 13px; line-height: 1.7; max-width: 400px; color: var(--muted); }
.workspace-notice { display: flex; align-items: flex-start; gap: 10px; border-radius: 10px; background: var(--surface-2); padding: 12px 14px; font-size: 12px; line-height: 1.6; }
.workspace-notice > .icon { margin-top: 2px; flex-shrink: 0; }
.workspace-notice.success { color: var(--good); background: color-mix(in srgb,var(--good) 7%,var(--surface)); }
.workspace-notice.error { color: var(--bad); background: color-mix(in srgb,var(--bad) 7%,var(--surface)); }
.aso-page .aso-table-wrap { border: 1px solid var(--hairline); border-radius: 12px; overflow: auto; }
.aso-page .aso-table { font-size: 12px; background: var(--surface); }
.aso-page .aso-table th { color: var(--muted); font-size: 11px; font-weight: 500; background: var(--surface-2); white-space: nowrap; padding: 13px 16px; }
.aso-page .aso-table td { padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.aso-page .aso-table tbody tr:last-child td { border-bottom: 0; }
.aso-page .aso-table tbody tr:hover { background: color-mix(in srgb,var(--text) 2%,var(--surface)); }
.workspace-section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.workspace-section-head h2 { font-size: 18px; }
.workspace-section-head p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.workspace-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.workspace-stat { padding: 8px 24px; border-right: 1px solid var(--hairline); }
.workspace-stat:first-child { padding-left: 0; }
.workspace-stat:last-child { border: 0; }
.workspace-stat strong { font-size: 32px; font-weight: 600; letter-spacing: -1px; display: block; margin-bottom: 7px; }
.workspace-stat strong small { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.workspace-stat span { font-size: 12px; color: var(--muted); }
.studio { display: grid; gap: 18px; }
.studio-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.studio-toolbar > .aso-btn { margin-left: auto; }
.studio-devices { display: flex; flex-wrap: wrap; }
.studio-devices button { white-space: nowrap; }
.studio-save-state { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.studio-workspace { display: grid; grid-template-columns: minmax(0,1fr) 300px; border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; background: var(--surface); }
.studio-board { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: 14px; padding: 18px 0 16px; background: var(--surface-2); }
.studio-board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; flex-wrap: wrap; }
.studio-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.studio-inline select { min-height: 32px !important; padding: 4px 28px 4px 10px !important; font-size: 12px !important; border-radius: 8px !important; }
.studio-strip { min-width: 0; display: flex; gap: 16px; overflow-x: auto; padding: 6px 20px 10px; scroll-snap-type: x proximity; scroll-padding-inline: 20px; overscroll-behavior-x: contain; }
.studio-card { flex: none; display: grid; gap: 8px; justify-items: center; scroll-snap-align: start; }
.studio-card-canvas { padding: 0; border: 0; background: none; border-radius: 14px; cursor: pointer; line-height: 0; outline-offset: 4px; }
.studio-card-canvas canvas { display: block; width: auto; border-radius: 14px; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 8px 24px rgb(0 0 0 / .1); transition: box-shadow .15s, transform .15s; }
.studio-card[data-selected] .studio-card-canvas canvas { box-shadow: 0 0 0 3px var(--accent), 0 10px 28px rgb(0 0 0 / .16); }
.studio-card[data-error] .studio-card-canvas canvas { box-shadow: 0 0 0 3px var(--bad); opacity: .55; }
.studio-card-canvas:hover canvas { transform: translateY(-2px); }
.studio-card-bar { display: flex; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.studio-card-bar > span { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.studio-card-bar button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.studio-card-bar button:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.studio-card-bar button:disabled { opacity: .35; cursor: default; }
.studio-card[data-selected] .studio-card-bar > span { color: var(--accent); }
.flip { display: inline-flex; transform: scaleX(-1); }
.studio-card-add { align-content: center; justify-items: center; gap: 6px; width: 170px; border: 1.5px dashed color-mix(in srgb,var(--text) 22%,transparent); border-radius: 14px; color: var(--muted); font-size: 12px; cursor: pointer; text-align: center; padding: 12px; }
.studio-card-add:hover { border-color: var(--accent); color: var(--accent); }
.studio-card-add small { font-size: 11px; opacity: .8; }
.studio-hint { padding: 0 20px; font-size: 11px; color: var(--muted); }
.studio-warning { display: flex; align-items: flex-start; gap: 8px; margin: 0 20px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5; background: color-mix(in srgb,var(--warn) 12%,transparent); color: var(--text); }
.studio-warning.error { margin: 0 0 14px; background: color-mix(in srgb,var(--bad) 12%,transparent); }
.studio-warning .icon { flex: none; margin-top: 1px; }
.studio-stale { color: var(--warn); }
.studio-inspector { padding: 18px 20px 22px; min-width: 0; border-left: 1px solid var(--hairline); }
.studio-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.studio-inspector-head strong { font-size: 14px; }
.studio-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.studio-inspector .feature-form { gap: 18px; }
.studio-inspector .aso-seg { display: flex; }
.studio-inspector .aso-seg button { flex: 1; min-height: 32px; }
.studio-inspector .aso-btn { white-space: normal; }
.studio-label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 8px; }
.studio-inspector .optional { font-weight: 400; color: var(--muted); font-size: 11px; }
.studio-color-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.studio-color-row input[type=color] { width: 52px; height: 36px; flex: none; border: 1px solid var(--hairline); padding: 3px; background: var(--surface); border-radius: 8px; cursor: pointer; }
.studio-contrast { margin-left: auto; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.studio-contrast.good { color: var(--good); background: color-mix(in srgb,var(--good) 12%,transparent); }
.studio-contrast.warn { color: var(--warn); background: color-mix(in srgb,var(--warn) 14%,transparent); }
.studio-contrast.bad { color: var(--bad); background: color-mix(in srgb,var(--bad) 12%,transparent); }
.studio-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.studio-image-field { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; }
.studio-image-field .studio-label { grid-column: 1 / -1; margin-bottom: 0; }
.studio-drop { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed color-mix(in srgb,var(--text) 22%,transparent); border-radius: 12px; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; transition: border-color .15s, color .15s; }
.studio-drop strong { color: var(--text); font-size: 13px; }
.studio-drop:hover, .studio-drop:focus-within { border-color: var(--accent); color: var(--accent); }
.studio-drop.small { display: flex; justify-items: start; text-align: left; padding: 8px 10px; gap: 10px; min-height: 52px; }
.studio-drop.small img { width: 22px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; }
.studio-start { display: grid; gap: 14px; }
.studio-start > .aso-seg { justify-self: start; display: flex; flex-wrap: wrap; }
.studio-start > .aso-seg button { display: inline-flex; align-items: center; gap: 6px; }
.studio-start .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-danger { color: var(--bad) !important; }
.studio-localization .feature-form { max-width: 680px; }
.studio-localization .aso-table { margin-top: 20px; }
/* Existing research and optimization surfaces share the same visual language. */
.aso-page .aso-audit-premium { --aso-brand: var(--accent); --aso-warm: var(--accent); }
.aso-page .aso-audit-premium :is(.aso-audit-hero,.aso-audit-summary,.aso-audit-section,.aso-strategy-card) { background: var(--surface); background-image: none; border-color: var(--hairline); box-shadow: var(--shadow); }
.aso-page .aso-audit-premium :is(h1,h2,h3) { letter-spacing: -.025em; }
.aso-page .aso-audit-premium .aso-btn.primary { background: var(--accent); box-shadow: none; }
.feature-message { background: var(--surface-2); border: 0; line-height: 1.75; }
.feature-message.user { background: var(--tint); }
.feature-code, .feature-token { background: var(--surface-2); border: 0; padding: 18px; border-radius: 12px; line-height: 1.7; }
@media (max-width:1100px) {
  .app { grid-template-columns: 200px minmax(0,1fr); }
  .content:has(.aso-page) { padding: 28px 24px 56px; }
  .workspace-tabs { gap: 20px; }
}
@media (max-width:980px) {
  .studio-workspace { grid-template-columns: minmax(0,1fr); }
  .studio-inspector { border-left: 0; border-top: 1px solid var(--hairline); }
}
@media (max-width:820px) {
  .app { display: block; }
  .content:has(.aso-page) { padding: 24px 20px 100px; }
  .workspace-intro h2 { font-size: 25px; }
  .aso-page .feature-panel { padding: 22px; }
  .workspace-stat { padding: 8px 16px; }
}
@media (max-width:600px) {
  .content:has(.aso-page) { padding: 20px 16px 100px; }
  .aso-page { gap: 20px; }
  .workspace-navigation { gap: 4px; }
  .workspace-tabs { gap: 18px; }
  .workspace-tabs > a, .workspace-more > summary { font-size: 12px; }
  .workspace-more.selected > summary { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .workspace-more-menu { left: auto; right: -40px; width: min(310px,calc(100vw - 32px)); }
  .workspace-assistant { padding: 10px 6px; }
  .workspace-assistant span { display: none; }
  .workspace-intro { display: grid; gap: 16px; }
  .workspace-intro p { font-size: 12px; }
  .workspace-columns { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .workspace-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 0; }
  .workspace-stat:nth-child(2) { border: 0; }
  .workspace-stat:nth-child(3) { padding-left: 0; }
  .workspace-stat strong { font-size: 28px; }
  .workspace-footer { align-items: flex-start; flex-direction: column; }
  .workspace-footer > .aso-btn { width: 100%; }
  .aso-page .feature-panel { padding: 20px; border-radius: 16px; }
  .aso-page .aso-btn { min-height: 42px; }
  .workspace-section-head { flex-wrap: wrap; }
  .feature-checkboxes { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-toolbar > .aso-btn { margin-left: 0; }
  .studio-strip { padding: 6px 16px 10px; gap: 12px; }
  .studio-board-head, .studio-hint { padding: 0 16px; }
  .studio-inspector { padding: 18px 16px 20px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.studio-section-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; min-height: 32px; font-size: 14px; font-weight: 600; }
.studio-section-summary > span:first-child { display: flex; align-items: center; gap: 12px; }
.studio-section-summary::after { content: "+"; color: var(--muted); font-size: 20px; font-weight: 400; }
details[open] > .studio-section-summary::after { content: "−"; }
.studio-section-summary .workspace-help { margin-left: auto; }
.workspace-dialog { width: min(440px,calc(100vw - 32px)); padding: 28px; background: var(--surface); color: var(--text); border: 1px solid var(--hairline); border-radius: 20px; box-shadow: 0 24px 70px rgb(0 0 0 / .2); }
.workspace-dialog::backdrop { background: rgb(0 0 0 / .28); backdrop-filter: blur(4px); }
.workspace-dialog h2 { font-size: 21px; margin-bottom: 12px; }
.workspace-dialog p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.workspace-dialog .row { justify-content: flex-end; }
.workspace-job-list { display: grid; gap: 12px; margin-top: 16px; font-size: 12px; }
.aso-page .aso-final-review { padding: 28px; }
.aso-final-review .aso-audit-actions { margin: 16px 0; }
.aso-final-review .aso-review-table caption { text-align: left; padding: 12px; line-height: 1.6; }
.aso-final-review .aso-review-table th:first-child { min-width: 150px; }
.aso-final-review .aso-review-table td { min-width: 160px; vertical-align: top; }
.aso-final-review .aso-review-table details { margin-top: 12px; }
.aso-final-review .aso-review-table details p { white-space: pre-wrap; max-height: 220px; overflow: auto; margin: 8px 0 14px; font-size: 12px; }
/* Keep the optimization view on the same application tokens. */
html body:has(.aso-audit-premium) { --bg: inherit; --surface: inherit; --surface-2: inherit; --hairline: inherit; --text: inherit; --muted: inherit; --accent: inherit; --accent-hover: inherit; background-color: var(--bg) !important; }
html .aso-page:has(.aso-audit-premium) > .aso-head { padding: 0; }
html .aso-page:has(.aso-audit-premium) > .aso-head h1 { font-size: 23px; font-weight: 650; }
html .aso-page:has(.aso-audit-premium) > .aso-head p { color: var(--muted); font-size: 12px; }
html .aso-page:has(.aso-audit-premium) { --asc-secondary: var(--muted); --asc-muted: var(--muted); }
@media(max-width:600px) { .aso-page .aso-final-review { padding: 20px; } .workspace-dialog .row { flex-direction: column-reverse; align-items: stretch; } }

/* Screenshots already on the App Store */
.studio-current { display: grid; gap: 14px; }
.studio-current .studio-section-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.studio-current .studio-section-summary select { min-height: 32px; font-size: 12px; }
.studio-current-shots { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.studio-current-shots img { height: 240px; width: auto; flex: none; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); }
.studio-current .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-current .studio-section-summary { cursor: default; }
.studio-current .studio-section-summary::after { content: none; }
/* File inputs live inside drop zones; keep them out of layout so they can't widen the page. */
.studio-drop, .studio-card-add { position: relative; }
.studio input[type=file].sr-only { position: absolute !important; inset: 0 auto auto 0; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); }

/* ASO assistant: chat in a slide-over panel or on its own page */
button.workspace-assistant { border: 0; background: none; font: inherit; font-size: 12px; cursor: pointer; }
.chat-scrim { position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .18); animation: chat-fade .18s ease-out; }
.chat-panel { position: fixed; z-index: 81; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; box-shadow: 0 24px 80px rgb(0 0 0 / .22); overflow: hidden; animation: chat-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes chat-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes chat-fade { from { opacity: 0; } }
.chat { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--surface); color: var(--text); }
.chat-page { height: calc(100dvh - 210px); min-height: 520px; border: 1px solid var(--hairline); border-radius: 18px; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--hairline); }
.chat-title { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.chat-title .icon { color: var(--accent); }
.chat-head-actions { display: flex; gap: 2px; }
.chat-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.chat-icon:hover:not(:disabled) { background: var(--surface-2); color: var(--text); text-decoration: none; }
.chat-icon:disabled { opacity: .35; cursor: default; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px 8px; }
.chat-page .chat-scroll { padding: 28px max(18px, calc((100% - 760px) / 2)) 8px; }
.chat-welcome { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 4px 12px; }
.chat-welcome h2 { font-size: 20px; letter-spacing: -.02em; }
.chat-welcome p { font-size: 13px; color: var(--muted); max-width: 360px; line-height: 1.6; }
.chat-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--accent); margin-bottom: 4px; }
.chat-suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 18px; }
.chat-suggestions button { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: background .15s, border-color .15s; }
.chat-suggestions button:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline)); }
.chat-suggestions b { font-size: 13px; font-weight: 600; }
.chat-suggestions span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.chat-thread { display: grid; gap: 22px; }
.chat-msg { display: flex; gap: 10px; min-width: 0; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--surface-2); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-avatar { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--accent); margin-top: 1px; }
.chat-msg.failed .chat-avatar { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.chat-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.chat-msg.failed .chat-body > p { color: var(--bad); }
.chat-body > :first-child { margin-top: 0; }
.chat-body p, .chat-body ul, .chat-body ol { margin: 0 0 10px; }
.chat-body ul, .chat-body ol { padding-left: 20px; }
.chat-body li { margin: 3px 0; }
.chat-body h1, .chat-body h2, .chat-body h3 { font-size: 15px; margin: 16px 0 8px; }
.chat-body code { font-size: 12.5px; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); }
.chat-body pre { padding: 12px; border-radius: 10px; background: var(--surface-2); overflow-x: auto; }
.chat-body pre code { padding: 0; background: none; }
.chat-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0 12px; display: block; overflow-x: auto; }
.chat-body th, .chat-body td { border: 1px solid var(--hairline); padding: 6px 8px; text-align: left; }
.chat-tools { display: flex; gap: 4px; margin-top: 2px; opacity: .0; transition: opacity .15s; }
.chat-msg:hover .chat-tools, .chat-msg.failed .chat-tools, .chat-tools:focus-within { opacity: 1; }
.chat-tools button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.chat-tools button:hover { background: var(--surface-2); color: var(--text); }
.chat-typing, .chat-loading { display: inline-flex; gap: 4px; align-items: center; padding: 10px 2px; }
.chat-loading { display: flex; justify-content: center; padding: 60px 0; }
.chat-typing span, .chat-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: chat-dot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2), .chat-loading span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3), .chat-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-3px); } }
.chat-empty-note { color: var(--bad); font-size: 13px; text-align: center; padding: 40px 12px; }
.chat-composer { padding: 10px 14px 12px; }
.chat-page .chat-composer { padding: 10px max(14px, calc((100% - 760px) / 2)) 16px; }
.chat-box { border: 1px solid var(--hairline); border-radius: 18px; background: var(--surface); box-shadow: 0 2px 10px rgb(0 0 0 / .05); transition: border-color .15s, box-shadow .15s; }
.chat-box:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); box-shadow: 0 0 0 3px var(--tint); }
.chat-box textarea { display: block; width: 100%; resize: none; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; padding: 12px 16px 4px !important; min-height: 0 !important; font: inherit; font-size: 14px; line-height: 1.5; color: var(--text); max-height: 200px; }
.chat-box-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 8px 10px; }
.chat-model select { border: 0 !important; background: transparent !important; color: var(--muted); font-size: 12px !important; padding: 4px 22px 4px 6px !important; min-height: 28px !important; border-radius: 8px !important; cursor: pointer; }
.chat-model select:hover { background: var(--surface-2) !important; color: var(--text); }
.chat-send { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--text); color: var(--surface); cursor: pointer; transition: opacity .15s; }
.chat-send:disabled { opacity: .25; cursor: default; }
.chat-fine { margin-top: 8px; text-align: center; font-size: 11px; color: var(--muted); }
@media (max-width: 600px) {
  .chat-panel { inset: 0; width: 100%; border-radius: 0; border: 0; }
  .chat-suggestions { grid-template-columns: minmax(0, 1fr); }
  .chat-page { height: calc(100dvh - 190px); }
  .chat-fine { display: none; }
}
/* The composer box shows focus itself; icon buttons stay flat like chat apps. */
.chat-box textarea:focus, .chat-box textarea:focus-visible { outline: none !important; box-shadow: none !important; }
.chat .chat-icon, .chat .chat-tools button, .chat .chat-send, .chat .chat-suggestions button { box-shadow: none !important; }
.chat-model select:focus-visible, .chat .chat-icon:focus-visible, .chat .chat-send:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 1px; }

/* Screenshot tools: studio and generator */
.studio-modes { display: inline-flex; justify-self: start; margin-bottom: -4px; }
.studio-modes button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; }
.studio-findtext { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.studio-color-row select { flex: 1; min-width: 0; }
.gen { display: grid; gap: 18px; }
.gen-step { display: grid; gap: 18px; }
.gen-step-head { display: flex; gap: 14px; align-items: flex-start; }
.gen-step-head h3 { font-size: 16px; margin-bottom: 4px; }
.gen-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 700; font-size: 13px; }
.gen-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.gen-row input[type=color] { width: 40px; height: 30px; padding: 2px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); cursor: pointer; }
.gen-spacer { flex: 1; }
.gen-screens { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.gen-screen { position: relative; flex: none; width: 128px; margin: 0; display: grid; gap: 6px; }
.gen-screen img { width: 128px; height: 260px; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--hairline); background: var(--surface-2); }
.gen-screen figcaption { font-size: 11px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gen-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 4px rgb(0 0 0 / .2); }
.gen-badge.good, .gen-tone.good { color: var(--good); } .gen-badge.warn, .gen-tone.warn { color: var(--warn); } .gen-badge.bad, .gen-tone.bad { color: var(--bad); }
.gen-remove { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; cursor: pointer; }
.gen-add { position: relative; flex: none; width: 128px; height: 260px; display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center; padding: 10px; border: 1.5px dashed color-mix(in srgb, var(--text) 22%, transparent); border-radius: 14px; color: var(--muted); font-size: 12px; cursor: pointer; }
.gen-add:hover { border-color: var(--accent); color: var(--accent); }
.gen-add small { font-size: 11px; opacity: .8; }
.gen-review summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.gen-review ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; }
.gen-review li { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); line-height: 1.5; }
.gen-retake { color: var(--warn); }
.gen-benefits { display: grid; gap: 16px; }
.gen-benefit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; padding: 16px; border: 1px solid var(--hairline); border-radius: 16px; }
.gen-preview { line-height: 0; }
.gen-canvas { width: 180px; height: auto; aspect-ratio: 1290 / 2796; object-fit: cover; border-radius: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.gen-fields { display: grid; gap: 12px; align-content: start; }
.gen-benefit-head { display: flex; align-items: center; gap: 8px; }
.gen-benefit-head > b { font-size: 13px; }
.gen-chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--tint); color: var(--accent); }
.gen-headline { display: grid; grid-template-columns: minmax(90px, .4fr) minmax(0, 1fr); gap: 10px; }
.gen-headline input { text-transform: uppercase; font-weight: 700; }
.gen-polish { display: flex; gap: 8px; flex-wrap: wrap; }
.gen-polish input { flex: 1; min-width: 180px; }
.gen-versions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.gen-versions button { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--muted); cursor: pointer; }
.gen-versions button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.flip-up { display: inline-flex; transform: rotate(-90deg); } .flip-down { display: inline-flex; transform: rotate(90deg); }
@media (max-width: 700px) { .gen-benefit { grid-template-columns: minmax(0, 1fr); } .gen-preview { justify-self: center; } .gen-headline { grid-template-columns: minmax(0, 1fr); } }
.studio-asis { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 20px; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: 12px; }
.studio-asis > span { display: inline-flex; align-items: center; gap: 8px; }

/* Text blocks on finished screenshots */
.studio-card-stage { position: relative; line-height: 0; }
.layer-overlay { position: absolute; inset: 0; pointer-events: none; border-radius: 14px; overflow: hidden; }
.layer-box { position: absolute; pointer-events: auto; cursor: grab; border: 1.5px dashed rgb(255 255 255 / .75); border-radius: 4px; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); transition: border-color .12s; touch-action: none; }
.layer-box:active { cursor: grabbing; }
.layer-box[data-selected] { border: 2px solid var(--accent); box-shadow: 0 0 0 1px #fff, 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.layer-box[data-hidden] { opacity: .45; }
.layers { display: grid; gap: 10px; }
.layer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.layer[data-selected] { border-color: color-mix(in srgb, var(--accent) 60%, var(--hairline)); box-shadow: 0 0 0 3px var(--tint); }
.layer-head { display: flex; align-items: center; gap: 6px; }
.layer-role { font-size: 12px; font-weight: 650; }
.layer-state { flex: 1; font-size: 11px; color: var(--muted); }
.layer textarea { min-height: 0 !important; resize: vertical; font-size: 13px !important; line-height: 1.45; }
.layer-style { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.layer-style select { flex: 1; min-width: 0; min-height: 34px !important; padding: 6px 26px 6px 8px !important; font-size: 12px !important; }
.layer-style input[type=color] { width: 40px; height: 34px; flex: none; padding: 3px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); cursor: pointer; }
.layer-size { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; }
.layer-size button { width: 30px; height: 32px; border: 0; background: var(--surface); color: var(--text); font-size: 16px; cursor: pointer; }
.layer-size button:hover { background: var(--surface-2); }
.layer-size span { min-width: 46px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.layer-align { display: inline-flex; }
.layer-align button { padding: 6px 9px; min-height: 32px; }
.align-ico { display: inline-grid; gap: 2px; width: 14px; }
.align-ico i { display: block; height: 2px; border-radius: 1px; background: currentColor; }
.align-ico i:nth-child(1) { width: 14px; } .align-ico i:nth-child(2) { width: 9px; } .align-ico i:nth-child(3) { width: 12px; }
.align-ico.center { justify-items: center; } .align-ico.right { justify-items: end; }
.studio-history { display: inline-flex; gap: 2px; margin-left: auto; }
.studio-history + .aso-btn { margin-left: 0; }
.layer-box[data-dragging] { cursor: grabbing; border-style: solid; }
.studio-reading { display: flex; align-items: center; gap: 8px; }
.studio-toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--text) 88%, transparent); color: var(--surface); font-size: 12px; font-weight: 500; box-shadow: 0 6px 24px rgb(0 0 0 / .2); pointer-events: none; animation: toast-in .16s ease-out, toast-out .25s ease-in 1.15s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 4px); } }
/* All app sections in one bar; it scrolls sideways when the window is narrow. */
.workspace-tabs { gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.workspace-tabs::-webkit-scrollbar { display: none; }
.workspace-tabs > a[aria-current="page"]::after { bottom: 0; }

/* Pricing */
.price-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; min-width: 0; }
.aso-page button.price-product { display: grid; align-content: start; justify-items: start; min-width: 0; gap: 6px; text-align: left; padding: 16px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.aso-page button.price-product:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); }
.aso-page button.price-product:active:not(:disabled) { transform: none; }
.aso-page button.price-product[aria-selected=true] { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.aso-page button.price-product[aria-selected=true]:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); border-color: var(--accent); }
.aso-page button.price-product:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.price-kind { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.price-product b { font-size: 15px; }
.price-us { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.price-us small { font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.price-panel { display: grid; gap: 18px; }
.price-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; }
.price-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.price-stats > div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: grid; align-content: space-between; gap: 2px; }
.price-stats b { font-size: 20px; letter-spacing: -.02em; }
.price-stats span { font-size: 11px; color: var(--muted); }
.price-us-edit-row { display: flex; align-items: center; gap: 6px; }
.price-us-edit { display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 8px; margin: -2px -8px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: text; transition: border-color .15s, background .15s, box-shadow .15s; }
.price-us-edit:hover { border-color: var(--hairline); background: var(--surface); }
.price-us-edit:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--tint); }
.price-us-edit[data-manual] { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); background: var(--tint); }
.price-us-symbol { font-size: 17px; font-weight: 650; color: var(--muted); user-select: none; }
.aso-page .price-us-input { width: 84px; min-height: 24px; padding: 0; border: 0; border-radius: 0; outline: 0 !important; box-shadow: none !important; background: transparent; color: var(--text); font: inherit; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-us-input::placeholder { color: var(--muted); font-weight: 500; opacity: .65; }
.price-us-input:disabled { cursor: not-allowed; opacity: .55; }
.price-stats .down, .price-change.down { color: var(--good); } .price-stats .up, .price-change.up { color: var(--warn); }
.price-table-wrap { max-height: 520px; }
.price-table td, .price-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table th:first-child, .price-table td:first-child { width: 36px; }
.price-table tr[data-usa] td { border-bottom-width: 2px; }
.price-table tr[data-selected] td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.price-table .muted { color: var(--muted); } .price-table small { color: var(--muted); font-size: 11px; }
.price-country { display: inline-flex; align-items: center; gap: 8px; }
.price-base-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.price-cell-suggested { display: inline-flex; align-items: center; gap: 6px; }
.price-edit { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid transparent; border-radius: 8px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); cursor: text; transition: border-color .15s, background .15s, box-shadow .15s; }
.price-edit:hover { border-color: var(--hairline); background: var(--surface-2); }
.price-edit:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--tint); }
.price-edit[data-manual] { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); background: var(--tint); }
.price-currency { font-size: 11px; font-weight: 500; color: var(--muted); user-select: none; }
.aso-page .price-input { width: 68px; min-height: 22px; padding: 0; border: 0; border-radius: 0; outline: 0 !important; box-shadow: none !important; background: transparent; color: var(--text); font: inherit; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.price-input::placeholder { color: var(--muted); font-weight: 400; opacity: .65; }
.price-input:disabled { cursor: not-allowed; opacity: .55; }
.aso-page button.price-reset { display: inline-grid; place-items: center; width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; transition: color .15s, background .15s; }
.aso-page button.price-reset:hover { color: var(--text); background: var(--surface-2); }
.aso-page button.price-reset:active { transform: none; }
.price-basis { margin-left: 2px; }
.aso-page button.price-enter-hint { display: inline-flex; align-items: center; min-height: 0; padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--hairline)); border-radius: 999px; background: var(--tint); color: var(--accent); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.aso-page button.price-enter-hint:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.aso-page button.price-enter-hint:active { transform: none; }
.price-change { display: inline-flex; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); }
.price-apply { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.price-apply input[type=date] { min-height: 34px; padding: 4px 8px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; }
.price-progress { display: grid; gap: 6px; }
.price-progress > div { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.price-progress > div > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.price-progress small { font-size: 11px; color: var(--muted); }
@media (max-width: 700px) { .price-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Keyword research and checks */
.kw-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.kw-status { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.kw-progress { display: inline-block; width: 120px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.kw-progress > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.kw-error { font-size: 12px; color: var(--bad); }
.kw-hero { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 40px 24px; border: 1px solid var(--hairline); border-radius: 18px; background: var(--surface); }
.kw-hero h2 { font-size: 20px; letter-spacing: -.02em; }
.kw-hero p { max-width: 520px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.kw-stage { display: inline-flex; align-items: center; gap: 8px; }

/* Overview */
.ov-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 28px; padding: 24px 28px; border: 1px solid var(--hairline); border-radius: 20px; background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--accent) 7%, var(--surface))); }
.ov-hero-score { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.ov-ring-value { font-size: 40px; font-weight: 700; letter-spacing: -.03em; fill: var(--text); }
.ov-ring-label { font-size: 11px; fill: var(--muted); }
.ov-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ov-hero-text h2 { font-size: 26px; letter-spacing: -.03em; margin: 4px 0 14px; }
.ov-subscores { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; min-width: 260px; }
.ov-subscores li { display: grid; grid-template-columns: 92px 1fr 32px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.ov-subscores b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.ov-minibar { display: inline-block; width: 100%; min-width: 60px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.ov-minibar > span { display: block; height: 100%; border-radius: 3px; }
.ov-hero-actions { flex: 1; display: flex; justify-content: flex-end; min-width: 280px; }
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ov-kpi { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface); }
.ov-kpi span { font-size: 12px; color: var(--muted); }
.ov-kpi b { font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ov-kpi em { font-style: normal; font-size: 11px; font-weight: 600; } .ov-kpi em.up { color: var(--good); } .ov-kpi em.down { color: var(--bad); }
.ov-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aso-page .ov-card { display: grid; gap: 14px; align-content: start; padding: 20px 22px; }
.ov-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ov-card h3 { font-size: 15px; letter-spacing: -.01em; }
.ov-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.ov-key i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-left: 6px; } .ov-key .k10 { background: var(--good-mark); } .ov-key .k30 { background: var(--accent); }
.ov-trend { width: 100%; height: 180px; overflow: visible; }
.ov-grid { stroke: var(--hairline); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ov-axis { font-size: 10px; fill: var(--muted); }
.ov-rankbar-track { display: flex; gap: 3px; height: 16px; border-radius: 8px; overflow: hidden; }
.ov-rankbar-track > span { min-width: 6px; }
.ov-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px 14px; list-style: none; margin: 14px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.ov-legend li { display: flex; align-items: center; gap: 7px; } .ov-legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.ov-b-top3 { background: var(--good-mark); } .ov-b-top10 { background: color-mix(in srgb, var(--good-mark) 55%, var(--accent)); } .ov-b-top30 { background: var(--accent); } .ov-b-deep { background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); } .ov-b-none, .ov-b-empty { background: var(--surface-2); }
.ov-list { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.ov-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.ov-list li:last-child { border-bottom: 0; }
.ov-tags { display: inline-flex; gap: 6px; } .ov-tags span { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.ov-rivals { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ov-rivals li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.ov-rivals li:last-child { border-bottom: 0; }
.ov-rivals img, .ov-icon { width: 36px; height: 36px; border-radius: 9px; flex: none; background: var(--surface-2); }
.ov-rival-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ov-rival-main b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-rival-main span { font-size: 11px; color: var(--muted); }
.ov-ahead { display: grid !important; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; }
.ov-markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.ov-markets a { display: grid; grid-template-columns: 1fr 70px 30px; grid-template-rows: auto auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; color: var(--text); font-size: 13px; }
.ov-markets a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); }
.ov-markets li[data-current] a { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.ov-markets b { text-align: right; } .ov-markets small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .ov-grid2 { grid-template-columns: minmax(0, 1fr); } .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-hero-actions { justify-content: flex-start; } }

/* Also styles the Research page hero (.rx-page); the New release page now uses .rl- in components/aso-release.css. */
.rx-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 40px; padding: 28px 32px; border: 1px solid var(--hairline); border-radius: 22px; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 55%), var(--surface); }
.rx-main { display: grid; gap: 14px; }

/* Apple Ecosystem Onboarding, Bento Cards & Guided Connection Sheets */
.aso-index-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding-bottom: 4px; }
.aso-index-bar .aso-index-head h1 { margin: 0 0 5px; font-size: 32px; font-weight: 700; letter-spacing: -0.032em; line-height: 1.08; }
.aso-index-bar .aso-index-head p { font-size: 14px; line-height: 1.5; max-width: 620px; }
.aso-index-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aso-find-section { display: grid; gap: 8px; }
.aso-find-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.aso-find-head .aso-section-title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.aso-find-caption { font-size: 12px; color: var(--muted); }
.aso-index .aso-find { padding: 8px 8px 8px 14px; border-radius: 16px; box-shadow: var(--shadow); transition: border-color .18s, box-shadow .18s; }
.aso-index .aso-find:focus-within { border-color: color-mix(in srgb, var(--accent) 48%, var(--hairline)); box-shadow: 0 0 0 4px var(--tint), var(--shadow); }
.apple-discovered-section { padding: 18px 20px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--hairline)); background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface) 68%); }

/* App badges */
.apple-app-badge { flex: none; display: inline-grid; place-items: center; border-radius: 24%; color: #fff; box-shadow: inset 0 1px 0.5px rgb(255 255 255 / .38), 0 4px 12px rgb(0 0 0 / .12); }
.apple-app-badge.asc { background: linear-gradient(160deg, #1ea7ff 0%, #0071e3 52%, #0051c3 100%); }
.apple-app-badge.ads { background: linear-gradient(160deg, #5e5ce6 0%, #2f69ef 54%, #0071e3 100%); }

/* Status dots & chips */
.apple-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--muted) 55%, transparent); }
.apple-dot.on { background: var(--good-mark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good-mark) 20%, transparent); }
.apple-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.apple-status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 550; color: var(--muted); background: var(--surface-2); border: 1px solid var(--hairline); }
.apple-status-chip.on { color: var(--good); background: color-mix(in srgb, var(--good-mark) 10%, var(--surface)); border-color: color-mix(in srgb, var(--good-mark) 28%, transparent); }
.apple-status-chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 11%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }

/* Showcase container */
.apple-showcase { position: relative; display: grid; gap: 22px; padding: 26px 28px 28px; border-radius: 24px; border: 1px solid var(--hairline); background: radial-gradient(900px 360px at 0% 0%, color-mix(in srgb, var(--accent) 6.5%, transparent), transparent 65%), radial-gradient(760px 340px at 100% 0%, color-mix(in srgb, #5e5ce6 6%, transparent), transparent 65%), var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .03), 0 12px 34px rgb(0 0 0 / .035); }
.apple-showcase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.apple-showcase-title { max-width: 680px; display: grid; gap: 6px; }
.apple-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.apple-showcase-title h2 { font-size: 23px; font-weight: 680; letter-spacing: -0.028em; line-height: 1.18; color: var(--text); }
.apple-showcase-title p { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.apple-showcase-meta { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.apple-progress-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 550; color: var(--muted); background: var(--surface-2); border: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.apple-progress-pill.done { color: var(--good); border-color: color-mix(in srgb, var(--good-mark) 32%, transparent); background: color-mix(in srgb, var(--good-mark) 9%, var(--surface)); }
.apple-progress-dots { display: inline-flex; gap: 4px; }
.apple-progress-dots i { width: 14px; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--text) 14%, transparent); transition: background-color .2s; }
.apple-progress-dots i.on { background: var(--good-mark); }
button.apple-minimize-btn, button.apple-dock-expand { min-height: 32px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 550; color: var(--muted); background: transparent; border: 1px solid var(--hairline); box-shadow: none; }
button.apple-minimize-btn:hover, button.apple-dock-expand:hover { color: var(--text); background: var(--surface-2); }

/* Bento Grid & Cards */
.apple-bento-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.apple-bento-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 20px; border: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface-2) 48%, var(--surface)); transition: transform .24s cubic-bezier(.32, .72, 0, 1), border-color .2s, box-shadow .24s; min-width: 0; }
.apple-bento-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 32%, var(--hairline)); box-shadow: 0 10px 28px rgb(0 0 0 / .055); }
.apple-bento-card.is-connected { border-color: color-mix(in srgb, var(--good-mark) 32%, var(--hairline)); background: linear-gradient(160deg, color-mix(in srgb, var(--good-mark) 4.5%, var(--surface)), var(--surface) 60%); }
.apple-bento-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.apple-bento-copy { display: grid; gap: 5px; }
.apple-bento-copy h3 { margin: 0; font-size: 18px; font-weight: 660; letter-spacing: -0.022em; color: var(--text); }
.apple-bento-copy p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* Visual Stages inside Bento Cards */
.apple-stage { padding: 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgb(0 0 0 / .025); }
.apple-stage.asc-stage { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.apple-stage-apps { display: flex; align-items: center; }
.apple-stage-icon { width: 38px; height: 38px; border-radius: 22.5%; flex: none; display: inline-grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; border: 2px solid var(--surface); box-shadow: 0 2px 6px rgb(0 0 0 / .1); object-fit: cover; }
.apple-stage-icon + .apple-stage-icon { margin-left: -8px; }
.apple-stage-icon.fallback { background: linear-gradient(145deg, #0071e3, #00c7be); }
.apple-stage-icon.mock.m1 { background: linear-gradient(145deg, #0a84ff, #5ac8fa); }
.apple-stage-icon.mock.m2 { background: linear-gradient(145deg, #5e5ce6, #bf5af2); }
.apple-stage-icon.mock.m3 { background: linear-gradient(145deg, #30d158, #00c7be); }
.apple-stage-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 550; color: var(--accent); background: var(--tint); white-space: nowrap; }
.apple-bento-card.is-connected .apple-stage-tag { color: var(--good); background: color-mix(in srgb, var(--good-mark) 12%, transparent); }

.apple-stage.ads-stage { display: grid; gap: 8px; min-height: 66px; align-content: center; }
.apple-kw-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 68px 24px; align-items: center; gap: 9px; font-size: 12px; }
.apple-kw-term { font-weight: 550; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apple-kw-store { font-size: 10px; font-weight: 650; padding: 2px 6px; border-radius: 5px; color: var(--muted); background: var(--surface-2); letter-spacing: .03em; }
.apple-kw-meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.apple-kw-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5e5ce6, var(--accent)); }
.apple-kw-score { font-size: 12px; font-weight: 660; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* Feature checklist & card footer */
.apple-feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; color: var(--text); }
.apple-feature-list li { display: flex; align-items: center; gap: 8px; }
.apple-feature-list .icon { color: var(--good-mark); flex: none; }
.apple-bento-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--hairline); }
.apple-foot-hint { font-size: 12px; color: var(--muted); }
.apple-ext-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.apple-ext-link:hover { color: var(--accent); text-decoration: none; }

/* Apple Pill CTA Buttons */
button.apple-cta { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 18px; border-radius: 980px; border: 0; font: inherit; font-size: 13px; font-weight: 580; letter-spacing: -0.01em; cursor: pointer; box-shadow: none; transition: background-color .16s, transform .18s cubic-bezier(.32, .72, 0, 1), opacity .15s; white-space: nowrap; }
button.apple-cta:active:not(:disabled) { transform: scale(.975); }
button.apple-cta:disabled { opacity: .45; cursor: not-allowed; }
button.apple-cta.primary { background: var(--accent); color: #fff; }
button.apple-cta.primary:hover:not(:disabled) { background: var(--accent-hover); }
button.apple-cta.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--hairline); }
button.apple-cta.secondary:hover:not(:disabled) { background: var(--surface-2); }
button.apple-cta.danger { background: color-mix(in srgb, var(--bad) 11%, transparent); color: var(--bad); }
button.apple-cta.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 17%, transparent); }
button.apple-cta.compact { min-height: 34px; padding: 6px 15px; font-size: 12.5px; }

/* Compact Apple Ecosystem Dock (when both connected or minimized) */
.apple-dock { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: var(--shadow); }
.apple-dock-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); padding-left: 2px; }
.apple-dock-mark { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--text); }
.apple-dock-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
button.apple-dock-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
button.apple-dock-pill:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); background: var(--surface); }
button.apple-dock-pill b { font-weight: 600; }
button.apple-dock-pill span:last-child { color: var(--muted); font-size: 12px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.apple-dock-pill.action span:last-child { color: var(--accent); font-weight: 550; }
button.apple-dock-pill.pending span:last-child { color: var(--warn); font-weight: 550; }

/* Keyword Research Inline Callout */
.apple-kw-callout { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--hairline)); background: linear-gradient(135deg, color-mix(in srgb, #5e5ce6 6%, var(--surface)), var(--surface) 65%); box-shadow: var(--shadow); }
.apple-kw-callout-text { flex: 1; display: grid; gap: 2px; }
.apple-kw-callout-text b { font-size: 13.5px; font-weight: 640; letter-spacing: -0.01em; color: var(--text); }
.apple-kw-callout-text span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* Empty Apps Shelf */
.apple-empty-apps { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 44px 24px; border-radius: 20px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: var(--shadow); }
.apple-empty-squircles { display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.apple-empty-squircles span { width: 44px; height: 44px; border-radius: 22.5%; border: 2px solid var(--surface); background: var(--surface-2); display: grid; place-items: center; color: var(--accent); box-shadow: 0 4px 12px rgb(0 0 0 / .06); }
.apple-empty-squircles .s1, .apple-empty-squircles .s3 { width: 36px; height: 36px; opacity: .65; }
.apple-empty-squircles .s2 { z-index: 1; margin-inline: -8px; background: var(--tint); }
.apple-empty-apps h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.apple-empty-apps p { max-width: 460px; font-size: 13px; line-height: 1.6; }

/* Modal Sheet & Guided Connection Forms */
dialog.apple-sheet { width: min(580px, calc(100vw - 24px)); border-radius: 24px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: 0 28px 80px rgb(0 0 0 / .26); }
.apple-sheet-body { padding: 24px 26px 26px; gap: 18px; }
.apple-sheet-head { padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.apple-sheet-title { display: flex; align-items: center; gap: 13px; }
.apple-sheet-title h2 { font-size: 19px; font-weight: 660; letter-spacing: -0.022em; }
.apple-sheet-title p { margin-top: 2px; font-size: 13px; }

.apple-connect-form { display: grid; gap: 15px; }
.apple-connected-banner { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 13px; background: color-mix(in srgb, var(--good-mark) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good-mark) 28%, transparent); }
.apple-connected-banner b { display: block; font-size: 13px; font-weight: 640; color: var(--good); }
.apple-connected-banner span:last-child { display: block; font-size: 12px; color: var(--muted); }

.apple-guide-disclosure { border: 1px solid var(--hairline); border-radius: 13px; padding: 10px 14px; background: var(--surface-2); }
.apple-guide-disclosure > summary { cursor: pointer; font-size: 12.5px; font-weight: 580; color: var(--text); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.apple-guide-disclosure > summary::after { content: "+"; font-size: 16px; color: var(--muted); }
.apple-guide-disclosure[open] > summary { margin-bottom: 10px; }
.apple-guide-disclosure[open] > summary::after { content: "−"; }

.apple-steps { margin: 0; padding: 0; list-style: none; counter-reset: astep; display: grid; gap: 9px; font-size: 12.8px; line-height: 1.5; color: var(--text); }
.apple-steps > li { counter-increment: astep; position: relative; padding-left: 28px; }
.apple-steps > li::before { content: counter(astep); position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 660; color: var(--accent); background: var(--tint); }
.apple-steps a { display: inline-flex; align-items: center; gap: 3px; font-weight: 580; }

.apple-inline-alert { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.apple-inline-alert .icon { flex: none; margin-top: 1px; }
.apple-inline-alert.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 24%, transparent); }
.apple-inline-alert.good { color: var(--good); background: color-mix(in srgb, var(--good-mark) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good-mark) 26%, transparent); }

/* Grouped Apple Inset Form Fields */
.apple-field-group { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface-2); overflow: hidden; transition: border-color .16s, box-shadow .16s; }
.apple-field-group:focus-within { border-color: color-mix(in srgb, var(--accent) 48%, var(--hairline)); box-shadow: 0 0 0 3px var(--tint); }
.apple-field-row { display: grid; grid-template-columns: 148px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; min-height: 46px; background: var(--surface); }
.apple-field-row + .apple-field-row { border-top: 1px solid var(--hairline); }
.apple-field-row:focus-within { background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.apple-field-row label { font-size: 13px; font-weight: 560; color: var(--text); display: grid; gap: 1px; }
.apple-field-row label small { font-size: 11px; font-weight: 400; color: var(--muted); }
.apple-field-row input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font: 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text); padding: 4px 0; }
.aso-page .apple-field-row input:focus-visible { outline: none; }
.apple-field-row input::placeholder { color: color-mix(in srgb, var(--muted) 68%, transparent); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }

/* .p8 File Dropzone */
.apple-p8-zone-wrap { position: relative; display: grid; gap: 7px; justify-items: start; }
.apple-p8-drop { width: 100%; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 20px 16px; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--text) 20%, transparent); background: var(--surface-2); cursor: pointer; transition: border-color .16s, background-color .16s; }
.apple-p8-drop:hover, .apple-p8-drop.dragging { border-color: var(--accent); background: var(--tint); }
.apple-p8-drop-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgb(0 0 0 / .08); margin-bottom: 3px; }
.apple-p8-drop b { font-size: 13px; font-weight: 600; color: var(--text); }
.apple-p8-drop span:last-child { font-size: 11.5px; color: var(--muted); }

.apple-p8-loaded { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--good-mark) 35%, var(--hairline)); background: color-mix(in srgb, var(--good-mark) 7%, var(--surface)); }
.apple-p8-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--good-mark) 16%, transparent); color: var(--good); }
.apple-p8-loaded .min0 { flex: 1; display: grid; gap: 1px; }
.apple-p8-loaded b { font-size: 13px; font-weight: 600; }
.apple-p8-loaded .min0 span { font-size: 11.5px; color: var(--muted); }

.apple-textarea { width: 100%; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--hairline); background: var(--surface-2); color: var(--text); font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; resize: vertical; outline: 0; }
.apple-textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--tint); }

button.apple-link-btn { min-height: 0; padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; font: inherit; font-size: 12px; font-weight: 550; color: var(--accent); cursor: pointer; }
button.apple-link-btn:hover { background: transparent; text-decoration: underline; }
button.apple-link-btn.subtle { color: var(--muted); }
button.apple-link-btn.subtle:hover { color: var(--accent); }

/* Public Key Box & Step 1 Keypair Intro */
.apple-key-box { margin-top: 8px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface-2); overflow: hidden; }
.apple-key-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 6px 12px; border-bottom: 1px solid var(--hairline); font-size: 11px; font-weight: 600; color: var(--muted); }
button.apple-copy-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font: inherit; font-size: 11.5px; font-weight: 560; box-shadow: none; cursor: pointer; }
button.apple-copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.apple-key-box pre { margin: 0; padding: 10px 12px; font: 11px/1.45 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 112px; overflow: auto; color: var(--text); }

.apple-keypair-intro { display: grid; justify-items: start; gap: 10px; padding: 20px; border-radius: 16px; border: 1px solid var(--hairline); background: var(--surface-2); }
.apple-keypair-graphic { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); margin-bottom: 2px; }
.apple-keypair-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 580; background: var(--surface); border: 1px solid var(--hairline); color: var(--text); }
.apple-keypair-pill.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--hairline)); background: var(--tint); }
.apple-keypair-intro h3 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em; }
.apple-keypair-intro p { margin: 0 0 4px; font-size: 13px; line-height: 1.55; color: var(--muted); }

.apple-form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 2px; }
.apple-trust-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.apple-trust-note .icon { flex: none; margin-top: 2px; }

@media (max-width: 900px) {
  .apple-bento-grid { grid-template-columns: minmax(0, 1fr); }
  .apple-showcase { padding: 20px; border-radius: 20px; }
  .apple-kw-callout { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .aso-index-bar .aso-index-head h1 { font-size: 27px; }
  .apple-showcase-title h2 { font-size: 19.5px; }
  .apple-field-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 9px 12px; }
  dialog.apple-sheet { width: 100vw; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .apple-sheet-body { padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); }
  .apple-bento-foot { flex-wrap: wrap; }
  .apple-bento-foot .apple-cta { width: 100%; }
}

/* ---------- Ratings & Customer Reviews ---------- */
.aso-ratings { display: grid; gap: 16px; }
.aso-ratings .aso-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(276px, 1.45fr); gap: 12px; align-items: stretch; }
.aso-ratings .aso-stat { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: var(--shadow); }
.aso-stat-value-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.aso-ratings .aso-stat b { font-size: 27px; font-weight: 680; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.aso-stat-of { font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.aso-stat-sub { font-size: 11.5px; color: var(--muted); }
.aso-change-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.aso-change-pill.up { color: var(--good); background: color-mix(in srgb, var(--good-mark) 13%, transparent); }
.aso-change-pill.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }

/* Premium Check All Stores Action Card & Button */
.aso-stat-action.aso-check-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--hairline));
  background:
    radial-gradient(120% 130% at 100% 0%, color-mix(in srgb, #5e5ce6 12%, transparent), transparent 65%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 68%);
  box-shadow: var(--shadow);
}
button.aso-check-stores-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px 10px 16px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(135deg, #0071e3 0%, #2563eb 50%, #5e5ce6 100%);
  box-shadow:
    inset 0 1px 0.5px rgb(255 255 255 / 0.34),
    inset 0 0 0 1px rgb(255 255 255 / 0.12),
    0 8px 22px -5px rgb(0 113 227 / 0.48),
    0 2px 6px rgb(0 0 0 / 0.14);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.2s, filter 0.18s;
}
button.aso-check-stores-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 28%, rgb(255 255 255 / 0.2) 50%, transparent 72%);
  transform: translateX(-120%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
button.aso-check-stores-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0077ed 0%, #2d6df6 50%, #6866f0 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0.5px rgb(255 255 255 / 0.42),
    inset 0 0 0 1px rgb(255 255 255 / 0.18),
    0 12px 28px -5px rgb(0 113 227 / 0.58),
    0 4px 10px rgb(0 0 0 / 0.16);
}
button.aso-check-stores-btn:hover:not(:disabled)::after { transform: translateX(120%); }
button.aso-check-stores-btn:active:not(:disabled) { transform: translateY(0) scale(0.985); }
button.aso-check-stores-btn:disabled { opacity: 0.92; cursor: default; }
button.aso-check-stores-btn.compact { width: auto; justify-content: center; padding-inline: 20px; }
.aso-check-btn-lead { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.aso-check-badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgb(255 255 255 / 0.18);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2);
}
.aso-check-meta { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.aso-check-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 50%, transparent); }
.aso-check-dot.on { background: var(--good-mark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good-mark) 20%, transparent); }
.aso-check-progress { display: grid; gap: 5px; }
.aso-check-progress-track { height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.aso-check-progress-track > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #5e5ce6); transition: width 0.35s ease; }
.aso-check-progress small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.aso-check-progress small b { color: var(--text); font-weight: 600; }

/* Stars */
.aso-review-stars { display: inline-flex; align-items: center; gap: 1.5px; flex: none; line-height: 0; }
.aso-review-stars svg.on { fill: #f59e0b; }
.aso-review-stars svg.off { fill: color-mix(in srgb, var(--text) 15%, transparent); }
.aso-amber-star { color: #f59e0b; }
.aso-store-rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 560; }

/* Ratings & Reviews Switcher Bar */
.aso-ratings-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aso-ratings-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}
.aso-ratings-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.aso-ratings-tabs button:hover { color: var(--text); background: transparent; }
.aso-ratings-tabs button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), inset 0 0 0 1px var(--hairline);
}
.aso-ratings-tabs button.active > .icon { color: var(--accent); }
.aso-tab-count {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.aso-ratings-tabs button.active .aso-tab-count { color: var(--accent); background: var(--tint); }
.aso-ratings-store-filter { flex: 0 1 230px; background: var(--surface); }

/* Store Table Row Reviews Action */
.aso-table th.aso-col-reviews-action,
.aso-table td.aso-col-reviews-action { text-align: right; width: 120px; }
button.aso-row-reviews-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
button.aso-row-reviews-btn:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--hairline));
  background: var(--tint);
}

/* Empty State Enhancements */
.aso-ratings-empty { gap: 10px; padding: 48px 24px; border-style: solid; }
.aso-ratings-empty p { max-width: 480px; line-height: 1.55; font-size: 13.5px; }
.aso-ratings-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: var(--accent);
  background: var(--tint);
  margin-bottom: 2px;
}
.aso-ratings-empty-actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.aso-ratings-empty-actions .aso-btn { margin-top: 0; min-height: 44px; border-radius: 12px; padding-inline: 16px; }

/* Customer Reviews Workspace */
.aso-reviews-section { display: grid; gap: 14px; }
.aso-reviews-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.aso-star-pills { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.aso-star-pills button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface-2);
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.14s, background-color 0.14s, color 0.14s;
}
.aso-star-pills button:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); background: var(--surface); }
.aso-star-pills button[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: var(--tint);
}
.aso-star-pills button small { font-size: 11px; color: var(--muted); font-weight: 500; }
.aso-star-pills button[aria-pressed="true"] small { color: var(--accent); }
.aso-reviews-search { flex: 1 1 190px; min-width: 160px; }

/* Reviews Summary & Star Histogram */
.aso-reviews-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 340px);
  align-items: center;
  gap: 18px 28px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.aso-reviews-summary-score { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.aso-reviews-summary-score > b { font-size: 40px; font-weight: 720; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.aso-reviews-summary-score > div { display: grid; gap: 4px; }
.aso-reviews-summary-score > div > span:last-child { font-size: 12px; color: var(--muted); }
.aso-reviews-source {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--tint);
}
.aso-reviews-bars { display: grid; gap: 4px; }
button.aso-reviews-bar-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 20px;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
button.aso-reviews-bar-row:hover,
button.aso-reviews-bar-row.active { background: var(--surface-2); color: var(--text); }
.aso-reviews-bar-label { font-weight: 600; text-align: right; }
.aso-reviews-bar-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.aso-reviews-bar-track > i { display: block; height: 100%; border-radius: 999px; background: #f59e0b; transition: width 0.25s ease; }
.aso-reviews-bar-track > i[data-star="5"],
.aso-reviews-bar-track > i[data-star="4"] { background: #f59e0b; }
.aso-reviews-bar-track > i[data-star="3"] { background: #eab308; }
.aso-reviews-bar-track > i[data-star="2"],
.aso-reviews-bar-track > i[data-star="1"] { background: var(--bad); }
.aso-reviews-bar-count { text-align: right; font-weight: 550; }

/* Review Cards */
.aso-review-list { display: grid; gap: 10px; }
.aso-review-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.aso-review-card:hover { border-color: color-mix(in srgb, var(--text) 18%, var(--hairline)); }
.aso-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.aso-review-title-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.aso-review-title { margin: 0; font-size: 14.5px; font-weight: 640; letter-spacing: -0.012em; color: var(--text); }
.aso-review-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
button.aso-review-store-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text);
  background: var(--surface-2);
  box-shadow: none;
  cursor: pointer;
}
button.aso-review-store-chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); color: var(--accent); background: var(--surface); }
.aso-review-version {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--surface-2);
}
.aso-review-body { margin: 0; font-size: 13.8px; line-height: 1.62; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.aso-review-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.aso-review-author b { color: var(--text); font-weight: 560; }
.aso-review-helpful {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 560;
  color: var(--good);
  background: color-mix(in srgb, var(--good-mark) 11%, transparent);
}
.aso-review-reply {
  display: grid;
  gap: 5px;
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}
.aso-review-reply-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.aso-review-reply-head b { color: var(--text); font-weight: 620; }
.aso-review-reply p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-line; }
.aso-reviews-more { display: flex; justify-content: center; padding-top: 4px; }

/* Skeleton Loading Cards */
.aso-review-card.is-skeleton { pointer-events: none; gap: 9px; }
.aso-skel-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--text) 9%, var(--surface-2)) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: aso-shimmer 1.4s ease-in-out infinite;
}
.aso-skel-line.short { width: 28%; height: 14px; }
.aso-skel-line.medium { width: 48%; }
.aso-skel-line.full { width: 96%; }
.aso-skel-line.long { width: 74%; }
@keyframes aso-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 1060px) {
  .aso-ratings .aso-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .aso-reviews-summary { grid-template-columns: minmax(0, 1fr); }
  .aso-ratings-store-filter { flex: 1 1 100%; }
}
@media (max-width: 560px) {
  .aso-ratings .aso-stats { grid-template-columns: minmax(0, 1fr); }
  .aso-ratings-tabs { width: 100%; }
  .aso-ratings-tabs button { flex: 1; justify-content: center; }
}

/* ---------- Overview: App Store Connect numbers ---------- */
/* Second series: orange, checked against the accent blue for colour-blind separation in both themes. */
.ss { --ss-second: #cc700c; gap: 18px; }
@media (prefers-color-scheme: light) { .ss { --ss-second: #c46a00; } }
:root[data-theme="light"] .ss { --ss-second: #c46a00; } :root[data-theme="dark"] .ss { --ss-second: #cc700c; }
.ss-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ss-head h3 { font-size: 18px; letter-spacing: -.02em; margin-top: 2px; }
.ss .ov-kpi { background: var(--surface-2); border-color: transparent; }
.ss-block { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ss-block h4 { font-size: 13px; font-weight: 600; color: var(--muted); }
.ss-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ss-chart { position: relative; }
.ss-chart svg { width: 100%; height: 190px; display: block; overflow: visible; }
.ss-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ss-tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; display: grid; gap: 2px; min-width: 150px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-size: 12px; color: var(--muted); white-space: nowrap; z-index: 2; }
.ss-tip b, .ss-tip strong { color: var(--text); font-variant-numeric: tabular-nums; }
.ss-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; } .ss-dot.a { background: var(--accent); } .ss-dot.b { background: var(--ss-second); }
.ov-key .ss-k2 { background: var(--ss-second); }
.ss-table { display: grid; font-size: 13px; }
.ss-tr { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, .9fr) 52px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.ss-tr:last-child { border-bottom: 0; }
.ss-th { font-size: 11px; color: var(--muted); padding-top: 0; }
.ss-tr > span:nth-child(n+3) { text-align: right; }
.ss-country { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-country i { font-style: normal; font-size: 16px; }
.ss-bar { display: flex; align-items: center; gap: 8px; }
.ss-bar > span { height: 8px; min-width: 2px; border-radius: 4px; background: var(--accent); }
.ss-bar b { font-weight: 600; }
.ss-ranks { list-style: none; margin: 0; padding: 0; display: grid; }
.ss-ranks li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.ss-ranks li:last-child { border-bottom: 0; }
.ss-ranks small { grid-column: 2 / 4; text-align: right; color: var(--muted); font-size: 12px; }
.ss-ranks b { text-align: right; font-variant-numeric: tabular-nums; }
.ss-rankbar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; } .ss-rankbar > span { display: block; height: 100%; border-radius: 4px; background: var(--good-mark); }
.ss-vendor { display: flex; gap: 8px; flex-wrap: wrap; } .ss-vendor .aso-input { max-width: 220px; }
.ss .aso-error { color: var(--bad); font-size: 13px; }
.ss-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ss-skeleton span, .ss-skeleton i { height: 78px; border-radius: 16px; background: var(--surface-2); animation: ss-pulse 1.4s ease-in-out infinite; }
.ss-skeleton i { grid-column: 1 / -1; height: 190px; }
@keyframes ss-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ss-skeleton span, .ss-skeleton i { animation: none; } }
@media (max-width: 900px) { .ss-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.apple-vendor { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.apple-vendor-help { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.apple-vendor-help a { color: var(--accent); }
.key-role-help { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); font-size: 13px; line-height: 1.5; }
.key-role-help > b { display: flex; align-items: center; gap: 7px; color: var(--warn); }
.key-role-help p { margin: 0; }
.key-role-help ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.key-role-help a { color: var(--accent); }
.key-role-help code { font-size: 12px; }

/* ---------- Add keywords: what competitors rank for ---------- */
dialog.aso-dialog.rk { width: min(880px, calc(100vw - 24px)); height: min(760px, calc(100dvh - 40px)); display: none; }
dialog.aso-dialog.rk[open] { display: flex; flex-direction: column; }
.rk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 6px; }
.rk-head h2 { font-size: 20px; letter-spacing: -.02em; }
.rk-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.rk-rivals { display: flex; align-items: flex-start; gap: 12px; padding: 14px 24px 16px; border-bottom: 1px solid var(--hairline); }
.rk-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rk-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 230px; height: 34px; padding: 0 6px 0 6px; border-radius: 999px; background: var(--aso-control, var(--surface-2)); font-size: 13px; font-weight: 500; }
.rk-chip img, .rk-rank img { border-radius: 6px; flex: none; }
.rk-chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.rk-chip button:hover { background: var(--hairline); color: var(--text); }
.rk-noicon { width: 20px; height: 20px; border-radius: 6px; background: var(--hairline); flex: none; }
.rk-add { flex: 1 1 220px; min-width: 200px; }
.rk-add .aso-input, .rk-add input { height: 34px; border-radius: 999px; }
.rk-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rk-find { flex: none; height: 34px; }
.rk-progress { position: relative; height: 3px; background: var(--hairline); }
.rk-progress > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .3s var(--spring); }
.rk-progress small { position: absolute; right: 24px; top: 8px; font-size: 11px; color: var(--muted); }
.rk-error { display: flex; align-items: center; gap: 8px; margin: 12px 24px 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 8%, var(--surface)); color: var(--bad); font-size: 13px; }
.rk-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 24px 16px; }
.rk-empty { display: grid; justify-items: center; gap: 8px; max-width: 440px; margin: 56px auto; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.55; }
.rk-empty b { color: var(--text); font-size: 15px; }
.rk-empty p { margin: 0; }
.rk-tools { position: sticky; top: -8px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; background: var(--surface); }
.rk-search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--aso-control, var(--surface-2)); color: var(--muted); }
.rk-search input { width: 200px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none; }
.rk-count { font-size: 12px; color: var(--muted); }
.rk-table { display: grid; }
.rk-row { display: grid; grid-template-columns: 28px minmax(0, 1.6fr) minmax(0, 1.8fr) 52px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; min-height: 48px; padding: 6px 8px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.rk-row:not(.rk-th):hover { background: var(--aso-control, var(--surface-2)); }
.rk-row.on { background: var(--tint); }
.rk-th { position: sticky; top: 40px; z-index: 1; min-height: 34px; background: var(--surface); border-bottom: 1px solid var(--hairline); border-radius: 0; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; cursor: default; }
.rk-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.rk-sort.on { color: var(--text); } .rk-sort .icon { transform: rotate(90deg); }
.rk-term { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-ranks { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-rank { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 7px 0 3px; border-radius: 8px; background: var(--aso-control, var(--surface-2)); font-size: 12px; font-variant-numeric: tabular-nums; }
.rk-own { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); } .rk-own.good { color: var(--good); font-weight: 600; }
.rk-loading span { height: 12px; border-radius: 6px; background: var(--hairline); animation: ss-pulse 1.4s ease-in-out infinite; }
.rk-notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.rk-notes li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.rk-notes .icon { flex: none; margin-top: 1px; }
.rk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--hairline); }
.rk-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.rk-own-form { flex: 1; display: flex; gap: 8px; max-width: 520px; } .rk-own-form .aso-input { flex: 1; }
@media (max-width: 720px) {
  .rk-rivals { flex-direction: column; align-items: stretch; }
  .rk-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .rk-row > :nth-child(n+4) { display: none; }
  .rk-th { top: 40px; }
}

/* ---------- Overview as one section ---------- */
.aso-page .ov-one { display: grid; gap: 0; padding: 0; border-radius: 22px; overflow: hidden; }
.aso-page .ov-one > *, .aso-page .ov-one > .ov-grid2 > * { margin: 0; padding: 24px 28px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.aso-page .ov-one > * + * { border-top: 1px solid var(--hairline); }
.aso-page .ov-one > .ov-grid2 { padding: 0; gap: 0; }
.aso-page .ov-one > .ov-grid2 > * + * { border-left: 1px solid var(--hairline); }
.aso-page .ov-one > .ov-hero { background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.aso-page .ov-one > .ov-kpis { padding-top: 0; border-top: 0; background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.aso-page .ov-one .ov-kpi { background: color-mix(in srgb, var(--surface-2) 70%, transparent); border-color: transparent; }
.aso-page .ov-one .ss .ov-kpi { background: var(--surface-2); }
@media (max-width: 900px) { .aso-page .ov-one > .ov-grid2 > * + * { border-left: 0; border-top: 1px solid var(--hairline); } .aso-page .ov-one > *, .aso-page .ov-one > .ov-grid2 > * { padding: 20px; } }

/* Visibility chart */
.vz { display: grid; gap: 14px; }
.vz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vz-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.vz-stats > div { display: grid; gap: 2px; }
.vz-stats span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.vz-stats b { font-size: 26px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.vz-stats em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); } .vz-stats em.up { color: var(--good); } .vz-stats em.down { color: var(--bad); }
.vz-k10, .vz-k30 { display: inline-block; width: 10px; height: 10px; border-radius: 3px; } .vz-k10 { background: var(--good-mark); } .vz-k30 { background: var(--accent); }
.vz-plot { position: relative; }
.vz-plot svg { width: 100%; height: 230px; display: block; overflow: visible; cursor: crosshair; }
.vz-end { font-size: 11px; font-weight: 600; fill: var(--text); }
.ss-dot.g { background: var(--good-mark); }

/* Overview summary band: score and headline numbers side by side, the action at the top right. */
.aso-page .ov-one > .ov-summary { display: grid; gap: 18px; background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.ov-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ov-summary-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.ov-summary .ov-hero-text h2 { margin: 0 0 10px; }
.ov-kpis.ov-kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-rank-today { display: grid; gap: 10px; padding-top: 18px; margin-top: 6px; border-top: 1px dashed var(--hairline); }
.ov-rank-today header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ov-rank-today h4 { font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 900px) { .ov-summary-body { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Overview: country switch, compact status, search + store side by side ---------- */
.aso-page .ov-one > .ov-top { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 18px 28px; background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.ov-top .ov-hero-actions { flex: 0 1 auto; min-width: 0; margin-left: auto; }
.ov-country { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 9px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ov-country:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); }
.ov-country:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.ov-country[data-pending] { opacity: .6; }
.ov-country-flag { font-size: 22px; line-height: 1; }
.ov-country-text { display: grid; line-height: 1.15; }
.ov-country-text small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.ov-country-text b { font-size: 14px; color: var(--text); white-space: nowrap; }
.ov-country select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 14px; }
.ov-status { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; min-width: 0; padding-left: 24px; border-left: 1px solid var(--hairline); }
.ov-status .ov-ring-value { font-size: 18px; } .ov-status .ov-ring-label { display: none; }
.ov-status .ov-ring text:first-of-type { transform: translateY(2px); }
.ov-status-text { display: grid; line-height: 1.2; }
.ov-status-text b { font-size: 17px; letter-spacing: -.02em; }
.ov-status.good .ov-status-text b { color: var(--good); } .ov-status.warn .ov-status-text b { color: var(--warn); } .ov-status.bad .ov-status-text b { color: var(--bad); }
.ov-status-text span { font-size: 11px; color: var(--muted); }
.ov-subscores.ov-subscores-inline { display: flex; gap: 18px; min-width: 0; }
.ov-subscores-inline li { display: grid; grid-template-columns: none; gap: 5px; width: 96px; }
.ov-subscores-inline li > span { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.ov-subscores-inline li > span b { color: var(--text); }
.ov-subscores-inline .ov-minibar { min-width: 0; height: 5px; }
.aso-page .ov-one > .kw-hero { margin: 0; border-radius: 0; }
.ov-empty { padding: 24px 28px; }

.aso-page .ov-one > .ov-kpi-band { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0; }
.aso-page .ov-one > .ov-kpi-band.solo, .aso-page .ov-one > .ov-kpi-band:has(> .ov-group:only-child) { grid-template-columns: minmax(0, 1fr); }
.ov-kpi-band > .ov-group { padding: 20px 28px 22px; }
.ov-kpi-band > .ov-group + .ov-group { border-left: 1px solid var(--hairline); }
.ov-group { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ov-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ov-group-head h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ov-kpis.ov-kpis-c { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ov-kpis-c .ov-kpi { padding: 12px 14px; border-radius: 12px; gap: 2px; }
.ov-kpis-c .ov-kpi span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-kpis-c .ov-kpi b { font-size: 22px; }
.ov-kpis-c .ov-kpi em { font-size: 10px; white-space: nowrap; }
.ss-ph { height: 70px; border-radius: 12px; background: var(--surface-2); animation: ss-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ss-ph { animation: none; } }
.ov-setup { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 70px; padding: 12px 16px; border: 1px dashed var(--hairline); border-radius: 12px; }
.ov-setup p { margin: 0; font-size: 13px; color: var(--muted); max-width: 42ch; }

.ov-chart, .ov-chart-empty, .ov-markets-t { display: grid; gap: 14px; align-content: start; min-width: 0; }
.ov-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 30px; }
.ov-chart-head h3, .ov-chart-empty h3 { font-size: 15px; letter-spacing: -.01em; }
.ov-chart-note { display: grid; gap: 10px; justify-items: start; padding: 28px 0; }
.ov-chart-empty { align-content: center; min-height: 200px; }
.ov-key .k10 { background: var(--good-mark); }

.mk-table { display: grid; font-size: 13px; }
.mk-tr { display: grid; grid-template-columns: minmax(0, 1.6fr) 80px 70px; gap: 12px; align-items: center; width: 100%; padding: 9px 10px; margin: 0; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; background: none; color: var(--text); font: inherit; text-align: left; font-variant-numeric: tabular-nums; }
.mk-table[data-store] .mk-tr { grid-template-columns: minmax(0, 1.4fr) 76px 64px minmax(0, 1.4fr) 90px 56px; }
.mk-tr > span:nth-child(n+2) { text-align: right; justify-self: end; }
.mk-tr .ss-bar { justify-self: stretch !important; justify-content: flex-end; }
.mk-th { padding-top: 0; font-size: 11px; color: var(--muted); }
button.mk-tr { cursor: pointer; border-radius: 10px; transition: background .12s; }
button.mk-tr:hover { background: var(--surface-2); }
button.mk-tr[aria-current] { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent); }
.mk-tr small { color: var(--muted); font-size: 11px; }
.mk-score { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-weight: 600; text-align: center; }
.mk-score.good { color: var(--good); background: color-mix(in srgb, var(--good-mark) 14%, transparent); }
.mk-score.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.mk-score.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.mk-more { justify-self: start; }

@media (max-width: 1100px) { .ov-status { border-left: 0; padding-left: 0; order: 3; flex-basis: 100%; } }
@media (max-width: 900px) {
  .aso-page .ov-one > .ov-top { padding: 16px 20px; }
  .aso-page .ov-one > .ov-kpi-band { grid-template-columns: minmax(0, 1fr); }
  .ov-kpi-band > .ov-group { padding: 18px 20px; }
  .ov-kpi-band > .ov-group + .ov-group { border-left: 0; border-top: 1px solid var(--hairline); }
  .ov-kpis.ov-kpis-c { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-table[data-store] .mk-tr { grid-template-columns: minmax(0, 1fr) 64px 80px; }
  .mk-table[data-store] .mk-tr > :nth-child(3), .mk-table[data-store] .mk-tr > :nth-child(5), .mk-table[data-store] .mk-tr > :nth-child(6) { display: none; }
  .ov-subscores.ov-subscores-inline { flex-wrap: wrap; }
}
.rk-stage { display: flex; align-items: center; gap: 8px; margin: 10px 24px 0; font-size: 12px; color: var(--muted); }
.rk-own { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--hairline); }
.rk-own label { font-size: 13px; font-weight: 600; color: var(--muted); }
.rk-own .aso-input { height: 34px; }
.rk-sources { font-size: 11px; color: var(--muted); }
