/* Fablori for agencies: a white-cube wall and a contact sheet, marked in grease pencil. */
:root {
  --sc-canvas: #F4F4F2;
  --sc-surface: #FFFFFF;
  --sc-ink: #111214;
  --sc-ink-soft: #54565B;
  --sc-accent: #C9221B;
  --sc-accent-ink: #FFFFFF;
  --sc-font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --sc-font-text: "Schibsted Grotesk", system-ui, sans-serif;
  --sc-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --sc-hairline: rgba(17, 18, 20, 0.14);
  --sc-hairline-strong: rgba(17, 18, 20, 0.32);
  --sc-shadow-color: 40 6% 30%;
  --ag-bar: 60px;
  --ag-rule: 1px solid var(--sc-hairline);
  --ag-rule-ink: 1px solid var(--sc-ink);
  --ag-r: 2px;
}
html { scroll-padding-top: var(--ag-bar); }
body { background: var(--sc-canvas); color: var(--sc-ink); }
:focus-visible { border-radius: var(--ag-r); }

.ag-mono {
  font-family: var(--sc-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sc-ink-soft);
  margin: 0;
}
.ag-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ag-skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--sc-ink); color: #fff; padding: 0.6rem 0.9rem; }
.ag-skip:focus { top: 0.6rem; }

.ag-h2 {
  font-family: var(--sc-font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.4rem + 1.9vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}
.ag-body { color: var(--sc-ink-soft); max-width: 52ch; text-wrap: pretty; margin: 0; }

/* buttons and links */
.ag-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.25rem;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  border: 0; border-radius: var(--ag-r);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.12), 0 6px 14px -8px rgba(120, 20, 15, 0.55);
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out);
}
.ag-btn:hover { background: #B01C16; }
.ag-btn:active { transform: translateY(1px); }
.ag-btn--ink { background: var(--sc-ink); box-shadow: none; }
.ag-btn--ink:hover { background: #2A2C30; }
.ag-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.ag-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--sc-ink); font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--sc-hairline-strong); text-underline-offset: 0.25em;
  min-height: 44px;
}
.ag-link:hover { text-decoration-color: var(--sc-accent); }
.ag-link svg { width: 1.05em; height: 1.05em; }

/* ------------------------------------------------------------- the bar -- */
.ag-bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  height: var(--ag-bar);
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0 var(--sc-gutter);
  background: rgba(244, 244, 242, 0.96);
  border-bottom: var(--ag-rule);
}
.ag-bar__home { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; color: var(--sc-ink); flex: none; min-height: 44px; }
.ag-bar__mark { width: 28px; height: 24px; }
.ag-strip { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
.ag-strip__list {
  list-style: none; margin: 0; padding: 0 0.5rem; height: 100%;
  display: flex; align-items: center; gap: 0.35rem;
  overflow-x: auto; scrollbar-width: none; position: relative;
}
.ag-strip__list::-webkit-scrollbar { display: none; }
.ag-strip__gap { width: 1px; height: 26px; background: var(--sc-hairline-strong); margin: 0 0.6rem; flex: none; }
.ag-thumb, .ag-word {
  position: relative; display: flex; align-items: center; gap: 0.45rem;
  height: 44px; padding: 0 0.4rem; flex: none;
  text-decoration: none; color: var(--sc-ink-soft);
  font-size: 0.8rem; font-weight: 500;
}
.ag-thumb img { width: 34px; height: 34px; object-fit: cover; border: 1px solid var(--sc-ink); background: #ddd; filter: grayscale(1) contrast(1.05); transition: filter 200ms var(--sc-ease-out); }
.ag-thumb span { display: none; }
.ag-thumb:hover img, .ag-thumb.is-on img { filter: none; }
.ag-thumb.is-on span, .ag-word.is-on { color: var(--sc-ink); }
@media (min-width: 1180px) { .ag-thumb.is-on span { display: inline; } }
.ag-word { font-size: 0.86rem; padding: 0 0.6rem; }
.ag-word:hover, .ag-thumb:hover { color: var(--sc-ink); }
.ag-strip__ring {
  position: absolute; left: 0; top: 0; width: 60px; height: 50px;
  color: var(--sc-accent); pointer-events: none; opacity: 0;
  transition: transform 260ms var(--sc-ease-out), width 0ms, opacity 200ms;
}
.ag-strip__ring.is-on { opacity: 1; }

/* -------------------------------------------------------------- the wall -- */
.ag-wall { background: var(--sc-canvas); }
.ag-wall__stage {
  display: flex; align-items: center;
  padding-top: var(--ag-bar);
  background:
    linear-gradient(to bottom, transparent calc(100% - 9vh), rgba(17,18,20,0.035) calc(100% - 9vh), rgba(17,18,20,0.035) 100%),
    var(--sc-canvas);
}
/* back plane: the sheet's edge print, travelling slower than the frames */
.ag-wall__edge {
  position: absolute; left: 0; top: calc(var(--ag-bar) + 2.2vh);
  display: flex; gap: 7.5rem; white-space: nowrap;
  font-family: var(--sc-font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  color: rgba(17,18,20,0.32);
  padding-left: var(--sc-gutter);
  will-change: transform;
}
.ag-wall__edge::after { content: ""; position: absolute; left: 0; right: 0; top: 1.5rem; border-top: 1px dashed rgba(17,18,20,0.18); }
.ag-rail {
  position: relative;
  align-items: flex-start; gap: clamp(2.5rem, 5vw, 5.5rem);
  padding: 0 var(--sc-gutter);
  margin-top: 1vh;
}
.ag-intro { flex: none; width: min(40rem, 86vw); padding-top: 4vh; }
.ag-intro__for { color: var(--sc-ink); }
.ag-intro__for::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; background: var(--sc-accent); border-radius: 50%; margin-right: 0.55rem; vertical-align: 0.02em; }
.ag-intro__h {
  font-family: var(--sc-font-display); font-weight: 600;
  font-size: clamp(2.2rem, 1.4rem + 2.1vw, 3.3rem);
  line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance;
  margin: 1.1rem 0 0;
}
.ag-intro__sub { margin: 1.2rem 0 0; font-size: 1.12rem; line-height: 1.5; color: var(--sc-ink-soft); max-width: 40ch; text-wrap: pretty; }
.ag-intro__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin: 2rem 0 0; }

.ag-obj { flex: none; margin: 0; display: flex; flex-direction: column; }
.ag-obj__frame {
  position: relative; background: #1b1c1f;
  border: 1px solid var(--sc-ink);
  box-shadow: 0 2px 3px hsl(var(--sc-shadow-color) / 0.16), 0 18px 34px -18px hsl(var(--sc-shadow-color) / 0.55);
  will-change: transform;
}
.ag-hold { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: opacity 300ms var(--sc-ease-out); pointer-events: none; }
.ag-hold.is-off { opacity: 0; }
.ag-obj__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ag-obj--wide .ag-obj__frame { height: 36vh; aspect-ratio: 16 / 9; }
.ag-obj--tall .ag-obj__frame { height: 50vh; aspect-ratio: 9 / 16; }
.ag-obj--wide { width: calc(36vh * 16 / 9); }
.ag-obj--tall { width: max(calc(50vh * 9 / 16), 19rem); }
.ag-obj.is-playing .ag-obj__frame { outline: 2px solid var(--sc-accent); outline-offset: 5px; }

.ag-label {
  position: relative; margin-top: 1.1rem; max-width: 26rem;
  background: var(--sc-surface); border: var(--ag-rule);
  padding: 0.9rem 1rem 0.6rem;
  box-shadow: 0 1px 2px hsl(var(--sc-shadow-color) / 0.12);
  will-change: transform;
}
.ag-label__kind { margin: 0; font-family: var(--sc-font-mono); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sc-ink); display: flex; gap: 0.6rem; align-items: baseline; }
.ag-label__kind span { color: var(--sc-ink-soft); }
.ag-label__title { margin: 0.35rem 0 0; font-size: 1.12rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.ag-label__spec { margin: 0.25rem 0 0; font-family: var(--sc-font-mono); font-size: 0.74rem; color: var(--sc-ink-soft); }
.ag-label__head { margin: 0.8rem 0 0; padding-top: 0.6rem; border-top: var(--ag-rule); font-family: var(--sc-font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sc-ink-soft); }
.ag-label__brief { margin: 0.3rem 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--sc-ink); text-wrap: pretty; }
.ag-label__brief::before { content: "\201C"; }
.ag-label__brief::after { content: "\201D"; }
.ag-label__note { margin: 0.4rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--sc-ink-soft); }
.ag-label__acts { margin: 0.5rem 0 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: var(--ag-rule); padding-top: 0.2rem; }
.ag-label__acts a { font-size: 0.86rem; font-weight: 600; color: var(--sc-accent); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.ag-label__acts a:hover { text-decoration: underline; }
.ag-sound {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; padding: 0 0.3rem;
  background: none; border: 0; cursor: pointer; font-size: 0.8rem; color: var(--sc-ink-soft);
}
.ag-sound svg { width: 18px; height: 18px; }
.ag-sound:hover, .ag-sound[aria-pressed="true"] { color: var(--sc-ink); }
.ag-wallend { flex: none; width: 15rem; align-self: center; border-left: var(--ag-rule-ink); padding: 0.4rem 0 0.4rem 1.2rem; }
.ag-wallend p:last-child { margin: 0.5rem 0 0; color: var(--sc-ink-soft); }

/* ------------------------------------------------------------- the hush -- */
.ag-hush { padding: clamp(6rem, 22vh, 14rem) 0 clamp(3rem, 8vh, 6rem); }
.ag-hush__h { margin: 0; font-weight: 500; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); letter-spacing: -0.03em; }

/* --------------------------------------------------------- the week -- */
.ag-week { padding: 0 0 clamp(4rem, 10vh, 8rem); }
.ag-week__wrap { display: grid; grid-template-columns: minmax(19rem, 23rem) 1fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
.ag-roster { position: sticky; top: calc(var(--ag-bar) + 1.5rem); display: grid; gap: 1.5rem; }
.ag-roster__intro { display: grid; gap: 0.8rem; }
.ag-kinds { border: 0; margin: 0; padding: 0; }
.ag-kinds legend { margin-bottom: 0.6rem; }
.ag-kinds__list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ag-chip { position: relative; }
.ag-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ag-chip span {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; padding: 0 0.75rem;
  border: 1px solid var(--sc-hairline-strong); background: var(--sc-surface); border-radius: var(--ag-r);
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: border-color 140ms var(--sc-ease-out), background-color 140ms var(--sc-ease-out);
}
.ag-chip span svg { width: 15px; height: 15px; color: var(--sc-accent); display: none; }
.ag-chip input:checked + span { border-color: var(--sc-ink); }
.ag-chip input:checked + span svg { display: block; }
.ag-chip input:focus-visible + span { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.ag-chip:hover span { border-color: var(--sc-ink); }
.ag-add { display: grid; gap: 0.5rem; }
.ag-add__row { display: flex; gap: 0.4rem; }
.ag-add input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 0.8rem;
  border: 1px solid var(--sc-hairline-strong); border-radius: var(--ag-r); background: var(--sc-surface);
  font-size: 0.95rem;
}
.ag-add input:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 1px; border-color: var(--sc-ink); }
.ag-add input::placeholder { color: #75777C; }
.ag-per { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ag-per__ctl { display: inline-flex; align-items: center; border: 1px solid var(--sc-hairline-strong); background: var(--sc-surface); border-radius: var(--ag-r); }
.ag-per__ctl button { width: 44px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.ag-per__ctl button:hover { background: var(--sc-canvas); }
.ag-per__ctl button[disabled] { color: #A7A9AD; cursor: default; background: none; }
.ag-per__ctl output { min-width: 2rem; text-align: center; font-family: var(--sc-font-mono); font-weight: 500; }

.ag-ledger { background: var(--sc-surface); border: var(--ag-rule-ink); padding: 1rem 1.1rem 0.9rem; }
.ag-ledger__sum { margin: 0.45rem 0 0.7rem; font-size: 0.95rem; line-height: 1.45; }
.ag-ledger__sum b { font-weight: 600; }
.ag-ledger__t { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ag-ledger__t thead th { font-family: var(--sc-font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sc-ink-soft); font-weight: 400; text-align: right; padding: 0 0 0.35rem; }
.ag-ledger__t thead th:first-child { text-align: left; }
.ag-ledger__t tbody th { text-align: left; font-weight: 600; padding: 0.55rem 0; border-top: var(--ag-rule); }
.ag-ledger__t tbody th small { display: block; font-weight: 400; font-size: 0.76rem; color: var(--sc-ink-soft); }
.ag-ledger__t td { text-align: right; font-family: var(--sc-font-mono); font-variant-numeric: tabular-nums; border-top: var(--ag-rule); padding-left: 0.6rem; white-space: nowrap; }
.ag-ledger__t tr.is-best td[data-k="each"] { position: relative; color: var(--sc-accent); font-weight: 500; }
.ag-ledger__t tr.is-best td[data-k="each"] svg { position: absolute; right: -0.55rem; top: 50%; width: calc(100% + 0.6rem); height: 2.4rem; translate: 0 -50%; color: var(--sc-accent); pointer-events: none; }
.ag-ledger__fine { margin: 0.6rem 0 0; font-size: 0.76rem; color: var(--sc-ink-soft); }

.ag-board { min-width: 0; }
.ag-board__status { margin: 0 0 0.6rem; min-height: 1.4em; font-family: var(--sc-font-mono); font-size: 0.75rem; color: var(--sc-ink-soft); }
.ag-board__days { border-top: var(--ag-rule-ink); }
.ag-day { display: grid; grid-template-columns: 4.2rem 1fr; border-bottom: var(--ag-rule); }
.ag-day__name { padding: 1rem 0; font-family: var(--sc-font-mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.ag-day__cards { display: grid; gap: 0; min-width: 0; }
.ag-day__open { padding: 1rem 0; color: var(--sc-ink-soft); font-size: 0.9rem; margin: 0; }
.ag-card { display: grid; grid-template-columns: minmax(12rem, 15rem) 1fr; gap: 1.2rem; padding: 1rem 0; min-width: 0; }
.ag-card + .ag-card { border-top: 1px dashed var(--sc-hairline); }
.ag-card.is-new { animation: ag-in 420ms var(--sc-ease-out) both; }
@keyframes ag-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ag-card__meta { min-width: 0; }
.ag-card__kind { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.ag-card__x { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--sc-ink-soft); margin: -6px -6px -6px 0; }
.ag-card__x:hover { color: var(--sc-ink); }
.ag-card__x svg { width: 16px; height: 16px; }
.ag-card__title { margin: 0.2rem 0 0; font-size: 1.02rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.ag-card__brief {
  field-sizing: content; max-height: 14rem;
  display: block; width: 100%; margin-top: 0.5rem; resize: vertical; min-height: 5.6rem;
  border: var(--ag-rule); border-radius: var(--ag-r); background: var(--sc-surface); padding: 0.5rem 0.6rem;
  font-size: 0.82rem; line-height: 1.45;
}
.ag-card__brief:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 1px; }
.ag-card__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.9rem; margin-top: 0.35rem; }
.ag-card__acts button, .ag-card__acts a { min-height: 40px; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.84rem; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.ag-card__acts button { color: var(--sc-ink); text-decoration: underline; text-decoration-color: var(--sc-hairline-strong); text-underline-offset: 0.22em; }
.ag-card__acts button[disabled] { color: var(--sc-ink-soft); text-decoration: none; cursor: default; }
.ag-card__acts a { color: var(--sc-accent); }
.ag-card__acts a svg { width: 1em; height: 1em; }
.ag-card__say { margin: 0.2rem 0 0; font-family: var(--sc-font-mono); font-size: 0.72rem; color: var(--sc-ink-soft); min-height: 1.2em; }

.ag-frames { min-width: 0; }
.ag-frames__title { margin: 0 0 0.5rem; font-size: 0.86rem; font-weight: 600; display: flex; gap: 0.7rem; align-items: baseline; flex-wrap: wrap; }
.ag-frames__title span { font-family: var(--sc-font-mono); font-size: 0.72rem; font-weight: 400; color: var(--sc-ink-soft); }
.ag-frames__row { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.3rem; }
.ag-fr { flex: none; width: 6.4rem; }
.ag-fr__img { position: relative; aspect-ratio: 3 / 4; background: #E6E6E3; border: 1px solid var(--sc-ink); overflow: hidden; }
.ag-fr__img img { width: 100%; height: 100%; object-fit: cover; }
.ag-fr__n { position: absolute; left: 0; top: 0; background: var(--sc-surface); font-family: var(--sc-font-mono); font-size: 0.66rem; padding: 0 0.3rem; border-right: 1px solid var(--sc-ink); border-bottom: 1px solid var(--sc-ink); }
.ag-fr__w { margin: 0.35rem 0 0; font-size: 0.76rem; line-height: 1.3; font-weight: 600; }
.ag-fr__s { margin: 0.1rem 0 0; font-family: var(--sc-font-mono); font-size: 0.66rem; color: var(--sc-ink-soft); }
.ag-fr--empty .ag-fr__img { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(17,18,20,0.05) 7px 8px), var(--sc-surface); border-style: dashed; border-color: var(--sc-hairline-strong); }
.ag-fr--wait .ag-fr__img { animation: ag-pulse 1.1s ease-in-out infinite alternate; }
@keyframes ag-pulse { from { opacity: 1; } to { opacity: 0.5; } }
.ag-frames__credit { margin: 0.4rem 0 0; font-size: 0.7rem; color: var(--sc-ink-soft); }
.ag-frames__credit a { color: inherit; }

/* ------------------------------------------------------------ shapes -- */
.ag-shapes { background: var(--sc-canvas); }
.ag-shapes__stage {
  display: grid; grid-template-columns: minmax(18rem, 25rem) 1fr; gap: clamp(2rem, 4vw, 4rem);
  align-items: center; padding: calc(var(--ag-bar) + 2vh) var(--sc-gutter) 4vh;
  border-top: var(--ag-rule);
}
.ag-shapes__copy { display: grid; gap: 1rem; }
.ag-sb { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; gap: 0.4rem; }
.ag-sb li { flex: 1; min-width: 0; }
.ag-sb img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--sc-ink); background: #E6E6E3; }
.ag-sb__w { display: block; margin-top: 0.3rem; font-size: 0.7rem; line-height: 1.25; font-weight: 600; }
.ag-sb__s { display: block; font-family: var(--sc-font-mono); font-size: 0.64rem; color: var(--sc-ink-soft); }
.ag-shapes__frames { display: flex; align-items: flex-end; gap: clamp(1rem, 2.4vw, 2.2rem); min-width: 0; }
.ag-shape { margin: 0; }
.ag-shape__box { position: relative; border: 1px solid var(--sc-ink); background: #1b1c1f; box-shadow: 0 18px 34px -18px hsl(var(--sc-shadow-color) / 0.55); }
.ag-shape__box video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ag-shape--wide .ag-shape__box { height: min(46vh, 22vw); aspect-ratio: 16 / 9; }
.ag-shape--tall .ag-shape__box { height: min(46vh, 22vw); aspect-ratio: 9 / 16; }
.ag-shape figcaption, .ag-shape__sq { margin-top: 0.6rem; color: var(--sc-ink); }
.ag-shape__sq { color: var(--sc-accent); margin-top: 0.2rem; }
/* the square, marked in grease pencil on the wide cut: four strokes drawn by scroll */
.ag-crop { z-index: 2; position: absolute; top: -3px; bottom: -3px; left: 50%; aspect-ratio: 1; translate: -50% 0; pointer-events: none; --q: clamp(0, (var(--sc-p, 0) - 0.5) / 0.3, 1); }
.ag-crop i { position: absolute; background: var(--sc-accent); border-radius: 2px; }
.ag-crop__t { left: 0; top: 0; width: 100%; height: 3px; transform-origin: 0 50%; transform: scaleX(clamp(0, var(--q) * 4, 1)); }
.ag-crop__r { right: 0; top: 0; width: 3px; height: 100%; transform-origin: 50% 0; transform: scaleY(clamp(0, var(--q) * 4 - 1, 1)); }
.ag-crop__b { right: 0; bottom: 0; width: 100%; height: 3px; transform-origin: 100% 50%; transform: scaleX(clamp(0, var(--q) * 4 - 2, 1)); }
.ag-crop__l { left: 0; bottom: 0; width: 3px; height: 100%; transform-origin: 50% 100%; transform: scaleY(clamp(0, var(--q) * 4 - 3, 1)); }

/* ------------------------------------------------------------- looks -- */
.ag-looks { padding: clamp(4rem, 12vh, 9rem) 0 clamp(3rem, 8vh, 6rem); border-top: var(--ag-rule); }
.ag-looks__head { display: grid; gap: 0.9rem; margin-bottom: 2rem; }
.ag-sheet { background: #16171A; padding: clamp(0.8rem, 1.6vw, 1.4rem); border-radius: var(--ag-r); }
.ag-sheet__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.5rem, 1vw, 0.9rem); }
.ag-cell { position: relative; }
.ag-cell button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: #F1F1EE; }
.ag-cell__img { position: relative; aspect-ratio: 16 / 9; background: #2a2b2f; overflow: hidden; }
.ag-cell__img img, .ag-cell__img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ag-cell__img video { opacity: 0; transition: opacity 220ms var(--sc-ease-out); }
.ag-cell.is-play .ag-cell__img video { opacity: 1; }
.ag-cell__name { display: flex; justify-content: space-between; align-items: baseline; padding: 0.45rem 0.1rem 0.15rem; font-size: 0.9rem; font-weight: 600; }
.ag-cell__name span { font-family: var(--sc-font-mono); font-size: 0.66rem; font-weight: 400; color: #A9AAAE; }
.ag-cell__ring { position: absolute; inset: -0.5rem -0.6rem -0.3rem; width: calc(100% + 1.2rem); height: calc(100% + 0.8rem); color: #FF4B3E; opacity: 0; pointer-events: none; transition: opacity 160ms var(--sc-ease-out); }
.ag-cell button[aria-pressed="true"] + .ag-cell__ring { opacity: 1; }
.ag-cell button:focus-visible { outline: 2px solid #FF4B3E; outline-offset: 3px; }
.ag-cell--cap { display: flex; flex-direction: column; justify-content: flex-end; padding: 0.4rem 0.2rem; color: #C9CACD; font-size: 0.84rem; line-height: 1.45; }
.ag-cell--cap p { margin: 0; }
.ag-cell--cap .ag-mono { color: #A9AAAE; margin-bottom: 0.4rem; }
.ag-looks__go { margin: 1.2rem 0 0; }

/* ------------------------------------------------------------- close -- */
.ag-close { padding: clamp(4rem, 12vh, 9rem) 0 clamp(5rem, 14vh, 10rem); border-top: var(--ag-rule); }
.ag-plate {
  max-width: 40rem; margin-inline: auto;
  background: var(--sc-surface); border: var(--ag-rule-ink);
  padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1.2rem, 3vw, 2.4rem) 1.4rem;
  box-shadow: 0 2px 3px hsl(var(--sc-shadow-color) / 0.12), 0 30px 60px -36px hsl(var(--sc-shadow-color) / 0.6);
}
.ag-plate__title { margin: 0.5rem 0 0; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.ag-plate__price { margin: 0.6rem 0 0; font-size: 1.25rem; color: var(--sc-ink-soft); }
.ag-plate__price .sc-nums { font-size: 2rem; font-weight: 600; color: var(--sc-ink); letter-spacing: -0.02em; margin-right: 0.2rem; }
.ag-plate__spec { margin: 1.3rem 0 0; border-top: var(--ag-rule); }
.ag-plate__spec div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: var(--ag-rule); }
.ag-plate__spec dt { font-family: var(--sc-font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--sc-ink-soft); padding-top: 0.15rem; }
.ag-plate__spec dd { margin: 0; font-weight: 500; }
.ag-ringed { position: relative; display: inline-block; padding: 0 0.15rem; }
.ag-ringed svg { position: absolute; left: -0.6rem; top: -0.55rem; width: calc(100% + 1.2rem); height: calc(100% + 1.1rem); color: var(--sc-accent); pointer-events: none; }
.ag-plate__yours { margin: 1.1rem 0 0; padding: 0.7rem 0.85rem; background: var(--sc-canvas); font-size: 0.95rem; line-height: 1.45; }
.ag-plate__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin: 1.5rem 0 0; }
.ag-plate__fine { margin: 1.2rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--sc-ink-soft); }

/* ------------------------------------------------------------ footer -- */
.ag-foot { border-top: var(--ag-rule-ink); padding: 2rem 0 2.6rem; font-size: 0.88rem; }
.ag-foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }
.ag-foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; }
.ag-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.ag-foot a { color: var(--sc-ink); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.ag-foot a:hover { text-decoration: underline; }
.ag-foot a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sc-accent); text-decoration-thickness: 2px; }

/* ------------------------------------------------------------ phones -- */
@media (max-width: 960px) {
  .ag-week__wrap { grid-template-columns: 1fr; }
  .ag-roster { position: static; }
  .ag-card { grid-template-columns: 1fr; gap: 0.8rem; }
  .ag-shapes__stage { grid-template-columns: 1fr; align-content: center; gap: 1.2rem; }
  .ag-sheet__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  :root { --ag-bar: 56px; }
  .ag-bar { gap: 0.6rem; padding: 0 0.75rem; }
  .ag-bar__home span { display: none; }
  .ag-thumb { padding: 0 0.2rem; }
  .ag-thumb img { width: 30px; height: 30px; }
  .ag-word { padding: 0 0.4rem; font-size: 0.8rem; }
  .ag-strip__gap { margin: 0 0.2rem; }
  .ag-rail { gap: 1.6rem; margin-top: 0; }
  .ag-intro { width: 84vw; padding-top: 0; }
  .ag-intro__h { font-size: 2.05rem; }
  .ag-intro__sub { font-size: 1rem; }
  .ag-intro__cta { margin-top: 1.4rem; }
  .ag-wall__edge { gap: 4rem; }
  .ag-obj--wide, .ag-obj--tall { width: 80vw; }
  .ag-obj--wide .ag-obj__frame { height: auto; width: 100%; }
  .ag-obj--tall .ag-obj__frame { height: 40svh; }
  .ag-label { padding: 0.7rem 0.8rem 0.4rem; margin-top: 0.8rem; }
  .ag-label__brief { font-size: 0.8rem; }
  .ag-day { grid-template-columns: 1fr; }
  .ag-day__name { padding: 0.8rem 0 0; }
  .ag-day__open { padding: 0.2rem 0 0.8rem; }
  .ag-shapes__stage { padding: calc(var(--ag-bar) + 1rem) var(--sc-gutter) 1rem; }
  .ag-shapes__copy .ag-body { font-size: 0.95rem; }
  .ag-sb { margin-top: 0.2rem; }
  .ag-sb__w { display: none; }
  .ag-shapes__frames { gap: 0.7rem; }
  .ag-shape--wide .ag-shape__box { height: auto; width: calc(100vw - 2 * var(--sc-gutter) - 0.7rem - 22vw); }
  .ag-shape--tall .ag-shape__box { height: auto; width: 22vw; }
  .ag-shape figcaption, .ag-shape__sq { font-size: 0.64rem; }
  .ag-sheet__grid { grid-template-columns: repeat(2, 1fr); }
  .ag-plate__spec div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* --------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .ag-wall__edge, .ag-label, .ag-obj__frame { transform: none !important; }
  .ag-card.is-new { animation: none; }
  .ag-fr--wait .ag-fr__img { animation: none; }
  .ag-strip__ring { transition: opacity 200ms; }
  .ag-crop i { transform: none !important; }
}

/* strip items never shrink: the strip scrolls sideways instead */
.ag-strip__list > li { flex: none; }
.ag-thumb img { flex: none; }
.ag-word { white-space: nowrap; }

/* Reduced motion: no pinned travel at all. The wall becomes a sideways
   scroll shelf one screen tall, and the shapes act a plain section. */
@media (prefers-reduced-motion: reduce) {
  .ag-wall, .ag-shapes { height: auto !important; }
  .ag-wall__stage, .ag-shapes__stage { position: relative !important; height: auto !important; min-height: 100svh; }
  .ag-wall__stage { padding-bottom: 2rem; }
}
