:root {
  --primary: #a71c20;
  --primary-dark: #7f1216;
  --primary-soft: #f8e9e9;
  --ink: #262426;
  --muted: #6d6868;
  --line: #ebe6e5;
  --canvas: #fbfaf9;
  --surface: #ffffff;
  --shadow: 0 14px 36px rgba(45, 28, 28, .08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(167, 28, 32, .28); outline-offset: 3px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; transform: translateY(-170%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; transition: transform .18s; }
.skip-link:focus { transform: translateY(0); }
.topbar { height: 78px; position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 250px minmax(280px, 650px) 1fr; align-items: center; gap: 30px; padding: 0 max(28px, calc((100vw - 1540px) / 2)); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 1.07rem; letter-spacing: -.02em; }
.brand small { color: var(--primary); font-size: .82rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.search { width: 100%; height: 44px; position: relative; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; background: #f5f3f2; border: 1px solid transparent; border-radius: 12px; transition: border-color .18s, background .18s; }
.search:focus-within { background: #fff; border-color: rgba(167, 28, 32, .35); }
.search-icon { font-size: 1.6rem; color: var(--muted); line-height: 1; transform: translateY(-1px); }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search input::placeholder { color: #8c8787; }
.search kbd { padding: 2px 6px; border: 1px solid #ded9d8; background: #fff; border-radius: 5px; color: var(--muted); font-size: .72rem; }
.topbar-actions { display: flex; justify-content: end; align-items: center; gap: 12px; }
.language-switcher { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f5f3f2; }
.language-button { min-width: 34px; padding: 6px 7px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .71rem; font-weight: 850; letter-spacing: .06em; }
.language-button:hover { color: var(--primary); }
.language-button[aria-pressed="true"] { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(45, 28, 28, .12); }
.icon-button { justify-self: end; display: none; width: 42px; height: 42px; padding: 9px; background: none; border: 1px solid var(--line); border-radius: 10px; }
.mobile-menu-button span { display: block; height: 2px; margin: 4px; background: var(--primary); border-radius: 3px; }
.app-shell { width: min(1540px, 100%); margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr) 215px; min-height: calc(100vh - 78px); }
.sidebar { position: sticky; top: 78px; align-self: start; height: calc(100vh - 78px); display: flex; flex-direction: column; padding: 32px 22px 22px; border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar-intro { padding: 0 9px 25px; }
.eyebrow { margin: 0 0 9px; color: var(--primary); font-size: .69rem; letter-spacing: .13em; font-weight: 800; }
.sidebar h2 { margin: 0 0 8px; font-size: 1.08rem; letter-spacing: -.025em; }
.sidebar-intro p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.module-nav { display: grid; gap: 5px; }
.module-item { display: grid; grid-template-columns: 25px 1fr 12px; gap: 9px; align-items: center; width: 100%; padding: 12px 9px; background: none; border: 1px solid transparent; border-radius: 12px; color: var(--ink); text-align: left; transition: background .18s, color .18s; }
.module-item:hover { background: #f2eeee; }
.module-item.active { background: var(--primary-soft); color: var(--primary); }
.module-icon { display: grid; place-items: center; width: 23px; height: 23px; background: #eee8e7; color: #7f6869; border-radius: 7px; font-size: .9rem; }
.module-item.active .module-icon { background: var(--primary); color: #fff; }
.module-item strong, .module-item small { display: block; }
.module-item strong { font-size: .88rem; line-height: 1.25; }
.module-item small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.chevron { color: #a59d9b; font-size: 1.35rem; line-height: 1; }
.sidebar-footer { display: flex; gap: 8px; align-items: center; margin-top: auto; padding: 24px 9px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3a9b6a; box-shadow: 0 0 0 3px rgba(58, 155, 106, .12); }
.main-content { min-width: 0; padding: 42px clamp(28px, 5vw, 72px) 88px; }
.guide-content { max-width: 820px; }
.guide-hero { padding-bottom: 35px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 28px; color: var(--muted); font-size: .79rem; }
.breadcrumbs strong { color: var(--primary); }
.guide-title-row { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.guide-title-row h1 { margin: 0; max-width: 650px; color: var(--primary); font-size: clamp(2rem, 3.7vw, 3.25rem); letter-spacing: -.055em; line-height: 1.02; }
.version { flex: 0 0 auto; margin-top: 4px; padding: 6px 10px; background: var(--primary-soft); border-radius: 99px; color: var(--primary); font-weight: 800; font-size: .78rem; }
.guide-summary { max-width: 690px; margin: 22px 0 13px; color: #4c4747; font-size: 1.06rem; line-height: 1.65; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .78rem; }
.reading-progress { height: 4px; margin-top: 30px; background: #f1edec; border-radius: 99px; overflow: hidden; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--primary); transition: width .08s linear; }
.guide-sections { border-top: 1px solid var(--line); }
.guide-section { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 47px 0; border-bottom: 1px solid var(--line); }
.section-number { padding-top: 7px; color: var(--primary); font-size: .75rem; font-weight: 850; letter-spacing: .08em; }
.section-body h2 { margin: 0; color: var(--primary); font-size: clamp(1.35rem, 2vw, 1.72rem); letter-spacing: -.035em; }
.section-intro { margin: 11px 0 24px; color: #514d4d; font-size: .99rem; line-height: 1.65; }
.callout { display: grid; grid-template-columns: 31px 1fr; gap: 12px; margin: 22px 0; padding: 16px 17px; border: 1px solid #efdfdf; border-radius: 12px; background: #fffafa; }
.callout.tip { background: #fbfcfb; border-color: #dcebe3; }
.callout.warning { background: #fffaf3; border-color: #f1e4c7; }
.callout-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 900; font-size: .86rem; }
.tip .callout-icon { background: #2f8a60; }
.warning .callout-icon { background: #c7851b; }
.callout h3 { margin: 0 0 4px; color: var(--primary); font-size: .9rem; }
.callout.tip h3 { color: #216847; }
.callout.warning h3 { color: #95600f; }
.callout p { margin: 0; color: #5e5656; font-size: .88rem; line-height: 1.55; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feature-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 10px rgba(45, 28, 28, .02); }
.feature-card h3 { margin: 0 0 7px; color: var(--primary); font-size: .9rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.steps { display: grid; gap: 20px; margin: 28px 0; padding: 0; list-style: none; counter-reset: item; }
.steps li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; align-items: start; }
.steps li > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #e7c5c6; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .71rem; font-weight: 850; }
.steps h3 { margin: 4px 0 4px; font-size: .96rem; }
.steps p { margin: 0; color: #5d5757; font-size: .9rem; line-height: 1.55; }
.bullets, .checklist { display: grid; gap: 12px; padding: 0; list-style: none; }
.bullets li, .checklist li { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 9px; }
.bullets li > span { color: var(--primary); font-size: 1.25rem; line-height: 1.05; }
.checklist li > span { display: grid; place-items: center; width: 17px; height: 17px; margin-top: 3px; border-radius: 5px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 800; }
.bullets p, .checklist p { margin: 0; color: #5d5757; font-size: .9rem; line-height: 1.6; }
.guide-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 30px 0 0; }
.guide-footer p { margin: 0; font-weight: 750; font-size: .92rem; }
.feedback-button, .copy-link { border: 1px solid #eadada; border-radius: 8px; padding: 9px 12px; background: #fff; color: var(--primary); font-size: .78rem; font-weight: 750; }
.feedback-button + .feedback-button { margin-left: 7px; }
.feedback-button:hover, .copy-link:hover { background: var(--primary-soft); }
.on-page { position: sticky; top: 118px; align-self: start; margin: 42px 0 0; padding: 0 22px; border-left: 1px solid var(--line); }
.on-page nav { display: grid; gap: 5px; margin-top: 12px; }
.on-page a { display: grid; grid-template-columns: 25px 1fr; gap: 5px; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: .77rem; line-height: 1.38; }
.on-page a span { color: #b8afad; font-size: .67rem; font-weight: 800; }
.on-page a:hover, .on-page a.active { color: var(--primary); font-weight: 750; }
.on-page a.active span { color: var(--primary); }
.copy-link { width: 100%; margin-top: 25px; }
.search-panel { max-width: 820px; margin: -15px 0 30px; padding: 20px; border: 1px solid #eadada; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.search-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.search-panel-heading .eyebrow { margin: 0; }
#search-status { color: var(--muted); font-size: .76rem; }
.search-results { display: grid; gap: 5px; }
.search-result { display: grid; grid-template-columns: 24px minmax(0, 1fr) 15px; gap: 8px; align-items: center; width: 100%; padding: 12px; background: transparent; border: 0; border-radius: 10px; text-align: left; }
.search-result:hover { background: #f9f5f4; }
.search-result > span:first-child { color: var(--primary); font-size: 1.2rem; }
.search-result small, .search-result strong, .search-result p { display: block; }
.search-result small { margin-bottom: 3px; color: var(--primary); font-size: .67rem; font-weight: 800; }
.search-result strong { font-size: .9rem; }
.search-result p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.empty-state { padding: 25px; color: var(--muted); text-align: center; }
.empty-state span { color: var(--primary); font-size: 1.8rem; }
.empty-state h2 { margin: 7px 0; color: var(--ink); font-size: 1rem; }
.empty-state p { margin: 0; font-size: .82rem; }
.mobile-nav-panel { display: none; }
@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 245px minmax(0, 1fr); }
  .on-page { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: 68px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 0 16px; }
  .brand img { width: 37px; height: 37px; }
  .brand strong { font-size: .98rem; }
  .brand small { font-size: .68rem; }
  .search { height: 40px; padding-left: 11px; }
  .search-icon { font-size: 1.35rem; }
  .search kbd { display: none; }
  .icon-button { display: block; }
  .app-shell { display: block; min-height: calc(100vh - 68px); }
  .sidebar { display: none; }
  .mobile-nav-panel { position: fixed; inset: 68px 0 auto; z-index: 4; max-height: calc(100vh - 68px); padding: 14px 16px 20px; overflow-y: auto; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(45, 28, 28, .1); }
  .mobile-nav-panel[hidden] { display: none; }
  .main-content { padding: 26px 20px 64px; }
  .guide-hero { padding-bottom: 25px; }
  .breadcrumbs { margin-bottom: 21px; }
  .guide-title-row h1 { font-size: 2.15rem; }
  .guide-summary { font-size: .98rem; }
  .guide-section { grid-template-columns: 33px minmax(0, 1fr); gap: 9px; padding: 35px 0; }
  .section-number { font-size: .67rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .guide-footer { align-items: start; flex-direction: column; }
  .search-panel { margin: -3px 0 25px; padding: 14px; }
}
@media (max-width: 420px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding-inline: 12px; gap: 8px; }
  .brand span { display: none; }
  .search input { font-size: .86rem; }
  .topbar-actions { gap: 7px; }
  .language-button { min-width: 29px; padding-inline: 5px; }
  .main-content { padding-inline: 16px; }
  .guide-title-row { display: block; }
  .version { display: inline-block; margin-top: 14px; }
  .guide-section { grid-template-columns: 1fr; gap: 6px; }
  .section-number { padding: 0; }
  .steps li { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .callout { grid-template-columns: 25px minmax(0, 1fr); padding: 14px; }
}
