/* ---------- Quick read: matches the site's pills, panels and serif accents ---------- */
.qr-btn { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 5px 6px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.qr-btn i { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; font-style: normal; font-size: 12px; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.qr-btn em { font: italic 400 16px/1 var(--serif); color: var(--accent); margin-left: -3px; }
.qr-btn:hover { border-color: var(--accent); background: var(--panel); transform: translateY(-1px); }
.qr-btn:hover i { transform: rotate(90deg); }
dialog.qr { width: min(760px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 28px; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.28); overflow-y: auto; opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1), display .4s allow-discrete, overlay .4s allow-discrete; }
dialog.qr[open] { opacity: 1; transform: none; }
@starting-style { dialog.qr[open] { opacity: 0; transform: translateY(18px) scale(.97); } }
dialog.qr::backdrop { background: rgba(10,10,14,0); backdrop-filter: blur(0); transition: background .3s, backdrop-filter .3s, display .3s allow-discrete, overlay .3s allow-discrete; }
dialog.qr[open]::backdrop { background: rgba(10,10,14,.3); backdrop-filter: blur(6px); }
@starting-style { dialog.qr[open]::backdrop { background: rgba(10,10,14,0); backdrop-filter: blur(0); } }
@media (max-width: 600px) {
  dialog.qr { width: 100vw; max-height: 88dvh; margin: auto 0 0; border-radius: 28px 28px 0 0; border-bottom: 0; transform: translateY(100%); }
  dialog.qr[open] { transform: none; }
  @starting-style { dialog.qr[open] { transform: translateY(100%); } }
}
.qr-inner { padding: clamp(22px, 4vw, 40px); }
.qr-inner::before { content: ""; display: none; width: 40px; height: 4px; margin: -8px auto 18px; border-radius: 999px; background: var(--line); }
@media (max-width: 600px) { .qr-inner::before { display: block; } }
.qr-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qr-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.qr-kicker i { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; font-style: normal; font-size: 11px; }
.qr-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; transition: transform .3s, background .2s; }
.qr-close:hover { transform: rotate(90deg); background: var(--panel-2); }
.qr h2 { margin: 22px 0 6px; font: 500 clamp(28px, 4vw, 40px)/1.05 var(--sans); letter-spacing: -0.03em; }
.qr h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.qr-meta { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.qr-thesis { margin: 22px 0 0; padding-left: 16px; border-left: 2px solid var(--accent); font: italic 400 clamp(21px, 2.6vw, 26px)/1.3 var(--serif); color: var(--ink); }
.qr-lede { margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.qr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.qr-stats li { padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); opacity: 0; transform: translateY(8px); }
.qr-stats b { display: block; font: 500 clamp(24px, 3vw, 30px)/1 var(--sans); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.qr-stats span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }
dialog.qr[open] .qr-stats li { animation: qrIn .45s cubic-bezier(.2,.8,.2,1) forwards; }
dialog.qr[open] .qr-stats li:nth-child(2) { animation-delay: .06s; }
dialog.qr[open] .qr-stats li:nth-child(3) { animation-delay: .12s; }
@keyframes qrIn { to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .qr-stats { grid-template-columns: 1fr; } .qr-stats li { display: flex; align-items: baseline; gap: 12px; } .qr-stats span { margin: 0; } }
.qr-chapters-h { margin: 26px 0 10px; font-size: 13px; color: var(--muted); }
.qr-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qr-chapters a { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 14px 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.qr-chapters .n { font: italic 400 15px/1 var(--serif); color: var(--accent); }
.qr-chapters .go { color: var(--muted); transition: transform .2s, color .2s; }
.qr-chapters a:hover, .qr-chapters a:focus-visible { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); border-color: var(--accent); transform: translateY(-1px); }
.qr-chapters a:hover .go, .qr-chapters a:focus-visible .go { transform: translateX(3px); color: var(--accent); }
.qr-flash { animation: qrFlash 1.4s ease; border-radius: 16px; }
@keyframes qrFlash { 0%, 100% { background: transparent; } 25% { background: color-mix(in srgb, var(--accent) 10%, transparent); } }
main section[id], main li[id] { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  dialog.qr, dialog.qr::backdrop,   dialog.qr[open] .qr-stats li { animation: none; opacity: 1; transform: none; }
  .qr-flash { animation: none; }
}

/* ---------- Reading dock: quick read + back to top ---------- */
.qr-dock { position: fixed; left: 50%; bottom: 18px; z-index: 45; display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--pill); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .3s, transform .3s; }
.qr-dock.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.qr-dock .qr-btn { margin: 0; border-color: transparent; }
.qr-dock .qr-btn:hover { transform: none; }
.to-top { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; background: transparent; color: var(--muted); font: 500 14px/1 var(--sans); cursor: pointer; transition: color .2s; }
.to-top span { display: inline-block; transition: transform .25s; }
.to-top:hover { color: var(--ink); }
.to-top:hover span { transform: translateY(-3px); }

/* ---------- Award: a label, not a button ---------- */
.hero .award { margin-top: 22px; padding: 0; border: 0; border-radius: 0; background: none; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.hero .award i { width: auto; height: auto; background: none; color: var(--accent); font-size: 14px; }

/* ---------- Talk: walkthrough + contact, quiet ---------- */
.talk { margin-top: clamp(64px, 9vw, 112px); padding: clamp(48px, 7vw, 80px) 0; border-top: 1px solid var(--line); }
.talk h2 { margin: 0; max-width: 18ch; font: 500 clamp(30px, 4vw, 48px)/1.08 var(--sans); letter-spacing: -0.03em; }
.talk h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.talk > p { margin: 18px 0 0; max-width: 52ch; font-size: 17px; line-height: 1.6; color: var(--muted); }
.talk-links { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 36px; }
.talk-links a, .talk-links button { display: inline-flex; gap: 6px; padding: 0 0 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 400 16px/1.3 var(--sans); text-decoration: none; cursor: pointer; transition: color .2s, border-color .2s; }
.talk-links a:hover, .talk-links button:hover { color: var(--accent); border-color: var(--accent); }
.teaser + .talk { margin-top: clamp(40px, 6vw, 72px); }

/* ---------- Horizontal galleries: arrows ---------- */
.hs { position: relative; }
.hs-btn { position: absolute; top: calc(50% - 40px); z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--pill); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); color: var(--ink); font-size: 18px; cursor: pointer; transition: opacity .2s, transform .2s; }
.hs-btn:hover { transform: scale(1.06); }
.hs-prev { left: -10px; } .hs-next { right: -10px; }
.hs-btn[hidden] { display: none; }
.hs::after { content: ""; position: absolute; top: 0; right: 0; bottom: 12px; width: 56px; pointer-events: none; background: linear-gradient(to left, var(--bg), transparent); opacity: 1; transition: opacity .2s; }
.hs.at-end::after { opacity: 0; }
.hs-hint { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .hs-prev { left: 4px; } .hs-next { right: 4px; } .hs-btn { width: 38px; height: 38px; } }
.qr-ps { margin: 22px 0 0; display: grid; gap: 12px; }
.qr-ps p { margin: 0; display: grid; grid-template-columns: 76px 1fr; gap: 12px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.qr-ps span { padding-top: 2px; font: italic 400 17px/1.3 var(--serif); color: var(--accent); }
@media (max-width: 520px) { .qr-ps p { grid-template-columns: 1fr; gap: 2px; } }
