.header-preferences {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: none;
}

.skin-select {
  min-height: 46px;
  max-width: 100%;
  padding: .3rem .4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control, var(--panel));
  color: var(--ink);
  font: 700 .83rem/1.2 var(--body);
  cursor: pointer;
}

.skin-select:focus-visible {
  outline: 3px solid var(--focus, #ffd488);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .header-rail .header-controls { display: contents; }
  .header-preferences { order: 1; margin-inline-start: auto; }
  .header-rail .header-links { width: 100%; order: 2; }
}

@media (max-width: 700px) {
  .header-preferences .languages { order: 0; margin-left: 0; }
  .header-preferences .languages :is(a, span) { min-width: 34px; }
  .skin-select { min-height: 44px; }
}

@media (max-width: 390px) {
  .header-rail .header { width: 96%; padding-inline: .35rem; }
  .header-preferences { gap: .25rem; }
  .header-preferences .languages { padding-inline: 0; }
  .header-preferences .languages :is(a, span) { min-width: 28px; }
  .header-brand .homepage-link { width: 35px; }
  .header-brand .homepage-link img { width: 28px; height: 28px; }
  .header .wordmark { font-size: 1.28rem; }
}

:root:is([data-skin="newspaper"], [data-skin="magazine"]) { color-scheme: light; }

[data-skin="newspaper"] body {
  --ink: #271f17;
  --muted: #5e503f;
  --base: #f3ead9;
  --panel: #fbf5e8;
  --control: #f8efdf;
  --wash: #e8dbc4;
  --line: #b7a58d;
  --accent: #842d2b;
  --button: #842d2b;
  --button-hover: #64201e;
  --focus: #7d2727;
  --display: Georgia, "Times New Roman", serif;
  --reading: Georgia, "Times New Roman", serif;
  background-image: radial-gradient(ellipse at 18% 0%, #fff8e861, transparent 48%),
    repeating-linear-gradient(0deg, #94744308 0 1px, transparent 1px 5px);
}

[data-skin="magazine"] body {
  --ink: #18142e;
  --muted: #514968;
  --base: #fff;
  --panel: #fff;
  --control: #f1edfc;
  --wash: #e9e3fa;
  --line: #cac2e0;
  --accent: #2816cd;
  --button: #2816cd;
  --button-hover: #231497;
  --focus: #3522bf;
  --reading: var(--body);
}

:root:where([data-skin="newspaper"], [data-skin="magazine"]) {
  & .landscape { display: none; }
  & .header-rail .header {
    background: var(--panel);
    box-shadow: none;
  }
  & .header-rail .header-links a[aria-current] {
    color: var(--accent);
    background: var(--wash);
  }
  & .homepage-link:hover { background: var(--wash); }
  & :is(a, button, video):focus-visible,
  & .work-link:focus-visible::before { outline-color: var(--focus); }
  & :is(.prepared, .intro, .lead, .feature-card p, .copy-block p, .bus-evidence p,
        .back-link, .partner-card a, .downloads small, .showcase-project-title, .showcase-reveal small) { color: var(--muted); }
  & :is(.eyebrow, .player-error) { color: var(--accent); }
  & .hero h1 { text-shadow: none; }
  & :is(.action, .film-choice, .showcase-window-actions button, .showcase-reveal, .photo-arrow,
        .work-enlarge span, .work-maximum) { border-color: var(--line); }
  & .action:not(.action-primary):hover { background: var(--wash); }
  & .film-choice {
    color: var(--ink);
    background: var(--control);
  }
  & .film-choice span { color: var(--muted); }
  & .film-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--wash); }
  & :is(.feature-card, .mcp-overview, .partner-card, .cv-table, .showcase-card) { background: var(--panel); }
  & :is(.featured-video, .video-frame, .work-image, .showcase-card, .showcase-titlebar) { border-color: var(--line); }
  & :is(.featured-video, .video-frame) figcaption { color: var(--muted); background: var(--control); }
  & :is(.showcase-titlebar, .showcase-reveal) { background: var(--panel); }
  & :is(.showcase-client-name, .showcase-reveal) { color: var(--ink); }
  & :is(.showcase-reveal [aria-hidden], .showcase-window-actions button) { color: var(--accent); }
  & :is(.showcase-window-actions button, .photo-arrow, .work-enlarge span, .work-maximum) { background: var(--panel); }
  & :is(.showcase-reveal, .showcase-window-actions button, .photo-arrow, .work-enlarge, .work-maximum):hover,
  & .work-enlarge:hover span { background-color: var(--wash); }
  & .work-enlarge:hover { background: transparent; }
  & [data-work-maximum] .window-icon {
    box-shadow: .14rem -.13rem 0 0 var(--panel), .24rem -.22rem 0 0 currentColor;
  }
  & :is(.showcase-window-actions button[aria-pressed="true"], .showcase-reveal:hover) { border-color: var(--accent); }
  & :is(.cv-table thead th, .showcase-card .work-visual, .showcase-more figure img, .feature-photo) { background: var(--wash); }
  & .rubia-open { background: var(--accent); color: #fff; }
  & .rubia-open:hover { background: var(--button-hover); }
  & :is(.showcase-copy, .intro, .detail .copy-block p, .feature-card p) { font-family: var(--reading); }
  & .hero-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(.85rem, 3vw, 2.4rem);
    padding-block: clamp(.65rem, 1.65vw, 1.4rem);
  }
  & .hero-masthead-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.7rem, 8.85vw, 9.25rem);
    line-height: .9;
    letter-spacing: -.047em;
    text-wrap: balance;
  }
  & .hero-masthead p {
    flex: 0 1 17ch;
    padding-inline-start: clamp(.6rem, 2vw, 1.5rem);
    border-inline-start: 1px solid var(--line);
    font-weight: 720;
    font-style: italic;
    line-height: 1.18;
  }
  & .hero {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr);
    align-items: start;
    gap: clamp(.8rem, 2.5vw, 2.7rem);
    padding-block: clamp(1.05rem, 2.1vw, 1.85rem) 1.1rem;
  }
  & .hero-copy { padding: .25rem 0 0; }
  & .hero-copy h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  & .hero .tagline {
    margin-top: .65rem;
    max-width: 20ch;
    font-size: clamp(1.65rem, 3.05vw, 3.05rem);
  }
  & .hero .intro { margin-block: .65rem .95rem; font-size: clamp(.99rem, 1.3vw, 1.21rem); }
  & .hero .hero-projects-link { display: inline-flex; gap: .38em; }
  & .hero .film-panel {
    display: grid;
    grid-template-areas: "choices" "caption" "film" "error";
  }
  & .hero .featured-video { grid-area: film; box-shadow: none; border-radius: 0; }
  & .hero .film-description { grid-area: caption; font-size: clamp(.92rem, 1.25vw, 1.13rem); margin-block: .4rem; }
  & .hero .film-choices { grid-area: choices; margin: 0; }
  & .hero .player-error { grid-area: error; }
  & .hero .film-choice { min-height: 44px; border-radius: 0; padding-block: .25rem; }
  & .mcp-overview { padding-block: .58rem; margin-bottom: 1.3rem; }
  & .showcase-card:not([data-size]) { grid-template-areas: "visual" "title" "copy"; }
}

[data-skin="newspaper"] {
  & .header-rail .header {
    border: 0;
    border-radius: 0;
    background: var(--base);
  }
  & .header-rail .header-links a[aria-current] { border-radius: 0; background: transparent; }
  & .wordmark { font-size: clamp(1.13rem, 3vw, 1.7rem); letter-spacing: -.055em; }
  & .wordmark::after { display: none; }
  & :is(.skin-select, .languages, .action, .film-choice, .featured-video, .video-frame,
        .work-image, .detail-image, .showcase-card, .showcase-titlebar,
        .showcase-reveal, .feature-card, .feature-photo, .cv-table) { border-radius: 0; }
  & .hero-masthead {
    border-block: 6px double var(--accent);
    color: #242018;
  }
  & .hero-masthead p { font-family: var(--display); }
  & .prepared { color: var(--accent); font-size: .79rem; letter-spacing: .07em; text-transform: uppercase; }
  & .tagline { color: var(--accent); font-family: var(--display); font-style: italic; }
  & .intro { max-width: 42ch; }
  & .film-description { font-family: var(--display); }
  & :is(.featured-video, .video-frame, .showcase-card) { box-shadow: none; }
  & :is(.hero .film-launch, .showcase-card:not([data-size]) .work-visual) {
    filter: grayscale(.88) sepia(.09);
  }
  & .mcp-overview { border-inline: 0; border-block: 1px solid var(--line); background: transparent; }
  & .work > h2 { border-block: 4px double var(--ink); padding-block: .55rem; color: var(--accent); }
  & .showcase-grid { gap: 1.55rem 1rem; }
  & .showcase-card { border: 0; border-inline-end: 1px solid var(--line); background: transparent; padding-inline-end: .5rem; }
  & .showcase-titlebar { padding-inline-start: .45rem; border-inline-start: 0; background: transparent; }
  & .showcase-titlebar .showcase-heading { font-family: var(--display); letter-spacing: -.02em; }
  & .showcase-client-name { font-size: clamp(1.24rem, 1.8vw, 1.65rem); }
  & .showcase-project-title { margin-top: .13rem; }
  & .showcase-copy { padding-inline: .45rem; }
  & .showcase-card[data-size] .showcase-copy { border-inline-start: 1px solid var(--line); padding: .9rem; }
  & .showcase-reveal { border: 1px solid var(--line); border-block-start: 2px solid var(--ink); font-family: var(--display); }
  & .feature-card h2 { padding-bottom: .45rem; border-block-end: 1px solid var(--line); }
  & .footer { border-top: 4px double var(--ink); }
}

[data-skin="magazine"] {
  --magazine-rule: linear-gradient(90deg, #28156c, #7660d7 27%, #dbc8fe 46%, #5540c8 68%, #241351);
  & .header-rail .header {
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  & .wordmark { letter-spacing: -.027em; }
  & .wordmark::after { display: none; }
  & .hero-masthead {
    border-bottom: .68rem solid var(--accent);
    border-image: var(--magazine-rule) 1;
  }
  & .hero-masthead-title {
    color: #160e48;
    font-style: italic;
    text-transform: uppercase;
  }
  & .hero-masthead p {
    border-inline-start: .3rem solid var(--accent);
    text-transform: uppercase;
    letter-spacing: .035em;
  }
  & .prepared { font-size: .83rem; color: var(--accent); font-weight: 780; }
  & .tagline { font-weight: 760; color: var(--accent); font-style: italic; }
  & .hero .action { border-radius: 0; }
  & .mcp-overview { background: var(--control); }
  & .work > h2 {
    border-top: .35rem solid var(--accent);
    border-image: var(--magazine-rule) 1;
    padding-top: .65rem;
    letter-spacing: .075em;
    text-transform: uppercase;
  }
  & .showcase-card {
    border-radius: 0;
    box-shadow: none;
  }
  & .showcase-titlebar { background: #fff; border-radius: 0; }
  & .showcase-card[data-size] { border-color: var(--accent); }
  & .showcase-client-name { color: #2f1d66; }
  & .showcase-reveal { background: linear-gradient(125deg, #e9e0ff, #f8f6ff); }
}

@media (max-width: 700px) {
  :root:where([data-skin="newspaper"], [data-skin="magazine"]) {
    & .hero { grid-template-columns: minmax(0, 1fr); }
    & .hero-masthead { display: grid; gap: .38rem; }
    & .hero-masthead-title { font-size: clamp(2.5rem, 10.1vw, 4.75rem); }
    & .hero-masthead p { border-inline-start: 0; padding-inline-start: 0; font-size: .8rem; }
  }
  [data-skin="newspaper"] .showcase-card[data-size] .showcase-copy { border-inline-start: 0; }
}

@media (min-width: 701px) {
  [data-skin="newspaper"] .hero-copy {
    align-self: stretch;
    padding-inline-end: clamp(1rem, 2.2vw, 2.6rem);
    border-inline-end: 1px solid var(--line);
  }
}

@media (min-width: 1101px) {
  :root:where([data-skin="newspaper"], [data-skin="magazine"]) {
    & .hero .featured-video video { aspect-ratio: 2.1 / 1; }
    & .hero .film-launch:has([data-play]:not([hidden])) video[data-media] { object-fit: cover; }
    & .mcp-overview { display: flex; align-items: baseline; gap: .65rem 1rem; }
    & .mcp-overview h2 { flex: 0 0 auto; }
    & .mcp-overview p { max-width: none; margin-top: 0; }
  }
}

@media (max-width: 350px) {
  .header-rail .header-links { gap: .16rem .3rem; font-size: .79rem; }
  .header-rail .header-brand { gap: .15rem; }
  .header-rail .homepage-link { width: 28px; }
  .header-rail .wordmark { font-size: 1.15rem; }
  .skin-select { padding-inline: .25rem; font-size: .77rem; }
  [data-skin="newspaper"] .header-rail .wordmark { font-size: 1rem; }
}
