/* /R5/jobs/ – self-contained styles matching the R5 page (system fonts, dark + gold/sage). */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #080810; color: #e0e0e0; overflow-x: hidden; line-height: 1.5; }
a { color: #d4af37; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 110% 80% at 18% 12%, rgba(123,155,123,0.16) 0%, transparent 62%),
    radial-gradient(ellipse 90% 70% at 82% 88%, rgba(212,175,55,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 100% 90% at 50% 50%, rgba(100,140,200,0.08) 0%, transparent 70%); }
.glow-1 { position: fixed; top: -30%; left: -20%; width: 60%; height: 60%; background: radial-gradient(circle, rgba(123,155,123,0.06) 0%, transparent 70%); z-index: 0; pointer-events: none; }
.glow-2 { position: fixed; bottom: -30%; right: -20%; width: 60%; height: 60%; background: radial-gradient(circle, rgba(212,175,55,0.04) 0%, transparent 70%); z-index: 0; pointer-events: none; }

.site-header { padding: 14px max(20px, calc((100% - 1200px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: rgba(10,10,15,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(123,155,123,0.12); position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 1.3em; font-weight: 700; color: #fff; text-decoration: none; }
.logo-icon { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-header nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-header nav a { color: #888; text-decoration: none; font-size: 0.9em; transition: color 0.3s; }
.site-header nav a:hover { color: #d4af37; }
.site-header nav a.back-link { color: #d4af37; border: 1px solid rgba(212,175,55,0.4); background: rgba(212,175,55,0.06); padding: 7px 14px; border-radius: 8px; font-weight: 600; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }
.hero { padding: 44px 0 10px; text-align: center; }
.hero-tagline { font-size: 0.95em; color: #d4af37; margin-bottom: 12px; letter-spacing: 2px; text-transform: uppercase; }
.hero h1 { font-size: 3em; line-height: 1.15; color: #fff; margin-bottom: 14px; }
.hero h1 .accent { color: #7b9b7b; display: block; }
.hero-sub { max-width: 760px; margin: 0 auto 14px; color: #ccc; font-size: 1.15em; line-height: 1.5; }
.hero-legal-note { max-width: 760px; margin: 0 auto 10px; font-size: 0.88em; line-height: 1.45; color: #999; }
.hero-text { max-width: 760px; margin: 22px auto 10px; color: #aaa; font-size: 1.02em; line-height: 1.75; text-align: left; }
.hero-text p + p { margin-top: 14px; }
.hero-text strong { color: #e8e8e8; }
.hero-stats { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.stat { display: flex; align-items: baseline; gap: 8px; padding: 10px 18px; border-radius: 50px; text-decoration: none;
  background: rgba(123,155,123,0.06); border: 1px solid rgba(123,155,123,0.15); color: #999; transition: all 0.3s; }
a.stat:hover { border-color: #7b9b7b; transform: translateY(-2px); }
.stat b { color: #d4af37; font-size: 1.15em; }
.stat span { font-size: 0.85em; }

.section { padding: 46px 0; scroll-margin-top: 70px; }
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.section-line { width: 40px; height: 2px; background: linear-gradient(90deg, #7b9b7b, #d4af37); border-radius: 1px; flex-shrink: 0; }
.section-label { font-size: 0.75em; text-transform: uppercase; letter-spacing: 3px; color: #7b9b7b; font-weight: 600; }
.section-title { font-size: 1.9em; color: #fff; font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
.section-text { color: #999; line-height: 1.7; max-width: 760px; margin-bottom: 22px; }
.section-text strong { color: #ddd; }

/* tags */
.tag { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.4px; padding: 1px 7px; border-radius: 4px; vertical-align: middle;
  border: 1px solid; white-space: nowrap; line-height: 1.5; }
.tag-ver { color: #9fc79f; border-color: rgba(123,155,123,0.5); background: rgba(123,155,123,0.1); }
.tag-est { color: #e2c15a; border-color: rgba(212,175,55,0.45); background: rgba(212,175,55,0.08); }
.tag-rep { color: #9db8e0; border-color: rgba(100,140,200,0.5); background: rgba(100,140,200,0.1); }
.tag-gen { color: #bbb; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); font-weight: 600; }
.tag-proxy { color: #c9a9d9; border-color: rgba(170,130,200,0.45); background: rgba(170,130,200,0.08); }
.tag-none { color: #999; border-color: rgba(255,255,255,0.14); background: transparent; }

/* costs */
.cost-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cost-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(212,175,55,0.2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cost-k { color: #7b9b7b; font-size: 0.75em; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.cost-card b { color: #fff; font-size: 1.6em; line-height: 1.2; }
.cost-u { color: #aaa; font-size: 0.88em; margin-bottom: 4px; }
.callout { margin: 18px 0 8px; padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(212,175,55,0.45); border-left-width: 4px;
  background: rgba(212,175,55,0.07); color: #f0e2b0; line-height: 1.6; max-width: 900px; }
.cost-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; margin-top: 22px; }
.cost-block { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.cost-block h3 { color: #fff; font-size: 1.15em; margin-bottom: 4px; }
.block-note { color: #888; font-size: 0.85em; margin-bottom: 12px; line-height: 1.5; }
.bars { list-style: none; }
.bar { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.bar:last-child { border-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.bar-label { color: #ddd; font-size: 0.9em; min-width: 0; }
.bar-val { color: #d4af37; font-weight: 700; font-size: 0.9em; white-space: nowrap; text-align: right; }
.bar-val small { color: #888; font-weight: 400; }
.bar-track { height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; margin-top: 5px; overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7b9b7b, #d4af37); }
.bar-credit .bar-track span { background: linear-gradient(90deg, #5d7fae, #9db8e0); }
.bar-credit .bar-val { color: #9db8e0; }
.bar-meta { color: #777; font-size: 0.75em; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bar-note { color: #888; flex-basis: 100%; }
.bar-sm .bar-label, .bar-sm .bar-val { font-size: 0.84em; }
.bar-sm .bar-track { height: 6px; }
details.more { margin-top: 14px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 10px 14px; }
details.more > summary { cursor: pointer; color: #d4af37; font-weight: 600; font-size: 0.95em; }
details.more[open] > summary { margin-bottom: 10px; }
.legend { margin: 0 0 18px; max-width: 900px; }
.legend ul { list-style: none; display: grid; gap: 6px; margin-bottom: 10px; }
.legend li, .legend p { color: #aaa; font-size: 0.88em; line-height: 1.55; }

/* controls */
.controls { display: grid; grid-template-columns: 1fr 280px; gap: 10px; margin-bottom: 10px; position: sticky; top: 69px; z-index: 50;
  padding: 10px 0; background: linear-gradient(180deg, rgba(8,8,16,0.97) 80%, rgba(8,8,16,0)); }
.ctl input, .ctl select { width: 100%; font: inherit; font-size: 16px; color: #eee; background: #12121b; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px; padding: 10px 12px; min-height: 44px; }
.ctl input:focus, .ctl select:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 0 2px rgba(212,175,55,0.2); }
.ctl select { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, #d4af37 50%), linear-gradient(135deg, #d4af37 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.phase-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 0.82em; color: #aaa; padding: 7px 12px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03); cursor: pointer; transition: all 0.2s; min-height: 34px; }
.chip:hover { color: #fff; border-color: rgba(212,175,55,0.5); }
.chip.on { color: #0a0a0f; background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%); border-color: #d4af37; font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.count { color: #888; font-size: 0.88em; margin: 4px 0 14px; }
.count b { color: #d4af37; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px 18px 14px; min-width: 0; overflow-wrap: anywhere;
  content-visibility: auto; contain-intrinsic-size: auto 520px; }
.card:hover { border-color: rgba(212,175,55,0.28); }
.card-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.card h3 { color: #fff; font-size: 1.12em; line-height: 1.3; }
.card .dept { color: #7b9b7b; font-size: 0.78em; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
.card .aka { color: #888; font-size: 0.84em; font-style: italic; }
.ph-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 2px; }
.ph { font-size: 0.7em; padding: 2px 8px; border-radius: 50px; border: 1px solid rgba(123,155,123,0.35); color: #9fc79f; background: rgba(123,155,123,0.07); }
.card .def { color: #ccc; font-size: 0.92em; line-height: 1.6; margin: 6px 0 10px; }
.facts { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 5px 12px; font-size: 0.85em; margin-bottom: 12px; }
.facts dt { color: #777; }
.facts dd { color: #bbb; overflow-wrap: anywhere; }
.pay { border: 1px solid rgba(212,175,55,0.22); background: rgba(212,175,55,0.045); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.pay-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.pay-label { font-size: 0.72em; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: #d4af37; }
.pay-rate { color: #fff; font-weight: 600; font-size: 0.95em; line-height: 1.45; overflow-wrap: anywhere; }
.pay-rate.none { color: #aaa; font-weight: 400; }
.pay-sub { color: #999; font-size: 0.8em; margin-top: 4px; line-height: 1.5; }
.card details.career { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 8px; margin-top: 4px; }
.card details.career > summary { cursor: pointer; color: #d4af37; font-weight: 600; font-size: 0.9em; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.card details.career > summary::-webkit-details-marker { display: none; }
.card details.career > summary::before { content: '+'; display: inline-flex; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(212,175,55,0.5); align-items: center; justify-content: center; font-size: 0.95em; line-height: 1; flex-shrink: 0; }
.card details.career[open] > summary::before { content: '\2212'; }
.cb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 6px; }
.tagline { display: block; margin-top: 3px; line-height: 1.4; }
.tag-why { color: #777; font-size: 0.74rem; }
.pay-head .tagline { display: inline; margin: 0; }
.cb-item h4 { color: #7b9b7b; font-size: 0.72em; text-transform: uppercase; letter-spacing: 1.3px; margin-bottom: 2px; }
.cb-item p { color: #bbb; font-size: 0.84em; line-height: 1.55; overflow-wrap: anywhere; }
.cb-item .tag { margin-top: 3px; }
.cb-note { color: #999; font-size: 0.8em; font-style: italic; border-left: 2px solid rgba(123,155,123,0.4); padding-left: 10px; }
.srcs { color: #666; font-size: 0.75em; margin-top: 8px; overflow-wrap: anywhere; }
.srcs a { color: #7b9b7b; text-decoration: none; }
.srcs a:hover { text-decoration: underline; }
.sentinel { height: 1px; }
.ai { border: 1px solid rgba(100,140,200,0.25); background: rgba(100,140,200,0.05); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ai .pay-label { color: #9db8e0; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.band { display: inline-flex; align-items: center; gap: 5px; }
.band-k { color: #888; font-size: 0.74em; text-transform: uppercase; letter-spacing: 1px; }
.controls.has-ai { grid-template-columns: 1fr 260px 220px; }
.empty { color: #888; padding: 30px 0; text-align: center; grid-column: 1 / -1; }

/* sources */
.src-list { list-style: none; columns: 2; column-gap: 30px; font-size: 0.84em; }
.src-list li { break-inside: avoid; padding: 5px 0; color: #999; line-height: 1.45; scroll-margin-top: 90px; overflow-wrap: anywhere; }
.src-list li:target { background: rgba(212,175,55,0.1); border-radius: 6px; }
.src-list .sid { display: inline-block; min-width: 42px; color: #d4af37; font-family: "Courier New", monospace; font-weight: 700; }
.src-list a { color: #ccc; text-decoration: none; border-bottom: 1px dotted rgba(212,175,55,0.5); }
.src-list a:hover { color: #d4af37; }
.src-list .pub { color: #777; }

.site-footer { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,0.06); padding: 34px 40px 40px; text-align: center; color: #555; font-size: 0.85em; margin-top: 30px; }
.footer-logo { justify-content: center; margin-bottom: 14px; font-size: 1.1em; }
.footer-logo .logo-icon { width: 32px; height: 32px; }
.footer-note { max-width: 760px; margin: 0 auto 8px; line-height: 1.6; color: #666; }
.footer-links { margin: 14px 0 10px; }
.footer-links a { color: #888; text-decoration: none; margin: 0 12px; transition: color 0.3s; display: inline-block; padding: 4px 0; }
.footer-links a:hover { color: #d4af37; }

@media (max-width: 1000px) {
  .cost-grid { grid-template-columns: repeat(2, 1fr); }
  .cost-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; padding: 10px 16px; }
  .site-header nav { width: 100%; justify-content: center; gap: 14px; padding-top: 8px; border-top: 1px solid rgba(123,155,123,0.08); }
  .site-header nav a { font-size: 0.82em; }
  .controls { position: static; }
  .cards { grid-template-columns: 1fr; }
  .src-list { columns: 1; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; overflow-x: clip; }
  .hero { padding: 26px 0 6px; }
  .hero h1 { font-size: 1.9em; }
  .hero-sub { font-size: 1.02em; }
  .hero-text { font-size: 0.97em; }
  .section { padding: 34px 0; }
  .section-title { font-size: 1.4em; }
  .controls, .controls.has-ai { grid-template-columns: 1fr; }
  .site-footer { padding: 28px 18px 34px; }
}
@media (max-width: 480px) {
  .logo { font-size: 1.1em; }
  .logo-icon { width: 34px; height: 34px; }
  .site-header nav { gap: 10px; }
  .site-header nav a.back-link { padding: 5px 10px; }
  .hero h1 { font-size: 1.6em; }
  .stat { padding: 8px 14px; }
  .cost-grid { gap: 10px; }
  .cost-card { padding: 12px; }
  .cost-card b { font-size: 1.25em; }
  .cost-k { font-size: 0.68em; letter-spacing: 1px; }
  .cost-block { padding: 14px 12px; }
  .bar-top { flex-wrap: wrap; gap: 2px 10px; }
  .bar-val { text-align: left; }
  .card { padding: 14px 14px 12px; }
  .facts { grid-template-columns: 1fr; gap: 1px; }
  .facts dd { margin-bottom: 6px; }
  .chip { padding: 6px 10px; font-size: 0.78em; }
  .footer-links a { margin: 0 8px; }
}
@media (max-width: 600px) {
  .site-header { position: relative; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---- v2: photos (all self-hosted in img/) and AI method note ---- */
.hero-banner { position: relative; display: flex; align-items: flex-end; min-height: 440px; margin: 4px 0 20px; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08); background: #0b0b12; }
.hero-banner picture, .hero-banner img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-banner img { object-fit: cover; object-position: 40% 45%; }
.hero-overlay { position: relative; width: 100%; padding: 150px 28px 26px;
  background: linear-gradient(to top, rgba(8,8,16,0.94) 0%, rgba(8,8,16,0.78) 38%, rgba(8,8,16,0.25) 75%, rgba(8,8,16,0) 100%); }
.hero-overlay h1, .hero-overlay .hero-sub, .hero-overlay .hero-tagline { text-shadow: 0 2px 12px rgba(0,0,0,0.85); }
.hero-overlay .hero-sub { color: #e2e2e2; margin-bottom: 0; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.photo-strip figure { margin: 0; }
.photo-strip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: #12121b; }
.photo-strip figcaption { color: #999; font-size: 0.85em; margin-top: 6px; }
.yt-tile a { position: relative; display: block; }
.yt-badge { position: absolute; left: 10px; bottom: 10px; background: rgba(8,8,16,0.82); color: #fff; font-size: 0.8em; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(212,175,55,0.5); }
.photo-credit { color: #777; font-size: 0.8em; margin: 8px 0 0; }
figure.banner { margin: 0 0 22px; }
figure.banner img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 6.25; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); background: #12121b; }
.crew-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 0; }
.tile { position: relative; display: block; padding: 0; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; cursor: pointer; background: #12121b; font: inherit; }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 7px; color: #fff; font-size: 0.82em; font-weight: 600; text-align: left;
  background: linear-gradient(to top, rgba(8,8,16,0.92), rgba(8,8,16,0)); text-shadow: 0 1px 6px rgba(0,0,0,0.9); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile:focus-visible { outline: 2px solid #d4af37; outline-offset: 2px; }
.crew-tiles + .photo-credit { margin-bottom: 16px; }
.ai-method { border: 1px solid rgba(100,140,200,0.25); background: rgba(100,140,200,0.05); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; max-width: 900px; }
.ai-method p, .ai-method li { color: #bbb; font-size: 0.88em; line-height: 1.55; }
.ai-method strong { color: #e8e8e8; }
.ai-method details { margin-top: 6px; }
.ai-method summary { cursor: pointer; color: #9db8e0; font-weight: 600; font-size: 0.88em; }
.ai-method ul { margin: 8px 0 2px 18px; display: grid; gap: 6px; }
.ai-method[hidden] { display: none; }
.ai-how { font-size: 0.78em; color: #9db8e0; margin-left: 6px; }
@media (max-width: 1000px) { .crew-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .hero-banner { min-height: 520px; border-radius: 14px; }
  .hero-banner img { object-position: 50% 40%; }
  .hero-overlay { padding: 190px 16px 20px; }
  .photo-strip { grid-template-columns: repeat(3, 78%); overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .photo-strip figure { scroll-snap-align: start; }
  .crew-tiles { grid-template-columns: repeat(2, 1fr); }
  figure.banner img { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) { .tile img { transition: none; } }
.hero-intro { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: center; max-width: 1080px; margin: 22px auto 10px; text-align: left; }
.hero-intro .hero-text { margin: 0; max-width: none; }
.hero-figure { margin: 0; }
.hero-figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); background: #12121b; }
.hero-figure figcaption { color: #888; font-size: 0.8em; margin-top: 6px; }
@media (max-width: 900px) { .hero-intro { grid-template-columns: 1fr; gap: 16px; } }
/* v4: charts, public-edition download, chart zoom */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 10px; }
figure.chart { margin: 0; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid rgba(255,255,255,0.08); min-width: 0; }
figure.chart img { display: block; width: 100%; height: auto; border-radius: 6px; }
figure.chart figcaption { color: #555; font-size: 0.82em; line-height: 1.4; padding: 6px 4px 2px; }
figure.chart a.zoom { display: block; cursor: zoom-in; }
figure.chart.solo { max-width: 860px; margin: 20px auto 6px; }
.chart-row figure.chart { display: flex; flex-direction: column; justify-content: space-between; }
.pdf-dl { margin: 14px 0 6px; padding: 14px 16px; border: 1px solid rgba(212,175,55,0.3); background: rgba(212,175,55,0.06); border-radius: 12px; }
.dl-btn { display: inline-block; background: #d4af37; color: #111; font-weight: 700; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-size: 0.95em; }
.dl-btn:hover, .dl-btn:focus-visible { background: #e6c45a; }
.dl-btn.dl-small { padding: 6px 13px; font-size: 0.85em; margin-right: 8px; }
.dl-note { color: #aaa; font-size: 0.85em; margin-top: 6px; }
.dl-line .dl-note { display: inline; }
.ai-method details.ai-chart figure.chart { margin-top: 8px; max-width: 620px; }
dialog.zoom-dlg { border: 0; padding: 0; background: #fff; border-radius: 10px; width: min(96vw, 1500px); max-width: 96vw; max-height: 94vh; overflow: hidden; }
dialog.zoom-dlg::backdrop { background: rgba(0,0,0,0.82); }
.zoom-wrap { max-height: 94vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.zoom-wrap img { display: block; width: 100%; height: auto; }
.zoom-close { position: absolute; top: 6px; right: 8px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(8,8,16,0.8); color: #fff; font-size: 24px; line-height: 38px; cursor: pointer; }
@media (max-width: 760px) {
  .chart-row { grid-template-columns: 1fr; }
  .zoom-wrap img { width: 900px; max-width: none; }
  .zoom-wrap img.tall { width: 760px; }
}
/* v5: back-to-top (floating button + end-of-section links) and anchor offsets */
.section-top { text-align: right; margin: 22px 0 0; font-size: 0.85em; }
.section-top a { color: #9a9a9a; text-decoration: none; border-bottom: 1px dotted rgba(212,175,55,0.5); padding: 4px 0; }
.section-top a:hover, .section-top a:focus-visible { color: #d4af37; }
#ai-method { scroll-margin-top: 140px; }
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(16,16,26,0.92); color: #d4af37; border: 1px solid rgba(212,175,55,0.55); box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  text-decoration: none; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility 0s linear .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s, visibility 0s; }
.to-top:hover { background: #d4af37; color: #111; }
.to-top:focus-visible { outline: 2px solid #d4af37; outline-offset: 3px; }
@media (max-width: 900px) { #ai-method { scroll-margin-top: 110px; } }
@media (max-width: 600px) {
  #ai-method, .section { scroll-margin-top: 12px; }
  .to-top { width: 42px; height: 42px; right: max(10px, env(safe-area-inset-right)); opacity: 0.9; }
  .site-footer { padding-bottom: 76px; }   /* keep footer links clear of the button */
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
/* v6: crew-group tiles + active-filter chips */
.tile.on { border-color: #d4af37; box-shadow: 0 0 0 2px rgba(212,175,55,0.55); }
.tile.on span { color: #f3d77a; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; scroll-margin-top: 90px; }
.active-filters[hidden] { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 6px 5px 12px; border-radius: 999px;
  background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.45); color: #ddd; font-size: 0.85em; line-height: 1.35; }
.fchip b { color: #f3d77a; }
.fchip-d { color: #aaa; }
.fchip-x { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.08); color: #eee; font-size: 17px; line-height: 26px; cursor: pointer; }
.fchip-x:hover, .fchip-x:focus-visible { background: #d4af37; color: #111; }
.fclear, .linkish { font: inherit; font-size: 0.85em; font-weight: 700; color: #111; background: #d4af37; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.fclear:hover, .linkish:hover { background: #e6c45a; }
@media (max-width: 480px) { .fchip { font-size: 0.8em; border-radius: 14px; } .fchip-d { display: block; } }
/* v7: data downloads (CSV + XLSX) next to the public-edition PDF */
.dl-more { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(212,175,55,0.2); scroll-margin-top: 90px; }
.dl-h { color: #fff; font-size: 1em; margin: 0 0 8px; }
.dl-list { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.dl-list li { line-height: 1.45; min-width: 0; }
.dl-link { color: #d4af37; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(212,175,55,0.5); }
.dl-link:hover, .dl-link:focus-visible { color: #f3d77a; }
.dl-meta { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.07); color: #ccc; font-size: 0.78em; white-space: nowrap; }
.dl-desc { display: block; color: #aaa; font-size: 0.85em; margin-top: 2px; overflow-wrap: anywhere; }
@media (max-width: 600px) { .dl-meta { margin-left: 0; margin-top: 2px; } }
