:root {
  --bg: #f4f2ed;
  --surface: #ffffff;
  --surface-2: #f9f8f4;
  --ink: #18201d;
  --ink-2: #4a524e;
  --muted: #858c88;
  --line: #e4e1d9;
  --line-2: #d2cec4;
  --brand: #234b40;
  --brand-2: #2f6354;
  --brand-soft: #e6eee9;
  --accent: #c8913a;
  --accent-soft: #f7ecda;
  --danger: #b5432f;
  --danger-soft: #f8e6e1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24, 32, 29, .04), 0 6px 20px rgba(24, 32, 29, .05);
  --sidebar: 248px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  letter-spacing: -.01em; font-feature-settings: 'tnum';
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; line-height: 1.25; }
p { margin: 0; }
small { color: var(--muted); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ── 레이아웃 ───────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 24px 16px;
  background: var(--brand); color: #e9efe9; display: flex; flex-direction: column; gap: 28px; overflow-y: auto; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: .08em; padding: 0 8px; }
.brand small { display: block; color: #a9bdb4; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.brand-symbol {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: #f4f2ed; color: var(--brand); font-size: 19px; font-weight: 900; letter-spacing: 0;
}
.brand-symbol span { color: var(--accent); margin-left: -2px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px;
  background: none; color: #cfdcd5; text-align: left; cursor: pointer; font-weight: 500;
}
.nav-item span { font-size: 11px; color: #7f9a8f; font-weight: 600; width: 18px; }
.nav-item em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.12); padding: 1px 8px; border-radius: 99px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: #f4f2ed; color: var(--brand); font-weight: 700; }
.nav-item.active span { color: var(--accent); }
.nav-item.active em { background: var(--brand); color: #fff; }
.sidebar-bottom { margin-top: auto; padding: 16px 12px 4px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #cfdcd5; display: grid; gap: 8px; }
.sidebar-bottom .badge { background: rgba(255,255,255,.1); color: #e9efe9; justify-self: start; }
.sidebar-bottom small { color: #8eaa9e; }

.main-shell { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 40px; background: rgba(244, 242, 237, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.breadcrumb { color: var(--muted); font-size: 13.5px; }
.breadcrumb span { margin: 0 6px; color: var(--line-2); }
.top-actions { display: flex; align-items: center; gap: 14px; }
#save-status { font-size: 12.5px; color: var(--muted); }
#save-status.error { color: var(--danger); font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; }
main { flex: 1; padding: 32px 40px 48px; max-width: 1360px; width: 100%; display: flex; flex-direction: column; gap: 22px; }
main[inert] { opacity: .55; }
footer { padding: 22px 40px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.load-banner { padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: #7a5419; font-size: 14px; }

/* ── 공통 요소 ──────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel.compact { padding: 14px 20px; }
.panel.tinted { background: var(--brand-soft); border-color: #d3e0d8; }
.panel h3 { font-size: 17px; }
.panel > p { color: var(--ink-2); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
main > .section-heading h2 { font-size: 26px; }
.section-heading h2 { font-size: 18px; }
.section-heading p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.panel .section-heading { align-items: flex-start; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.two-col.lower { align-items: start; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow.light { color: #a9c4b8; }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.prewrap { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; }
.block { display: block; }
.huge { font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.button:hover { background: var(--brand-2); }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.button.secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.button.small { padding: 6px 12px; font-size: 13px; }
.button.wide { width: 100%; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.text-btn { border: 0; background: none; padding: 4px 2px; color: var(--brand-2); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.text-btn:hover { text-decoration: underline; }
.text-btn.danger { color: var(--danger); margin-right: auto; }
.text-link { color: var(--brand-2); font-weight: 600; font-size: 13.5px; text-decoration: none; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); white-space: nowrap; }
.text-link:hover { border-color: var(--brand-2); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2); flex-shrink: 0; }
.icon-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.green { background: var(--brand-soft); color: var(--brand); border-color: #cfe0d6; }
.badge.amber { background: var(--accent-soft); color: #8a5c17; border-color: #eed7b2; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid #eed7b2; }
.notice strong { font-size: 14px; }
.notice p { font-size: 13.5px; color: #6b5124; margin-top: 2px; }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex-shrink: 0; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty.large { padding: 48px 24px; align-items: center; gap: 10px; }
.empty.large p { color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 22px; }

/* ── 입력 ───────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=number], input[type=date], input[type=month], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
select:disabled { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; line-height: 1.6; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.switch-row { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.switch-row > div { flex: 1; }
.switch-row small { display: block; }

/* ── 대시보드 ───────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); border-radius: 20px; overflow: hidden; background: var(--brand); color: #fff; min-height: 380px; box-shadow: var(--shadow); }
.hero-copy { padding: 40px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -.045em; }
.hero-copy > p { color: #c2d4cb; font-size: 15.5px; }
.light-button { background: #f4f2ed; color: var(--brand); border-color: #f4f2ed; align-self: flex-start; }
.light-button:hover { background: #fff; }
.hero-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #a9c4b8; margin-top: 8px; flex-wrap: wrap; }
.hero-foot i { width: 1px; height: 12px; background: rgba(255,255,255,.2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7fd1a4; box-shadow: 0 0 0 4px rgba(127,209,164,.2); }
.hero-map { position: relative; min-height: 320px; background: #1f2a26; }
.hero-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-caption { position: absolute; left: 18px; bottom: 16px; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.map-caption span { display: block; letter-spacing: 0; font-weight: 500; font-size: 12px; color: #d4e2db; }
.map-open { position: absolute; right: 16px; top: 16px; border: 0; padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--brand); font-weight: 700; font-size: 13px; cursor: pointer; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metrics.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.metric strong { font-size: 25px; font-weight: 800; letter-spacing: -.035em; }
.metric.warning { background: var(--danger-soft); border-color: #efcdc4; }
.metric.warning strong { color: var(--danger); }
.task-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row > div { flex: 1; min-width: 0; }
.task-row strong { display: block; font-weight: 600; font-size: 14.5px; }
.task-row.completed strong { color: var(--muted); text-decoration: line-through; }
.date-label { flex: 0 0 auto !important; font-size: 13px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 8px; }
.event-feature { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.event-feature h3 { margin: 6px 0 2px; }
.event-feature p { font-size: 13.5px; color: var(--ink-2); }
.date-tile { width: 64px; height: 70px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-content: center; text-align: center; flex-shrink: 0; }
.date-tile small { color: #a9c4b8; font-weight: 700; letter-spacing: .1em; font-size: 11px; }
.date-tile b { font-size: 26px; line-height: 1; }
.option-highlight strong { font-size: 34px; font-weight: 800; letter-spacing: -.04em; color: var(--brand); }
.option-highlight span { margin-left: 8px; color: var(--ink-2); font-size: 14px; }
.mini-bars { height: 8px; border-radius: 99px; background: rgba(35,75,64,.12); overflow: hidden; }
.mini-bars span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.news-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.news-row:last-child { border-bottom: 0; }
.news-row small { grid-column: 2; }

/* ── 표 ─────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
th, td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--surface-2); font-size: 12.5px; font-weight: 650; color: var(--muted); }
tbody tr:hover { background: #fbfaf7; }
tbody tr:last-child td { border-bottom: 0; }
tfoot th, tfoot td { background: var(--brand-soft); font-weight: 800; border-bottom: 0; border-top: 1px solid #d3e0d8; }
tfoot th { text-align: right; }
td.negative { color: var(--danger); font-weight: 700; }

/* ── 옵션 ───────────────────────────── */
.option-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.option-layout > section { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.option-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.option-card.chosen { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2), var(--shadow); }
.option-card p { font-size: 13px; color: var(--ink-2); flex: 1; }
.option-card select { font-size: 13.5px; padding: 8px 10px; }
.option-top { display: flex; justify-content: space-between; align-items: center; }
.option-top .text-link { padding: 2px 8px; font-size: 12px; }
.option-number { font-size: 12px; font-weight: 800; color: var(--accent); }
.option-price { font-size: 17px; font-weight: 800; text-align: right; }
.option-card:not(.chosen) .option-price { color: var(--muted); font-weight: 600; }
.option-summary { position: sticky; top: 76px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.summary-line span { color: var(--ink-2); }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 15px; }
.summary-line.total span { color: var(--ink); font-weight: 700; }
.tax-lines { padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }

/* ── 3D 지도 ────────────────────────── */
.map-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 13.5px; }
.map-toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.map-toolbar input[type=date] { width: auto; padding: 6px 10px; }
/* 내 집에서 보기 */
.view-bar { background: var(--brand-soft); }
.view-bar strong { color: var(--brand); }
.map-toolbar select, .map-toolbar input[type=number] { width: auto; padding: 6px 10px; }
.map-toolbar input[type=number] { width: 80px; }
#view-unit:empty { display: none; }
#sun-time { font-weight: 800; color: var(--ink); min-width: 44px; }
#sun-slider { flex: 1; min-width: 160px; accent-color: var(--accent); }
.map-stage { position: relative; height: min(68vh, 640px); min-height: 380px; background: #e9ecea; }
.map-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.map-info { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; }
#sun-info { background: rgba(255,255,255,.92); padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
#sun-info:empty { display: none; }
.map-help { position: absolute; right: 14px; bottom: 14px; background: rgba(24,32,29,.72); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 12px; pointer-events: none; }
.map-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.map-bottom label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
#building-info { font-weight: 600; }

/* 예상 건물 근거 슬라이드 (넓은 화면: 오른쪽에서, 좁은 화면: 아래에서) */
.detail-drawer {
  position: absolute; z-index: 4; top: 12px; right: 12px; bottom: 12px; width: min(380px, calc(100% - 64px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(24,32,29,.18);
  display: flex; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s;
}
.detail-drawer[data-state="hidden"] { transform: translateX(calc(100% + 64px)); opacity: 0; pointer-events: none; }
.detail-drawer[data-state="collapsed"] { transform: translateX(calc(100% + 12px)); }
.drawer-tab {
  position: absolute; left: -40px; top: 50%; transform: translateY(-50%); width: 40px; padding: 14px 0; border: 0;
  border-radius: 12px 0 0 12px; background: var(--brand); color: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; touch-action: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px; writing-mode: vertical-rl; letter-spacing: .1em;
  box-shadow: -4px 4px 14px rgba(24,32,29,.15);
}
.drawer-grip { width: 4px; height: 22px; border-radius: 2px; background: rgba(255,255,255,.5); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.drawer-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.drawer-head h3 { font-size: 20px; margin: 6px 0 2px; }
.drawer-figures { display: flex; gap: 8px; }
.drawer-figures div { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.drawer-figures b { font-size: 18px; letter-spacing: -.03em; }
.drawer-body h4 { font-size: 13px; color: var(--muted); letter-spacing: .02em; margin: 6px 0 0; }
.drawer-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); }
.drawer-body p { color: var(--ink-2); }
.drawer-trust { padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid #eed7b2; font-size: 13.5px; }
.drawer-trust[data-level^="높음"], .drawer-trust[data-level^="중간~높음"] { background: var(--brand-soft); border-color: #cfe0d6; }
.drawer-trust[data-level^="낮음"] { background: var(--danger-soft); border-color: #efcdc4; }
@media (max-width: 720px) {
  .detail-drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(62%, 520px); flex-direction: column; }
  .detail-drawer[data-state="hidden"] { transform: translateY(calc(100% + 60px)); }
  .detail-drawer[data-state="collapsed"] { transform: translateY(calc(100% + 8px)); }
  .drawer-tab { left: 50%; top: -32px; transform: translateX(-50%); width: auto; padding: 6px 18px; writing-mode: horizontal-tb;
                flex-direction: row; border-radius: 12px 12px 0 0; }
  .drawer-grip { width: 22px; height: 4px; }
}

/* ── 개발·견적 ─────────────────────── */
.development-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.development-card { position: relative; }
.development-card p { font-size: 14px; }
.development-index { position: absolute; right: 22px; top: 18px; font-size: 32px; font-weight: 900; color: var(--line); letter-spacing: -.04em; }
.source-footer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.source-footer .text-btn { margin-left: auto; }
.deal-card .huge { font-size: 24px; }
.deal-card > .badge { align-self: flex-start; }

/* ── 자료 ───────────────────────────── */
.document-link { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.document-link:hover { border-color: var(--brand-2); background: var(--surface-2); }
.document-link > span { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 800; flex-shrink: 0; }
.document-link div { flex: 1; min-width: 0; }
.document-link strong { display: block; }
.document-link b { color: var(--muted); }

/* ── 대화상자 ───────────────────────── */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0,0,0,.25); background: var(--surface); }
dialog::backdrop { background: rgba(24,32,29,.45); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { font-size: 20px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; align-items: center; padding-top: 6px; }

/* ── 좁은 화면 ─────────────────────── */
@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-layout { grid-template-columns: 1fr; }
  .option-summary { position: static; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; padding: 14px 16px; gap: 12px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav-item { width: auto; white-space: nowrap; }
  .nav-item span { display: none; }
  .sidebar-bottom { display: none; }
  .main-shell { margin-left: 0; }
  .topbar, main, footer { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 20px; }
  .hero, .two-col { grid-template-columns: 1fr; }
  .hero-copy { padding: 28px 24px; }
  .hero h1 { font-size: 30px; }
  .form-grid, .form-grid.three, .metrics.three { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}
