/* Functional foundation. Direction fonts and colours live in their own files. */
* { box-sizing: border-box; }
html { font-synthesis: none; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, figure, ol, dl, dd { margin: 0; }
.error-page h1 + p, .error-page h2 + p { margin-top: 16px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; max-width: 100%; }
h1, h2, h3, p, dt, dd, button, figcaption { overflow-wrap: anywhere; }
:focus-visible, video:focus, video:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 8px; left: 16px; padding: 12px 16px; z-index: 10; color: var(--ink); background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.container { width: calc(100% - 192px); max-width: 1248px; margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-size: 20px; line-height: 24px; font-weight: 600; }
.languages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.languages button, .languages a { text-decoration: none; min-width: 44px; min-height: 44px; border: 2px solid transparent; background: transparent; padding: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.languages button[aria-pressed="true"], .languages a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.category { font-size: 14px; line-height: 20px; }
.feature { margin-top: 8px; }
.actions { display: grid; gap: 8px; }
.action { min-width: 0; min-height: 52px; padding: 4px 12px; border: 2px solid var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 16px; line-height: 20px; font-weight: 600; text-align: center; text-decoration: none; }
.action-primary { color: var(--paper); background: var(--accent); }
.action-secondary { color: var(--accent); background: var(--paper); }
.action-primary[href]:hover > span:first-child { text-decoration: underline; }
.action-secondary[href]:hover { background: var(--hover); }
.action[href]:active { outline: 2px solid currentColor; outline-offset: -6px; }
.action.is-pending { border-style: dashed; }
.pending-status { font-size: 14px; line-height: 20px; font-weight: 400; }
.destination-help, .config-error { font-size: 14px; line-height: 20px; margin-top: 8px; }
.destination-help > span { display: block; }
.no-script { padding-block: 12px; font-size: 14px; line-height: 20px; }
.photo-slot { min-width: 0; }
.photo-frame { position: relative; }
.photo-placeholder { width: 100%; height: auto; background: var(--photo-surface); outline: 2px solid var(--accent); outline-offset: -2px; }
.photo-placeholder path { stroke: var(--accent); stroke-width: 2px; fill: none; }
.photo-frame picture, .photo-frame img { display: block; width: 100%; height: 100%; }
.photo-frame picture { position: absolute; inset: 0; }
.photo-frame img { object-fit: cover; }
.photo-frame.has-photo .photo-placeholder { visibility: hidden; }
.photo-slot figcaption { margin-top: 12px; font-size: 14px; line-height: 20px; }
.photo-slot figcaption p + p { margin-top: 4px; }
.photo-label { position: absolute; top: 24px; left: 24px; right: 24px; font-size: 14px; line-height: 20px; font-weight: 600; background: var(--photo-surface); }
.photo-frame.has-photo .photo-label { display: none; }
.photo-caption { margin-top: 12px !important; }
.photo-error { font-weight: 600; }
.photo-slot.has-photo .photo-orientation,
.photo-slot.has-photo .photo-kind,
.photo-slot.has-photo .photo-pending { display: none; }
/* Text remains legible before JS, throughout entry motion, and on failure. */
@keyframes title-a { from { transform: translateY(8px); } to { transform: none; } }
@keyframes photo-a { from { opacity: .94; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes title-b { from { opacity: .96; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes photo-b { from { opacity: .96; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tip-b { from { transform: translateY(6px); } to { transform: none; } }
.direction-a .motion-title { animation: title-a 220ms ease-out; }
.direction-a .motion-photo { animation: photo-a 320ms ease-out; }
.direction-a .motion-heading { animation: title-a 220ms ease-out; }
.direction-b .motion-title { animation: title-b 300ms ease-out; }
.direction-b .motion-photo { animation: photo-b 380ms ease-out; }
.direction-b .motion-heading { animation: title-b 260ms ease-out; }
.direction-b .motion-tip-heading { animation: tip-b 260ms ease-out; }
html[data-preview] *, html[data-preview] *::before, html[data-preview] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (max-width: 1311px) { .container { width: calc(100% - 64px); } }
@media (max-width: 959px) { .container { max-width: 640px; } }
@media (max-width: 599px) {
  .container { width: calc(100% - 40px); }
  .brand { font-size: 18px; }
  .category { font-size: 13px; }
  .photo-slot figcaption { margin-top: 8px; }
  .photo-label { top: 16px; left: 16px; right: 16px; }
}
@media (max-width: 359px) { .container { width: calc(100% - 32px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.current-language { display: block; font-size: 14px; line-height: 20px; font-weight: 400; }
