:root {
  color-scheme: light;
  --guide-bg: oklch(97.3% 0.008 250);
  --guide-surface-subtle: oklch(95.2% 0.015 245);
  --guide-ink-soft: oklch(39% 0.035 255);
  --guide-blue-soft: oklch(94% 0.035 248);
  --guide-green-soft: oklch(94% 0.04 165);
  --guide-error-bg: oklch(96% 0.025 25);
}

* { box-sizing: border-box; }

html { background: var(--guide-bg); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--u2-fg);
  background: var(--guide-bg);
  font-family: var(--u2-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: var(--u2-z-toast);
  padding: 10px 14px;
  color: white;
  background: var(--brand-navy);
  border-radius: var(--u2-radius-control);
  transform: translateY(-160%);
  transition: transform var(--u2-transition);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--u2-border);
}

.u2-brand-lockup { text-decoration: none; }

.back-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--u2-border);
  border-radius: var(--u2-radius-control);
  color: var(--guide-ink-soft);
  background: var(--u2-surface);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color var(--u2-transition), color var(--u2-transition), background var(--u2-transition);
}

.back-link:hover {
  color: var(--brand-navy);
  border-color: color-mix(in oklch, var(--brand-navy), white 55%);
  background: var(--guide-blue-soft);
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr);
  gap: 56px;
  align-items: end;
  padding: 72px 0 52px;
}

.guide-label {
  margin: 0 0 18px;
  color: var(--brand-teal);
  font-size: 14px;
  font-weight: 750;
}

.guide-hero h1 {
  max-width: 17ch;
  margin: 0;
  color: var(--brand-navy);
  font-size: 48px;
  line-height: 1.16;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero-intro {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--guide-ink-soft);
  font-size: 17px;
  line-height: 1.85;
  text-wrap: pretty;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  color: var(--u2-muted);
  font-size: 13px;
}

.hero-meta span { position: relative; }
.hero-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -11px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--brand-teal);
}

.hero-aside {
  padding: 24px;
  color: white;
  background: var(--brand-navy);
  border-radius: var(--u2-radius-panel);
}

.hero-aside p {
  margin: 0 0 8px;
  color: oklch(88% 0.03 245);
  font-size: 13px;
}

.hero-aside strong {
  display: block;
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions,
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-action,
.secondary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: var(--u2-radius-control);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  border: 1px solid transparent;
  color: var(--brand-navy);
  background: white;
}

button.primary-action { color: white; background: var(--brand-navy); }

.secondary-action {
  border: 1px solid color-mix(in oklch, white, transparent 62%);
  color: white;
  background: transparent;
}

.guide-shell {
  min-height: 500px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-top: 1px solid var(--u2-border);
  border-bottom: 1px solid var(--u2-border);
}

.tab-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 32px 28px 32px 0;
  border-right: 1px solid var(--u2-border);
}

.guide-tab {
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--u2-radius-control);
  color: var(--guide-ink-soft);
  background: transparent;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: color var(--u2-transition), background var(--u2-transition);
}

.guide-tab:hover { background: var(--guide-surface-subtle); }

.guide-tab[aria-selected="true"] {
  color: var(--brand-navy);
  background: var(--guide-blue-soft);
}

.guide-sections { min-width: 0; padding: 38px 0 46px 44px; }

.guide-panel:focus { outline: none; }

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.panel-heading h2 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 28px;
  letter-spacing: -.025em;
}

.panel-heading p {
  max-width: 65ch;
  margin: 8px 0 0;
  color: var(--guide-ink-soft);
  line-height: 1.75;
}

.item-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--brand-teal);
  background: var(--guide-green-soft);
  font-size: 12px;
  font-weight: 700;
}

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--u2-border);
}

.guide-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--u2-border);
}

.item-number {
  color: var(--brand-teal);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.item-copy h3 {
  margin: 0;
  color: var(--u2-fg);
  font-size: 17px;
  letter-spacing: -.012em;
}

.item-copy p {
  max-width: 70ch;
  margin: 8px 0 0;
  color: var(--guide-ink-soft);
  font-size: 14px;
  line-height: 1.8;
  text-wrap: pretty;
}

.item-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--u2-border);
  border-radius: var(--u2-radius-control);
  color: var(--brand-navy);
  background: var(--u2-surface);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.loading-state { display: grid; gap: 18px; padding-top: 20px; }

.loading-line {
  height: 72px;
  border-radius: var(--u2-radius-control);
  background: linear-gradient(100deg, var(--guide-surface-subtle) 25%, white 45%, var(--guide-surface-subtle) 65%);
  background-size: 220% 100%;
  animation: guide-loading 1.4s ease-in-out infinite;
}

.loading-line-short { width: 74%; }

@keyframes guide-loading { to { background-position-x: -220%; } }

.error-state {
  max-width: 620px;
  padding: 28px;
  background: var(--guide-error-bg);
  border-radius: var(--u2-radius-panel);
}

.error-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: var(--u2-danger);
  font-weight: 800;
}

.error-state h2 { margin: 18px 0 8px; font-size: 22px; }
.error-state p { margin: 0; color: var(--guide-ink-soft); line-height: 1.7; }
.error-state .secondary-action { color: var(--brand-navy); border-color: var(--u2-border); }

.support-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 40px 0;
}

.support-strip h2 { margin: 0; color: var(--brand-navy); font-size: 21px; }
.support-strip p { margin: 7px 0 0; color: var(--guide-ink-soft); line-height: 1.65; }
.support-strip > a { flex: 0 0 auto; color: var(--brand-navy); font-weight: 750; text-decoration: none; }

.site-footer {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px max(20px, calc((100% - 1120px) / 2));
  color: var(--u2-muted);
  background: var(--u2-surface);
  border-top: 1px solid var(--u2-border);
  font-size: 12px;
}

.site-footer p { margin: 0; }
.site-footer div { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--brand-navy); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .guide-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 54px; }
  .guide-hero h1 { font-size: 40px; }
  .hero-aside { max-width: 560px; }
  .guide-shell { grid-template-columns: 1fr; }
  .tab-list {
    position: sticky;
    top: 0;
    z-index: var(--u2-z-sticky);
    flex-direction: row;
    overflow-x: auto;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--u2-border);
    background: color-mix(in oklch, var(--guide-bg), transparent 5%);
  }
  .guide-tab { flex: 0 0 auto; }
  .guide-sections { padding: 32px 0 42px; }
}

@media (max-width: 560px) {
  .site-header, main { width: min(100% - 28px, 1120px); }
  .site-header { min-height: 64px; }
  .back-link { padding: 0 11px; }
  .guide-hero { padding: 42px 0 34px; }
  .guide-hero h1 { max-width: none; font-size: 34px; line-height: 1.2; letter-spacing: -.025em; }
  .hero-intro { font-size: 16px; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .hero-meta span::after { display: none; }
  .hero-aside { padding: 20px; }
  .guide-sections { padding-top: 26px; }
  .panel-heading { display: block; }
  .item-count { display: inline-block; margin-top: 14px; }
  .guide-item { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 22px 0; }
  .item-action { grid-column: 2; justify-self: start; }
  .support-strip { align-items: flex-start; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-line { animation: none; }
}
