@import url("ocean.css");

* { box-sizing:border-box }
[hidden] { display:none !important }
body {
  margin:0; min-height:100dvh; background:var(--ocean-page); color:var(--text);
  font:1rem/1.75 var(--font-ui,sans-serif);
}
main { width:min(1130px,calc(100% - 2rem)); margin-inline:auto; padding-block:clamp(1.5rem,4vw,3.5rem) 4rem }
a { color:var(--action); text-underline-offset:.2em }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px }
.skip-link { position:absolute; inset-inline-start:1rem; top:-5rem; z-index:20; background:var(--surface); padding:.5rem }
.skip-link:focus { top:.5rem }
h1,h2,p { margin:0 }
.story-hub-intro h1 { font:750 clamp(1.8rem,4vw,3rem)/1.4 var(--font-display,sans-serif) }
.story-hub-intro p { margin-block-start:.5rem; color:var(--muted) }
.hub-start {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.65rem 1.5rem;
  padding:.8rem 1rem; margin-block:1.35rem; background:var(--surface);
  border:1px solid var(--line); border-radius:.85rem;
}
.hub-start p { flex:1 1 24rem; color:var(--muted); font-size:.92rem }
.hub-year-form { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem .75rem }
.hub-year-form label { font-weight:700 }
button,select { font:inherit }
.hub-year-form select,.hub-year-form button,#clear-story-progress {
  min-height:44px; padding:.4rem .75rem; border:1px solid var(--edge); border-radius:.65rem;
  background:var(--raised); color:var(--text); cursor:pointer;
}
.hub-year-form select { min-width:5.4rem }
.story-hub-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem }
.hub-country,.hub-compare {
  border:1px solid var(--line); border-radius:1.1rem; background:var(--surface); box-shadow:var(--depth);
}
.hub-country { --country-color:var(--china); overflow:hidden; display:flex; flex-direction:column }
.hub-country[data-progress-country="usa"] { --country-color:var(--usa) }
.hub-country:focus-within,.hub-country:hover { border-color:var(--country-color) }
.hub-country-visual { background:var(--deep); border-block-end:3px solid var(--country-color) }
.hub-country-art { display:block; width:100%; height:clamp(8rem,17vw,11rem); object-fit:cover; object-position:35% 50% }
.hub-country-content { display:flex; flex-direction:column; flex:1; gap:.5rem; padding:clamp(.9rem,2.5vw,1.35rem) }
.hub-country h2,.hub-compare h2 { font:750 clamp(1.25rem,2.4vw,1.6rem)/1.45 var(--font-display,sans-serif) }
.hub-country p,.hub-compare p { color:var(--muted) }
.hub-country nav,.hub-compare nav { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:.35rem .65rem }
.hub-compare nav { margin-inline-start:auto }
.hub-country nav { margin-block-start:auto; padding-block-start:.55rem }
.action,.hub-text-link {
  display:inline-flex; align-items:center; gap:.32em; min-height:44px; padding:.42rem .8rem;
  border:1px solid transparent; border-radius:.65rem; font-weight:700; text-decoration:none;
}
.action { background:var(--primary); color:var(--on-action) }
.action:hover { background:var(--primary-hover) }
.hub-text-link { color:var(--action) }
.hub-text-link:hover,#clear-story-progress:hover { background:var(--active) }
.hub-compare {
  grid-column:1 / -1; display:flex; justify-content:space-between; align-items:center;
  gap:.75rem 1.3rem; flex-wrap:wrap; padding:clamp(1rem,2.8vw,1.5rem);
  border-inline-start:4px solid var(--primary);
  background:linear-gradient(105deg,transparent,var(--sea-glow)),var(--surface);
}
.hub-compare p { margin-block-start:.35rem }
.hub-footer { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; margin-block-start:1rem }
.hub-source-note { color:var(--muted); font-size:.9rem }
#clear-story-progress { margin-inline-start:auto }
#progress-status:empty { display:none }
@media(max-width:640px) {
  .story-hub-choices { grid-template-columns:minmax(0,1fr) }
  .hub-start { align-items:start }
}
