/* PS Construction — shared stylesheet
   Palettes derived from Studio Puisto's global colour set and the PSC logo files.
   No rounded shapes anywhere: border-radius is 0 throughout. */

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Themes ---------- */

.t-clay {
  --bg: #EEEBE0;
  --bg-alt: #F6F0EC;
  --bg-deep: #3A1B19;
  --accent: #A2643D;
  --accent-deep: #3A1B19;
  --line: #DCD6C1;
  --ink: #000000;
  --ink-soft: #313131;
  --on-deep: #EEEBE0;
}

.t-sage {
  --bg: #F6F6F5;
  --bg-alt: #E9EBE7;
  --bg-deep: #263313;
  --accent: #7D8572;
  --accent-deep: #263313;
  --line: #BEC2B8;
  --ink: #000000;
  --ink-soft: #313131;
  --on-deep: #F6F6F5;
}

.t-blue {
  --bg: #EDF4F6;
  --bg-alt: #E3F1F4;
  --bg-deep: #2F4448;
  --accent: #547277;
  --accent-deep: #2F4448;
  --line: #C8CED1;
  --ink: #000000;
  --ink-soft: #313131;
  --on-deep: #EDF4F6;
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 6vw, 3.9rem); line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.12; }
h3 { font-size: 1.18rem; line-height: 1.25; }
h4 { font-size: 1rem; line-height: 1.3; }

p { margin: 0 0 1.1em; max-width: 68ch; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }

.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.5; color: var(--ink); max-width: 56ch; }

/* ---------- Layout ---------- */

.wrap { width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section-deep { background: var(--bg-deep); color: var(--on-deep); }
.section-deep h2, .section-deep h3 { color: var(--on-deep); }
.section-deep a { color: var(--on-deep); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent-deep); color: var(--on-deep);
  padding: .8rem 1.2rem; z-index: 99;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .9rem 0; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.brand img { display: block; width: 46px; height: 46px; }
.brand-name {
  font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em;
  color: var(--ink); line-height: 1.1;
}
.brand-place { display: block; font-weight: 400; font-size: .78rem; color: var(--ink-soft); letter-spacing: 0; }

.nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.lang { display: flex; gap: .35rem; align-items: center; font-size: .82rem; }
.lang a, .lang span { padding: .3rem .5rem; text-decoration: none; border: 1px solid var(--line); color: var(--ink-soft); }
.lang [aria-current="true"] { background: var(--accent-deep); color: var(--on-deep); border-color: var(--accent-deep); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; padding: .85rem 1.5rem;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  border: 2px solid var(--accent-deep);
  transition: background-color .15s linear, color .15s linear;
}
.btn-primary { background: var(--accent-deep); color: var(--on-deep); }
.btn-primary:hover { background: transparent; color: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--accent-deep); }
.btn-ghost:hover { background: var(--accent-deep); color: var(--on-deep); }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero p.lead { margin-bottom: 0; }

/* The gable: the same silhouette as the PSC mark, at architectural scale. */
.gable {
  position: relative;
  /* aspect-ratio makes grid `justify-items: normal` behave as `start`, so the
     shape would shrink to its content. Keep it filling its column. */
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 49.3%, 100% 100%, 0% 100%, 0% 49.3%);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1.4rem;
}
.gable span {
  color: var(--bg); font-size: .82rem; font-weight: 500;
  text-align: center; line-height: 1.35; max-width: 26ch;
}
.gable-reveal { animation: gable-in .7s cubic-bezier(.2,.7,.3,1) both; }
@keyframes gable-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Service blocks ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 > * { background: var(--bg); }
/* pariton viimeinen kortti venyy koko riville, jottei jaa tyhjaa ruutua */
.grid-2 > :last-child:nth-child(odd) { grid-column: 1 / -1; }

.svc { display: block; padding: clamp(1.5rem, 3vw, 2.2rem); text-decoration: none; color: var(--ink-soft); transition: background-color .15s linear; }
.svc:hover { background: var(--bg-alt); }
.svc h3 { margin-bottom: .45rem; }
.svc p { margin: 0; font-size: .96rem; max-width: 40ch; }
.svc-more { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--accent-deep); border-bottom: 2px solid var(--accent); }

/* ---------- Generic content pieces ---------- */

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.split { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-3 > * { background: var(--bg); }
.page-intro { padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem); }

.ticks { list-style: none; padding: 0; margin: 0 0 1.4rem; max-width: 62ch; }
.ticks li { padding: .7rem 0 .7rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: 10px; height: 10px; background: var(--accent);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.steps strong { display: block; color: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.facts div { background: var(--bg); padding: 1.3rem 1.4rem; }
.facts dt { font-size: .82rem; color: var(--ink-soft); margin-bottom: .25rem; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); font-size: 1rem; }

details.faq { border-top: 1px solid var(--line); padding: 0; }
details.faq:last-of-type { border-bottom: 1px solid var(--line); }
details.faq summary {
  cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 600; color: var(--ink); list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 1.45rem;
  width: 12px; height: 8px; background: var(--accent);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transition: transform .18s linear;
}
details.faq[open] summary::after { transform: rotate(180deg); }
details.faq .faq-body { padding: 0 0 1.2rem; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }

.form-field { margin-bottom: 1.2rem; }
.form-field label { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: .4rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
  padding: .75rem .9rem; background: #fff;
  border: 1px solid var(--line); border-bottom: 2px solid var(--accent);
}
.form-field textarea { min-height: 9rem; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent-deep); }
.form-note { font-size: .85rem; margin-top: 1rem; }
.hp { position: absolute; left: -9999px; }

.contact-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-list .k { display: block; font-size: .82rem; color: var(--ink-soft); }
.contact-list .v { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.contact-list .v a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--accent); }

/* ---------- Trust strip ---------- */

.trust { display: flex; flex-wrap: wrap; gap: .6rem 2rem; font-size: .9rem; }
.trust span { display: inline-flex; align-items: center; gap: .55rem; }
.trust span::before { content: ""; width: 9px; height: 9px; background: var(--accent); clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }

/* ---------- Footer ---------- */

.site-footer { background: var(--bg-deep); color: var(--on-deep); padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; }
.site-footer a { color: var(--on-deep); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.site-footer a:hover { border-bottom-color: currentColor; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-grid h2 { color: var(--on-deep); font-size: .88rem; line-height: 1.3; letter-spacing: 0; font-weight: 600; margin: 0 0 .8rem; opacity: .75; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: .22rem 0; font-size: .95rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.22);
  font-size: .85rem; opacity: .8;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .gable { max-width: 380px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .split-wide { grid-template-columns: 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-inner { gap: .8rem; }
  .brand { margin-right: auto; }
  .nav { gap: .9rem 1.1rem; order: 3; width: 100%; padding-bottom: .3rem; font-size: .92rem; }
}

/* ================================================================
   Added: self-hosted type, mobile nav, reference grid, legal pages
   ================================================================ */

/* ---------- Archivo, self-hosted (SIL OFL 1.1) ---------- */

@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 700;
  font-stretch: 100%; font-display: swap;
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 700;
  font-stretch: 100%; font-display: swap;
  src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Mobile navigation ---------- */

.nav-burger { display: none; }

@media (max-width: 860px) {
  .js .nav-burger {
    display: inline-flex; align-items: center; gap: .6rem;
    font: inherit; font-size: .92rem; font-weight: 600;
    color: var(--ink); background: transparent;
    border: 1px solid var(--line); padding: .55rem .85rem; cursor: pointer;
  }
  .js .nav-burger-bars { position: relative; width: 18px; height: 2px; background: var(--ink); display: block; }
  .js .nav-burger-bars::before,
  .js .nav-burger-bars::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
    transition: transform .18s linear, top .18s linear;
  }
  .js .nav-burger-bars::before { top: -6px; }
  .js .nav-burger-bars::after  { top: 6px; }
  .js .nav-burger[aria-expanded="true"] .nav-burger-bars { background: transparent; }
  .js .nav-burger[aria-expanded="true"] .nav-burger-bars::before { top: 0; transform: rotate(45deg); }
  .js .nav-burger[aria-expanded="true"] .nav-burger-bars::after  { top: 0; transform: rotate(-45deg); }

  .js .nav { display: none; }
  .js .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    order: 4; width: 100%; gap: 0;
    border-top: 1px solid var(--line); margin-top: .6rem;
  }
  .js .nav.is-open a {
    padding: .85rem .2rem; border-bottom: 1px solid var(--line); border-top: 0; font-size: 1rem;
  }
  .js .nav.is-open a:hover,
  .js .nav.is-open a[aria-current="page"] { border-bottom-color: var(--line); color: var(--ink); background: var(--bg-alt); }
}

/* ---------- Reference grid ---------- */

.ref-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.ref-item {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bg-alt);
  text-decoration: none; color: inherit;
}
.ref-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-ph { position: absolute; inset: 0; }

.ref-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.3rem 1.4rem; gap: .35rem;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.12) 100%);
  opacity: 0; transition: opacity .22s linear;
}
.ref-overlay strong { color: #fff; font-size: 1.05rem; line-height: 1.2; }
.ref-overlay span { color: rgba(255,255,255,.88); font-size: .88rem; line-height: 1.4; max-width: 34ch; }
.ref-item:hover .ref-overlay,
.ref-item:focus-visible .ref-overlay,
.ref-item:focus-within .ref-overlay { opacity: 1; }

/* Touch devices have no hover: keep the caption visible so tiles are never blank. */
@media (hover: none) {
  .ref-overlay { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 55%, transparent 100%); }
}

@media (max-width: 860px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ref-grid { grid-template-columns: 1fr; } }

/* ---------- Long-form / legal pages ---------- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.6rem; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.8rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose dl.facts { margin-bottom: 2rem; }
.updated { font-size: .85rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; }

/* ---------- 404 ---------- */

.err { padding: clamp(4rem, 12vw, 8rem) 0; }
.err h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); }
.err .lead { margin-bottom: 2rem; }
.err hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0 2rem; }

/* ---------- Fixes ---------- */

.ref-item { margin: 0; }                       /* <figure> default margin would break the grid */
.ref-overlay { margin: 0; }

.page-intro + .section { padding-top: clamp(1.5rem, 3vw, 2.6rem); }

@media (max-width: 860px) {
  .js .header-inner { gap: .7rem 1rem; }
  .js .lang { margin-left: auto; }
}
@media (max-width: 560px) {
  .brand-place { display: none; }
  .brand-name { font-size: 1.02rem; }
  .js .nav-burger { padding: .55rem .7rem; font-size: 0; gap: 0; }   /* icon only */
  .js .nav-burger-bars { width: 20px; }
  .js .nav-burger-bars::before, .js .nav-burger-bars::after { width: 20px; }
}

/* ---------- Consent banner ---------- */

.psc-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--bg-deep); color: var(--on-deep);
  border-top: 3px solid var(--accent);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.psc-consent-visible { transform: none; }
.psc-consent-msg { margin: 0; flex: 1 1 30rem; font-size: .92rem; line-height: 1.5; max-width: 74ch; }
.psc-consent-msg a { color: var(--on-deep); text-underline-offset: .2em; }
.psc-consent-actions { display: flex; gap: .7rem; flex: 0 0 auto; }
.psc-consent-btn {
  font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
  padding: .65rem 1.4rem; border: 2px solid var(--on-deep);
  background: transparent; color: var(--on-deep);
  transition: background-color .15s linear, color .15s linear;
}
.psc-consent-btn:hover { background: var(--on-deep); color: var(--bg-deep); }
.psc-consent-accept { background: var(--on-deep); color: var(--bg-deep); }
.psc-consent-accept:hover { background: transparent; color: var(--on-deep); }
@media (prefers-reduced-motion: reduce) { .psc-consent { transition: none; } }
@media (max-width: 620px) { .psc-consent-actions { width: 100%; } .psc-consent-btn { flex: 1; } }

/* ---------- Photo heroes ---------- */

img { max-width: 100%; }
img.gable {
  display: block; width: 100%; height: auto;
  padding: 0;                 /* the .gable padding would inset the photo */
  background: none;
  object-fit: cover;
}
.ref-item img { height: 100%; }

/* The gable clip removes the top ~15% and both top corners, so the shape needs a
   little breathing room next to the headline column on wide screens. */
@media (min-width: 861px) { .hero-grid .gable { max-width: 520px; margin-left: auto; } }

/* Hero supporting paragraph: .hero p.lead has no bottom margin, so a second
   paragraph after it needs its own space, and the same measure as the lead. */
.hero .lead + p { margin-top: 1.15em; max-width: 56ch; }

/* Unnumbered variant of the step list: no counter, no number column. */
.steps-plain li { grid-template-columns: 1fr; }
.steps-plain li::before { content: none; }
.steps-plain strong { margin-bottom: .3rem; }
.steps-plain li { padding: 1.3rem 0; }

/* Wider left column where the intro is a full paragraph, not just a heading.
   As a class (not an inline style) so the <=860px stacking rule still wins. */
@media (min-width: 861px) {
  .split-intro { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); }
}

/* ---------- Reference photo strip ---------- */

.ref-strip-wrap { position: relative; }

.ref-strip {
  display: flex; gap: 1px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  background: var(--line); border: 1px solid var(--line);
}
.ref-strip img {
  flex: 0 0 auto; display: block;
  height: clamp(210px, 30vw, 400px); width: auto;
  object-fit: cover; scroll-snap-align: start;
  background: var(--bg-alt);
}
.ref-strip:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ref-strip { scroll-behavior: auto; } }

/* Arrows appear only with a pointer, and only when the strip actually overflows.
   site.js adds .has-overflow; without JS the strip still scrolls by touch/trackpad. */
.ref-arrow { display: none; }
@media (hover: hover) {
  .ref-strip-wrap.has-overflow .ref-arrow {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; cursor: pointer;
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--line); font: inherit; font-size: 1.1rem; line-height: 1;
    transition: background-color .15s linear;
  }
  .ref-strip-wrap.has-overflow .ref-arrow:hover { background: var(--bg-alt); }
  .ref-arrow-prev { left: .7rem; }
  .ref-arrow-next { right: .7rem; }
  .ref-arrow[disabled] { opacity: .35; cursor: default; }
}

/* ---------- Reference list by year ---------- */

.ref-year { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); }
.ref-year + .ref-year { margin-top: clamp(2rem, 4vw, 3rem); }
.ref-year h3 { font-size: 1.35rem; color: var(--accent-deep); margin: 0; padding-top: .9rem; }
.ref-year ul { list-style: none; margin: 0; padding: 0; }
.ref-year li {
  display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; justify-content: space-between;
  padding: .9rem 0; border-top: 1px solid var(--line);
}
.ref-year li:last-child { border-bottom: 1px solid var(--line); }
.ref-what { color: var(--ink); font-weight: 600; }
.ref-where { color: var(--ink-soft); font-size: .95rem; }

@media (max-width: 620px) {
  .ref-year { grid-template-columns: 1fr; gap: .4rem; }
  .ref-year h3 { padding-top: 0; }
}
