/* pldb components on top of kc.css (kirancodes.me's own stylesheet).
   Sizes follow the GOV.UK scale kc.css uses: 1.1875rem body, 1rem small. */

/* kc.css resets bare links (Tailwind preflight); give unclassed links in
   content the site's .link look so templates need not tag every anchor. */
main a:not([class]), .footer a:not([class]) {
  color: var(--trans-pink-darker);
  text-decoration: underline;
  text-decoration-thickness: max(1px, 0.0625rem);
  text-underline-offset: 0.1578em;
}
main a:not([class]):visited { color: #aa0f0f; }
main a:not([class]):hover { color: var(--trans-pink); text-decoration-thickness: max(3px, 0.1875rem, 0.12em); }
main a:not([class]):focus {
  outline: 3px solid transparent; color: #0b0c0c; background-color: var(--trans-pink);
  box-shadow: 0 -2px var(--trans-pink), 0 4px #0b0c0c; text-decoration: none;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { position: static; display: block; padding: 10px 15px; background: var(--trans-pink); color: #0b0c0c; }

.nav-right { margin-left: auto; }

.muted { color: #505a5f; }
.small { font-size: 1rem; }
main code { padding: 1px 3px; color: #d13118; background-color: #f3f2f1; font-size: 0.9em; }
kbd { font-family: ui-monospace, menlo, monospace; font-size: 0.9rem; border: 1px solid #b1b4b6; border-bottom-width: 3px; padding: 0 5px; }
h2.section { margin-top: 40px; }

/* tags: kc.css .tag is 1.1875rem; pldb uses a smaller variant inline */
.tag { font-size: 1rem; line-height: 1.25; margin: 0; }
a.tag:hover { background: var(--trans-pink); color: #0b0c0c; }
.tag.award { color: #0b3a4d; background: #d9f3fe; font-weight: 700; }

/* ---------- search form (GOV.UK input + button) ---------- */
.searchbar { display: flex; }
.searchbar input, .row input, .row select {
  font: inherit; font-size: 1.1875rem; line-height: 1.25; color: #0b0c0c; background: #fff;
  border: 2px solid #0b0c0c; border-radius: 0; -webkit-appearance: none; appearance: none;
}
.searchbar input { flex: 1; min-width: 0; height: 2.5rem; padding: 5px; }
.searchbar input:focus, .row input:focus, .row select:focus {
  outline: 3px solid var(--trans-pink); outline-offset: 0; box-shadow: inset 0 0 0 2px;
}
.searchbar button, .row button {
  font: inherit; font-size: 1.1875rem; line-height: 1; color: #fff; cursor: pointer;
  background-color: var(--trans-pink-darkest); border: 2px solid transparent;
  box-shadow: 0 2px 0 #5e0a13; padding: 8px 12px 7px;
}
.searchbar button { height: 2.5rem; box-shadow: none; }
.searchbar button:hover, .row button:hover { background-color: #7d1119; }
.searchbar button:focus, .row button:focus { outline: 3px solid transparent; background: var(--trans-pink); color: #0b0c0c; box-shadow: 0 2px 0 #0b0c0c; }
.row input, .row select { font-size: 1rem; }
.row select { padding: 3px 28px 3px 6px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0h12L6 8z' fill='%230b0c0c'/%3E%3C/svg%3E") no-repeat right 8px center; }
.row input[type=number] { width: 5.5em; padding: 3px 6px; -moz-appearance: textfield; appearance: textfield; }
.row button { font-size: 1rem; padding: 6px 12px 5px; }

details.filters { margin-top: 10px; font-size: 1rem; }
details.filters summary { display: inline-block; cursor: pointer; color: var(--trans-pink-darker); text-decoration: underline; text-underline-offset: 0.1578em; list-style: none; }
details.filters summary::-webkit-details-marker { display: none; }
details.filters summary::before { content: ""; display: inline-block; margin-right: 6px; border-style: solid; border-color: transparent; border-width: 6px 0 6px 9px; border-left-color: currentColor; }
details.filters[open] summary::before { border-width: 9px 6px 0; border-top-color: currentColor; border-left-color: transparent; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--trans-pink-darker); margin-left: 6px; vertical-align: middle; }
.filter-body { margin-top: 10px; padding: 10px 0 5px 15px; border-left: 5px solid #b1b4b6; }
fieldset.venues { margin: 0 0 10px; }
fieldset legend { font-weight: 700; margin-bottom: 6px; }
.tier-link { font-weight: 400; margin-left: 8px; }
.chip { display: inline-flex; margin: 0 5px 6px 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { padding: 1px 8px 2px; border: 2px solid #0b0c0c; background: #fff; }
.chip:hover span { box-shadow: inset 0 0 0 1px #0b0c0c; }
.chip input:checked + span { background: var(--trans-pink-darkest); border-color: var(--trans-pink-darkest); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--trans-pink); }
.row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.row label { display: inline-flex; gap: 6px; align-items: center; }
.row .award-toggle input { width: 18px; height: 18px; accent-color: var(--trans-pink-darkest); -webkit-appearance: auto; appearance: auto; }

/* ---------- results ---------- */
#results { margin-top: 25px; }
.summary { color: #505a5f; margin: 0 0 10px; }
.summary strong, .summary q { color: #0b0c0c; }
.summary q { font-weight: 700; }
.facets { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; }
.facet .n { opacity: 0.75; font-variant-numeric: tabular-nums; }
a.tag.facet.on { background: var(--trans-pink-darkest); color: #fff; }

.hit { padding: 15px 0; border-top: 1px solid #b1b4b6; }
.hit:last-of-type { border-bottom: 1px solid #b1b4b6; }
.hit-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; font-size: 1rem; }
.badge { color: #505a5f; font-weight: 700; text-decoration: none; }
.badge:hover { color: #0b0c0c; text-decoration: underline; }
.hit h2.heading-s { margin-bottom: 5px; }
.authors { margin: 0 0 5px; font-size: 1rem; color: #505a5f; }
a.author { color: #505a5f; text-decoration: underline; text-decoration-color: #b1b4b6; text-underline-offset: 0.1578em; }
a.author:hover { color: var(--trans-pink-darker); text-decoration-color: currentColor; }
.snippet { margin: 0 0 5px; font-size: 1rem; line-height: 1.4; }
mark { background: var(--trans-pink-lighter); color: inherit; font-weight: 700; padding: 0 1px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 1rem; }
.pager { display: flex; justify-content: space-between; padding-top: 15px; font-weight: 700; }
.empty { padding: 15px 0; }

/* ---------- landing & venues ---------- */
.intro { margin-top: 30px; }
.lede { font-size: 1.3125rem; line-height: 1.25; margin: 0 0 10px; }
.examples { margin: 0; font-size: 1rem; color: #505a5f; }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; }
.venue-card { display: flex; flex-direction: column; padding: 10px 15px 12px; border-top: 5px solid var(--trans-pink); background: #f3f2f1; }
.venue-card:hover { background: var(--trans-pink-lighter); }
.vname { font-weight: 700; color: var(--trans-pink-darker); text-decoration: underline; text-underline-offset: 0.1578em; }
.vmeta { font-size: 1rem; color: #505a5f; margin-top: 2px; }
.crumbs a { font-size: inherit; }
.year-grid { display: grid; gap: 2px; margin-top: 20px; }
.year { display: grid; grid-template-columns: 52px 1fr 40px; align-items: center; gap: 12px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.year .y { color: var(--trans-pink-darker); font-weight: 700; text-decoration: underline; text-underline-offset: 0.1578em; }
.year:hover { background: var(--trans-pink-lighter); }
.year .bar { height: 12px; background: var(--trans-pink); }
.year .n { color: #505a5f; font-size: 1rem; text-align: right; }
ol.toc { list-style: decimal; padding-left: 1.6em; }
ol.toc li { margin: 0 0 10px; }
ol.toc li > a { font-weight: 700; }
ol.toc .authors { font-size: 1rem; }

/* ---------- paper page ---------- */
article.paper h1 { margin: 5px 0 10px; }
.links.big { gap: 10px; margin: 15px 0 25px; }
.btn { display: inline-block; padding: 6px 10px 5px; font-size: 1rem; color: #0b0c0c; background: #f3f2f1; box-shadow: 0 2px 0 #929191; text-decoration: none; }
.btn:hover { background: #dbdad9; }
.btn:focus { outline: 3px solid transparent; background: var(--trans-pink); box-shadow: 0 2px 0 #0b0c0c; }
.abstract { max-width: 40em; padding: 10px 0 1px 20px; margin-bottom: 15px; border-left: 10px solid var(--trans-pink); }
.abstract p { line-height: 1.45; margin: 0 0 15px; }
.similar { margin-top: 35px; padding-top: 25px; border-top: 1px solid #b1b4b6; }
.similar li .muted { font-size: 1rem; }

/* ---------- prose ---------- */
.prose { max-width: 40em; }
.prose h2 { margin-top: 30px; }
.prose pre { background: #f3f2f1; border-left: 5px solid var(--trans-pink); padding: 10px 15px; margin: 0 0 20px; overflow-x: auto; font-size: 0.875rem; line-height: 1.5; }
.prose pre code { padding: 0; background: none; color: #0b0c0c; }
.prose .table { margin-bottom: 20px; font-size: 1rem; }

/* footer: same markup as kirancodes.me, plus our source credits */
.footer-block-item > img { margin: 0 10px 5px 0; }

.lambda { color: var(--trans-pink-darker); }
