:root {
  --paper: #f1f0ec; --muted: #b4b3bd; --accent: #b9b5ff;
  --line: #42404e; --ground: #101013; --dialog: #19181e;
  --control: #34323a; --thumb: #bcb9c3; --control-border: #7e7b88;
  --glow: #38216faa; --blue-glow: #182e6b55;
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #222128; --muted: #595663; --accent: #4c3289;
  --line: #cac7d1; --ground: #f5f5f2; --dialog: #f5f5f2;
  --control: #d7d6d2; --thumb: #f3f3ef; --control-border: #85828b;
  --glow: #a899cd33; --blue-glow: #aebbd322;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light; --paper: #222128; --muted: #595663; --accent: #4c3289;
    --line: #cac7d1; --ground: #f5f5f2; --dialog: #f5f5f2;
    --control: #d7d6d2; --thumb: #f3f3ef; --control-border: #85828b;
    --glow: #a899cd33; --blue-glow: #aebbd322;
  }
}
body::before { height: 900px; background: radial-gradient(ellipse at 76% 12%, var(--glow), transparent 64%), radial-gradient(ellipse at 42% 0%, var(--blue-glow), transparent 55%); }
.header-actions { display: flex; gap: clamp(20px, 2.5vw, 48px); align-items: center; }
.header-role { margin-left: clamp(24px, 6vw, 120px); }
/* Exact paths, offsets, RGB fills and edge gradients extracted from maket-button.ai/PDF.
   Native dimensions: base 52.961×35.069; slider 29.082×28.742.
   The PNG is the source PDF's light-normal soft edge, not an added CSS shadow. */
.theme-switch { display: inline-flex; flex: 0 0 58px; align-items: center; padding: 0; width: 58px; min-height: 44px; background: transparent; border: 0; cursor: pointer; border-radius: 15.5px; }
.theme-art { display: block; width: 58px; height: auto; overflow: visible; pointer-events: none; }
.theme-base { fill: rgb(87.8% 86.7% 89%); stroke: url(#button-light-edge); }
.theme-slider { transform: translate(20.1411px, 3.1633px); transition: transform 500ms ease-in-out; }
.theme-slider-shape { fill: rgb(94.9% 94.5% 95.7%); stroke: url(#thumb-light-edge); }
.theme-reference-edge { opacity: 1; }
.theme-switch:hover .theme-base { fill: rgb(12.9% 9% 23.5%); }
.theme-switch:hover .theme-reference-edge { opacity: 0; }
[data-theme="dark"] .theme-base { fill: rgb(19.2% 15.3% 29%); stroke: url(#button-dark-edge); }
[data-theme="dark"] .theme-slider { transform: translate(3.6767px, 3.1633px); }
[data-theme="dark"] .theme-slider-shape { fill: rgb(11.4% 7.5% 22.4%); stroke: url(#thumb-dark-edge); }
[data-theme="dark"] .theme-reference-edge { opacity: 0; }
[data-theme="dark"] .theme-switch:hover .theme-base { fill: #fff; }
[data-theme="dark"] .theme-switch:hover .theme-slider-shape { fill: rgb(10.2% 6.3% 21.2%); }
.project-arrow { display: block; margin-top: 2px; }
.link-arrow { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.project-arrow, .link-arrow { transition: none; }
.project-link:hover .project-arrow, .project-link:focus-visible .project-arrow,
a:hover .link-arrow { transform: none; }
.site-nav a, .contact-links a { gap: 5px; }
.project-link:focus-visible .project-image { outline: 2px solid var(--accent); outline-offset: -2px; }
.project-image { background: var(--line); }
.editorial-note { width: min(100%, 340px); max-width: none; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.editorial-note::before { background: var(--muted); }
.pair-1 .project:first-of-type { grid-row: 1; }
.pair-1 .project:last-of-type { grid-row: 1; }
.pair-2 .note-tea { grid-column: 1 / 6; grid-row: 2; }
.pair-3 .project:first-of-type { grid-row: 1 / 3; }
.pair-3 .project:last-of-type { grid-row: 1; }
.pair-3 .note-triptea { grid-column: 8 / 13; grid-row: 2; }
.pair-4 .project:first-of-type { grid-row: 1; }
.pair-4 .project:last-of-type { grid-row: 1 / 3; }
.note-editorial { grid-column: 1 / 6; grid-row: 2; }
.pair-5 .project { grid-column: 3 / 11; }
.image-dialog { color: var(--paper); background: var(--dialog); border-color: var(--muted); }
.dialog-close { border-color: var(--muted); }
.dialog-close:hover { background: var(--line); }
.text-link { border-color: var(--muted); }
.case-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; padding-block: 45px 42px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; }
.case-heading h1 { font-size: clamp(4rem, 9vw, 10rem); letter-spacing: -.065em; margin-top: 18px; }
.case-category { color: var(--muted); font-size: 1rem; padding-bottom: 8px; }
.case-gallery { display: flex; flex-direction: column; gap: clamp(44px, 6vw, 100px); }
.case-figure { min-width: 0; }
.case-image-link { display: block; }
.case-image-link img { width: 100%; height: auto; display: block; }
.case-figure figcaption { padding-top: 13px; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.case-lead { width: 100%; }
.case-intro { display: grid; grid-template-columns: 1fr 2fr; gap: 35px; padding-block: 10px 5px; align-items: baseline; }
.case-intro .label { color: var(--muted); }
.case-intro h2 { font-weight: 400; font-size: clamp(2rem, 4vw, 4.5rem); letter-spacing: -.045em; }
.case-wide { width: 100%; }
.case-pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
.case-pair .case-offset { margin-top: clamp(36px, 7vw, 110px); }
.case-reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.archive-preview { max-width: 560px; color: var(--muted); }
.archive-preview summary { cursor: pointer; min-height: 44px; padding-block: 12px; font-size: .875rem; }
.archive-preview .case-figure { margin-top: 20px; }
.case-navigation { display: flex; gap: 40px; justify-content: space-between; align-items: end; border-top: 1px solid var(--line); margin-top: 90px; padding-block: 35px 60px; }
.case-navigation a { display: block; min-height: 44px; font-size: .875rem; }
.case-navigation a:last-child { display: grid; grid-template-columns: 1fr auto; column-gap: 30px; row-gap: 12px; text-decoration: none; }
.case-navigation .label { grid-column: 1 / -1; color: var(--muted); }
.case-navigation strong { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 400; letter-spacing: -.045em; }
.case-navigation .project-arrow { align-self: center; }
@media (max-width: 1000px) {
  .header-role { display: none; }
  .site-header { justify-content: space-between; }
}
@media (max-width: 700px) {
  .work-pair .project:first-of-type, .work-pair .project:last-of-type,
  .work-pair .editorial-note { grid-column: 1; grid-row: auto; }
  .editorial-note { width: auto; max-width: 340px; margin-left: 27px; }
  .case-pair, .case-reverse { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .case-pair .case-offset { margin-top: 0; }
  .case-intro { grid-template-columns: 1fr; gap: 18px; }
  .case-heading { gap: 20px; padding-block: 30px 35px; }
  .case-category { font-size: .875rem; }
  .case-navigation { align-items: start; flex-direction: column; margin-top: 60px; gap: 24px; }
}
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; padding-block: 20px 12px; gap: 12px; }
  .wordmark { flex: 1 1 auto; }
  .header-actions { display: contents; }
  .theme-switch { order: 1; }
  .site-nav { order: 2; flex: 1 1 100%; justify-content: space-between; gap: 20px; font-size: .875rem; }
  .site-nav .about-link { display: inline-flex; }
  .hero { padding-top: 30px; }
  .case-heading { flex-direction: column; align-items: start; gap: 18px; }
  .case-heading h1 { font-size: clamp(4rem, 20vw, 6rem); }
  .case-category { padding: 0; }
}

/* Approved IPAARI copy: the existing editorial grid, without panels or dividers. */
.case-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 35px; align-items: start; padding-block: 8px; }
.case-copy h2 { font-size: clamp(1rem, 1.3vw, 1.25rem); font-weight: 400; line-height: 1.6; letter-spacing: -.02em; }
.case-copy p { max-width: 640px; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.65; text-wrap: pretty; }
@media (max-width: 700px) { .case-copy { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 4px; } }
@media (prefers-reduced-motion: reduce) { .theme-slider { transition: none; } }
