:root {
  --navy-950: #0a202c;
  --navy-900: #102c3b;
  --navy-800: #173c4e;
  --teal-700: #14756d;
  --teal-600: #198b80;
  --teal-100: #dff3ef;
  --paper: #fbfcfa;
  --surface: #fff;
  --surface-soft: #f1f5f4;
  --ink: #152a35;
  --muted: #61737c;
  --line: #dbe4e5;
  --gold: #b68437;
  --danger: #a3493f;
  --shadow-sm: 0 2px 14px rgba(10, 32, 44, .05);
  --shadow-lg: 0 24px 70px rgba(10, 32, 44, .13);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, main:focus-visible {
  outline: 3px solid rgba(25, 139, 128, .3);
  outline-offset: 3px;
}
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--navy-950); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { height: 76px; position: sticky; inset-block-start: 0; z-index: 40; border-bottom: 1px solid rgba(219, 228, 229, .85); background: rgba(251, 252, 250, .92); backdrop-filter: blur(18px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, var(--navy-800), var(--navy-950)); box-shadow: 0 7px 18px rgba(16, 44, 59, .2); }
.brand-mark svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; color: var(--navy-900); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; letter-spacing: .06em; }
.brand small { display: block; margin-top: 2px; color: #829199; font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.main-nav { display: flex; align-items: center; gap: 28px; color: #50636d; font-size: 12px; font-weight: 700; }
.main-nav a { padding-block: 10px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--teal-700); border-color: var(--teal-700); }

.preview-banner { color: #fff; background: var(--navy-900); }
.preview-banner .shell { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 11px; }
.preview-banner strong { padding: 4px 8px; border-radius: 999px; color: var(--navy-950); background: #f1dcae; font-size: 9px; letter-spacing: .08em; }

.hero { position: relative; overflow: hidden; color: #fff; background: var(--navy-900); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to left, #000, transparent 74%); }
.hero::after { content: ""; position: absolute; width: 440px; height: 440px; right: -160px; top: -245px; border: 70px solid rgba(75, 194, 178, .12); border-radius: 50%; }
.hero-inner { position: relative; z-index: 1; min-height: 390px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 80px; align-items: center; padding-block: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #87dbcf; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.hero h1 { max-width: 760px; margin: 15px 0 16px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(35px, 5vw, 58px); font-weight: 600; letter-spacing: .04em; line-height: 1.23; }
.hero-copy { max-width: 660px; margin: 0; color: #c6d5dc; font-size: 14px; line-height: 2; }
.hero-side { padding: 25px; border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); background: rgba(255,255,255,.07); box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); }
.hero-side-label { display: block; margin-bottom: 13px; color: #86d8cd; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.hero-side strong { display: block; margin-bottom: 7px; font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.hero-side p { margin: 0; color: #bfd0d7; font-size: 11px; line-height: 1.8; }
.hero-side hr { margin: 19px 0; border: 0; border-top: 1px solid rgba(255,255,255,.14); }

.content { padding-block: 34px 72px; }
.summary-grid { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -66px; margin-bottom: 25px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }
.summary-card { min-height: 138px; padding: 25px 27px; }
.summary-card + .summary-card { border-left: 1px solid var(--line); }
.summary-label { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.summary-value { display: block; margin: 11px 0 6px; color: var(--navy-900); font-family: Georgia, "Yu Mincho", serif; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.summary-value small { margin-left: 5px; font: 12px sans-serif; }
.summary-note { color: var(--teal-700); font-size: 9px; font-weight: 700; }

.data-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 26px 28px 18px; }
.section-kicker { display: block; margin-bottom: 6px; color: var(--teal-700); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.panel-heading h2 { margin: 0 0 5px; color: var(--navy-900); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 22px; letter-spacing: .04em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy-900); background: #fff; font-size: 11px; font-weight: 800; }
.button:hover { border-color: #a9bec2; background: #f7faf9; }
.button.primary { color: #fff; border-color: var(--teal-700); background: var(--teal-700); }

.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 0 28px 18px; }
.search-field { display: flex; align-items: center; gap: 11px; height: 47px; padding: 0 15px; border: 1px solid #cbd8da; border-radius: 9px; color: #86969d; background: #fbfcfc; }
.search-field svg { width: 18px; flex: none; }
.search-field input { width: 100%; height: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; padding: 18px 28px; border-block: 1px solid var(--line); background: var(--surface-soft); }
.filters label span { display: block; margin: 0 0 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.filters input, .filters select { width: 100%; height: 39px; padding: 6px 9px; border: 1px solid #cad7d9; border-radius: 7px; color: var(--ink); background: #fff; font-size: 11px; }
.table-tools { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 28px; border-bottom: 1px solid var(--line); }
.table-tools label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.table-tools select { padding: 6px; border: 0; color: var(--navy-900); background: transparent; font-size: 10px; font-weight: 800; }
.unit-switch { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.unit-switch button { padding: 6px 13px; border: 0; color: var(--muted); background: #fff; font-size: 10px; }
.unit-switch button + button { border-left: 1px solid var(--line); }
.unit-switch button.active { color: #fff; background: var(--navy-800); }
.table-scroll { overflow-x: auto; }
.salary-table { width: 100%; min-width: 1060px; border-spacing: 0; border-collapse: separate; font-size: 11px; }
.salary-table th { padding: 12px 13px; color: #5d7079; border-bottom: 1px solid var(--line); background: #f3f6f6; text-align: left; white-space: nowrap; font-size: 9px; letter-spacing: .03em; }
.salary-table td { padding: 16px 13px; border-bottom: 1px solid #e7eded; white-space: nowrap; vertical-align: middle; }
.salary-table tbody tr { transition: background .16s; }
.salary-table tbody tr:hover { background: #f6faf9; }
.salary-table tbody tr:last-child td { border-bottom: 0; }
.numeric { text-align: right !important; font-variant-numeric: tabular-nums; }
.code { color: #62747d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; }
.company-link { color: var(--navy-900); font-size: 12px; font-weight: 800; text-decoration: underline; text-decoration-color: #b8cbce; text-underline-offset: 4px; }
.company-link:hover { color: var(--teal-700); }
.subtext { display: block; margin-top: 5px; color: #8a999f; font-size: 8px; }
.salary-value { color: var(--navy-900); font-size: 12px; font-weight: 850; }
.positive { color: var(--teal-700); font-weight: 800; }
.negative { color: var(--danger); font-weight: 800; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 900; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-verified { color: #216b51; background: #e5f3eb; }
.status-automatic { color: #135f68; background: #e2f2f3; }
.status-corrected { color: #315f82; background: #e7eef5; }
.status-unverified { color: #836725; background: #f5efdf; }
.status-needs_review { color: #99463d; background: #f7e8e6; }
.empty-state { padding: 50px 20px; color: var(--muted); text-align: center; }
.pagination { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 10px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pagination-actions { display: flex; gap: 6px; }
.pagination button { min-width: 32px; height: 31px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy-900); background: #fff; }
.pagination button:disabled { cursor: not-allowed; opacity: .4; }
.data-note { display: flex; gap: 11px; margin: 18px 0 0; padding: 15px 18px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; color: #6d6658; background: #faf7ef; font-size: 10px; line-height: 1.8; }

.company-library { margin-top: 34px; scroll-margin-top: 94px; }
.library-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 28px 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.library-summary div { padding: 17px 20px; }
.library-summary div + div { border-left: 1px solid var(--line); }
.library-summary strong { display: block; margin-bottom: 4px; color: var(--navy-900); font-family: Georgia, "Yu Mincho", serif; font-size: 22px; }
.library-summary span { color: var(--muted); font-size: 9px; font-weight: 800; }
.library-filters { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; padding: 0 28px 20px; }
.library-filters > label:last-child span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.library-filters select { width: 100%; height: 47px; padding: 6px 10px; border: 1px solid #cad7d9; border-radius: 9px; color: var(--ink); background: #fff; font-size: 11px; }
.company-library-table { min-width: 760px; }
.company-library-table strong { color: var(--navy-900); }
.library-pending { color: var(--muted); font-size: 9px; font-weight: 800; }
.library-note { margin: 0; padding: 17px 28px 22px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; line-height: 1.8; }

.detail-hero { color: #fff; background: var(--navy-900); }
.detail-hero-inner { padding-block: 42px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 23px; color: #aabfc9; font-size: 10px; }
.breadcrumbs a:hover { color: #fff; }
.detail-hero h1 { margin: 0 0 14px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: .04em; }
.company-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.company-meta span { padding: 5px 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #c8d7dd; background: rgba(255,255,255,.05); font-size: 9px; }
.detail-main { padding-block: 28px 70px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.metric-card { min-height: 150px; padding: 21px; border: 1px solid var(--line); border-top: 3px solid var(--teal-600); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.metric-card > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.metric-card strong { display: block; margin: 13px 0 7px; color: var(--navy-900); font-family: Georgia, "Yu Mincho", serif; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--teal-700); font-size: 9px; }
.metric-card .status { margin-top: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; align-items: start; }
.card { margin-bottom: 20px; padding: 25px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.card h2, .card h3 { margin: 0 0 18px; color: var(--navy-900); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .04em; }
.card h2 { font-size: 20px; }
.card h3 { font-size: 16px; }
.population-summary { display: grid; gap: 10px; }
.population-lead { margin: 0 0 5px; color: var(--navy-900); font-size: 14px; font-weight: 800; }
.population-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.7; }
.population-row span:first-child { color: var(--muted); }
.chart { width: 100%; height: 245px; display: block; overflow: visible; }
.chart-grid { stroke: #e4ebeb; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--teal-600); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#salaryGradient); }
.chart-point { fill: #fff; stroke: var(--teal-600); stroke-width: 3; }
.chart-label { fill: var(--muted); font-size: 9px; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { padding: 15px 0; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.8; }
.source-list li:first-child { padding-top: 0; border-top: 0; }
.source-list strong { display: block; color: var(--navy-900); }
.source-list span { display: block; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--teal-700); font-size: 11px; font-weight: 800; }

.loading-state, .error-state { min-height: 62vh; display: grid; place-content: center; justify-items: center; padding: 40px; color: var(--muted); text-align: center; }
.loading-mark { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--teal-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { margin: 0; padding: 12px; color: #fff; background: var(--danger); text-align: center; }

.site-footer { padding: 47px 0; color: #fff; background: var(--navy-950); }
.footer-grid { display: grid; grid-template-columns: 270px 1fr; gap: 80px; }
.footer-brand strong { font-family: "Yu Mincho", serif; letter-spacing: .05em; }
.site-footer p { margin: 8px 0 0; color: #9fb4be; font-size: 9px; line-height: 2; }

@media (max-width: 920px) {
  .shell { width: min(100% - 30px, 1180px); }
  .hero-inner { min-height: 0; grid-template-columns: 1fr; gap: 28px; padding-block: 52px 95px; }
  .hero-side { max-width: 520px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .summary-card:nth-child(4) { border-top: 1px solid var(--line); }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .library-filters { grid-template-columns: 1fr 200px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 22px, 1180px); }
  .site-header { height: 66px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand strong { font-size: 13px; }
  .brand small { display: none; }
  .main-nav { gap: 13px; font-size: 10px; }
  .main-nav a:nth-child(3) { display: none; }
  .preview-banner .shell { min-height: 52px; align-items: flex-start; flex-direction: column; gap: 4px; padding-block: 8px; }
  .hero-inner { padding-block: 42px 88px; }
  .hero h1 { font-size: 34px; }
  .hero-copy { font-size: 12px; }
  .hero-side { padding: 19px; }
  .summary-grid { margin-top: -58px; }
  .summary-card { min-height: 115px; padding: 18px 16px; }
  .summary-value { font-size: 26px; }
  .panel-heading { align-items: flex-start; flex-direction: column; padding: 21px 17px 15px; }
  .panel-heading .button { width: 100%; }
  .search-row { grid-template-columns: 1fr; padding: 0 17px 15px; }
  .filters { grid-template-columns: 1fr 1fr; padding: 15px 17px; }
  .library-summary { margin-inline: 17px; }
  .library-filters { grid-template-columns: 1fr; padding-inline: 17px; }
  .table-tools { align-items: flex-start; flex-direction: column; padding: 11px 17px; }
  .pagination { padding: 10px 17px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 132px; padding: 16px; }
  .metric-card strong { font-size: 21px; }
  .card { padding: 20px 17px; }
  .population-row { grid-template-columns: 1fr; gap: 3px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 420px) {
  .main-nav a:first-child { display: none; }
  .summary-grid, .metric-grid { grid-template-columns: 1fr; }
  .summary-card + .summary-card { border-left: 0; border-top: 1px solid var(--line); }
  .filters { grid-template-columns: 1fr; }
  .library-summary { grid-template-columns: 1fr; }
  .library-summary div + div { border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
