/* Brand palette and base styles */

:root {
  --ink: #181818;
  --muted: #59564e;
  --nav: #1b1b1b;
  --nav-text: #e1ded6;
  --nav-muted: #bcb7ac;
  --nav-line: #42403a;
  --paper: #f8f7f3;
  --surface: #ffffff;
  --line: #e0ddd3;
  --line-strong: #b9b3a6;
  --accent: #e0be38;
  --accent-hover: #edcd54;
  --accent-ink: #624b0a;
  --accent-line: #e0cc7d;
  --accent-wash: #fcf3ce;
  --soft: #f2f0e9;
  --focus: #896809;
  --radius: 16px;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  font-synthesis: none;
  line-height: 1.6;
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

button {
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

svg {
  vertical-align: middle;
}

.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  left: 20px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  padding: 12px;
}

.skip:focus {
  top: 8px;
}

/* Sidebar and navigation */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  background: var(--nav);
  color: var(--nav-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding: 28px 18px 20px;
  overflow-y: auto;
}

.brand {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--nav-line);
  color: var(--nav-text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 198px;
  height: auto;
  aspect-ratio: 2.12;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  background: var(--surface);
}

.brand-label {
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.brand:hover {
  text-decoration: none;
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin: 23px 0 8px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  border-radius: 8px;
}

.nav-home.active {
  color: var(--accent);
  background: #363126;
  box-shadow: inset 3px 0 var(--accent);
}

.nav-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 23px 12px 6px;
  color: var(--nav-muted);
  font-weight: 700;
}

/* ==========================================
   Sidebar - Application Heading Logos
   ========================================== */

.nav-label-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Application logo - matches navigation icons */
.nav-app-logo {
    display: block;
    width: 17px;
    height: 17px;
    object-fit: contain;
    flex: 0 0 17px;
}

/* Application heading text */
.nav-label-with-icon span {
    display: block;
    line-height: 17px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 8px;
  margin: 2px 0;
}

.nav-link .icon {
  width: 17px;
  height: 17px;
  opacity: .8;
}

.nav-link:hover,
.nav-home:hover {
  background: #2f2d28;
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
  background: #363126;
  box-shadow: inset 3px 0 var(--accent);
}

.sidebar :focus-visible {
  outline-color: var(--accent);
  outline-offset: 2px;
}

.nav-bottom {
  margin-top: auto;
  padding-top: 26px;
}

.nav-bottom small {
  display: block;
  padding: 10px 12px 0;
  font-size: 11px;
  color: var(--nav-muted);
}

/* Page frame and header search */

.page-shell {
  margin-left: 258px;
}

.topbar {
  min-height: 78px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 44px;
}

.topbar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .1px;
}

.topbar-label span {
  color: var(--muted);
  margin: 0 9px;
}

.topbar-mark {
  display: none;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 9px;
  padding: 5px 8px 5px 12px;
  width: 310px;
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 6px 0;
  outline: none;
  font-size: 13px;
}

.top-search button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 5px;
}

.top-search .icon {
  width: 18px;
  height: 18px;
}

.top-search:focus-within,
.hero-search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.menu-button:hover {
  background: var(--accent-wash);
}

.menu-button {
  display: none;
  padding: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.main {
  max-width: 1360px;
  padding: 40px 44px 64px;
  margin: auto;
}

/* Homepage introduction and search */

.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 13px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 36px;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 3px 0 20px;
  padding: clamp(24px, 3.6vw, 50px);
  border-radius: 20px;
  border-top: 4px solid var(--accent);
  background: var(--nav);
  color: var(--surface);
}

.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  right: -66px;
  bottom: -180px;
  width: 360px;
  height: 400px;
  border: 26px solid rgb(224 190 56 / 9%);
  border-radius: 50%;
}

.hero > div > .eyebrow {
  color: var(--accent);
  font-size: 11px;
  margin: 0 0 13px;
}

.hero h1 {
  font-size: clamp(36px, 4.3vw, 58px);
  line-height: 1.08;
  letter-spacing: -.042em;
  font-weight: 750;
  margin: 0 0 16px;
  max-width: 660px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 16px;
  color: var(--nav-text);
  max-width: 550px;
  margin: 0;
}

.hero-aside {
  padding: 20px 22px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
}

.hero-aside .eyebrow {
  font-size: 10px;
  color: var(--accent-ink);
  margin-bottom: 8px;
}

.hero-aside p {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 12px;
}

.hero-aside a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
}

.search-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px 24px;
  margin: 0 0 38px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 3%);
}

.search-panel label {
  font-weight: 650;
  font-size: 15px;
  display: block;
  margin-bottom: 10px;
}

.hero-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 7px 7px 7px 16px;
  gap: 12px;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  padding: 8px 0;
  border: 0;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  background: none;
}

.hero-search button,
.primary {
  background: var(--accent);
  color: var(--ink);
  border: 0;
  border-radius: 7px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.hero-search button:hover,
.primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.search-hints {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.search-hints a {
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
}

.search-hints a:hover {
  background: var(--accent-wash);
  border-color: var(--accent-line);
}

/* Homepage guide cards */

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -.5px;
}

.section-heading p {
  margin: 7px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.section-heading .count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.product-block {
  margin: 27px 0;
}

.product-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 12px;
}

.product-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.section-card {
  display: flex;
  flex-direction: column;
  min-height: 204px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 21px 21px 17px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 4px rgb(0 0 0 / 2%);
  transition: transform .15s, border-color .15s;
}

.section-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 6px 16px rgb(0 0 0 / 6%);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-icon {
  display: grid;
  place-items: center;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  background: var(--accent-wash);
  color: var(--accent-ink);
}

.card-top>span {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.section-card h3 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.section-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 17px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-ink);
}

.card-foot .icon {
  width: 17px;
  height: 17px;
}

.bottom-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}

.info-panel {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.info-panel h2 {
  font-size: 17px;
  margin: 0 0 10px;
}

.info-panel p,
.info-panel li {
  font-size: 13px;
  color: var(--muted);
}

.info-panel a {
  font-size: 13px;
}

.info-panel ul {
  padding-left: 20px;
}

/* Footer */

.footer {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 22px 44px;
  display: flex;
  gap: 15px;
  justify-content: space-between;
}

.footer a {
  color: var(--muted);
}

/* Section pages and guide lists */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 26px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs span {
  opacity: .6;
}

.section-intro {
  padding: 0 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.section-intro::before,
.article-head::before {
  content: '';
  display: block;
  width: 44px;
  height: 4px;
  background: var(--accent);
  border-radius: 8px;
  margin-bottom: 16px;
}

.section-intro h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 12px 0;
  letter-spacing: -1px;
}

.section-intro p {
  max-width: 700px;
  font-size: 16px;
  color: var(--muted);
}

.article-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.article-card {
  display: flex;
  gap: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
}

.article-card:hover {
  border-color: var(--accent-line);
  text-decoration: none;
}

.article-card .task-number {
  color: var(--muted);
  font-size: 12px;
  min-width: 23px;
  padding-top: 3px;
  font-weight: 650;
}

.article-card h2 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 7px;
}

.article-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 11px;
}

.article-card .meta {
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 600;
}

/* Guide articles and step-by-step controls */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 32px;
  align-items: start;
}

.article-main {
  min-width: 0;
  max-width: 850px;
}

.article-head h1 {
  font-size: clamp(29px, 3vw, 39px);
  letter-spacing: -1px;
  line-height: 1.2;
  margin: 12px 0 16px;
}

.article-head .summary {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin: 16px 0 20px;
}

.article-meta .icon {
  width: 15px;
  height: 15px;
  margin-right: 4px;
}

.pill {
  display: inline-flex;
  border-radius: 5px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 650;
}

.article-actions {
  display: flex;
  gap: 9px;
  margin: 0 0 25px;
}

.quiet-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  text-decoration: none;
}

.quiet-button .icon {
  height: 16px;
  width: 16px;
}

.quiet-button:hover {
  background: var(--soft);
  text-decoration: none;
}

.quiet-button[aria-pressed=true] {
  background: var(--accent-wash);
  color: var(--accent-ink);
}

.before {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 19px 23px;
  margin: 20px 0;
}

.before h2 {
  margin: 0 0 9px;
  font-size: 16px;
}

.before ul {
  padding-left: 20px;
  margin: 0;
}

.before li {
  font-size: 14px;
  margin: 5px 0;
}

.notice {
  padding: 17px 21px;
  border: 1px solid var(--accent-line);
  border-left: 4px solid var(--focus);
  border-radius: 9px;
  background: var(--accent-wash);
  margin: 22px 0;
  font-size: 14px;
}

.notice.info {
  border-color: var(--line);
  border-left-color: var(--line-strong);
  background: var(--accent-wash);
}

.notice strong {
  display: block;
  margin-bottom: 5px;
}

.notice p {
  margin: 0;
}

.variant-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  margin-top: 29px;
}

.variant-tabs button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.variant-tabs button[aria-selected=true] {
  background: var(--accent-wash);
  color: var(--ink);
  border-color: var(--focus);
}

.variant-intro {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 18px;
}

.variant-panel h2 {
  font-size: 22px;
  letter-spacing: -.4px;
  margin: 25px 0 16px;
}

.progress-row {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(248 247 243 / 94%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.progress-row progress {
  flex: 1;
  height: 5px;
  accent-color: var(--accent-ink);
  max-width: 160px;
}

.progress-row button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 15px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.step-check {
  display: inline-block;
  width: 35px;
  height: 35px;
  position: relative;
  cursor: pointer;
}

.step-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.step-check span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.step-check input:checked+span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.step-check input:checked+span:after {
  content: '✓';
}

.step-check input:checked+span b {
  display: none;
}

.step-check input:focus-visible+span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.step h3 {
  font-size: 18px;
  line-height: 1.45;
  margin: 2px 0 8px;
}

.step p {
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  color: var(--muted);
}

.step strong {
  font-weight: 700;
  color: var(--ink);
}

.step code {
  background: var(--soft);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: .9em;
  overflow-wrap: anywhere;
}

.step a {
  overflow-wrap: anywhere;
}

.step.done h3 {
  color: var(--accent-ink);
}

/* Guide resources */

.success {
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  padding: 21px 23px;
  margin: 30px 0;
}

.success h2 {
  font-size: 17px;
  color: var(--accent-ink);
  margin: 0 0 10px;
}

.success ul {
  margin: 0;
  padding-left: 20px;
}

.success li {
  font-size: 14px;
  margin: 6px 0;
}

.tips h2,
.help-section h2,
.sources h2 {
  font-size: 20px;
  margin: 28px 0 14px;
}

.tips ul {
  margin: 0;
  padding-left: 21px;
}

.tips li {
  font-size: 15px;
  margin: 9px 0;
  color: var(--muted);
}

.help-section details {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  margin: 10px 0;
}

.help-section summary {
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.help-section details p {
  margin: 0;
  padding: 0 18px 17px;
  font-size: 14px;
  color: var(--muted);
}

.sources {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 5px;
}

.sources p,
.sources li {
  font-size: 12px;
  color: var(--muted);
}

.sources ul {
  padding-left: 18px;
}

.sources a {
  overflow-wrap: anywhere;
}

.article-aside {
  position: sticky;
  top: 25px;
  padding-top: 4px;
}

.article-aside h2 {
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 13px;
}

.article-aside a {
  display: block;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
  border-left: 2px solid var(--line);
}

.article-aside a.current {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
  background: var(--accent-wash);
  font-weight: 650;
}

.article-aside .aside-help {
  font-size: 12px;
  color: var(--muted);
  padding: 18px 12px;
  margin-top: 22px;
  background: var(--soft);
  border-radius: 8px;
}

.next-guide {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  margin-top: 30px;
}

.next-guide small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}

.next-guide strong {
  font-size: 15px;
}

/* Reference pages and tables */

.link-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  background: var(--surface);
}

.link-table th,
.link-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.link-table th {
  font-size: 12px;
  background: var(--soft);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 20px 0;
}

.resource-copy {
  max-width: 860px;
}

.resource-copy h1 {
  font-size: 35px;
  letter-spacing: -1px;
  line-height: 1.25;
}

.resource-copy h2 {
  font-size: 23px;
  margin-top: 32px;
}

.resource-copy p,
.resource-copy li {
  color: var(--muted);
}

.resource-copy li {
  margin: 9px 0;
}

.resource-copy .notice p {
  font-size: 14px;
}

/* Search results and saved guides */

.search-controls {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.search-controls label {
  font-size: 13px;
}

.search-controls select {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
}

.search-status {
  font-size: 14px;
  color: var(--muted);
  margin: 20px 0;
}

.search-result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
  margin: 12px 0;
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.search-result:hover {
  border-color: var(--accent-line);
  text-decoration: none;
}

.search-result h2 {
  font-size: 19px;
  margin: 6px 0;
}

.search-result p {
  font-size: 14px;
  color: var(--muted);
  margin: 5px 0;
}

.search-result small {
  font-size: 11px;
  color: var(--muted);
}

.empty-search {
  padding: 32px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.saved-section {
  margin: 28px 0;
}

.saved-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.saved-list a {
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 16px;
  text-decoration: none;
}

.saved-list small {
  display: block;
  color: var(--muted);
}

/* Overlays and accessibility helpers */

.mobile-overlay {
  display: none;
}

.noscript {
  margin: 20px;
  padding: 14px;
  background: var(--accent-wash);
}

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

[hidden] {
  display: none !important;
}

/* Responsive layout */

@media (min-width: 1600px) {
  .main {
    padding-top: 50px;
  }
}

@media (max-width: 1200px) {
  .sidebar {
    width: 225px;
    padding-left: 13px;
    padding-right: 13px;
  }

  .page-shell {
    margin-left: 225px;
  }

  .main {
    padding: 30px;
  }

  .topbar {
    padding: 16px 30px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-aside {
    display: none;
  }

  .card-grid {
    gap: 12px;
  }

  .section-card {
    padding: 18px;
  }

  .footer {
    padding: 20px 30px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 240px;
    transform: translateX(-100%);
    transition: transform .2s;
  }

  .sidebar.open {
    transform: none;
  }

  .page-shell {
    margin-left: 0;
  }

  .menu-button {
    display: block;
  }

  .topbar {
    padding: 13px 22px;
    min-height: 66px;
    gap: 12px;
  }

  .topbar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
  }

  .topbar-label span {
    margin: 0;
  }

  .topbar-mark {
    display: block;
    width: 25px;
    height: 25px;
  }

  .top-search {
    max-width: 290px;
    width: 38vw;
  }

  .main {
    padding: 30px 24px 45px;
  }

  .mobile-overlay.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 55%);
    z-index: 35;
  }

  .footer {
    padding: 20px 24px;
  }

  .hero-aside {
    padding: 18px;
  }

  .card-grid {
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .topbar-label {
    font-size: 12px;
  }

  .topbar-label span,
  .topbar-label .top-context {
    display: none;
  }

  .top-search {
    width: 44px;
    background: none;
    border: 0;
    padding: 0;
  }

  .top-search input {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    width: 1px;
    height: 1px;
  }

  .top-search button {
    padding: 8px;
  }

  .topbar:focus-within .topbar-label {
    min-width: 0;
  }

  .top-search:focus-within {
    position: relative;
    flex: 1 1 100px;
    min-width: 100px;
    width: auto;
    border: 1px solid var(--line);
    padding-left: 8px;
    background: var(--surface);
  }

  .top-search:focus-within input {
    position: static;
    clip: auto;
    width: auto;
    height: auto;
  }

  .main {
    padding: 27px 18px 40px;
  }

  .hero {
    display: block;
    margin-bottom: 20px;
  }

  .hero h1 {
    font-size: clamp(31px, 8vw, 42px);
  }

  .hero p {
    font-size: 15px;
  }

  .hero-aside {
    margin-top: 23px;
    padding: 17px 19px;
  }

  .hero-aside p {
    margin-bottom: 7px;
  }

  .search-panel {
    padding: 17px;
    margin-bottom: 30px;
  }

  .hero-search {
    padding-left: 10px;
    gap: 7px;
  }

  .hero-search input {
    font-size: 14px;
  }

  .hero-search button {
    padding: 10px 12px;
    font-size: 12px;
  }

  .hero-search .icon {
    width: 19px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .section-heading .count {
    display: none;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section-card {
    min-height: 0;
    padding: 19px;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 16px;
  }

  .card-top {
    grid-row: 1/4;
    grid-column: 2;
    align-items: start;
    justify-content: end;
    margin: 0;
  }

  .card-top>span {
    display: none;
  }

  .section-card h3 {
    font-size: 17px;
    margin-bottom: 5px;
  }

  .section-card p {
    grid-column: 1;
    margin-bottom: 9px;
  }

  .section-card .card-foot {
    grid-column: 1;
    justify-content: start;
    gap: 10px;
  }

  .bottom-panels {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 20px 18px;
    display: block;
    font-size: 11px;
  }

  .footer>span {
    display: block;
    margin-top: 7px;
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  .article-card {
    padding: 19px;
  }

  .section-intro h1 {
    font-size: 30px;
  }

  .article-head h1 {
    font-size: 30px;
  }

  .article-head .summary {
    font-size: 16px;
  }

  .article-main {
    max-width: 100%;
  }

  .before {
    padding: 16px 19px;
  }

  .notice {
    padding: 15px 17px;
  }

  .step {
    gap: 12px;
    grid-template-columns: 31px 1fr;
    padding: 21px 0;
  }

  .step-check,
  .step-check span {
    width: 31px;
    height: 31px;
  }

  .step h3 {
    font-size: 17px;
  }

  .step p {
    font-size: 16px;
  }

  .variant-tabs button {
    padding: 9px 11px;
    font-size: 12px;
  }

  .saved-list {
    grid-template-columns: 1fr;
  }

  .resource-copy h1 {
    font-size: 30px;
  }

  .link-table {
    font-size: 13px;
    min-width: 580px;
  }

  .crumbs {
    margin-bottom: 20px;
  }

  .progress-row progress {
    max-width: 90px;
  }

  .hero-aside .eyebrow {
    margin-bottom: 6px;
  }
}

@media (max-width: 380px) {
  .topbar {
    padding-inline: 16px;
  }

  .main {
    padding-inline: 14px;
  }

  .hero {
    padding: 22px 18px;
  }

  .hero-search button {
    white-space: nowrap;
  }
}

/* Motion preferences and print */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: var(--surface);
    color: black;
    font-size: 11pt;
  }

  .sidebar,
  .topbar,
  .footer,
  .article-aside,
  .article-actions,
  .crumbs,
  .skip,
  .variant-tabs,
  .progress-row,
  .next-guide,
  .mobile-overlay,
  .search-panel {
    display: none !important;
  }

  .page-shell {
    margin: 0;
  }

  .main {
    max-width: none;
    padding: 0;
  }

  .article-layout {
    display: block;
  }

  .article-main {
    max-width: none;
  }

  .article-head h1 {
    font-size: 26pt;
  }

  .article-head .summary {
    font-size: 12pt;
  }

  .step {
    break-inside: avoid;
    padding: 12px 0;
  }

  .step p {
    font-size: 11pt;
    line-height: 1.6;
  }

  .step h3 {
    font-size: 13pt;
  }

  .before,
  .notice,
  .success {
    break-inside: avoid;
    background: var(--surface);
  }

  .help-section details {
    break-inside: avoid;
  }

  .help-section details>p {
    display: block !important;
  }

  .sources a {
    color: black;
  }

  .article-card {
    break-inside: avoid;
  }

  .article-list {
    display: block;
  }

  .article-card {
    margin: 10px 0;
  }

  .section-intro {
    border: 0;
  }

  .resource-copy {
    max-width: none;
  }

  .source-url {
    overflow-wrap: anywhere;
  }
}
