/* The slide picture: shared by the big screen and the phone's Screen view. Sizes are in em so the whole
   picture scales from one font-size set on .stage. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 0.18em solid var(--gold); outline-offset: 0.15em; border-radius: 0.3em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.stage.moving { overflow: hidden; }
.stage { --fam: var(--accent-ink); position: relative; overflow-x: hidden; overflow-y: auto; font-size: clamp(13px, min(1.25vw + 0.9vh, 3.3vh), 80px); line-height: 1.35; }
.stage[data-family='ais'] { --fam: var(--ais); }
.stage[data-family='hem'] { --fam: var(--hem); }

.view { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 0.7em; padding: 2.2em 4.2em 1.6em; max-width: 62em; margin: 0 auto; }
.view[data-enter='left'] { animation: in-left 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.view[data-enter='right'] { animation: in-right 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.view[data-enter='down'] { animation: in-down 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.view[data-enter='up'] { animation: in-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes in-left { from { opacity: 0; transform: translateX(3em); } }
@keyframes in-right { from { opacity: 0; transform: translateX(-3em); } }
@keyframes in-down { from { opacity: 0; transform: translateY(2.2em); } }
@keyframes in-up { from { opacity: 0; transform: translateY(-2.2em); } }
@media (prefers-reduced-motion: reduce) { .view[data-enter] { animation: none; } }

.kicker { margin: 0; font-size: 0.78em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fam); display: flex; align-items: center; gap: 0.7em; }
.kicker::before { content: ''; width: 2.2em; height: 0.28em; background: var(--gold); border-radius: 1em; }
.title { margin: 0; font-size: 2.7em; line-height: 1.06; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.title-2 { font-size: 2.1em; }
.lead { margin: 0; font-size: 1.22em; color: var(--muted); max-width: 34em; text-wrap: pretty; }

.tiles { display: grid; gap: 0.8em; margin-top: 1.1em; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.tiles-1 { --cols: 1; max-width: 26em; }
.tiles-2 { --cols: 2; }
.tiles-3 { --cols: 3; }
.tiles-4 { --cols: 4; }
.tiles-5 { --cols: 5; }
.tile { --fam: var(--accent-ink); display: flex; flex-direction: column; gap: 0.45em; text-align: left; padding: 1em 1.05em 0.85em; background: var(--card); border: 1px solid var(--line); border-top: 0.28em solid var(--fam); border-radius: var(--radius); cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; min-height: 7.4em; }
.tile[data-family='ais'] { --fam: var(--ais); }
.tile[data-family='hem'] { --fam: var(--hem); }
.tile[data-family='both'] { border-top-color: var(--gold); }
.tile:hover, .tile:focus-visible { background: var(--card-2); transform: translateY(-0.15em); box-shadow: var(--shadow); }
.tile-label { font-size: 1.12em; font-weight: 750; line-height: 1.15; }
.tile-blurb { font-size: 0.86em; color: var(--muted); flex: 1; }
.tile-more { font-size: 0.68em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fam); }
.tiles-5 .tile-label { font-size: 0.98em; }
.tiles-5 .tile-blurb { font-size: 0.8em; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em; font-size: 0.74em; color: var(--muted); }
.up { background: var(--card); border: 1px solid var(--line); border-radius: 2em; padding: 0.35em 0.95em; cursor: pointer; font-weight: 700; color: var(--text); }
.up:hover { background: var(--card-2); }
.crumb { letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.crumb + .crumb::before { content: '›'; margin-right: 0.6em; color: var(--line); }

.items { list-style: none; margin: 0.7em 0 0; padding: 0; display: grid; gap: 0.6em; }
.items-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.items-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.items-three .item-name { font-size: 0.9em; }
.items-three .item-text { font-size: 0.78em; }
.item { background: var(--card); border: 1px solid var(--line); border-left: 0.28em solid var(--fam); border-radius: 0.7em; padding: 0.7em 0.9em 0.6em; display: flex; flex-direction: column; gap: 0.35em; }
.item-main { display: flex; flex-direction: column; gap: 0.28em; text-align: left; background: none; border: 0; padding: 0; width: 100%; }
button.item-main { cursor: pointer; }
.item-open:hover { background: var(--card-2); }
.item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5em; }
.item-name { font-weight: 750; font-size: 0.98em; line-height: 1.2; }
.chip { font-size: 0.6em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fam); border: 1px solid currentColor; border-radius: 2em; padding: 0.15em 0.7em; white-space: nowrap; }
.item-text { font-size: 0.84em; color: var(--muted); }
.item-more { margin-left: auto; white-space: nowrap; font-size: 0.62em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fam); }
.sources { margin: 0; font-size: 0.62em; color: var(--muted); }
.sources-label { font-weight: 700; }
.src { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 0.2em; text-decoration-thickness: 0.09em; }
.src:hover { color: var(--accent-ink); }

.points-wrap { background: var(--card); border: 1px solid var(--line); border-left: 0.28em solid var(--fam); border-radius: var(--radius); padding: 0.9em 1.2em; margin-top: 0.4em; }
.points-label { margin: 0 0 0.4em; font-size: 0.66em; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fam); }
.points { margin: 0; padding-left: 1.1em; display: grid; gap: 0.4em; font-size: 0.98em; }
.points li::marker { color: var(--gold); }
.layer-3 .sources { font-size: 0.76em; margin-top: 0.3em; }

@media (max-width: 760px), (orientation: portrait) {
  .stage { font-size: clamp(15px, 4.2vw, 40px); }
  .view { justify-content: flex-start; padding: 1.3em 16px 1.4em; gap: 0.6em; }
  .title { font-size: 1.85em; }
  .title-2 { font-size: 1.55em; }
  .lead { font-size: 1.05em; }
  .tiles, .items-two, .items-three { grid-template-columns: 1fr; }
  .items-three .item-name { font-size: 0.98em; }
  .items-three .item-text { font-size: 0.84em; }
  .tiles-1 { max-width: none; }
  .tile { min-height: 0; }
  .tiles-5 .tile-label { font-size: 1.12em; }
  .tiles-5 .tile-blurb { font-size: 0.86em; }
  .sources { font-size: 0.74em; }
  .chip { font-size: 0.66em; }
}

/* A tablet held upright, or a portrait display: still stacked top to bottom, but two boxes across. */
@media (orientation: portrait) and (min-width: 700px) {
  .stage { font-size: clamp(20px, 2.9vw, 60px); }
  .view { padding: 2em 2em 1.6em; }
  .tiles, .items-two, .items-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-1 { grid-template-columns: 1fr; }
}
/* A phone on its side: very little height, so the picture gives up its outer padding. */
@media (orientation: landscape) and (max-height: 480px) {
  .view { padding: 0.8em 2em 0.6em; gap: 0.45em; }
  .tiles { margin-top: 0.5em; }
  .tile { min-height: 0; }
}
