
:root{
  --ink:#182b43;
  --ink-2:#263a50;
  --text:#18222d;
  --muted:#647180;
  --line:#d9e0e7;
  --panel:#f4f7f9;
  --white:#fff;
  --warn:#8b5a1f;
  --warn-bg:#fff7e8;
  --max:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Arial,sans-serif;
  color:var(--text);
  background:#fff;
  line-height:1.55;
}
img{max-width:100%;display:block}
a{color:var(--ink);text-decoration:none}
a:hover{text-decoration:underline}
.container{width:min(calc(100% - 40px),var(--max));margin:0 auto}
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line)
}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:28px;min-height:72px}
.brand{font-weight:800;letter-spacing:.04em;color:var(--ink)}
.brand small{display:block;font-size:.67rem;font-weight:600;letter-spacing:.11em;color:var(--muted);margin-top:2px}
nav{display:flex;flex-wrap:wrap;gap:18px;align-items:center}
nav a{font-size:.9rem;font-weight:650;color:var(--ink-2)}
nav a.active{border-bottom:2px solid var(--ink);padding-bottom:4px}
.draft-bar{
  background:#fff4d8;color:#68410f;border-bottom:1px solid #ead6a8;
  font-size:.82rem;font-weight:650;text-align:center;padding:8px 20px
}
.hero{padding:52px 0 44px;background:linear-gradient(180deg,#f8fafc 0,#fff 100%)}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:48px;align-items:center}
.eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.14em;color:var(--muted);text-transform:uppercase}
h1{font-size:clamp(2.2rem,5vw,4.5rem);line-height:1.02;margin:12px 0 20px;color:var(--ink);letter-spacing:-.035em}
h2{font-size:clamp(1.55rem,3vw,2.35rem);line-height:1.15;color:var(--ink);letter-spacing:-.02em;margin:0 0 16px}
h3{color:var(--ink);margin:0 0 8px;font-size:1.13rem}
.lead{font-size:1.16rem;max-width:68ch;color:#334253}
.hero-photo{border-radius:4px;box-shadow:0 16px 40px rgba(24,43,67,.13);overflow:hidden;background:#e8edf1}
.hero-photo img{width:100%;height:auto}
.caption{font-size:.75rem;color:var(--muted);margin-top:8px}
.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}
.button{display:inline-block;border:1px solid var(--ink);padding:10px 15px;font-weight:700;font-size:.9rem}
.button.primary{background:var(--ink);color:#fff}
.button:hover{text-decoration:none;transform:translateY(-1px)}
.section{padding:60px 0}
.section.compact{padding:42px 0}
.section.gray{background:var(--panel)}
.section-intro{max-width:760px;margin-bottom:28px}
.grid{display:grid;gap:22px}
.grid.cards{grid-template-columns:repeat(3,1fr)}
.card{
  border:1px solid var(--line);background:#fff;min-height:100%;
  transition:.18s ease;display:flex;flex-direction:column
}
.card:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(24,43,67,.08)}
.card img{aspect-ratio:16/10;object-fit:cover;border-bottom:1px solid var(--line)}
.card-body{padding:20px}
.card p{color:#435160;margin:0 0 14px}
.tag-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}
.tag{font-size:.73rem;font-weight:700;border:1px solid var(--line);background:var(--panel);padding:4px 8px;color:#435160}
.project-hero{padding:48px 0 36px;background:var(--panel);border-bottom:1px solid var(--line)}
.project-hero-grid{display:grid;grid-template-columns:1fr .86fr;gap:40px;align-items:center}
.project-meta{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:38px}
.media-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.media-grid img{width:100%;height:360px;object-fit:cover;border:1px solid var(--line)}
.media-grid.three{grid-template-columns:repeat(3,1fr)}
.media-grid.three img{height:270px}
.figure{margin:26px 0}
.figure img{border:1px solid var(--line);background:#fff}
.figure.large img{width:100%;max-height:740px;object-fit:contain}
.note{
  border-left:4px solid var(--ink);
  background:var(--panel);padding:18px 20px;margin:24px 0
}
.permission-note{
  border:1px solid #e7c98e;background:var(--warn-bg);color:#5f421f;
  padding:16px 18px;margin:18px 0;font-size:.9rem
}
.case{
  display:grid;grid-template-columns:150px 1fr;border-top:1px solid var(--line)
}
.case:last-child{border-bottom:1px solid var(--line)}
.case dt{font-weight:800;color:var(--ink);padding:13px 14px 13px 0}
.case dd{margin:0;padding:13px 0;color:#334253}
.role-list{columns:2;column-gap:42px;padding-left:20px}
.role-list li{margin:0 0 8px;break-inside:avoid}
.timeline{display:grid;grid-template-columns:repeat(5,1fr);border:1px solid var(--line)}
.timeline div{padding:16px 14px;border-right:1px solid var(--line);font-weight:750;color:var(--ink);text-align:center}
.timeline div:last-child{border-right:0}
.footer{border-top:1px solid var(--line);padding:30px 0 50px;color:var(--muted);font-size:.82rem}
.footer-grid{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.placeholder{
  padding:44px;border:1px dashed #aeb9c3;background:#fafbfc;text-align:center;color:var(--muted)
}
.small{font-size:.84rem;color:var(--muted)}
.kicker{font-size:.88rem;font-weight:800;color:var(--ink);letter-spacing:.04em;text-transform:uppercase}
hr{border:0;border-top:1px solid var(--line);margin:34px 0}
@media(max-width:900px){
  .hero-grid,.project-hero-grid,.two-col{grid-template-columns:1fr}
  .grid.cards{grid-template-columns:1fr 1fr}
  .media-grid.three{grid-template-columns:1fr 1fr}
  nav{gap:12px}
}
@media(max-width:640px){
  .container{width:min(calc(100% - 28px),var(--max))}
  .header-inner{align-items:flex-start;padding:13px 0;flex-direction:column;gap:10px}
  nav{padding-bottom:6px}
  .grid.cards,.media-grid,.media-grid.three{grid-template-columns:1fr}
  .media-grid img,.media-grid.three img{height:auto}
  .role-list{columns:1}
  .timeline{grid-template-columns:1fr}
  .timeline div{border-right:0;border-bottom:1px solid var(--line)}
  .timeline div:last-child{border-bottom:0}
  .case{grid-template-columns:1fr}
  .case dt{padding-bottom:0}
  .footer-grid{flex-direction:column}
}


/* ===== v2 additions: LANSCE overview + richer project storytelling ===== */
.feature-card{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:1.25fr .75fr;
  border:1px solid var(--line);
  background:var(--ink);
  color:#fff;
  overflow:hidden;
  min-height:420px
}
.feature-card:hover{box-shadow:0 14px 34px rgba(24,43,67,.16);text-decoration:none}
.feature-card img{width:100%;height:100%;object-fit:cover;min-height:420px}
.feature-card .feature-body{padding:36px;display:flex;flex-direction:column;justify-content:center}
.feature-card h2,.feature-card h3{color:#fff}
.feature-card p{color:#d9e3ec}
.feature-card .tag{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.25);color:#fff}
.pathway{
  display:grid;
  grid-template-columns:1fr 70px 1fr;
  gap:18px;
  align-items:stretch;
  margin-top:28px
}
.path-card{border:1px solid var(--line);background:#fff;padding:22px}
.path-arrow{display:flex;align-items:center;justify-content:center;font-size:2rem;color:var(--muted)}
.context-strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border:1px solid var(--line);
  margin:26px 0
}
.context-strip div{padding:15px;border-right:1px solid var(--line);text-align:center}
.context-strip div:last-child{border-right:0}
.context-strip strong{display:block;color:var(--ink);font-size:1.02rem}
.photo-callout{
  position:relative;
  border:1px solid var(--line);
  background:#fff;
  overflow:hidden
}
.photo-callout img{width:100%;height:auto}
.photo-callout .overlay{
  position:absolute;left:18px;bottom:18px;
  background:rgba(24,43,67,.92);color:#fff;
  padding:12px 14px;max-width:72%;font-weight:750
}
.source-note{
  border-top:1px solid var(--line);
  margin-top:22px;padding-top:12px;
  font-size:.78rem;color:var(--muted)
}
.gallery-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.gallery-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.gallery-2 figure,.gallery-3 figure{margin:0}
.gallery-2 img,.gallery-3 img{
  width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid var(--line)
}
.story-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}
.story{
  border-top:3px solid var(--ink);
  background:#fff;
  padding:20px;
  border-left:1px solid var(--line);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line)
}
.story .num{font-size:.75rem;font-weight:900;letter-spacing:.12em;color:var(--muted);text-transform:uppercase}
.figure-link{display:block}
.figure-link:hover{text-decoration:none}
.figure-link img{transition:.16s ease}
.figure-link:hover img{filter:brightness(.96)}
.mini-link{font-weight:800;color:var(--ink)}
@media(max-width:900px){
  .feature-card{grid-template-columns:1fr}
  .feature-card img{min-height:280px}
  .pathway{grid-template-columns:1fr}
  .path-arrow{transform:rotate(90deg)}
  .context-strip{grid-template-columns:1fr 1fr}
  .context-strip div:nth-child(2){border-right:0}
  .context-strip div:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .story-grid{grid-template-columns:1fr}
}
@media(max-width:640px){
  .gallery-2,.gallery-3{grid-template-columns:1fr}
  .feature-card .feature-body{padding:24px}
  .context-strip{grid-template-columns:1fr}
  .context-strip div{border-right:0;border-bottom:1px solid var(--line)!important}
  .context-strip div:last-child{border-bottom:0!important}
}


/* ===== v4 home-page facility hierarchy ===== */
.facility-split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  margin-top:28px
}
.facility-panel{
  border:1px solid var(--line);
  background:#fff;
  overflow:hidden
}
.facility-panel .panel-body{padding:24px}
.facility-panel .panel-body p{color:#435160}
.facility-panel img{width:100%;height:auto;display:block}
.facility-panel .stack{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px;background:#f7f9fb}
.facility-panel .stack img{aspect-ratio:4/3;object-fit:cover;border:1px solid var(--line)}
.facility-list{
  margin:14px 0 0;
  padding-left:18px;
  color:#334253
}
.facility-list li{margin-bottom:6px}
.section-separator{
  border-top:1px solid var(--line);
  margin:38px 0 26px
}
@media(max-width:900px){
  .facility-split{grid-template-columns:1fr}
}


/* ===== v5 Lujan / UCN home layout ===== */
.facility-panel .lujan-wide{
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
  background:#fff;
}
.lujan-lower{
  padding:12px 18px 0;
  background:#fff;
  text-align:center;
}
.lujan-lower img{
  width:min(72%, 520px);
  height:auto;
  object-fit:contain;
  display:inline-block;
  border:1px solid var(--line);
  background:#fff;
}
@media(max-width:900px){
  .lujan-lower img{width:min(86%, 520px)}
}

/* ===== v6 facility headings above imagery ===== */
.facility-panel .panel-heading{
  padding:24px 24px 16px;
  background:#fff;
}
.facility-panel .panel-heading h2{
  margin-bottom:0;
}


/* ===== v7 experiment storytelling ===== */
.experiment-intro{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:34px;
  align-items:start
}
.experiment-intro .explain{
  border-left:4px solid var(--ink);
  padding-left:22px
}
.role-band{
  background:var(--ink);
  color:#fff;
  padding:26px;
  margin-top:26px
}
.role-band h2,.role-band h3{color:#fff}
.role-band p{color:#d9e3ec}
.process-chain{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:0;
  margin:24px 0;
  border:1px solid var(--line)
}
.process-chain div{
  padding:16px 12px;
  background:#fff;
  border-right:1px solid var(--line);
  text-align:center;
  font-size:.9rem
}
.process-chain div:last-child{border-right:0}
.process-chain strong{display:block;color:var(--ink);margin-bottom:5px}
.image-story{
  display:grid;
  grid-template-columns:1.2fr .8fr .8fr;
  gap:16px;
  align-items:start
}
.image-story figure{margin:0}
.image-story img{width:100%;height:auto;border:1px solid var(--line)}
.definition{
  font-size:.9rem;
  color:var(--muted);
  border-top:1px solid var(--line);
  padding-top:12px;
  margin-top:18px
}
@media(max-width:900px){
  .experiment-intro,.image-story{grid-template-columns:1fr}
  .process-chain{grid-template-columns:1fr}
  .process-chain div{border-right:0;border-bottom:1px solid var(--line)}
  .process-chain div:last-child{border-bottom:0}
}


/* ===== v9 CCM build-to-operations progression ===== */
.progression{
  position:relative;
  max-width:1050px;
  margin:0 auto;
}
.progression-step{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:24px;
  padding:34px 0;
  border-top:1px solid var(--line);
}
.progression-step:first-child{border-top:0}
.step-marker{
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--muted);
  padding-top:5px
}
.step-marker strong{
  display:block;
  font-size:2rem;
  line-height:1;
  color:var(--ink);
  letter-spacing:-.03em;
  margin-top:7px
}
.step-content h2{margin-bottom:10px}
.step-content > p{max-width:78ch}
.progression-gallery{
  display:grid;
  gap:14px;
  margin-top:20px
}
.progression-gallery.one{grid-template-columns:1fr}
.progression-gallery.two{grid-template-columns:repeat(2,1fr)}
.progression-gallery.three{grid-template-columns:repeat(3,1fr)}
.progression-gallery.four{grid-template-columns:repeat(4,1fr)}
.progression-gallery figure{margin:0}
.progression-gallery img{
  width:100%;
  height:260px;
  object-fit:cover;
  border:1px solid var(--line);
  background:#fff
}
.progression-gallery.contain img{object-fit:contain}
.progression-gallery.large img{height:auto;max-height:760px;object-fit:contain}
.progression-callout{
  margin-top:18px;
  padding:16px 18px;
  background:var(--panel);
  border-left:4px solid var(--ink);
  color:#334253
}
@media(max-width:900px){
  .progression-step{grid-template-columns:1fr}
  .progression-gallery.four,.progression-gallery.three{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:640px){
  .progression-gallery.two,.progression-gallery.three,.progression-gallery.four{grid-template-columns:1fr}
  .progression-gallery img{height:auto}
}


/* ===== v10 CCM progression refinements ===== */
.progression-gallery.no-box img{
  border:0;
  background:transparent;
}
.progression-gallery.stage01 img{
  height:310px;
  object-fit:contain;
}
.progression-gallery.stage05 img{
  height:360px;
  object-fit:cover;
}
.progression-gallery.time-series img{
  height:auto;
  max-height:470px;
  object-fit:contain;
}
@media(max-width:640px){
  .progression-gallery.stage01 img,
  .progression-gallery.stage05 img{height:auto}
}


/* ===== v11 awards and publications ===== */
.award-panel{
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fff 0,#f7f9fb 100%);
  padding:28px;
}
.award-panel .award-title{
  font-size:1.55rem;
  color:var(--ink);
  font-weight:850;
  margin:5px 0 10px;
}
.pub-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}
.pub-card{
  border:1px solid var(--line);
  background:#fff;
  padding:20px;
  min-height:100%;
}
.pub-card .pub-year{
  font-size:.75rem;
  color:var(--muted);
  font-weight:850;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.pub-card h3{margin-top:6px}
.pub-card p{color:#435160}
.pub-card a{font-weight:800}
.progression-gallery.stage03{
  grid-template-columns:repeat(2,1fr);
}
.progression-gallery.stage08{
  grid-template-columns:repeat(3,1fr);
}
.progression-gallery.stage08 img{
  height:330px;
  object-fit:contain;
}
@media(max-width:900px){
  .pub-grid{grid-template-columns:1fr}
  .progression-gallery.stage08{grid-template-columns:1fr}
}
@media(max-width:640px){
  .progression-gallery.stage03{grid-template-columns:1fr}
}

/* nEDM / progression evidence images: no white card framing */
.progression-gallery.no-box figure {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.progression-gallery.no-box img {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* nEDM progression: show complete source images rather than cropping them */
.progression-gallery.no-box img {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}
.progression-gallery.no-box figure {
  overflow: visible !important;
}

/* nEDM Stage 01: center differently proportioned images vertically */
.progression-step:first-of-type .progression-gallery.two.no-box {
  align-items: center;
}
.progression-step:first-of-type .progression-gallery.two.no-box figure {
  align-self: center;
}
.progression-step:first-of-type .progression-gallery.two.no-box img {
  object-fit: contain !important;
  height: auto !important;
}

/* Chamber-build context images should remain uncropped */
.chamber-build-context {
  align-items: center;
}
.chamber-build-context img {
  object-fit: contain !important;
  width: 100%;
  height: auto !important;
  max-height: none !important;
}

/* CCM operating-principle infographic */
.ccm-how-works { margin-top: 34px; }
.ccm-how-works-figure { margin-top: 18px; }
.ccm-how-works-figure img { width: 100%; height: auto; display: block; object-fit: contain; }
.pub-card p { line-height: 1.55; }

/* ===== v25: CCM operating principle integrated into site visual language ===== */
.ccm-how-works{margin-top:42px}
.ccm-how-works>.lead{max-width:850px;margin-bottom:26px}
.ccm-process-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  align-items:stretch;
}
.ccm-process-card{
  position:relative;
  border:1px solid var(--line);
  background:#fff;
  padding:24px 22px 20px;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.ccm-process-number{
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.12em;
  color:var(--muted);
  margin-bottom:8px;
}
.ccm-process-card h3{
  font-size:1.22rem;
  line-height:1.2;
  margin:0 0 12px;
}
.ccm-process-card>p{
  color:#435160;
  font-size:.94rem;
  margin:0 0 18px;
}
.ccm-process-visual{
  margin:auto 0 0;
  padding-top:16px;
  border-top:1px solid var(--line);
}
.ccm-process-visual img{
  width:100%;
  height:300px;
  object-fit:contain;
  border:0;
  background:#fff;
}
.ccm-process-visual.timing img{height:275px}
.ccm-process-summary{
  margin-top:18px;
  padding:16px 20px;
  border-left:4px solid var(--ink);
  background:var(--panel);
  color:var(--ink);
  font-weight:700;
}
@media(max-width:900px){
  .ccm-process-grid{grid-template-columns:1fr}
  .ccm-process-visual img,.ccm-process-visual.timing img{height:auto;max-height:440px}
}

/* ===== v26: CCM flow refinements ===== */
.ccm-process-card:not(:last-child)::after{
  content:"→";
  position:absolute;
  right:-18px;
  top:50%;
  transform:translate(50%,-50%);
  z-index:3;
  color:var(--muted);
  background:var(--bg);
  font-size:1.7rem;
  line-height:1;
  padding:4px 2px;
  font-weight:500;
}
.ccm-process-visual img{
  width:100%;
  height:auto;
  max-height:330px;
  object-fit:contain;
  object-position:center;
  background:#fff;
}
.ccm-process-visual.timing img{
  height:auto;
  max-height:330px;
}
@media(max-width:900px){
  .ccm-process-card:not(:last-child)::after{
    content:"↓";
    right:50%;
    top:auto;
    bottom:-21px;
    transform:translate(50%,50%);
  }
}

/* v44: preserve the full magnetic-shield-room door photograph */
.nedm-shield-door-gallery{
  display:block;
  margin-top:22px;
}
.nedm-shield-door-gallery figure{
  width:100%;
  margin:0;
}
.nedm-shield-door-gallery img{
  display:block;
  width:100%;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center !important;
}


/* ===== v45: Training & Qualifications page ===== */
.training-hero h1{max-width:900px}
.training-section{padding-top:46px}
.training-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  border-top:1px solid var(--line);
  max-width:980px;
}
.training-item{
  min-height:78px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:18px 22px 18px 0;
  border-bottom:1px solid var(--line);
  color:var(--ink);
}
.training-item:nth-child(odd){margin-right:30px}
.training-item span{
  flex:0 0 34px;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.12em;
  color:var(--muted);
}
.training-item strong{font-size:1.03rem;line-height:1.3}
@media(max-width:720px){
  .training-list{grid-template-columns:1fr}
  .training-item:nth-child(odd){margin-right:0}
  .training-item{min-height:66px;padding-right:0}
}

/* ===== v60: UCNtau project page ===== */
.tau-upgrade-gallery img{height:auto;max-height:620px;object-fit:contain}
@media(max-width:900px){.tau-upgrade-gallery img{max-height:none}}
/* UCNtau intro: two explanatory visuals without disturbing the established page width */
.tau-intro-visuals{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.9fr);gap:18px;align-items:center;min-width:0}
.tau-intro-visuals .figure{margin:0;min-width:0}
.tau-intro-visuals img{display:block;width:100%;height:auto;object-fit:contain}
.tau-intro-secondary{max-width:440px;justify-self:center}
@media(max-width:900px){.tau-intro-visuals{grid-template-columns:1fr}.tau-intro-secondary{max-width:none}}

/* ===== v67 requested alignment refinements ===== */
/* On the UCNtau intro, align the labeled CAD to the bottom of the complete left text/photo column. */
.experiment-intro:has(.tau-intro-text-figure){align-items:end;}
.experiment-intro:has(.tau-intro-text-figure) .tau-intro-visuals{align-self:end;}
@media(max-width:900px){
  .experiment-intro:has(.tau-intro-text-figure){align-items:stretch;}
}

/* v68: Cavallo home thumbnail — preserve the original top edge; crop only from bottom as needed. */
.card[href="projects/cryo-hv.html"] > img{
  object-position:center top;
}
