/* Shared responsive foundation for content pages. Keep page artwork rules local. */
:root {
  color-scheme: light;
  --color-page: #e9f8ff;
  --color-ink: #263e73;
  --color-accent: #5354cf;
  --color-accent-shadow: #343493;
  --color-card: rgb(255 255 255 / 88%);
  --layout-max: 72rem;
  --content-max: 35rem;
  --space-page: clamp(1rem, 4vw, 2rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
  color: var(--color-ink);
  background: var(--color-page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 4px solid #173f9a;
  outline-offset: 4px;
}

.app-shell {
  width: min(100%, var(--layout-max));
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: calc(var(--space-page) + var(--safe-top)) calc(var(--space-page) + var(--safe-right)) calc(var(--space-page) + var(--safe-bottom)) calc(var(--space-page) + var(--safe-left));
  display: grid;
  place-items: center;
}

/* Full-viewport stage for illustrated screens that need edge-to-edge artwork. */
.app-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
}

@media (pointer: coarse) and (max-height: 1000px) {
  .app-viewport.page {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    width: 100dvw;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .app-viewport.page .artboard {
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    height: 100%;
    margin: 0;
    aspect-ratio: auto;
  }
}

@media (display-mode: standalone) and (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  .app-viewport.page .artboard img { object-fit: cover; object-position: center; }
}

.content-card {
  width: min(100%, var(--content-max));
  padding: clamp(1.5rem, 6vw, 3.5rem);
  border: 4px solid #fff;
  border-radius: clamp(1.5rem, 5vw, 2rem);
  background: var(--color-card);
  box-shadow: 0 12px 32px rgb(52 112 156 / 20%);
  text-align: center;
}

.page-title {
  margin: 0 0 1rem;
  color: var(--color-accent);
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  text-wrap: balance;
}

.page-copy {
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  line-height: 1.55;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 999px;
  padding: .8rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--color-accent-shadow);
  cursor: pointer;
}

.button:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--color-accent-shadow); }

@media (max-width: 480px) {
  .content-card { padding: clamp(1.25rem, 7vw, 2rem); }
  .button { width: 100%; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .app-shell { place-items: start center; }
  .content-card { margin-block: auto; }
}

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