/* IRGF landing page — shares the documentation palette, standalone layout */

/* Monochrome palette. "accent" is retained as a token name so the rest of the
   sheet needs no rewiring, but it now resolves to ink rather than to a hue. */
:root{
  --bg:#ffffff; --bg-alt:#f7f7f5; --bg-sink:#eeeeeb;
  --fg:#101010; --fg-soft:#3c3c3a; --fg-mute:#6c6c69;
  --line:#d7d7d2; --line-soft:#e7e7e2;
  --accent:#101010; --accent-soft:#f0f0ec; --accent-ink:#000000;
  --warn:#3c3c3a; --warn-bg:#f4f4f1; --warn-line:#cecec9;
  --radius:4px;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,"Times New Roman",Times,serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
}
html[data-theme="dark"]{
  --bg:#111111; --bg-alt:#191919; --bg-sink:#202020;
  --fg:#f3f3f1; --fg-soft:#c8c8c4; --fg-mute:#98988f;
  --line:#343431; --line-soft:#282826;
  --accent:#f3f3f1; --accent-soft:#242422; --accent-ink:#ffffff;
  --warn:#c8c8c4; --warn-bg:#1e1e1c; --warn-line:#3a3a37;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--fg); font-family:var(--serif);
  font-size:17px; line-height:1.66; -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility; font-kerning:normal;
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{letter-spacing:0; font-weight:700}

/* Colour no longer separates a link from body text, so running-text links
   carry a rule the way they would in a set page. Chrome (nav, buttons,
   cards) stays undecorated and relies on its own affordances. */
.intro a, section p a, .checklist a, .cite a, footer.site a, .mailbig, .send, details.faq p a{
  text-decoration:underline; text-decoration-thickness:.055em;
  text-underline-offset:.17em; text-decoration-color:var(--line);
}
.intro a:hover, section p a:hover, .checklist a:hover, .cite a:hover,
footer.site a:hover, .mailbig:hover, .send:hover, details.faq p a:hover{
  text-decoration-color:currentColor;
}
.skip{position:absolute;left:-9999px;top:0;background:var(--accent);color:#fff;padding:.6rem 1rem;z-index:99}
.skip:focus{left:.5rem;top:.5rem}

.wrap{max-width:1080px; margin:0 auto; padding:0 1.6rem}

/* ---------------- header ---------------- */
header.site{
  position:sticky; top:0; z-index:40; background:var(--bg);
  border-bottom:1px solid var(--line-soft);
}
header.site .wrap{display:flex; align-items:center; gap:1.2rem; height:60px}
.logo{display:flex; align-items:baseline; gap:.55rem; margin-right:auto}
.logo .mark{font-weight:800; font-size:1.2rem; letter-spacing:.06em; color:var(--accent-ink)}
.logo .sub{font-size:.76rem; color:var(--fg-mute); letter-spacing:.02em}
header.site nav{display:flex; align-items:center; gap:1.25rem}
header.site nav a{font-size:.87rem; color:var(--fg-soft)}
header.site nav a:hover{color:var(--accent); text-decoration:none}
.themetoggle{
  border:1px solid var(--line); background:var(--bg-alt); color:var(--fg-soft);
  border-radius:3px; width:2rem; height:2rem; cursor:pointer; font-size:.9rem; line-height:1;
}
.themetoggle:hover{border-color:var(--accent); color:var(--accent)}
.ico-moon{display:none}
html[data-theme="dark"] .ico-sun{display:none}
html[data-theme="dark"] .ico-moon{display:inline}
@media (max-width:760px){
  header.site nav a.hide-sm{display:none}
  .logo .sub{display:none}
  header.site nav{gap:1rem}
  header.site nav a{font-size:.85rem}
  header.site .wrap{gap:.8rem}
}

/* ---------------- hero ---------------- */
.hero{position:relative; overflow:hidden; padding:4.4rem 0 3.2rem; border-bottom:1px solid var(--line-soft)}
.hero > .wrap{position:relative; z-index:1}

/* layered backdrop: warm sink at the top, accent wash behind the figure, faint blueprint grid */
.hero-bg{position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(46rem 24rem at 78% -14%, var(--accent-soft), transparent 62%),
    linear-gradient(180deg, var(--bg-alt) 0%, transparent 58%);
}
.hero-bg::after{
  content:""; position:absolute; inset:0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size:54px 54px;
  opacity:.3;
  -webkit-mask-image:radial-gradient(40rem 20rem at 76% 6%, #000, transparent 72%);
          mask-image:radial-gradient(40rem 20rem at 76% 6%, #000, transparent 72%);
}

.hero-grid{
  display:grid; grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);
  column-gap:2.6rem; row-gap:2.5rem; align-items:center;
}

.eyebrow{
  display:inline-flex; align-items:center; font-size:.7rem; font-weight:700; letter-spacing:.15em;
  text-transform:uppercase; color:var(--fg-mute); background:none;
  border:0; border-bottom:1px solid var(--line); padding:0 .1rem .4rem; border-radius:0;
  margin-bottom:1.2rem;
}
.eyebrow .dot{
  width:.34rem; height:.34rem; border-radius:50%; background:var(--fg-mute);
  margin-right:.55rem; flex:0 0 auto;
}
.hero h1{
  font-size:clamp(2.5rem,5.6vw,3.5rem); line-height:1.05; margin:0 0 .35rem;
  font-weight:700; letter-spacing:.015em;
}
.hero .expand{font-size:1.16rem; font-style:italic; font-weight:400; color:var(--fg-soft); margin:0 0 1.15rem; letter-spacing:0}
.hero .lede{font-size:1.02rem; color:var(--fg-soft); max-width:54ch; margin:0 0 1.75rem}

.btns{display:flex; flex-wrap:wrap; gap:.6rem; align-items:center}
.btn{
  display:inline-flex; align-items:center; padding:.6rem 1.1rem; border-radius:3px; font-size:.93rem;
  font-weight:600; border:1px solid var(--accent); font-family:var(--serif);
  transition:background .16s ease, border-color .16s ease, color .16s ease,
             transform .16s ease, box-shadow .16s ease;
}
.btn:hover{text-decoration:none; transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn.primary{background:var(--accent); color:var(--bg); box-shadow:0 1px 2px rgba(0,0,0,.16), 0 8px 18px -10px rgba(0,0,0,.45)}
.btn.primary:hover{background:var(--accent-ink); border-color:var(--accent-ink); box-shadow:0 2px 4px rgba(0,0,0,.2), 0 12px 22px -10px rgba(0,0,0,.5)}
.btn.ghost{color:var(--accent); background:var(--bg); border-color:var(--line)}
.btn.ghost:hover{background:var(--accent-soft); border-color:var(--accent)}
.arw{display:inline-block; margin-left:.5rem; transition:transform .16s ease}
.btn.primary:hover .arw{transform:translateX(3px)}
html[data-theme="dark"] .btn.primary{color:#111111}
html[data-theme="dark"] .btn.primary:hover{background:var(--accent-ink); color:#111111}
html[data-theme="dark"] .btn.primary{box-shadow:0 1px 2px rgba(0,0,0,.45), 0 8px 20px -12px rgba(255,255,255,.28)}

/* the intent-to-runtime chain, hero figure */
.herofig{margin:0}
.chain{
  border:1px solid var(--line); border-radius:var(--radius); background:var(--bg);
  padding:1.05rem 1.15rem 1rem; box-shadow:0 1px 2px rgba(0,0,0,.05), 0 18px 38px -26px rgba(0,0,0,.32);
}
html[data-theme="dark"] .chain{background:var(--bg-alt); box-shadow:0 1px 2px rgba(0,0,0,.35), 0 18px 38px -26px rgba(0,0,0,.8)}
.chain-cap{
  display:flex; align-items:center; gap:.4rem; margin:0 0 .35rem;
  font-size:.66rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; color:var(--fg-mute);
}
.chain-cap .cyc{font-size:.92rem; color:var(--fg-mute); letter-spacing:0}
.chain-steps{list-style:none; margin:0; padding:0; position:relative}
.chain-steps::before{
  content:""; position:absolute; left:.4rem; top:1.15rem; bottom:1.15rem; width:2px;
  background:linear-gradient(180deg, var(--accent), var(--line));
}
.chain-steps li{
  position:relative; display:flex; align-items:center; gap:.55rem;
  padding:.5rem 0 .5rem 1.55rem; font-size:.83rem; color:var(--fg-soft);
}
.chain-steps li::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:.85rem; height:.85rem; border-radius:50%;
  border:2px solid var(--accent); background:var(--bg);
}
html[data-theme="dark"] .chain-steps li::before{background:var(--bg-alt)}
.chain-steps .cs-s{
  flex:0 0 auto; font-family:var(--mono); font-size:.66rem; color:var(--fg);
  background:var(--accent-soft); border-radius:2px; padding:.1rem .38rem;
}
.chain-steps .cs-n{flex:1 1 auto; min-width:0}
.chain-steps .cs-g{
  flex:0 0 auto; font-family:var(--mono); font-size:.66rem; font-weight:700; color:var(--fg);
  border:1px solid var(--line); border-radius:2px; padding:.1rem .38rem; background:var(--bg-alt);
}
html[data-theme="dark"] .chain-steps .cs-g{background:var(--bg-sink)}
.chain-foot{
  margin:.6rem 0 0; padding-top:.7rem; border-top:1px solid var(--line-soft);
  font-size:.78rem; color:var(--fg-mute); line-height:1.5; text-wrap:pretty;
}
.chain-foot b{color:var(--fg-soft); font-weight:650}

/* proof strip */
.stats{
  grid-column:1 / -1; display:grid; grid-template-columns:repeat(4,1fr);
  margin:0; padding-top:1.35rem; border-top:1px solid var(--line-soft);
}
.stats > div{padding:0 1.4rem; border-left:1px solid var(--line-soft)}
.stats > div:first-child{padding-left:0; border-left:0}
.stats dt{font-size:1.62rem; font-weight:700; color:var(--fg); line-height:1.05; letter-spacing:0}
.stats dd{margin:.22rem 0 0; font-size:.79rem; color:var(--fg-mute); line-height:1.4; max-width:15rem; text-wrap:pretty}

@media (max-width:1000px){
  .hero-grid{grid-template-columns:1fr; row-gap:2.1rem}
  .hero .lede{max-width:62ch}
  .chain{max-width:34rem}
}
@media (max-width:720px){
  .stats{grid-template-columns:repeat(2,1fr); row-gap:1.25rem}
  .stats > div:nth-child(odd){padding-left:0; border-left:0}
}
@media (prefers-reduced-motion:reduce){
  .btn,.arw{transition:none}
  .btn:hover{transform:none}
  .btn.primary:hover .arw{transform:none}
}

/* ---------------- generic sections ---------------- */
section{padding:3rem 0; border-bottom:1px solid var(--line-soft)}
section[id],div[id]{scroll-margin-top:74px}
section > .wrap > h2, .sechead h2{
  font-size:1.62rem; margin:0 0 .55rem; font-weight:700; line-height:1.28;
}
section .kicker{
  font-size:.7rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase;
  color:var(--fg-mute); margin:0 0 .55rem;
}
section .intro{color:var(--fg-soft); max-width:68ch; margin:0 0 1.8rem}

/* Section masthead. The standfirst used to sit under the title at a 68ch
   measure, leaving the right 46% of the row empty; it now shares the row
   with the title, the way the hero copy shares its row with the figure. */
.sechead{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.06fr);
  column-gap:3rem; row-gap:.7rem; align-items:start;
  margin:0 0 1.9rem; padding-bottom:1.35rem; border-bottom:1px solid var(--line-soft);
}
.sechead-t{min-width:0}
.sechead .kicker{margin:0 0 .45rem}
.sechead h2{margin:0}
.sechead .intro{margin:0; max-width:none; padding-top:.12rem}

/* The FAQ carries no standfirst, so it keeps the single-column head but picks
   up the same rule as the others. */
section > .wrap > h2{margin:0 0 1.9rem; padding-bottom:1.35rem; border-bottom:1px solid var(--line-soft)}

/* Contribute: the checklist and the follow-up note ran one after the other at
   the full 1029px measure. Side by side they fill the row and keep a readable
   line length. */
.closer{
  display:grid; grid-template-columns:minmax(0,1.32fr) minmax(0,.68fr);
  column-gap:2.8rem; row-gap:1.6rem; align-items:start; margin-top:2rem;
}
.closer h3{margin:0 0 .55rem; font-size:1.02rem; font-weight:700}
.closer-main .checklist{margin:0; column-count:2; column-gap:2.2rem}
.closer-main .checklist li{break-inside:avoid; margin:.3rem 0}
.closer-note{
  background:var(--bg-alt); border:1px solid var(--line); border-radius:var(--radius);
  padding:1.05rem 1.15rem;
}
.closer-note p{margin:0; font-size:.89rem; color:var(--fg-soft)}

@media (max-width:860px){
  .sechead{grid-template-columns:1fr; row-gap:.9rem; padding-bottom:1.15rem; margin-bottom:1.55rem}
  .sechead .intro{max-width:68ch}
  .closer{grid-template-columns:1fr; column-gap:0}
  .closer-main .checklist{column-count:1}
}

.grid3{display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:1.2rem}
.grid2{display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:1.4rem}
/* Four abreast, held at four rather than auto-fitting, so the set reads as one
   row of equals. Two up on a tablet, stacked on a phone. */
.grid4{display:grid; grid-template-columns:repeat(4,1fr); gap:1.1rem}
.grid4 .card{padding:1.05rem 1.05rem 1.1rem}
.grid4 .card h3{font-size:.97rem; margin-bottom:.35rem}
.grid4 .card p{font-size:.87rem; line-height:1.52}
.grid4 .card p + p{margin-top:.55rem; font-size:.8rem; color:var(--fg-mute)}
@media (max-width:1000px){.grid4{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.grid4{grid-template-columns:1fr}}
.card{
  border:1px solid var(--line); border-radius:var(--radius); padding:1.15rem 1.25rem;
  background:var(--bg-alt);
}
.card h3{margin:0 0 .4rem; font-size:1.02rem; font-weight:700; color:var(--fg)}
.card p{margin:0; font-size:.91rem; color:var(--fg-soft)}
.card p + p{margin-top:.6rem}
a.card{display:block}
a.card:hover{border-color:var(--fg-mute); text-decoration:none}

/* status band */
.status{background:var(--warn-bg); border-bottom:1px solid var(--warn-line)}
.status .wrap{display:flex; gap:1.1rem; align-items:flex-start; padding-top:1.4rem; padding-bottom:1.4rem}
.status .dot{
  flex:0 0 auto; margin-top:.35rem; width:.6rem; height:.6rem; border-radius:50%;
  background:var(--warn);
}
.status h2{font-size:1.02rem; margin:0 0 .3rem; color:var(--warn)}
.status p{margin:0; font-size:.93rem; color:var(--fg-soft); max-width:78ch}
.status p + p{margin-top:.5rem}

/* framework figure */
.figrow{display:grid; grid-template-columns:1.05fr .95fr; gap:1.8rem; align-items:center}
@media (max-width:860px){ .figrow{grid-template-columns:1fr} }
.figrow img{
  width:100%; height:auto; border:1px solid var(--line); border-radius:var(--radius);
  background:#fff; padding:.6rem;
}
.speclist{list-style:none; margin:0; padding:0}
.speclist li{
  padding:.6rem 0 .6rem 6rem; text-indent:-6rem;
  border-bottom:1px solid var(--line-soft); font-size:.93rem; color:var(--fg-soft);
}
.speclist li.plain{padding-left:0; text-indent:0}
.speclist li:last-child{border-bottom:0}
.speclist b{color:var(--fg); font-weight:660}
.speclist .tag{
  min-width:5.4rem; font-family:var(--mono); font-size:.72rem;
  color:var(--fg); background:var(--accent-soft); border-radius:2px;
  padding:.08rem .4rem; margin-right:.6rem;
}

/* the seventeen questions */
.qgrid{
  columns:2; column-gap:2.6rem; margin:0; padding:0 0 0 1.4rem;
  font-size:.95rem; color:var(--fg-soft);
}
.qgrid li{margin:.42rem 0; break-inside:avoid}
@media (max-width:720px){ .qgrid{columns:1} }

/* contribute */
.asks{display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:1.1rem; margin-bottom:1.8rem}
.ask{border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:0 var(--radius) var(--radius) 0;
  padding:1rem 1.15rem; background:var(--bg)}
.ask h3{margin:0 0 .35rem; font-size:.98rem}
.ask p{margin:0 0 .6rem; font-size:.9rem; color:var(--fg-soft)}
.ask .send{font-size:.85rem; font-weight:600}
.ask.wanted{border-left-color:var(--warn)}

.checklist{margin:.4rem 0 0; padding-left:1.25rem; font-size:.93rem; color:var(--fg-soft)}
.checklist li{margin:.3rem 0}

/* faq */
details.faq{
  border-bottom:1px solid var(--line-soft); padding:.85rem 0;
}
details.faq summary{
  cursor:pointer; font-weight:640; font-size:.98rem; list-style:none;
  display:flex; align-items:flex-start; gap:.6rem;
}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary::before{content:"+"; color:var(--fg-mute); font-weight:700; line-height:1.5}
details.faq[open] summary::before{content:"\2013"}
details.faq p{margin:.6rem 0 .2rem 1.2rem; font-size:.93rem; color:var(--fg-soft); max-width:74ch}

/* contact */
.contact{background:var(--bg-alt)}
.contact .mailbig{
  display:inline-block; font-size:1.18rem; font-weight:700; margin:.3rem 0 .9rem;
}
.cite{
  font-family:var(--mono); font-size:.82rem; background:var(--bg-sink); color:var(--fg-soft);
  border:1px solid var(--line); border-radius:var(--radius); padding:.8rem 1rem;
  max-width:74ch; line-height:1.6;
}

footer.site{padding:2rem 0 3rem; font-size:.85rem; color:var(--fg-mute)}
footer.site .wrap{display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between}
footer.site a{color:var(--fg-soft)}

/* ---------------- diagram viewer ---------------- */
/* The figures are detailed enough that the column width is not readable, so
   they open in a modal that fits them to the screen and zooms from there.
   The vector source is used when one exists, so zoom stays sharp. */
.zoombtn{
  display:block; width:100%; padding:0; border:0; background:none;
  cursor:zoom-in; font:inherit; color:inherit;
}
.zoombtn:focus-visible{outline:2px solid var(--fg); outline-offset:3px}
.zoombtn img{display:block}

.lbox{
  position:fixed; inset:0; z-index:200; display:flex; flex-direction:column;
  background:var(--bg);
}
.lbox[hidden]{display:none}

.lbox-bar{
  flex:0 0 auto; display:flex; align-items:center; gap:1.2rem;
  padding:.7rem 1.1rem; border-bottom:1px solid var(--line);
}
.lbox-cap{
  margin:0; flex:1 1 auto; min-width:0; font-size:.82rem; color:var(--fg-soft);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.lbox-tools{flex:0 0 auto; display:flex; align-items:center; gap:.35rem}
.lbox-b{
  font-family:var(--serif); font-size:.9rem; line-height:1; color:var(--fg);
  background:var(--bg); border:1px solid var(--line); border-radius:3px;
  min-width:2rem; height:2rem; padding:0 .5rem; cursor:pointer;
}
.lbox-b:hover{border-color:var(--fg-mute); background:var(--bg-alt)}
.lbox-b:focus-visible{outline:2px solid var(--fg); outline-offset:2px}
.lbox-b[disabled]{opacity:.4; cursor:default}
.lbox-b.lbox-t{font-size:.78rem; letter-spacing:.04em}
.lbox-b.lbox-x{font-size:1.15rem; margin-left:.45rem}
.lbox-pct{
  font-family:var(--mono); font-size:.72rem; color:var(--fg-soft);
  min-width:3.4rem; text-align:center;
}

.lbox-stage{
  flex:1 1 auto; position:relative; overflow:hidden; touch-action:none;
}
.lbox-img{
  position:absolute; left:50%; top:50%; max-width:100%; max-height:100%;
  background:#fff; transform-origin:center center; will-change:transform;
  -webkit-user-select:none; user-select:none; -webkit-user-drag:none;
}
.lbox-hint{
  flex:0 0 auto; margin:0; padding:.55rem 1.1rem .7rem; text-align:center;
  font-size:.74rem; color:var(--fg-mute); border-top:1px solid var(--line-soft);
}
.hint-coarse{display:none}
@media (hover:none) and (pointer:coarse){
  .hint-fine{display:none}
  .hint-coarse{display:inline}
}
@media (max-width:640px){
  .lbox-cap{display:none}
  .lbox-hint{font-size:.7rem}
  .lbox-bar{gap:.5rem; justify-content:flex-end}
}
@media print{ .lbox{display:none} }

@media (max-width:640px){
  .hero{padding:3rem 0 2.4rem}
  section{padding:2.3rem 0}
}
@media print{
  header.site,.themetoggle,.btns,.hero-bg,.herofig{display:none}
  body{font-size:11pt}
  section{border:0; padding:1rem 0}
  .hero{padding:0 0 1rem}
  .stats{border-top:1px solid #ccc}
}
