/* American Gambling Institute. Two faces only: AGRI Slab for headlines and figures, Hanken Grotesk for everything else. */
:root {
  --field: #fbf9f4;
  --field-deep: #f0e9d6;
  --ramp-lo: #b8d3ff;
  --ramp-mid: #5c87cc;
  --ramp-hi: #003b99;
  --plot-ink: #0f1846;
  --on-field: #0f1846;
  --accent: #003b99;
  --ink: #0f1846;
  --body: #2a3260;
  --muted: #535b82;
  --paper: #ffffff;
  --mist: #eef0fb;
  --rule: #d5d9ee;
  --periwinkle: #93a2f4;
  --signal: #e0401f;
  --signal-on-field: #ff7a57;
  --gutter: clamp(20px, 4vw, 56px);
  --display: "AGRI Slab", Georgia, serif;
  --serif: "AGRI Slab", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--body); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 400; color: var(--ink); letter-spacing: -.008em; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.on-field :focus-visible { outline-color: var(--on-field); }
.wrap { max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 132px); }
.section-title { font-size: clamp(34px, 3.4vw, 50px); line-height: 1.08; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(32px, 5vw, 88px); }
.on-field { background: var(--field); color: var(--on-field); }
.on-field h1, .on-field h2 { color: var(--on-field); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; padding-block: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 400 21px/1.15 var(--serif); }
.brand svg { flex: none; width: 30px; height: 24px; }
.site-nav { display: flex; gap: clamp(18px, 2.6vw, 38px); font-size: 17px; font-weight: 500; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
/* Current page: a red card pip (the diamond on the ace) before the label. */
.site-nav a[aria-current], .sc-tabs a[aria-current] { position: relative; font-weight: 600; }
.site-nav a[aria-current]::before, .sc-tabs a[aria-current]::before { content: ""; position: absolute; left: 0; top: calc(50% - var(--pip-h) / 2 + .5px); width: var(--pip-w); height: var(--pip-h); background: #dc3f26; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.site-nav a[aria-current] { --pip-w: 10px; --pip-h: 14px; padding-left: 18px; }
.site-nav a[aria-current]:hover { text-decoration: none; }

/* Hero: the headline occupies the space the staircase leaves empty. */
.hero { display: flex; flex-direction: column; min-height: max(100svh, 780px); }
.hero .masthead { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }
.stage { position: relative; flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }
.hero-copy { position: absolute; z-index: 2; top: clamp(16px, 3vh, 40px); left: var(--gutter); pointer-events: none; }
.hero-copy > * { width: fit-content; pointer-events: auto; }
.hero-copy h1 { font-size: clamp(44px, 4.9vw, 78px); line-height: 1.03; }
.hero-copy p { text-wrap: balance; max-width: 19em; margin-top: 24px; font-size: clamp(21px, 1.75vw, 26px); line-height: 1.38; }
.stair { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.plot { position: relative; flex: 1; min-height: 420px; }
.plot canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.tip { position: absolute; z-index: 3; padding: 6px 10px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.3; white-space: nowrap; pointer-events: none; opacity: 0; }
.tip.on { opacity: 1; }
.stair figcaption { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 40px; align-items: end; padding-block: 16px 30px; font-size: 14px; line-height: 1.5; }
.stair figcaption p { max-width: 96ch; }
.stair figcaption b { font-weight: 600; }
.scale { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.scale i { height: 10px; background: linear-gradient(90deg, var(--ramp-lo, #3546c6), var(--ramp-mid, #93a2f4) 55%, var(--ramp-hi, #fff)); }
.scale small { grid-column: 1 / -1; font-size: 14px; }

/* Statement */
.statement p { font: 400 clamp(28px, 3vw, 44px)/1.22 var(--display); color: var(--ink); max-width: 30em; letter-spacing: -.004em; }
.statement p + p { margin-top: .75em; }

/* State lookup */
.states { background: var(--mist); }
.picker { margin-top: 28px; }
.picker label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.picker select { width: 100%; max-width: 340px; height: 56px; padding: 0 44px 0 16px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f1846' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center; color: var(--ink); font: 400 19px var(--serif); -webkit-appearance: none; appearance: none; cursor: pointer; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(28px, 4vw, 64px); align-items: start; }
.grade { font: 700 clamp(130px, 15vw, 212px)/.8 var(--display); color: var(--accent); letter-spacing: -.02em; min-width: 1.05em; }
.result h3 { font: 400 30px/1.15 var(--serif); color: var(--ink); margin: 0 0 12px; }
.result-text { max-width: 36em; font-size: 18px; }
.result-text p + p { margin-top: 10px; }
.flow { grid-column: 1 / -1; margin-top: 40px; }
.bar { display: flex; height: 44px; background: var(--paper); }
.bar span { display: block; transition: flex-basis .45s cubic-bezier(.2, .7, .2, 1); }
.bar .tax { background: var(--accent); }
.bar .kept { background: var(--periwinkle); }
.bar .left { background: var(--signal); }
.key { display: flex; flex-wrap: wrap; gap: 6px 32px; margin-top: 12px; font-size: 15px; color: var(--ink); }
.key li { display: flex; align-items: center; gap: 8px; }
.key i { width: 12px; height: 12px; }
.result-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 26px; font-size: 16px; font-weight: 500; color: var(--ink); }

/* Evidence table */
.evidence-head { max-width: 40em; margin-bottom: clamp(36px, 5vw, 64px); }
.evidence-head p { margin-top: 16px; font-size: 19px; }
.evidence { width: 100%; border-collapse: collapse; }
.evidence tr { border-top: 1px solid var(--rule); }
.evidence tr:last-child { border-bottom: 1px solid var(--rule); }
.evidence th, .evidence td { padding-block: clamp(26px, 3vw, 40px); vertical-align: top; text-align: left; font-weight: 400; }
.evidence th { width: 33%; padding-right: 32px; font: 400 clamp(25px, 2.3vw, 33px)/1.15 var(--display); color: var(--ink); }
.evidence .fig { width: 21%; padding-right: 24px; font: 400 clamp(46px, 4.8vw, 72px)/.95 var(--display); color: var(--accent); white-space: nowrap; letter-spacing: -.01em; }
.evidence .finding { font-size: 18px; }
.evidence cite { display: block; margin-top: 8px; font-style: normal; font-size: 15px; color: var(--muted); }

/* Publications */
.pubs li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); column-gap: 24px; padding-block: 22px; border-top: 1px solid var(--rule); }
.pubs li:last-child { border-bottom: 1px solid var(--rule); }
.pubs time, .pubs .when { font-size: 15px; color: var(--muted); padding-top: .38em; }
.pubs a, .pubs .pub-title { font: 400 clamp(22px, 2vw, 28px)/1.2 var(--serif); color: var(--ink); text-decoration: none; }
.pubs a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pubs p { margin-top: 6px; font-size: 16px; color: var(--muted); }

/* Atlas */
.atlas-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(32px, 5vw, 88px); align-items: center; }
.atlas-grid img { width: min(100%, 300px); }
.atlas-copy p { max-width: 34em; margin-top: 18px; font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; height: 50px; padding-inline: 22px; border: 1px solid currentColor; background: none; color: inherit; font: 500 16px var(--sans); text-decoration: none; cursor: pointer; }
.button.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.on-field .button.solid { background: var(--on-field); border-color: var(--on-field); color: var(--field); }
.button:hover { text-decoration: underline; text-underline-offset: .2em; }

/* Fellowships and subscribe */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(40px, 7vw, 120px); row-gap: 64px; }
.pair h2 { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.1; }
.pair p { margin-top: 14px; max-width: 32em; font-size: 18px; }
.subscribe { display: flex; gap: 8px; margin-top: 24px; max-width: 460px; }
.subscribe input { flex: 1; min-width: 0; height: 50px; padding-inline: 14px; border: 1px solid var(--ink); border-radius: 0; font: 400 16px var(--sans); color: var(--ink); }
.form-note { min-height: 1.5em; margin-top: 10px; font-size: 15px; color: var(--ink); }

/* Footer */
.footer { padding-block: 56px 44px; font-size: 15px; }
.footer .brand { font-size: 24px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px 64px; flex-wrap: wrap; }
.footer-grid p { max-width: 30em; margin-top: 14px; }
.footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 48px; }

/* Interior pages */
.page-head { padding-bottom: clamp(44px, 6vw, 84px); }
.page-head .masthead { margin-bottom: clamp(36px, 6vw, 80px); padding-inline: 0; }
.page-head h1 { font-size: clamp(42px, 5vw, 76px); line-height: 1.04; max-width: 15em; }
.page-head .lede { max-width: 36em; margin-top: 24px; font-size: 20px; line-height: 1.45; }
.doc-kind { font-size: 17px; font-weight: 500; margin-bottom: 14px; }

/* Paper layout: metadata left, text center, notes in the right margin. */
.paper { display: grid; grid-template-columns: minmax(180px, 2.4fr) minmax(0, 9.6fr); column-gap: clamp(32px, 4vw, 64px); }
.paper-meta { position: sticky; top: 28px; align-self: start; font-size: 15px; }
.paper-meta dt { font-weight: 600; color: var(--ink); margin-top: 18px; }
.paper-meta dt:first-child { margin-top: 0; }
.cite-btn { margin-top: 22px; height: 44px; padding-inline: 14px; font-size: 15px; }
.abstract { max-width: 38em; font: 400 22px/1.5 var(--serif); color: var(--ink); margin-bottom: 52px; }
.article h2 { font-size: 34px; line-height: 1.12; margin: 56px 0 18px; }
.para { display: grid; grid-template-columns: minmax(0, 38em) minmax(180px, 15em); column-gap: 40px; margin-bottom: 1.15em; }
.para p { font: 400 18.5px/1.72 var(--serif); }
.para sup { font: 500 13px/0 var(--sans); }
.para sup a { text-decoration: none; color: var(--accent); }
.para aside { font-size: 14.5px; line-height: 1.45; color: var(--muted); padding-top: 4px; }
.bullets { max-width: 38em; font: 400 18.5px/1.65 var(--serif); margin-bottom: 1.15em; }
.bullets li { padding-left: 1.3em; text-indent: -1.3em; margin-bottom: .5em; }
.bullets li::before { content: "\2022"; display: inline-block; width: 1.3em; text-indent: 0; color: var(--accent); }
.ledger-wrap { margin-block: 26px 12px; overflow-x: auto; }
.ledger { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.ledger caption { text-align: left; font-size: 15px; padding-bottom: 12px; }
.ledger caption b { font-weight: 600; color: var(--ink); }
.ledger th, .ledger td { padding: 11px 20px 11px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
.ledger thead th { font-weight: 600; color: var(--ink); border-top: 1px solid var(--ink); }
.ledger .group th { padding-top: 22px; font: 400 21px/1.2 var(--serif); color: var(--accent); border-top: 1px solid var(--ink); }
.ledger tbody td:first-child { width: 23%; color: var(--ink); font-weight: 500; }
.refs { max-width: 46em; counter-reset: ref; font-size: 16px; }
.refs li { counter-increment: ref; display: grid; grid-template-columns: 2em 1fr; margin-bottom: 10px; }
.refs li::before { content: counter(ref) "."; color: var(--muted); }

/* People */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 44px clamp(20px, 2.6vw, 36px); }
.people-grid.staff { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.portrait { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #d6dcfb; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.portrait.none { background: var(--accent); color: #fff; display: flex; align-items: flex-end; padding: 18px; }
.portrait.none::after { content: none; }
.portrait.none span { font: 400 74px/.9 var(--display); }
.person h3 { margin: 16px 0 3px; font: 400 23px/1.2 var(--serif); color: var(--ink); }
.person .post { font-size: 15.5px; color: var(--muted); }
.person .work { margin-top: 10px; font-size: 16px; line-height: 1.45; }
.draft-note { margin-bottom: 36px; padding: 13px 16px; background: #fdeee9; color: #8c2410; font-size: 16px; font-weight: 500; }
.section-intro { max-width: 40em; margin: 14px 0 44px; font-size: 19px; }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px clamp(32px, 5vw, 72px); }
.principles h3 { margin: 0 0 6px; font: 400 22px/1.25 var(--serif); color: var(--ink); }
.principles p { font-size: 17px; max-width: 32em; }

@media (max-width: 1099px) {
  .hero { min-height: 0; }
  .hero-copy { position: static; padding-block: 28px 32px; pointer-events: auto; }
  .hero-copy h1 br { display: none; }
  .plot { flex: none; height: 430px; min-height: 0; }
  .stair figcaption { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .scale { max-width: 280px; }
  .split, .atlas-grid { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  .people-grid.staff { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
  .paper { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .paper-meta { position: static; }
  .para { grid-template-columns: minmax(0, 38em); row-gap: 8px; }
}
@media (max-width: 759px) {
  body { font-size: 16.5px; }
  .brand { font-size: 19px; }
  .masthead { padding-block: 18px; }
  .plot { height: 340px; }
  .evidence, .evidence tbody, .evidence tr, .evidence th, .evidence td { display: block; width: auto; }
  .evidence tr { padding-block: 28px; }
  .evidence th, .evidence td { padding: 0; }
  .evidence .fig { margin-top: 14px; }
  .evidence .finding { margin-top: 10px; }
  .pubs li { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .pair, .principles { grid-template-columns: minmax(0, 1fr); }
  .result { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .bar { height: 36px; }
  .subscribe { flex-wrap: wrap; }
  .subscribe input, .subscribe .button { flex: 1 1 100%; }
  .abstract { font-size: 20px; }
  .people-grid, .people-grid.staff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait.none span { font-size: 56px; }
}

/* Headlines in the logo face: AGRI Slab regular. Letter grades in AGRI Slab bold. */
@font-face { font-family: "AGRI Slab"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/AGRISlab-Regular.woff2) format("woff2"); }
@font-face { font-family: "AGRI Slab"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/AGRISlab-Semibold.woff2) format("woff2"); }
@font-face { font-family: "AGRI Slab"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/AGRISlab-Bold.woff2) format("woff2"); }
:root { --head: "AGRI Slab", Georgia, serif; }
h1, h2, h3, h4 { font-family: var(--head) !important; font-weight: 400 !important; }
