:root {
  color-scheme: light;

  --ink: #1f2933;
  --muted: #5f6f7d;
  --line: #d7e0e7;
  --paper: #f7f9fb;
  --surface: #ffffff;

  --navy: #12324a;
  --deep-navy: #0b2447;
  --green: #176b5b;
  --gold: #a66f15;
  --red: #a64035;
  --focus: #0b77c5;

  --shadow: 0 14px 34px rgba(18, 50, 74, 0.12);
  --radius: 8px;
  --container: min(1240px, calc(100% - 32px));
  --container-narrow: min(1120px, calc(100% - 32px));
}

/* Base */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
.filters input:focus,
.filters select:focus,
.ja-filter-panel input:focus,
.ja-filter-panel select:focus,
.restaurant-filter-panel input:focus,
.restaurant-filter-panel select:focus {
  outline: 3px solid rgba(11, 119, 197, 0.24);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.02rem;
}

main {
  width: var(--container);
  margin: 0 auto;
}

.intent-page main {
  width: var(--container-narrow);
}

.profile-page main {
  width: min(1040px, calc(100% - 32px));
}

/* Shared header */

.topbar,
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy,
.brand > span:not(.brand-mark) {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.brand strong,
.brand small,
.brand-copy strong,
.brand-copy small {
  display: block;
  line-height: 1.15;
}

.brand small,
.brand-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 1.25rem);
  font-size: 0.94rem;
}

.topnav a {
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover {
  color: var(--navy);
}

/* Shared panels and sections */

.finder-panel,
.market-snapshot,
.detail,
.compare,
.for-schools,
.opportunity-strip,
.seo-hubs,
.readiness,
.intent-hero,
.intent-section,
.intent-sidebar,
.profile-hero,
.profile-panel,
.profile-sidebar,
.verification-panel,
.hero-panel,
.side-panel,
.page-band,
.listing-card,
.profile-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro p:not(.eyebrow),
.detail p,
.section-heading + p,
.listing-card p,
.profile-section p,
.page-band p,
.side-panel p {
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 6px;
  max-width: 760px;
  margin-bottom: 18px;
}

/* Buttons and links */

.button-link,
.ghost-button,
.school-card button,
.detail-actions a,
.detail-actions button,
.card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.button-link {
  min-height: 44px;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
}

.button-link.secondary {
  background: #fff;
  color: var(--navy);
}

.ghost-button:hover,
.school-card button:hover,
.button-link:hover,
.detail-actions a:hover,
.detail-actions button:hover,
.card-actions button:hover {
  border-color: var(--green);
  color: var(--green);
}

.button-link:hover {
  background: #fff;
}

/* Original school finder / home */

.finder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: stretch;
  padding: 28px 0 18px;
}

.finder-panel {
  padding: clamp(20px, 4vw, 40px);
}

.intro {
  max-width: 820px;
}

.filters {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.filters label,
.ja-filter-panel label,
.restaurant-filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.filters input,
.filters select,
.ja-filter-panel input,
.ja-filter-panel select,
.restaurant-filter-panel input,
.restaurant-filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.secondary-filters {
  align-items: stretch;
}

.filters fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.filters legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.filters fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
}

.filters input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.strategy-note {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 100%;
  border: 1px solid #c8ded7;
  border-radius: 6px;
  padding: 12px;
  background: #f0f7f4;
}

.strategy-note strong {
  color: var(--green);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.strategy-note span {
  color: var(--muted);
  font-size: 0.88rem;
}

.market-snapshot {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.market-snapshot div {
  display: grid;
  gap: 2px;
  padding: 16px;
  background: #f2f6f5;
  border-radius: var(--radius);
}

.market-snapshot strong {
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
}

.market-snapshot span,
.stat-block span {
  color: var(--muted);
  font-size: 0.9rem;
}

.opportunity-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 22px;
}

.opportunity-strip p:last-child {
  margin: 0;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
  margin: 0 0 18px;
}

.results {
  min-width: 0;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 14px;
}

.school-grid,
.ja-school-grid {
  display: grid;
  gap: 14px;
}

.school-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.school-card.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

.ja-school-card.is-active {
  border-color: var(--navy);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.school-card h3 {
  font-size: 1.16rem;
}

.status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status.seed {
  background: #f8ead2;
  color: var(--gold);
}

.status.verified {
  background: #dff1ec;
  color: var(--green);
}

.homepage-preview {
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  background: #fff;
}

.homepage-preview a,
.listing-card-media a {
  display: block;
}

.homepage-preview img,
.listing-card-media img {
  display: block;
  width: 100%;
  height: auto;
  background: #edf3f7;
}

.homepage-preview figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.listing-card-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  background: #fff;
}

.listing-card-media img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.homepage-link {
  font-weight: 800;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.meta,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.pill-list li {
  padding: 4px 8px;
  background: #edf3f7;
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.signal-list div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fbfcfd;
}

.signal-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-list dd {
  margin: 0;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
}

.detail-signals {
  grid-template-columns: 1fr;
}

.card-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail,
.intent-sidebar,
.profile-sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 22px;
}

.detail ul,
.intent-sidebar ul,
.profile-section ul,
.profile-sidebar ul {
  margin: 0;
  padding-left: 18px;
}

.compare,
.for-schools,
.seo-hubs,
.readiness {
  margin: 18px 0;
  padding: 24px;
}

.school-actions,
.readiness-grid,
.category-grid,
.listing-grid,
.trust-grid,
.hub-grid {
  display: grid;
  gap: 14px;
}

.school-actions,
.readiness-grid,
.category-grid,
.listing-grid,
.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-grid.two,
.trust-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.school-actions > div,
.hub-grid article {
  padding: 16px;
  background: #f3f7f8;
  border-radius: var(--radius);
}

.readiness-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.readiness-grid p,
.hub-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.hub-grid a {
  color: var(--navy);
}

/* Data lists and tables */

.note-list,
.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.note-list div {
  display: grid;
  gap: 3px;
  border-left: 3px solid #c8ded7;
  padding: 8px 10px;
  background: #f7faf9;
}

.note-list dt,
.facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.note-list dt {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 900;
}

.note-list dd,
.facts dd {
  margin: 0;
}

.facts div {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.facts.compact {
  gap: 6px;
}

.facts.compact div {
  padding-bottom: 6px;
}

.compare-table-wrap,
.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.compare-table th,
.compare-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

/* Intent and profile pages */

.intent-hero,
.profile-hero {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: clamp(22px, 4vw, 42px);
}

.intent-hero h1,
.profile-hero h1 {
  font-size: clamp(2rem, 6vw, 4.4rem);
}

.intent-layout,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin: 18px 0;
}

.intent-section,
.profile-panel,
.verification-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.intent-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intent-list li {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcfd;
}

.profile-section {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 3vw, 28px);
}

.profile-sidebar a {
  width: fit-content;
}

.not-found,
.empty {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.not-found {
  margin: 28px 0;
}

.empty,
.empty-note {
  color: var(--muted);
}

/* v10 / directory pages */

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  padding: clamp(22px, 4vw, 44px);
}

.hero-panel h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

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

.side-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.stat-block strong {
  display: block;
  color: var(--navy);
  font-size: 1.65rem;
  line-height: 1;
}

.page-band {
  margin-top: 18px;
  padding: clamp(18px, 3vw, 30px);
}

.category-grid,
.listing-grid,
.trust-grid {
  margin-top: 18px;
}

.listing-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5f2;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.label.warn {
  background: #fff4e3;
  color: var(--gold);
}

.label.strong {
  background: #e9f1f8;
  color: var(--navy);
}

.check-list {
  padding-left: 20px;
}

.check-list li {
  margin: 6px 0;
}

.school-guide-page .notice-box {
  border: 1px solid rgba(6, 95, 70, 0.22);
  border-radius: 8px;
  background: rgba(236, 253, 245, 0.84);
  color: #064e3b;
  padding: 1rem;
  font-weight: 650;
}

.school-list {
  display: grid;
  gap: 1rem;
}

.school-profile {
  display: grid;
  gap: 0.8rem;
}

.school-profile h3 {
  margin: 0;
}

.school-profile .facts {
  margin: 0;
}

.school-profile .homepage-link {
  font-weight: 750;
}

/* Restaurant and Japanese school finder */

.school-finder,
.restaurant-finder {
  display: grid;
  gap: 18px;
}

.ja-filter-panel,
.restaurant-filter-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.restaurant-filter-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ja-school-layout,
.restaurant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.restaurant-grid {
  display: grid;
  gap: 14px;
}

.restaurant-card h3 a {
  color: var(--navy);
  text-decoration: none;
}

.restaurant-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.notice-box {
  border: 1px solid rgba(6, 95, 70, 0.22);
  border-radius: 8px;
  background: rgba(236, 253, 245, 0.84);
  color: #064e3b;
  padding: 1rem;
  font-weight: 650;
}

/* Shared footer partial */

.site-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  background: radial-gradient(circle at top left, rgba(12, 48, 92, 0.06), transparent 34rem), #f8fafc;
  color: #172033;
}

.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 4rem) 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.footer-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
}

.footer-brand strong {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.2;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  max-width: 44rem;
  color: #475569;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}

.footer-grid section {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.footer-grid h2 {
  margin: 0 0 0.35rem;
  color: var(--deep-navy);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-site-lang="ja"] .footer-grid h2 {
  letter-spacing: 0.02em;
  text-transform: none;
}

.footer-grid a {
  color: #334155;
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--deep-navy);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-note {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Legacy footer still used by older static pages */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: var(--container);
  margin: 18px auto 0;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Theme flow */

.section-intro {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.theme-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.flow-step {
  position: relative;
  min-height: 240px;
  padding: 24px;
  border: 1px solid rgba(11, 36, 71, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(11, 36, 71, 0.06);
}

.flow-step span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}

.flow-step h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.flow-step p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.flow-step a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.flow-step a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 960px) {
  .finder,
  .layout,
  .opportunity-strip,
  .profile-layout,
  .intent-layout {
    grid-template-columns: 1fr;
  }

  .market-snapshot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail,
  .profile-sidebar,
  .intent-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .hero-split,
  .category-grid,
  .category-grid.two,
  .theme-flow,
  .listing-grid,
  .trust-grid,
  .trust-grid.two,
  .ja-filter-panel,
  .restaurant-filter-panel,
  .ja-school-layout,
  .restaurant-layout {
    grid-template-columns: 1fr;
  }

  .site-header,
  .topbar {
    position: relative;
    align-items: flex-start;
    gap: 1rem;
  }

  .topnav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

@media (max-width: 720px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
  }

  .filter-row,
  .market-snapshot,
  .school-actions,
  .signal-list,
  .hub-grid,
  .readiness-grid {
    grid-template-columns: 1fr;
  }

  .results-head,
  .card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 4rem);
  }
}

@media (max-width: 560px) {
  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-copy small,
  .brand small {
    font-size: 0.75rem;
  }

  .topnav {
    gap: 0.5rem 0.8rem;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-logo {
    width: 58px;
    height: 58px;
  }
}
/* === SEF DESIGN SYSTEM V1 — PASS 3 === */
:root {
  --ink: #17252f;
  --muted: #5a6972;
  --line: #d6e1e5;
  --line-strong: #c2d2d8;
  --paper: #f3f7f6;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --surface-tint: #edf6f3;

  --navy: #123b56;
  --deep-navy: #092f46;
  --green: #0f6f62;
  --green-dark: #0b594f;
  --gold: #9a681b;
  --red: #a33d35;
  --focus: #006eb5;

  --shadow-xs: 0 1px 2px rgba(9, 47, 70, 0.05);
  --shadow-sm: 0 10px 30px rgba(9, 47, 70, 0.08);
  --shadow: 0 18px 48px rgba(9, 47, 70, 0.11);
  --shadow-hover: 0 18px 42px rgba(9, 47, 70, 0.14);

  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;

  --container: min(1220px, calc(100% - 40px));
  --container-narrow: min(1080px, calc(100% - 40px));

  --hero-gradient: linear-gradient(135deg, #ffffff 0%, #f0f8f5 55%, #e8f1f6 100%);
  --brand-gradient: linear-gradient(135deg, #123b56 0%, #0f6f62 100%);
}

html {
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -4%, rgba(15, 111, 98, 0.075), transparent 30rem),
    radial-gradient(circle at 92% 5%, rgba(18, 59, 86, 0.065), transparent 28rem),
    var(--paper);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(15, 111, 98, 0.18);
}

main {
  width: var(--container);
}

.intent-page main {
  width: var(--container-narrow);
}

.profile-page main {
  width: min(1040px, calc(100% - 40px));
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 820px;
  color: var(--deep-navy);
  font-size: clamp(2.35rem, 5.5vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h2 {
  color: var(--deep-navy);
  font-size: clamp(1.45rem, 2.7vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

h3 {
  color: var(--deep-navy);
  font-size: 1.08rem;
  line-height: 1.3;
}

p,
li,
dd {
  text-wrap: pretty;
}

.topbar,
.site-header {
  min-height: 68px;
  padding: 10px clamp(16px, 3.5vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(18, 59, 86, 0.11);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 24px rgba(9, 47, 70, 0.04);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  gap: 11px;
}

.brand-logo {
  width: 46px;
  height: 46px;
}

.brand strong,
.brand-copy strong {
  color: var(--deep-navy);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.brand small,
.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.topnav {
  gap: 2px;
  font-size: 0.91rem;
}

.topnav a {
  border-radius: 999px;
  padding: 8px 11px;
  transition: background-color 140ms ease, color 140ms ease;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a[aria-current="page"] {
  background: var(--surface-tint);
  color: var(--deep-navy);
}

.finder-panel,
.market-snapshot,
.detail,
.compare,
.for-schools,
.opportunity-strip,
.seo-hubs,
.readiness,
.intent-hero,
.intent-section,
.intent-sidebar,
.profile-hero,
.profile-panel,
.profile-sidebar,
.verification-panel,
.hero-panel,
.side-panel,
.page-band,
.listing-card,
.profile-section,
.school-card,
.not-found,
.empty {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.hero-panel,
.intent-hero,
.profile-hero {
  overflow: hidden;
  background: var(--hero-gradient);
  border-color: #cfdddf;
  box-shadow: var(--shadow-sm);
}

.hero-panel,
.intent-hero,
.profile-hero {
  position: relative;
}

.hero-panel::after,
.intent-hero::after,
.profile-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  bottom: -110px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(18, 59, 86, 0.08), rgba(15, 111, 98, 0.04));
  pointer-events: none;
}

.hero-panel > *,
.intent-hero > *,
.profile-hero > * {
  position: relative;
  z-index: 1;
}

.hero-panel p:not(.eyebrow),
.intent-hero p:not(.eyebrow),
.profile-hero p:not(.eyebrow) {
  max-width: 70ch;
  font-size: 1.03rem;
}

.side-panel,
.market-snapshot {
  background: linear-gradient(180deg, #ffffff 0%, #f6faf9 100%);
  border-color: #d0dcdf;
  box-shadow: var(--shadow-sm);
}

.stat-block {
  padding: 15px 16px;
  border: 1px solid rgba(18, 59, 86, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.stat-block strong,
.market-snapshot strong {
  color: var(--deep-navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.eyebrow {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.055em;
}

.section-heading {
  gap: 7px;
  max-width: 800px;
  margin-bottom: 20px;
}

.section-intro,
.intro p:not(.eyebrow),
.detail p,
.section-heading + p,
.listing-card p,
.profile-section p,
.page-band p,
.side-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  padding: 34px 0 64px;
}

.hero-split {
  gap: 22px;
}

.hero-panel {
  padding: clamp(26px, 4.5vw, 52px);
}

.side-panel {
  gap: 12px;
  padding: 18px;
}

.page-band,
.intent-section,
.profile-panel,
.verification-panel {
  padding: clamp(22px, 3.5vw, 34px);
}

.page-band {
  margin-top: 22px;
}

.category-grid,
.listing-grid,
.trust-grid,
.school-actions,
.readiness-grid,
.hub-grid {
  gap: 18px;
}

.listing-card,
.school-card,
.intent-list li,
.readiness-grid article,
.school-actions > div,
.hub-grid article {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.listing-card,
.school-card {
  gap: 13px;
  padding: 20px;
}

.listing-card h3 a,
.restaurant-card h3 a,
.hub-grid a,
.homepage-link {
  color: var(--deep-navy);
  text-decoration-color: rgba(15, 111, 98, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

@media (hover: hover) and (pointer: fine) {
  .listing-card,
  .school-card,
  .flow-step {
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }

  .listing-card:hover,
  .school-card:hover,
  .flow-step:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-hover);
  }
}

.button-link,
.ghost-button,
.school-card button,
.detail-actions a,
.detail-actions button,
.card-actions button {
  min-height: 42px;
  border-color: var(--line-strong);
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 780;
  line-height: 1.2;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.button-link {
  min-height: 46px;
  padding: 11px 16px;
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 5px 14px rgba(18, 59, 86, 0.14);
}

.button-link.secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.84);
  color: var(--navy);
  box-shadow: none;
}

.button-link:hover,
.button-link:focus-visible {
  border-color: var(--deep-navy);
  background: var(--deep-navy);
  color: #fff;
}

.button-link.secondary:hover,
.button-link.secondary:focus-visible,
.ghost-button:hover,
.school-card button:hover,
.detail-actions a:hover,
.detail-actions button:hover,
.card-actions button:hover {
  border-color: rgba(15, 111, 98, 0.40);
  background: var(--surface-tint);
  color: var(--green-dark);
}

.label,
.pill-list li {
  min-height: 28px;
  border: 1px solid rgba(15, 111, 98, 0.12);
  border-radius: 999px;
  background: #edf6f3;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 780;
}

.label.warn {
  border-color: rgba(154, 104, 27, 0.16);
  background: #fff7e8;
  color: #855815;
}

.label.strong {
  border-color: rgba(18, 59, 86, 0.13);
  background: #edf3f7;
  color: var(--navy);
}

.facts div {
  gap: 4px;
  padding-bottom: 12px;
  border-color: #e5ecef;
}

.facts dt,
.note-list dt,
.compare-table th {
  letter-spacing: 0.035em;
}

.note-list div {
  border-left-color: rgba(15, 111, 98, 0.42);
  border-radius: 0 9px 9px 0;
  background: #f5faf8;
}

.filters input,
.filters select,
.ja-filter-panel input,
.ja-filter-panel select,
.restaurant-filter-panel input,
.restaurant-filter-panel select {
  min-height: 48px;
  border-color: var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.filters fieldset {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 110, 181, 0.28);
  outline-offset: 3px;
}

.notice-box,
.school-guide-page .notice-box {
  border: 1px solid rgba(15, 111, 98, 0.20);
  border-radius: 12px;
  background: #eef8f4;
  color: #174d45;
  padding: 14px 16px;
  font-weight: 620;
  line-height: 1.6;
}

.compare-table-wrap,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.compare-table {
  min-width: 720px;
}

.compare-table th,
.compare-table td {
  padding: 13px 14px;
  border-color: #e4ecef;
}

.compare-table th {
  background: #f4f8f8;
  color: #53636c;
}

.compare-table tbody tr:nth-child(even) {
  background: #fbfcfc;
}

.profile-layout,
.intent-layout,
.ja-school-layout,
.restaurant-layout {
  gap: 22px;
}

.detail,
.intent-sidebar,
.profile-sidebar {
  top: 88px;
  gap: 15px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.school-profile {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.theme-flow {
  gap: 16px;
}

.flow-step {
  min-height: 0;
  padding: 22px;
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}

.flow-step span {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  background: var(--brand-gradient);
  box-shadow: 0 7px 16px rgba(18, 59, 86, 0.15);
}

.site-footer {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-top: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(49, 146, 127, 0.16), transparent 28rem),
    linear-gradient(145deg, #092f46 0%, #0b3547 48%, #0d453f 100%);
  color: #edf5f6;
}

.footer-inner {
  width: min(1120px, calc(100% - 40px));
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}

.footer-brand {
  margin-bottom: clamp(2rem, 4vw, 2.8rem);
}

.footer-brand strong,
.footer-grid h2 {
  color: #fff;
}

.footer-brand p {
  color: #bfd0d6;
}

.footer-grid a {
  color: #d4e1e4;
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: #fff;
}

.footer-note {
  border-top-color: rgba(255, 255, 255, 0.13);
  color: #afc3c9;
}

@media (max-width: 980px) {
  .topbar,
  .site-header {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-block: 9px;
  }

  .topnav {
    order: 2;
    width: 100%;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .topnav a {
    flex: 0 0 auto;
  }

  .hero-split,
  .finder,
  .layout,
  .opportunity-strip,
  .profile-layout,
  .intent-layout,
  .ja-school-layout,
  .restaurant-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .detail,
  .intent-sidebar,
  .profile-sidebar {
    position: static;
  }

  .theme-flow,
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid,
  .listing-grid,
  .trust-grid,
  .school-actions,
  .readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ja-filter-panel,
  .restaurant-filter-panel,
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(1220px, calc(100% - 24px));
    --container-narrow: min(1080px, calc(100% - 24px));
  }

  html {
    scroll-padding-top: 124px;
  }

  body {
    font-size: 15.75px;
  }

  .brand-copy small,
  .brand > span:not(.brand-mark) small {
    display: none;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .page-shell,
  .footer-inner {
    width: calc(100% - 24px);
  }

  .page-shell {
    padding-top: 22px;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .stat-block strong {
    font-size: 1.35rem;
  }

  h1,
  .hero-panel h1,
  .intent-hero h1,
  .profile-hero h1 {
    font-size: clamp(2rem, 11vw, 3.1rem);
    line-height: 1.04;
  }

  .hero-panel,
  .intent-hero,
  .profile-hero,
  .page-band,
  .intent-section,
  .profile-panel,
  .verification-panel {
    padding: 20px;
  }

  .category-grid,
  .listing-grid,
  .trust-grid,
  .school-actions,
  .readiness-grid,
  .theme-flow,
  .hub-grid,
  .ja-filter-panel,
  .restaurant-filter-panel,
  .filter-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .card-actions,
  .detail-actions {
    align-items: stretch;
  }

  .hero-actions .button-link,
  .card-actions .button-link,
  .card-actions button {
    width: 100%;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-logo {
    width: 60px;
    height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* === SEF CORE / UTILITY COMPONENTS — PASS 5 === */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.source-note {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.emergency-callout {
  border-color: rgba(163, 61, 53, 0.22);
  background: linear-gradient(135deg, #fff 0%, #fff7f5 100%);
}

.emergency-callout h2,
.emergency-side strong {
  color: var(--red);
}

.emergency-side {
  border-color: rgba(163, 61, 53, 0.20);
  background: linear-gradient(180deg, #fff 0%, #fff7f5 100%);
}

.compact-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.compact-link-grid > a {
  color: inherit;
  text-decoration: none;
}

.compact-link-grid > a strong {
  display: block;
  margin-bottom: 6px;
  color: var(--deep-navy);
}

.compact-link-grid > a span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .compact-link-grid {
    grid-template-columns: 1fr;
  }
}
