:root {
  --ink: #111820;
  --muted: #5b6472;
  --paper: #f6f4ef;
  --panel: #ffffff;
  --line: #d8d2c5;
  --red: #d53f2f;
  --cyan: #1c7f94;
  --amber: #d5962f;
  --green: #4f7d44;
  --blue: #2f5b8f;
  --shadow: 0 18px 48px rgba(17, 24, 32, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  border-radius: 8px;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 10px 28px;
  background: rgba(246, 244, 239, 0.92);
  border-bottom: 1px solid rgba(17, 24, 32, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 36px;
  border: 2px solid var(--ink);
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.top-nav a,
.print-button,
.primary-action,
.secondary-action,
.copy-button,
.filter,
.mode-button,
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: normal;
  text-align: center;
}

.language-picker {
  display: inline-grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.language-picker select {
  min-height: 38px;
  min-width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 6px 28px 6px 10px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: none;
}

.top-nav a {
  padding: 8px 12px;
  color: #2c3440;
  font-size: 0.94rem;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: #e8e1d4;
}

.print-button {
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #101820;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 15, 20, 0.9) 0%, rgba(10, 15, 20, 0.72) 42%, rgba(10, 15, 20, 0.18) 100%),
    linear-gradient(0deg, rgba(10, 15, 20, 0.86), rgba(10, 15, 20, 0.08) 46%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 100px 0 64px;
  color: #fff;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero .eyebrow {
  color: #ffb148;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  font-size: 3.75rem;
}

h1 span + span::before {
  content: " ";
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.08rem;
}

.hero-copy {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  padding: 10px 18px;
  font-weight: 800;
}

.primary-action {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  max-width: 920px;
  margin: 44px 0 0;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-facts div {
  min-width: 0;
  padding: 18px;
  background: rgba(17, 24, 32, 0.58);
}

.hero-facts dt {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.notice-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 28px;
  background: var(--amber);
  color: #18130b;
  font-weight: 650;
}

.notice-band a {
  flex: 0 0 auto;
  font-weight: 900;
}

.section {
  padding: 86px 28px;
}

.section:nth-of-type(even) {
  background: #fffaf0;
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 30px;
}

.section-heading p:not(.eyebrow) {
  max-width: 850px;
  margin: 12px 0 0;
  color: var(--muted);
}

.fact-grid,
.update-grid,
.team-grid,
.area-grid,
.principle-grid,
.decision-grid,
.onsite-grid,
.extra-grid,
.source-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

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

.fact-card,
.update-card,
.team-card,
.area-card,
.principle-grid article,
.decision-grid article,
.onsite-grid article,
.extra-card,
.source-card,
.booking-checklist,
.script-panel,
.action-item,
.lodging-recommendation {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(17, 24, 32, 0.06);
}

.fact-card {
  padding: 20px;
}

.update-card {
  padding: 20px;
  border-top: 5px solid var(--amber);
}

.update-card p {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.update-card strong {
  color: var(--ink);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f5e5c2;
  color: #6d4b0c;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.3;
}

.decision-map-frame {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.decision-map-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.decision-map-svg {
  display: block;
  width: 100%;
  min-width: 980px;
  height: auto;
}

.decision-map-svg text {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}

.grok-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(17, 24, 32, 0.06);
  padding: 18px;
}

.grok-prompt {
  max-height: 520px;
  min-height: 420px;
  background: #111820;
  color: #edf2f7;
  border-color: #111820;
}

.grok-copy {
  max-width: 260px;
}

.card-label,
.team-priority,
.tag,
.area-meta,
.source-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.card-label {
  margin-bottom: 12px;
  background: #f0dbd4;
  color: #7f2318;
}

.fact-card p,
.team-card p,
.area-card p,
.onsite-grid p,
.extra-card p,
.source-card p {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.timeline-strip {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.timeline-strip div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.timeline-strip div:last-child {
  border-right: 0;
}

.timeline-strip span {
  display: block;
  margin-bottom: 8px;
  color: #ffc35c;
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline-strip strong {
  display: block;
  overflow-wrap: anywhere;
}

.action-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
}

.action-list {
  display: grid;
  gap: 12px;
}

.action-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  padding: 18px;
}

.action-step {
  display: grid;
  place-items: center;
  align-self: start;
  width: 54px;
  height: 54px;
  background: var(--cyan);
  color: #fff;
  font-weight: 900;
}

.action-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.script-panel {
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 18px;
}

.script-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
}

.tab,
.filter,
.mode-button {
  padding: 8px 12px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.tab.is-active,
.filter.is-active,
.mode-button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

pre {
  min-height: 310px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fbf7ef;
  color: #28313b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

.copy-button {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 900;
}

.toolbar {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 16px;
  align-items: end;
}

.intel-grid {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.intel-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--cyan);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(17, 24, 32, 0.06);
}

.intel-card h3 {
  font-size: 0.98rem;
}

.intel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.intel-card strong {
  color: var(--ink);
}

.intel-card a {
  color: var(--blue);
  font-weight: 900;
}

.public-use-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.public-use-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(17, 24, 32, 0.06);
}

.public-use-card h3 {
  margin-top: 10px;
}

.public-use-card dl {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.public-use-card dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.public-use-card dd {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.search-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.84rem;
}

.search-box input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.segmented,
.lodging-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented {
  justify-content: flex-end;
}

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

.team-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  padding: 20px;
  min-height: 420px;
}

.team-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.team-card h3 {
  overflow-wrap: anywhere;
}

.team-priority {
  flex: 0 0 auto;
  background: #dcece9;
  color: #0d5962;
}

.team-priority[data-priority="A"] {
  background: #f4d6d0;
  color: #8e2519;
}

.team-priority[data-priority="B"] {
  background: #f5e5c2;
  color: #6d4b0c;
}

.team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.tag {
  background: #eef0f3;
  color: #344253;
}

.tag.narrative {
  background: #e5f2ef;
  color: #155f5f;
}

.tag.regional {
  background: #f5dfdc;
  color: #842719;
}

.fit-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.fit-list li + li {
  margin-top: 6px;
}

.team-footer {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.team-footer strong {
  color: var(--ink);
}

.team-footer a,
.source-card a {
  color: var(--blue);
  font-weight: 800;
}

.team-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.team-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.team-details .team-footer {
  margin-top: 12px;
  border-top: 0;
  padding-top: 0;
}

.lodging-controls {
  width: min(1180px, 100%);
  margin: 0 auto 16px;
}

.lodging-recommendation {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  padding: 20px;
  border-left: 6px solid var(--green);
}

.lodging-recommendation h3 {
  margin-bottom: 8px;
}

.lodging-recommendation p {
  margin: 0;
  color: var(--muted);
}

.hotel-shortlist-note {
  width: min(1180px, 100%);
  margin: -4px auto 16px;
  color: var(--muted);
}

.hotel-grid,
.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hotel-card,
.audit-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hotel-card header,
.audit-card header {
  display: flex;
  align-items: start;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hotel-card header {
  justify-content: flex-start;
}

.hotel-rank {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #111820;
  color: #fff;
  font-weight: 900;
}

.hotel-tier {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5f2ef;
  color: #155f5f;
  font-size: 0.74rem;
  font-weight: 900;
}

.hotel-card h3,
.audit-card h3 {
  margin: 0;
}

.hotel-card header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.hotel-role {
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 800;
}

.hotel-card dl,
.audit-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.hotel-card dl div,
.audit-card dl div {
  display: grid;
  gap: 3px;
}

.hotel-card dt,
.audit-card dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hotel-card dd,
.audit-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.hotel-card footer {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.hotel-card footer a,
.audit-card a {
  color: var(--blue);
  font-weight: 900;
}

.lodging-compass-panel {
  width: min(1180px, 100%);
  margin: 0 auto 22px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lodging-compass-panel > div:first-child {
  max-width: 820px;
}

.lodging-compass-panel h3 {
  margin-bottom: 8px;
}

.lodging-compass-panel p:not(.eyebrow) {
  color: var(--muted);
}

.lodging-compass-scroll {
  margin-top: 18px;
  overflow-x: auto;
}

.lodging-compass-svg {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compass-grid line {
  stroke: #344253;
  stroke-width: 1.2;
  opacity: 0.42;
}

.compass-quadrants text,
.compass-axis text,
.compass-legend text,
.compass-point text {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  fill: #111820;
}

.compass-quadrants text {
  font-size: 13px;
  font-weight: 900;
  opacity: 0.72;
}

.compass-axis text,
.compass-legend text {
  font-size: 12px;
  font-weight: 800;
  fill: #5b6472;
}

.compass-point text {
  font-size: 11px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 4px;
  stroke-linejoin: round;
}

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

.compass-notes article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf7ef;
  color: var(--muted);
}

.post-stay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-stay-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.post-stay-card h3 {
  margin-top: 10px;
}

.post-stay-card dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.post-stay-card dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.post-stay-card dd {
  margin: 0;
}

.post-stay-card footer {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.post-stay-card footer a {
  color: var(--blue);
  font-weight: 900;
}

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

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

.principle-grid article,
.decision-grid article {
  padding: 20px;
}

.principle-grid ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.principle-grid li + li {
  margin-top: 8px;
}

.principle-grid p,
.decision-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.area-card {
  padding: 20px;
}

.area-meta {
  margin-bottom: 12px;
  background: #eef0f3;
  color: #344253;
}

.area-card dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  margin: 18px 0 0;
}

.area-card dt {
  color: var(--muted);
  font-weight: 800;
}

.area-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.booking-checklist {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  padding: 22px;
}

.decision-grid {
  margin-top: 16px;
}

.booking-checklist ul,
.onsite-grid ul,
.onsite-grid ol {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.booking-checklist li + li,
.onsite-grid li + li {
  margin-top: 8px;
}

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

.onsite-grid article {
  padding: 20px;
}

.route-map {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns:
    minmax(82px, 1fr) 28px minmax(82px, 1fr) 28px minmax(82px, 1fr) 28px
    minmax(82px, 1fr) 28px minmax(82px, 1fr) 28px minmax(82px, 1fr) 28px
    minmax(120px, 1.25fr) 28px minmax(82px, 1fr);
  align-items: center;
  overflow-x: auto;
  padding-bottom: 6px;
}

.route-node {
  display: grid;
  place-items: center;
  min-height: 54px;
  min-width: 82px;
  padding: 8px;
  border: 2px solid var(--ink);
  background: #fff;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
}

.route-node.strong {
  background: var(--blue);
  color: #fff;
}

.route-node.target {
  background: var(--red);
  color: #fff;
}

.route-line {
  height: 4px;
  background: var(--cyan);
}

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

.extra-card {
  padding: 20px;
}

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

.source-card {
  padding: 18px;
}

.source-type {
  margin-bottom: 8px;
  background: #eef0f3;
  color: #344253;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.summary-card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-card.not-published {
  border-color: rgba(213, 63, 47, 0.35);
  background: linear-gradient(180deg, #fff8f6, #ffffff);
}

.summary-card ul {
  margin: 12px 0 0;
  padding-left: 1.1rem;
}

.summary-card li + li {
  margin-top: 10px;
}

.type-pill {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5f2ef;
  color: #155f5f;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.type-pill[data-type*="NOT"],
.type-pill[data-type*="not published"] {
  background: #f4d6d0;
  color: #8e2519;
}

.type-pill[data-type="published signal"],
.type-pill[data-type="likely timing"] {
  background: #f5e5c2;
  color: #6d4b0c;
}

.type-pill[data-type="inference"] {
  background: #e5ebf4;
  color: #344253;
}

.type-pill[data-type="recommendation"] {
  background: #dce8f6;
  color: #2f5b8f;
}

.claim-pill {
  white-space: nowrap;
}

.table-section-title {
  margin: 28px 0 12px;
  font-size: 1.05rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.data-table th {
  background: #111820;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.data-table tr.row-muted td {
  color: var(--muted);
}

.data-table a {
  font-weight: 800;
  text-decoration: underline;
}

.lodging-matrix td:nth-child(7),
.lodging-matrix td:nth-child(8) {
  font-weight: 800;
  white-space: nowrap;
}

.staff-plan-card,
.viz-card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.staff-plan-card h4 {
  margin: 18px 0 8px;
  font-size: 0.95rem;
}

.one-pager {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.one-pager-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.one-pager-header h4 {
  margin-top: 0;
}

.one-pager-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.copy-inline-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.one-pager-text {
  min-height: 260px;
}

.shift-list div {
  margin-bottom: 10px;
}

.shift-list dt {
  font-weight: 800;
}

.shift-list dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.viz-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.verdict-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcece9;
  color: #0d5962;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.source-meta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer {
  padding: 28px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.site-footer p {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.site-footer p + p {
  margin-top: 8px;
}

.site-footer a {
  color: #fff;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .fact-grid,
  .update-grid,
  .intel-grid,
  .public-use-grid,
  .onsite-grid,
  .extra-grid,
  .principle-grid,
  .decision-grid,
  .summary-grid,
  .viz-grid,
  .compass-notes,
  .post-stay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .action-layout {
    grid-template-columns: 1fr;
  }

  .script-panel {
    position: static;
  }

  .timeline-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 10px 14px;
    gap: 10px;
  }

  .language-picker {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
  }

  .language-picker select {
    width: 100%;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 38px;
    height: 34px;
  }

  .print-button {
    min-height: 36px;
    padding: 6px 10px;
  }

  .top-nav a {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.82rem;
  }

  .top-nav {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .hero {
    min-height: 680px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(10, 15, 20, 0.92), rgba(10, 15, 20, 0.62)),
      linear-gradient(0deg, rgba(10, 15, 20, 0.9), rgba(10, 15, 20, 0.2));
  }

  .hero-content {
    width: calc(100vw - 28px);
    padding-bottom: 40px;
  }

  h1 {
    font-size: 2rem;
  }

  h1 span {
    display: block;
  }

  h1 span + span::before {
    content: "";
  }

  .hero h1,
  .hero-copy,
  .hero-facts dd {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  h2 {
    font-size: 1.72rem;
  }

  .hero-copy {
    font-size: 0.96rem;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .notice-band {
    display: grid;
    padding: 16px 14px;
  }

  .section {
    padding: 58px 14px;
  }

  .fact-grid,
  .update-grid,
  .intel-grid,
  .public-use-grid,
  .team-grid,
  .area-grid,
  .principle-grid,
  .decision-grid,
  .onsite-grid,
  .extra-grid,
  .source-grid,
  .summary-grid,
  .viz-grid,
  .hotel-grid,
  .audit-grid,
  .compass-notes,
  .post-stay-grid {
    grid-template-columns: 1fr;
  }

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

  .segmented {
    justify-content: start;
  }

  .timeline-strip {
    grid-template-columns: 1fr;
  }

  .timeline-strip div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .timeline-strip div:last-child {
    border-bottom: 0;
  }

  .action-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-card {
    min-height: 0;
  }

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

  .route-map {
    grid-template-columns:
      120px 28px 120px 28px 120px 28px 120px 28px 120px 28px 120px 28px
      140px 28px 120px;
  }
}

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

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

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ecf1;
    --muted: #9aa7b4;
    --paper: #0e1318;
    --panel: #161d25;
    --line: #2a333d;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }

  /* Accent text tuned for dark surfaces */
  .eyebrow {
    color: #ff7a6b;
  }
  .intel-card a,
  .team-footer a,
  .source-card a,
  .team-details summary,
  .hotel-card footer a,
  .audit-card a,
  .post-stay-card footer a {
    color: #7fb4ff;
  }

  /* Sticky header */
  .site-header {
    background: rgba(14, 19, 24, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .top-nav a {
    color: #c3ccd6;
  }
  .top-nav a:hover,
  .top-nav a:focus-visible {
    background: #222c36;
  }

  /* Alternating sections get a subtle lift instead of cream */
  .section:nth-of-type(even) {
    background: #121922;
  }

  /* Inputs and segmented controls */
  .language-picker select,
  .search-box input,
  .tab,
  .filter,
  .mode-button {
    background: #0f151b;
    color: var(--ink);
    border-color: var(--line);
  }

  /* Inverse active state keeps selection high-contrast */
  .tab.is-active,
  .filter.is-active,
  .mode-button.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #0e1318;
  }

  /* Dark fills that must NOT follow --ink as it flips to light */
  .skip-link {
    background: #0a0e12;
  }
  .print-button {
    background: #222c36;
    border-color: #39434e;
  }
  .timeline-strip {
    background: #10161d;
    border-color: var(--line);
  }
  .timeline-strip div {
    border-right-color: rgba(255, 255, 255, 0.12);
  }
  .timeline-strip div:last-child {
    border-right: 0;
  }
  .site-footer {
    background: #0a0e12;
  }

  /* Code blocks and route nodes */
  pre {
    background: #0f151b;
    color: #d4dbe3;
    border-color: var(--line);
  }
  .route-node {
    background: #0f151b;
    border-color: #3a4654;
  }

  /* Remaining hardcoded-light panels */
  .compass-notes article {
    background: #0f151b;
    color: var(--muted);
  }
  .summary-card.not-published {
    border-color: rgba(213, 63, 47, 0.45);
    background: linear-gradient(180deg, #221316, #161d25);
  }

  /* The decision map and lodging compass are self-contained light infographics
     (each paints its own light background), so a dark frame just softens their
     edge — their inner text stays dark-on-light and must NOT be overridden. */
  .decision-map-frame {
    background: #0f151b;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .toolbar,
  .lodging-controls,
  .copy-button,
  .copy-inline-button {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero {
    min-height: auto;
    background: #fff;
  }

  .hero-image,
  .hero-overlay {
    display: none;
  }

  .hero-content {
    color: #000;
    padding: 24px 0;
  }

  .hero-copy,
  .section-heading p:not(.eyebrow),
  .fact-card p,
  .update-card p,
  .team-card p,
  .area-card p,
  .onsite-grid li,
  .booking-checklist li {
    color: #000;
  }

  .section {
    padding: 28px 0;
    break-inside: avoid;
  }

  .fact-card,
  .update-card,
  .team-card,
  .area-card,
  .onsite-grid article,
  .extra-card,
  .source-card,
  .hotel-card,
  .audit-card,
  .post-stay-card,
  .lodging-compass-panel,
  .booking-checklist,
  .script-panel,
  .action-item,
  .lodging-recommendation {
    box-shadow: none;
  }
}
