/* Tokens match insfetch/docs/brand (indigo + teal). No Instagram gradient or camera mark. */
:root {
  color-scheme: light;
  --if-brand: #4965e8;
  --if-accent: #007f69;
  --if-bg: #f6f8fc;
  --if-surface: #ffffff;
  --if-text: #172b3a;
  --if-muted: #546579;
  --if-line: #c5cedb;
  --if-on-brand: #ffffff;
  --bg: var(--if-bg);
  --surface: var(--if-surface);
  --ink: var(--if-text);
  --muted: var(--if-muted);
  --line: var(--if-line);
  --accent: var(--if-brand);
  --on-accent: var(--if-on-brand);
  --focus: var(--if-brand);
  --danger: #8f1d1d;
  --danger-bg: #fdecea;
  --danger-line: #eab3ad;
  --note-bg: #e7f6f2;
  /* Form-field edges keep 3:1 against surface and page (WCAG 1.4.11). */
  --field: #7b8aa0;
  --accent-hover: #3a55d6;
  --cta: linear-gradient(180deg, #4965e8, #3a55d6);
  --cta-shadow: 0 10px 24px -10px rgb(58 85 214 / 60%);
  --tint: rgb(73 101 232 / 9%);
  --soft-line: #e1e6ef;
  --glow-a: rgb(73 101 232 / 15%);
  --glow-b: rgb(0 127 105 / 9%);
  --shadow: 0 1px 2px rgb(23 43 58 / 6%);
  --shadow-lg: 0 1px 2px rgb(23 43 58 / 5%), 0 18px 40px -18px rgb(40 62 150 / 28%);
  --radius: 14px;
  --col: 42rem;
  --col-tool: 48rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --if-brand: #a5b4ff;
    --if-accent: #71d8ba;
    --if-bg: #101b2a;
    --if-surface: #19283b;
    --if-text: #f2f6fc;
    --if-muted: #aabbd0;
    --if-line: #526780;
    --if-on-brand: #101b2a;
    --danger: #ffb4ab;
    --danger-bg: #3a2428;
    --danger-line: #7a4046;
    --note-bg: #14332c;
    --field: #6f84a0;
    --accent-hover: #bcc7ff;
    --cta: linear-gradient(180deg, #b3c0ff, #97a8fb);
    --cta-shadow: 0 10px 24px -12px rgb(0 0 0 / 70%);
    --tint: rgb(165 180 255 / 12%);
    --soft-line: #2c3d53;
    --glow-a: rgb(165 180 255 / 13%);
    --glow-b: rgb(113 216 186 / 7%);
    --shadow: 0 1px 0 rgb(0 0 0 / 35%);
    --shadow-lg: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 22px 44px -22px rgb(0 0 0 / 70%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --if-brand: #a5b4ff;
  --if-accent: #71d8ba;
  --if-bg: #101b2a;
  --if-surface: #19283b;
  --if-text: #f2f6fc;
  --if-muted: #aabbd0;
  --if-line: #526780;
  --if-on-brand: #101b2a;
  --danger: #ffb4ab;
  --danger-bg: #3a2428;
  --danger-line: #7a4046;
  --note-bg: #14332c;
  --field: #6f84a0;
  --accent-hover: #bcc7ff;
  --cta: linear-gradient(180deg, #b3c0ff, #97a8fb);
  --cta-shadow: 0 10px 24px -12px rgb(0 0 0 / 70%);
  --tint: rgb(165 180 255 / 12%);
  --soft-line: #2c3d53;
  --glow-a: rgb(165 180 255 / 13%);
  --glow-b: rgb(113 216 186 / 7%);
  --shadow: 0 1px 0 rgb(0 0 0 / 35%);
  --shadow-lg: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 22px 44px -22px rgb(0 0 0 / 70%);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--ink);
  font: 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(56rem 26rem at 50% -6rem, var(--glow-a), transparent 70%),
    radial-gradient(34rem 20rem at 92% 2rem, var(--glow-b), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
img { max-width: 100%; }
h1, h2, p { overflow-wrap: anywhere; }
h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem); line-height: 1.08; font-weight: 800;
  letter-spacing: -0.035em; margin: 0 0 0.75rem; text-wrap: balance;
}
h2 { font-size: 1.375rem; line-height: 1.3; font-weight: 720; letter-spacing: -0.015em; margin: 2.5rem 0 0.75rem; }
p { margin: 0.5rem 0; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip {
  position: absolute; left: 0.5rem; top: -3rem; background: var(--surface); color: var(--ink);
  padding: 0.5rem 0.75rem; border-radius: 8px; z-index: 2;
}
.skip:focus { top: 0.5rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.shell { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
.meta, .hint, .kicker { color: var(--muted); }
.kicker { font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0; }

/* Header */
.topbar { border-bottom: 1px solid var(--soft-line); }
.topbar__grid {
  display: grid;
  grid-template-areas: "brand menu theme" "nav nav nav";
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-height: 4rem;
}
.brand {
  grid-area: brand; display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px;
  color: inherit; text-decoration: none; font-weight: 760; font-size: 1.125rem; letter-spacing: -0.015em;
}
.brand__mark {
  width: 30px; height: 30px; flex: none;
  background: var(--if-brand);
  -webkit-mask: url("/static/icons/logo.svg") center / contain no-repeat;
  mask: url("/static/icons/logo.svg") center / contain no-repeat;
}
.ico {
  width: 1.15rem; height: 1.15rem; flex: none; display: inline-block;
  background: currentColor;
  -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat;
  mask-position: center; mask-size: contain; mask-repeat: no-repeat;
}
.ico-paste { -webkit-mask-image: url("/static/icons/paste.svg"); mask-image: url("/static/icons/paste.svg"); }
.ico-clear { -webkit-mask-image: url("/static/icons/clear.svg"); mask-image: url("/static/icons/clear.svg"); }
.ico-download { -webkit-mask-image: url("/static/icons/download.svg"); mask-image: url("/static/icons/download.svg"); }
.ico-download-all { -webkit-mask-image: url("/static/icons/download-all.svg"); mask-image: url("/static/icons/download-all.svg"); }
.ico-video { -webkit-mask-image: url("/static/icons/video.svg"); mask-image: url("/static/icons/video.svg"); }
.ico-retry { -webkit-mask-image: url("/static/icons/retry.svg"); mask-image: url("/static/icons/retry.svg"); }
.ico-link { -webkit-mask-image: url("/static/icons/link.svg"); mask-image: url("/static/icons/link.svg"); }
.ico-help { -webkit-mask-image: url("/static/icons/help.svg"); mask-image: url("/static/icons/help.svg"); }
.ico-lock { -webkit-mask-image: url("/static/icons/lock.svg"); mask-image: url("/static/icons/lock.svg"); }
.ico-external { -webkit-mask-image: url("/static/icons/external-link.svg"); mask-image: url("/static/icons/external-link.svg"); }
.nav-toggle { grid-area: menu; }
.theme-toggle { grid-area: theme; }
.nav-toggle, .theme-toggle { background: transparent; border-color: var(--soft-line); font-size: 0.9375rem; font-weight: 560; padding-inline: 0.75rem; white-space: nowrap; }
.site-nav { grid-area: nav; display: none; flex-direction: column; gap: 0.125rem; padding-bottom: 0.75rem; }
.site-nav.is-open { display: flex; }
.site-nav a {
  min-height: 44px; min-width: 2rem; padding-inline: 0.75rem; display: flex; align-items: center;
  border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 560;
}
.site-nav a:hover { color: var(--ink); background: var(--tint); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--tint); font-weight: 680; }

/* Hero + tool */
main { flex: 1 0 auto; padding: clamp(1.75rem, 5vw, 4rem) 0 4rem; }
.tool, .supported { max-width: var(--col-tool); margin-inline: auto; }
.tool > h1, .tool > .lede { text-align: center; margin-inline: auto; }
.tool > .lede { max-width: 38rem; color: var(--muted); font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem); text-wrap: pretty; }
.tool__form, .page-head, .result {
  background: var(--surface); border: 1px solid var(--soft-line); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.tool__form { padding: clamp(1rem, 3.5vw, 1.75rem); margin-top: clamp(1.25rem, 3vw, 2rem); }
.page-head { max-width: var(--col); margin-inline: auto; padding: clamp(1.25rem, 3vw, 2rem); }
.lede { font-size: 1.0625rem; max-width: 42rem; }
label { display: block; font-weight: 650; margin: 1rem 0 0.4rem; }
.tool__form label { margin: 0 0 0.625rem; font-size: 1rem; }
/* Phones: field, then Paste/Clear, then Get files on its own row. The link icon is a grid item over the field. */
.tool__controls { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0.625rem 0.5rem; align-items: center; }
.tool__controls::before {
  content: ""; grid-row: 1; grid-column: 1; z-index: 1; margin-left: 1rem; width: 1.25rem; height: 1.25rem;
  pointer-events: none; background: var(--muted);
  -webkit-mask: url("/static/icons/link.svg") center / contain no-repeat;
  mask: url("/static/icons/link.svg") center / contain no-repeat;
}
.tool__controls input { grid-row: 1; grid-column: 1 / -1; min-width: 0; min-height: 58px; padding-left: 3rem; font-size: 1.0625rem; }
#dl-paste { grid-row: 2; grid-column: 1; }
#dl-clear { grid-row: 2; grid-column: 2; }
#dl-submit, #dl-cancel { grid-row: 3; grid-column: 1 / -1; }
input, .btn, .theme-toggle, .nav-toggle {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
input { min-height: 52px; padding: 0 1rem; width: 100%; background: var(--bg); border: 1.5px solid var(--field); }
input:hover { border-color: var(--accent); }
input:focus-visible { outline-offset: 1px; border-color: var(--accent); background: var(--surface); }
input::placeholder { color: var(--muted); opacity: 1; }
.btn, .theme-toggle, .nav-toggle {
  min-height: 44px; min-width: 44px; padding: 0.45rem 1rem; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-weight: 600; line-height: 1.2; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover, .theme-toggle:hover, .nav-toggle:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 680; }
.btn--primary:hover { background: var(--accent-hover); border-color: transparent; }
.btn--ghost { background: transparent; }
.tool__controls .btn { min-height: 48px; }
/* Get files is the one call to action: taller, larger type, a gradient and a lift. */
#dl-submit, #dl-cancel { min-height: 60px; font-size: 1.125rem; font-weight: 760; letter-spacing: -0.005em; border-radius: 14px; }
#dl-submit { background: var(--cta); box-shadow: var(--cta-shadow); }
#dl-submit .ico { width: 1.35rem; height: 1.35rem; }
#dl-submit:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
#dl-submit:disabled { box-shadow: none; }
.hint { min-height: 1.25rem; font-size: 0.875rem; }
.tool__form .hint { margin: 0.5rem 0 0; }
/* Only typing fills the hint, so an empty one takes no room (input-driven shifts are exempt from CLS). */
.tool__form .hint:empty { min-height: 0; margin: 0; }
.status { margin: 1rem 0 0; font-weight: 560; }
.status:empty { margin: 0; }
.skeleton {
  display: grid; gap: 0.75rem; margin-top: 1rem;
}
.skeleton span {
  display: block; height: 7.5rem; border-radius: 16px;
  background: linear-gradient(100deg, var(--soft-line) 30%, var(--surface) 50%, var(--soft-line) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }
.alert, .help, .note { border-radius: 14px; padding: 0.875rem 1.125rem; margin-top: 1rem; }
.alert { background: var(--danger-bg); border: 1px solid var(--danger-line); }
.alert__title { color: var(--danger); font-weight: 680; margin-top: 0; display: flex; gap: 0.5rem; align-items: flex-start; }
.alert__title::before {
  content: ""; flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; background: currentColor;
  -webkit-mask: url("/static/icons/error.svg") center / contain no-repeat;
  mask: url("/static/icons/error.svg") center / contain no-repeat;
}
.help, .note { background: var(--note-bg); border-left: 3px solid var(--if-accent); }
.help__title { font-weight: 650; margin-top: 0; }
.help__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.help__link { flex: 1 1 12rem; min-width: 0; }
.alert__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

/* Result */
.result { margin-top: 1rem; padding: clamp(1rem, 3vw, 1.5rem); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }
.result__head { flex: 1 1 16rem; min-width: 0; }
.result > .btn { flex: none; }
.result__list, .result__note { flex: 1 1 100%; }
.result__title { font-size: 1.25rem; margin: 0; }
.result__meta { margin: 0.25rem 0 0; font-size: 0.875rem; }
.result__missing { color: var(--danger); font-weight: 650; }
.btn.is-busy, .btn:disabled { opacity: 0.72; cursor: not-allowed; }
.result__caption, .item__file { color: var(--muted); overflow-wrap: anywhere; }
.result__caption { margin: 0.25rem 0 0; }
.result__caption summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink); }
.result__list {
  list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.625rem;
}
.result > .btn--ghost { margin-top: 0.25rem; }
.item {
  display: flex; gap: 0.875rem; align-items: center; min-width: 0;
  border: 1px solid var(--soft-line); border-radius: 16px; padding: 0.5rem; background: var(--bg);
}
.item.is-failed { border-color: var(--danger-line); }
.item__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.2rem; padding: 0 0.25rem 0.25rem; }
.item__label { font-weight: 680; margin: 0; font-size: 0.9375rem; }
.item__file {
  margin: 0 0 0.375rem; font-size: 0.8125rem; line-height: 1.4; word-break: break-all;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.item__fail { color: var(--danger); margin: 0.25rem 0; font-size: 0.875rem; }
.item .btn { width: 100%; margin-top: auto; padding-inline: 0.5rem; font-size: 0.9375rem; white-space: nowrap; }
.item .btn + .btn, .item__fail + .btn { margin-top: 0.375rem; }
.thumb {
  width: 5.75rem; flex: none; aspect-ratio: 4 / 5; border-radius: 12px; background: var(--soft-line); position: relative; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item.is-failed .thumb img { visibility: hidden; }
.thumb__play {
  position: absolute; left: 0.4rem; bottom: 0.4rem; background: var(--surface); color: var(--ink);
  border-radius: 999px; font-size: 0.75rem; font-weight: 650; line-height: 1; padding: 0.3rem 0.5rem;
  display: inline-flex; align-items: center; gap: 0.25rem; box-shadow: var(--shadow);
}
.thumb__play .ico { width: 0.85rem; height: 0.85rem; }
/* Phones: one row per file. Wider screens: a card grid; a single file stays one wide row. */
.item__body { padding: 0.25rem 0.25rem 0.25rem 0; }
.item:only-child { grid-column: 1 / -1; }
.item:only-child .thumb { width: clamp(5.75rem, 28%, 9rem); }

/* Supported links + prose */
.prose { max-width: var(--col); margin-inline: auto; }
.supported {
  margin-top: 2.5rem; padding: 1.25rem 1.5rem; border: 1px solid var(--soft-line); border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow);
}
.supported h2 { margin: 0 0 0.75rem; font-size: 1.125rem; }
.supported ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.supported li { position: relative; padding-left: 1.75rem; }
.supported li::before {
  content: ""; position: absolute; left: 0.35rem; top: 0.3rem; width: 0.4rem; height: 0.75rem;
  border: solid var(--if-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.supported li.is-no { color: var(--muted); }
.supported li.is-no::before { border: 0; background: var(--muted); height: 2.5px; width: 0.75rem; top: 0.75rem; left: 0.2rem; transform: none; }
.supported .hint { margin: 0.875rem 0 0; padding-top: 0.875rem; border-top: 1px solid var(--soft-line); }
.prose { margin-top: 2.5rem; font-size: 1.0625rem; }
.prose > h2:first-child, .prose > .note:first-child { margin-top: 0; }
.prose li { margin: 0.35rem 0; }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.35rem; }
.prose li::marker { color: var(--muted); }
.note { font-size: 1rem; }
.note p { margin: 0; }
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0.75rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.75rem; min-height: 1.9rem; margin: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.9rem; height: 1.9rem;
  border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 0.875rem; font-weight: 720;
}
.link-list, .related ul, .footer__nav { display: flex; flex-wrap: wrap; padding: 0; list-style: none; }
.link-list, .related ul { gap: 0.5rem; margin: 1.5rem 0 0; }
.link-list a, .related a {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--soft-line); background: var(--surface); color: var(--ink);
  text-decoration: none; font-size: 0.9375rem; font-weight: 560;
}
.link-list a:hover, .related a:hover { border-color: var(--accent); color: var(--accent); }
.link-list li, .related li { margin: 0; }
.prose .related ul { margin-top: 0; padding: 0; }
.faq h2 { margin-bottom: 1rem; }
.faq details {
  border: 1px solid var(--soft-line); border-radius: 14px; background: var(--surface); margin: 0.5rem 0;
}
.faq summary {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 1.125rem; cursor: pointer; font-weight: 620; list-style: none; border-radius: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.55rem; height: 0.55rem; margin-right: 0.25rem;
  border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 1.125rem 1rem; color: var(--muted); }
.prose > .meta { margin-top: 2rem; font-size: 0.875rem; }

/* Footer */
.footer { border-top: 1px solid var(--soft-line); padding: 2rem 0 2.5rem; background: var(--surface); font-size: 0.9375rem; }
.footer .shell { display: grid; gap: 0.25rem 2rem; }
.footer p { margin: 0; color: var(--muted); }
.footer__nav { gap: 0 1.25rem; margin: 0 0 0.5rem; }
.footer__nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-weight: 560; }
.footer__nav a:hover { color: var(--accent); text-decoration: underline; }
/* The GA footer settings widget (ga.css) spans the footer grid so it stays centred. */
.footer .shell > .ga-consent-widget { grid-column: 1 / -1; margin-top: 1rem; }

@media (min-width: 560px) {
  /* Paste and Clear sit inside the right end of the field; Get files stands beside it. */
  .tool__controls { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0; }
  .tool__controls input { grid-column: 1 / 4; min-height: 64px; font-size: 1.125rem; padding-right: 7.25rem; border-radius: 14px; }
  .tool__controls:has(#dl-clear:not([hidden])) input { padding-right: 13.5rem; }
  #dl-paste, #dl-clear {
    grid-row: 1; z-index: 1; min-height: 44px; margin-right: 0.5rem; padding-inline: 0.8rem;
    background: var(--tint); border-color: transparent; font-size: 0.9375rem;
  }
  #dl-paste { grid-column: 2; }
  #dl-clear { grid-column: 3; margin-left: -0.125rem; }
  #dl-paste:hover, #dl-clear:hover { border-color: var(--accent); }
  #dl-submit, #dl-cancel { grid-row: 1; grid-column: 4; margin-left: 0.75rem; min-height: 64px; min-width: 11rem; padding-inline: 1.5rem; }
  .result__list, .skeleton { grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr)); gap: 0.75rem; }
  .skeleton span { height: auto; aspect-ratio: 4 / 5; }
  .item:not(:only-child) { flex-direction: column; align-items: stretch; gap: 0.625rem; }
  .item:not(:only-child) .thumb { width: 100%; }
  .item:not(:only-child) .item__body { padding: 0 0.25rem 0.25rem; }
  .item:only-child .item__body { justify-content: center; }
  .item:only-child .btn { width: auto; min-width: 12rem; align-self: flex-start; margin-top: 0.25rem; padding-inline: 1.25rem; }
}

@media (min-width: 880px) {
  .topbar__grid { grid-template-areas: "brand nav theme"; grid-template-columns: auto 1fr auto; column-gap: 1.5rem; }
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: flex; flex-flow: row wrap; justify-content: flex-end; gap: 0.25rem; padding: 0; }
  .footer .shell { grid-template-columns: 1fr auto; grid-template-areas: "text nav" "meta nav"; align-items: center; }
  .footer .shell > p:not(.meta) { grid-area: text; }
  .footer .meta { grid-area: meta; }
  .footer__nav { grid-area: nav; margin: 0; }
}

@media (max-width: 379px) {
  .brand { font-size: 1.0625rem; gap: 0.45rem; }
  .brand__mark { width: 26px; height: 26px; }
  .nav-toggle, .theme-toggle { padding-inline: 0.6rem; font-size: 0.875rem; }
  .tool__controls input { font-size: 1rem; padding-left: 2.625rem; padding-right: 0.75rem; }
  .tool__controls::before { margin-left: 0.8rem; width: 1.125rem; height: 1.125rem; }
  .item { gap: 0.75rem; }
  .thumb, .item:only-child .thumb { width: 4.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
