/* Navigation, page framing, and shared actions. */
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--ink); font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.brand-name span { color: var(--accent); }
.brand-logo { width: 32px; height: 32px; }
nav { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 12px; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; border-radius: var(--radius); }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active, .nav-link.active:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.account-actions { position: relative; justify-self: end; display: flex; align-items: center; gap: 8px; }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
.lang-toggle { min-width: 36px; height: 36px; padding: 0 8px; color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: var(--radius); font-size: .82rem; font-weight: 700; cursor: pointer; }
.lang-toggle:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle svg { width: 17px; height: 17px; }
/* Signed out: a plain "Sign in" button. Signed in: initial + chevron that opens the account menu. */
.account-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .88rem; font-weight: 600; cursor: pointer; }
.account-button:hover, .account-button[aria-expanded="true"] { background: var(--surface-2); }
.account-button > svg { width: 16px; height: 16px; }
.account-button.signed-in { gap: 4px; padding: 0 6px 0 3px; border-radius: 999px; }
.account-button.signed-in > svg { width: 14px; height: 14px; color: var(--muted); transition: transform 150ms ease; }
.account-button.signed-in[aria-expanded="true"] > svg { transform: rotate(180deg); }
.profile-avatar { display: grid; place-items: center; width: 28px; height: 28px; color: var(--accent); background: var(--accent-soft); border-radius: 50%; font-size: .82rem; font-weight: 700; line-height: 1; }

main { min-height: calc(100vh - 150px); padding: 28px 0 0; }
.page-view[hidden] { display: none; }

.intro { width: min(1180px, calc(100% - 56px)); margin: 8px auto 28px; }
.intro h1 { max-width: 900px; margin: 0 0 12px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.intro-lead { max-width: 680px; margin: 0 0 14px; color: var(--ink-2); font-size: 1.12rem; }
.intro-accent { color: var(--accent); white-space: nowrap; }
/* Only filled when prices fail to load. */
.intro-stats { margin: 0; color: var(--muted); font-size: .88rem; }
.intro-stats:empty { display: none; }

.model-prices { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.model-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.model-price:hover { background: var(--surface-2); }
.model-price-name { font-weight: 600; }
.model-price-name small { margin-left: 8px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.model-price-value { font-size: 1.1rem; font-weight: 700; text-align: right; }
.model-price-meta { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
.fold-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; font-weight: 600; cursor: pointer; }
.fold-toggle:hover { border-color: var(--line-strong); }
.fold-toggle[hidden] { display: none; }
.fold-toggle svg { width: 16px; height: 16px; transition: transform 150ms ease; }
.fold-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius); font-weight: 600; text-decoration: none; cursor: pointer; }
.primary-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.primary-button:disabled, .small-button:disabled { cursor: not-allowed; opacity: .5; }
.small-button { min-height: 36px; padding: 0 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .85rem; font-weight: 600; cursor: pointer; }
.small-button:hover { background: var(--surface-2); }
.small-button.tracked { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.text-button { padding: 0; color: var(--accent); font-size: .88rem; font-weight: 600; text-decoration: none; background: transparent; border: 0; cursor: pointer; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.search-band, .section { width: min(1180px, calc(100% - 56px)); margin: 0 auto 16px; }
.search-form { position: relative; display: flex; align-items: center; min-height: 48px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.search-form:focus-within { border-color: var(--ink-2); }
.search-form > svg { flex: 0 0 auto; width: 18px; height: 18px; margin-left: 14px; color: var(--muted); }
.search-form input { min-width: 0; flex: 1; padding: 0 12px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-form input::placeholder { color: var(--muted); }
.search-form .primary-button { align-self: stretch; min-height: 0; margin: 4px; }

.section { padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.section-description { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.section-heading.compact { align-items: start; }
.count-label, .muted { margin-bottom: 2px; color: var(--muted); font-size: .82rem; }

footer { width: min(1180px, calc(100% - 56px)); display: flex; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 20px 2px 32px; color: var(--muted); font-size: .8rem; }

/* Suggestion list under a combobox input (search, compare pickers). */
.suggestions { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0; max-height: 320px; margin: 0; padding: 6px; overflow-y: auto; list-style: none; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); }
.suggestions[hidden] { display: none; }
.suggestions li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.suggestions li:hover, .suggestions li[aria-selected="true"] { background: var(--surface-2); }
.suggestions small { flex: 0 0 auto; color: var(--muted); font-size: .8rem; }
