/* Cluemaster pages: /cluemaster.html, /cluemaster/cluemaster-1-0.html, /cluemaster/studio.html
   Builds on style.css (variables, nav, footer, dotgrid, body.boardpage). Nothing here touches other pages. */

/* ---------- shared ---------- */
.boardpage .nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pagenav { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; }
.pagenav a { color: var(--muted); text-decoration: none; }
.pagenav a:hover, .pagenav a:focus-visible, .pagenav a[aria-current=page] { color: var(--text); }
.pagenav .sep { width: 1px; background: var(--line); }

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.note { color: var(--muted); font-size: .88rem; margin-top: 10px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; background: rgba(255, 255, 255, .07); padding: 1px 6px; border-radius: 5px; }
pre.code { white-space: pre-wrap; word-break: break-word; background: rgba(5, 6, 13, .72); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: .85rem; line-height: 1.55; color: #cfd8f3; }
pre.code code { background: none; padding: 0; }

/* ---------- hub and model page: article column ---------- */
.post { width: 100%; padding: 120px clamp(20px, 5vw, 48px) 40px; }
.post-head, .article, .post .dotgrid { max-width: 760px; margin-left: auto; margin-right: auto; }
.post-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.08; margin: 6px 0 12px; max-width: none; }
.post-head .sub { color: var(--muted); font-size: 1.2rem; margin: 0 0 30px; }
.post .dotgrid { display: block; width: 100%; margin-bottom: 44px; }
.article.wide { max-width: 1000px; }
.article p, .article dd, .article li { color: #dbe1f3; font-size: 1.04rem; line-height: 1.7; }
.article p { margin: 0 0 16px; }
.article p.intro { font-size: 1.28rem; line-height: 1.55; color: var(--text); }
.article h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 56px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.article h3 { font-size: 1.3rem; margin: 34px 0 10px; }
.article h4 { font-size: 1.02rem; margin: 28px 0 8px; color: var(--text); }
.article a { color: var(--accent); }
.article b { color: var(--text); }
.article pre.code { max-width: none; }

.hubs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.hublink { display: block; text-decoration: none; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 24px; backdrop-filter: blur(18px); }
.hublink b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.8rem; color: var(--text); margin-bottom: 6px; }
.hublink span { color: var(--muted); line-height: 1.5; }
.hublink:hover { border-color: var(--accent); }

/* benchmark charts */
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin: 18px 0 22px; }
.charts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart { margin: 0 0 22px; height: 100%; display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.charts .chart { margin: 0; }
.chart h3 { margin: 0 0 2px; font-size: 1.05rem; }
.chart .cnote { color: var(--muted); font-size: .82rem; margin: 0 0 12px; min-height: 1.3em; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "t t"; gap: 4px 10px; margin: 12px 0; font-size: .86rem; }
.bn { grid-area: n; color: var(--muted); line-height: 1.25; }
.bv { grid-area: v; text-align: right; font-variant-numeric: tabular-nums; }
.bt { grid-area: t; height: 12px; background: rgba(255, 255, 255, .07); border-radius: 6px; overflow: hidden; }
.bt i { display: block; height: 100%; border-radius: 6px; background: #5d7fbd; }
.bar.us .bn { color: var(--text); font-weight: 600; }
.bar.us .bv { font-weight: 600; }
.bar.us .bt i { background: var(--accent); }
.bar.best .bn, .bar.best .bv { color: #fff; font-weight: 600; }
.bar.best .bt i { background: #7fe3b4; }

/* benchmark tables */
.tablewrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); -webkit-overflow-scrolling: touch; }
.tablewrap.points { max-width: 460px; }
table.results { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.results th, table.results td { padding: 11px 9px; text-align: right; border-bottom: 1px solid var(--line); }
table.results td { white-space: nowrap; }
table.results th:first-child, table.results td:first-child { text-align: left; white-space: normal; min-width: 150px; padding-left: 14px; }
table.results th:last-child, table.results td:last-child { padding-right: 14px; }
table.results thead th { color: var(--muted); font-weight: 500; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; vertical-align: bottom; }
table.results tbody tr:last-child td { border-bottom: 0; }
table.results tr.us td:first-child { color: #fff; font-weight: 600; }
table.results td.best { background: rgba(143, 182, 255, .14); color: #fff; font-weight: 600; }

/* model card */
.card { margin-top: 20px; }
.cardnav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 6px; }
.cardnav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.cardnav a:hover { color: var(--text); }
dl.spec { margin: 0; }
dl.spec dt { color: var(--text); font-weight: 600; margin-top: 18px; font-size: .98rem; }
dl.spec dd { margin: 4px 0 0; }

/* ---------- studio page ---------- */
.stu { padding: 0; }
.stu .in { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.stu h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; margin: 12px 0 18px; max-width: none; }
.stu h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 10px; line-height: 1.1; }
.stu p { color: #dbe1f3; line-height: 1.65; }
.stu a { color: var(--accent); }
.stu .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; min-height: 82svh; padding-top: 110px; padding-bottom: 40px; }
.stu .lede { font-size: 1.15rem; max-width: 44ch; margin: 0 0 26px; }
.stu .hero canvas.dotgrid { width: 100%; max-width: 600px; height: clamp(260px, 38vw, 420px); margin: 0 0 0 auto; border: 0; background: none; border-radius: 0; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text) !important; background: var(--glass); backdrop-filter: blur(18px); font-size: .92rem; }
.btn.pri { background: rgba(143, 182, 255, .16); border-color: rgba(143, 182, 255, .45); }
.stu section.s { padding-top: 84px; padding-bottom: 12px; }
.stu .lead { margin: 0 0 28px; font-size: 1.05rem; text-wrap: balance; }
.rule { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; margin-top: 70px; letter-spacing: .08em; opacity: .7; }
.grid3, .grid4 { display: grid; gap: 14px; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid3 article, .grid4 article { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.grid3 h3, .grid4 h3 { font-size: 1.08rem; margin: 0 0 6px; }
.grid3 p, .grid4 p { margin: 0; font-size: .94rem; }
.grid3 .need { color: var(--accent); margin-top: 10px; font-size: .72rem; }
.turn { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(5, 6, 13, .55); backdrop-filter: blur(18px); }
.turn > div { padding: 18px 18px 22px; border-right: 1px solid var(--line); min-width: 0; }
.turn > div:last-child { border-right: 0; }
.turn h3 { font-size: 1.05rem; margin: 4px 0; }
.turn p.d { font-size: .86rem; color: var(--muted); margin: 0 0 14px; line-height: 1.45; }
pre.asc { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .74rem; line-height: 1.6; color: #cfd8f3; white-space: pre-wrap; word-break: break-word; }
pre.asc .k { color: var(--accent); }
pre.asc .win { color: #fff; font-weight: 700; }
pre.asc .dim { color: #7f89aa; }
.cap { margin-top: 14px; color: var(--muted); font-size: .86rem; }

/* ---------- small screens ---------- */
@media (min-width: 900px) { .stu .lead { white-space: nowrap; } }
@media (max-width: 900px) {
  .stu .hero { grid-template-columns: 1fr; gap: 24px; min-height: 0; padding-top: 96px; }
  .stu .hero canvas.dotgrid { margin: 0; max-width: none; }
  .turn { grid-template-columns: 1fr 1fr; }
  .turn > div { border-bottom: 1px solid var(--line); }
  .grid3, .grid4 { grid-template-columns: 1fr 1fr; }
  .charts, .charts.two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pagenav { gap: 14px; font-size: .86rem; }
  .pagenav .sep, .pagenav .sep ~ a { display: none; }
  .post { padding-top: 96px; }
  .hubs, .grid3, .grid4, .turn { grid-template-columns: 1fr; }
  .turn > div { border-right: 0; }
  .article p.intro { font-size: 1.15rem; }
  .btns .btn { flex: 1 1 100%; text-align: center; }
  .stu section.s { padding-top: 64px; }
  .rule { margin-top: 48px; }
  .tablewrap.points { max-width: none; }
}

/* screenshot on the Studio page */
.stu .shot { padding-bottom: 8px; }
.stu .shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; }
