/* Homepage below the hero (prototype). The hero, header and footer are the site's own; these
   sections use the site's tokens from style.css, so they follow the light and dark themes.
   Everything is scoped to .acad. */
.acad { font-size: 16px; }
.acad .sec { padding-top: 112px; }
.acad .sec:first-child { padding-top: 40px; }
.acad .eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.acad h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.025em; margin: 12px 0 0; }
.acad .sub { color: var(--fg-dim); font-size: 17px; line-height: 1.6; max-width: 36em; margin: 14px 0 0; }

/* pill switch */
.acad .seg2 { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--muted); }
.acad .seg2 button { border: 0; background: none; border-radius: 999px; padding: 8px 16px; font: 500 14px var(--font-sans); color: var(--fg-dim); cursor: pointer; white-space: nowrap; }
.acad .seg2 button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }

/* 1 · the charts */
.acad .charts .bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.acad .charts .bar .k { font-size: 14px; color: var(--fg-dim); }
.acad .charts .bar .segs { display: flex; gap: 10px; flex-wrap: wrap; }
.acad .charts .bar .k b { color: var(--fg); font-weight: 600; }
.acad .charts .panel { margin-top: 18px; border-radius: 24px; background: var(--muted); padding: 32px 36px 26px; }
.acad .charts .panel > div { background: var(--card); border-radius: 16px; padding: 24px 24px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.acad .charts .panel > div[hidden], .acad .charts .cap[hidden] { display: none; }
.acad .charts svg { width: 100%; height: auto; max-width: 980px; margin: 0 auto; }
.acad .charts svg text { font-family: var(--font-sans) !important; letter-spacing: 0 !important; }
.acad .charts .cap { max-width: 860px; margin: 16px auto 0; text-align: center; color: var(--fg-dim); font-size: 14px; line-height: 1.6; }

/* 2 · the leaderboard */
.acad .lb2 { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; }
.acad .lb2 .seg2 { margin-top: 26px; }
.acad .lb2 .more { display: inline-flex; gap: 8px; align-items: center; margin-top: 26px; font-weight: 500; font-size: 15px; color: var(--fg); border-bottom: 1px solid var(--fg); padding-bottom: 2px; text-decoration: none; }
.acad .rows { list-style: none; margin: 4px 0 0; padding: 0; }
.acad .rows li { display: grid; grid-template-columns: 26px 20px minmax(150px, 1fr) 1.3fr 58px; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.acad .rows li:first-child { border-top: 1px solid var(--border); }
.acad .rows .r { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-dimmer); }
.acad .rows .m { font-size: 15.5px; font-weight: 500; }
.acad .rows .m sup { font-weight: 400; color: var(--fg-dimmer); font-size: 11px; margin-left: 2px; }
.acad .rows svg { width: 16px; height: 16px; color: var(--org, var(--fg-dim)); }
.acad .rows .t { height: 6px; border-radius: 99px; background: var(--muted); overflow: hidden; }
.acad .rows .t i { display: block; height: 100%; border-radius: 99px; background: var(--org, var(--fg)); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.acad .rows .v { font-family: var(--font-mono); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.acad .foot-note { font-size: 13px; color: var(--fg-dimmer); margin-top: 12px; }

/* 3 · the tasks */
.acad .tasks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.acad .task { border-radius: 20px; background: var(--muted); padding: 24px 22px 20px; display: flex; flex-direction: column; min-height: 260px; color: var(--fg); text-decoration: none; transition: background .2s; }
.acad .task:hover { background: color-mix(in srgb, var(--muted) 92%, var(--fg) 8%); text-decoration: none; }
.acad .task .k { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dimmer); }
.acad .task h3 { font-family: var(--font-display); font-weight: 600; font-size: 25px; letter-spacing: -.02em; line-height: 1.1; margin: 10px 0 10px; }
.acad .task p { margin: 0; color: var(--fg-dim); font-size: 15px; line-height: 1.55; }
.acad .task .top { margin-top: auto; padding-top: 20px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fg-dim); }
.acad .task .top svg { width: 15px; height: 15px; }
.acad .task .top .v { margin-left: auto; font-family: var(--font-mono); color: var(--fg); }
.acad .two { margin-top: 16px; border-radius: 20px; background: #161512; color: #f2f0ea; display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; }
.acad .two > div { padding: 38px 38px 36px; }
.acad .two .k { font-family: var(--font-mono); font-size: 12px; color: #a7a39a; }
.acad .two h3 { font-family: var(--font-display); font-weight: 600; font-size: 36px; letter-spacing: -.025em; line-height: 1.05; margin: 12px 0 12px; }
.acad .two p { color: #c9c5bc; margin: 0 0 24px; font-size: 16px; max-width: 30em; }
.acad .two a.pill { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: #f2f0ea; color: #161512; font-size: 14.5px; font-weight: 500; text-decoration: none; }
.acad .two-stats { display: grid; grid-template-columns: repeat(3, 1fr); align-content: center; border-left: 1px solid rgba(255,255,255,.08); }
.acad .two-stats div { padding: 0 24px; }
.acad .two-stats b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 52px; letter-spacing: -.03em; line-height: 1; }
.acad .two-stats span { font-size: 13.5px; color: #a7a39a; }

/* 4 · latest */
.acad .posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.acad .post { color: var(--fg); text-decoration: none; }
.acad .post:hover { text-decoration: none; }
.acad .post .img { aspect-ratio: 16 / 10; border-radius: 16px; background: var(--muted); overflow: hidden; display: grid; place-items: center; }
.acad .post .img img { width: 88%; height: auto; max-height: 86%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s; }
.acad .post:hover .img img { transform: scale(1.03); }
.acad .post .d { font-size: 13px; color: var(--fg-dimmer); margin-top: 14px; }
.acad .post h4 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.015em; line-height: 1.25; margin: 6px 0 0; }

/* 5 · citation */
.acad .bib2 { margin-top: 26px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.acad .bib2__bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--muted); font-size: 13px; }
.acad .bib2__bar button { border: 0; background: none; font: 500 13px var(--font-sans); color: var(--fg-dim); cursor: pointer; padding: 3px 7px; }
.acad .bib2__bar button.on { color: var(--fg); font-weight: 600; }
.acad .bib2 pre { margin: 0; padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--fg-dim); overflow-x: auto; background: transparent; border: 0; border-radius: 0; }
.acad .bib2 pre[hidden] { display: none; }
.acad .endpad { height: 80px; }

@media (max-width: 980px) {
  .acad .lb2 { grid-template-columns: 1fr; gap: 26px; }
  .acad .tasks { grid-template-columns: repeat(2, 1fr); }
  .acad .two { grid-template-columns: 1fr; }
  .acad .two-stats { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); padding: 28px 14px; }
  .acad .posts { grid-template-columns: 1fr; }
  .acad .charts .panel { padding: 18px; }
}
@media (max-width: 600px) {
  .acad .sec { padding-top: 84px; }
  .acad .charts .panel { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); border-radius: 0; padding: 12px 0 14px; }
  .acad .charts .panel > div { border-radius: 0; padding: 12px 0 6px; overflow-x: auto; }
  .acad .charts .panel > div svg { min-width: 600px; }
  .acad .charts .cap { padding: 0 var(--pad); font-size: 13.5px; }
  .acad .tasks { grid-template-columns: 1fr; }
  .acad .rows li { grid-template-columns: 22px 18px 1fr 54px; }
  .acad .rows .t { display: none; }
  .acad .two-stats b { font-size: 40px; }
  .acad .two > div { padding: 28px 22px; }
}
.acad [data-tools-seg][hidden] { display: none; }

/* cost chart: "All models" shows every curve; "Frontier" hides the curves, keeps the frontier and its points, fades the rest */
.acad .panel[data-frv="all"] .fl, .acad .panel[data-frv="all"] .fleg, .acad .panel[data-frv="all"] .flabs { display: none; }
.acad .panel[data-frv="front"] .ml, .acad .panel[data-frv="front"] .lbs { display: none; }
.acad .panel[data-frv="front"] .pt:not(.pf) { opacity: .22; }
.acad .panel[data-frv="front"] .fl { stroke-width: 2 !important; stroke-dasharray: none !important; stroke: var(--fg) !important; }
.acad .panel[data-frv="front"] .pf { r: 4.6; }
.acad [data-fr-seg][hidden] { display: none; }
.acad .panel[data-frv="front"] .fleg line { stroke: var(--fg) !important; stroke-width: 2 !important; stroke-dasharray: none !important; }

/* sections switched by the 1.0 / 2.0 control at the top of the page */
.acad [hidden] { display: none !important; }
