/* Silences d'Or: the Catalogue kit (core.css + catalogue.css) with a gold signal colour, plus the site's own parts. */

/* ---------- gold ---------- */
:root[data-site=sdo] { --accent: #946800; --on-accent: #ffffff; --gold-soft: #f6ecd2; }
:root[data-site=sdo][data-scheme=dark] { --accent: #f0b93a; --on-accent: #0d0d0d; --gold-soft: #2a2210; }
@media (prefers-color-scheme: dark) {
  :root[data-site=sdo]:not([data-scheme]) { --accent: #f0b93a; --on-accent: #0d0d0d; --gold-soft: #2a2210; }
}

/* ---------- masthead ---------- */
.wordmark { display: inline-flex; align-items: baseline; gap: .1em; }
.medal { display: inline-block; width: .55em; height: .55em; background: var(--accent); margin-right: .4em; align-self: center; }
.nav-login { font-size: .95rem; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-login:hover, .nav-login[aria-current] { color: var(--accent); }
.avatar.initial { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem;
  background: var(--accent); color: var(--on-accent); }
@media (max-width: 44rem) { .nav-login { margin-left: auto; } }

.site-foot { align-items: center; }
.site-foot .scheme { margin-left: auto; font-size: .8rem; color: var(--muted); text-decoration: none; }
.site-foot .scheme:hover { color: var(--accent); }

.flash.success { border-color: var(--accent); }
.crumbs { margin-bottom: .75rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a::before { content: "← "; }
.crumbs a:hover { color: var(--accent); }

/* ---------- home ---------- */
.hero { margin-bottom: 3rem; }
.hero h1 { font-size: clamp(2.8rem, 9vw, 6.2rem); }
.countdown { border-top: 3px solid var(--ink); margin-top: 1.75rem; padding-top: 1rem; }
.countdown-lead { font-size: 1.15rem; font-weight: 600; margin: 0; }
.countdown-time { font-size: clamp(3rem, 13vw, 8.5rem); line-height: 1; color: var(--accent); margin: .2rem 0 .4rem;
  white-space: nowrap; }
.countdown-time small { font-size: .32em; color: var(--ink); font-stretch: 100%; font-weight: 700; margin-left: .06em; margin-right: .3em;
  letter-spacing: 0; }
.countdown-end { margin: 0; }

.prose { max-width: 46rem; }
.prose p, .prose li { font-size: 1.05rem; }
.prose h2 { margin: 1.5rem 0 .6rem; }
.prose blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--ink-2); }
.lede p { margin: 0 0 .6rem; }

/* ---------- categories ---------- */
.page-head .big-count small { font-size: .45em; color: var(--muted); }
.legend { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.legend .state + .state, .legend .state:not(:first-child) { margin-left: 1rem; }
.state { display: inline-flex; align-items: center; justify-content: center; }
.state .icon { width: 1.35em; height: 1.35em; }
.state.done { color: var(--accent); }
.state.todo { color: var(--muted); }
.cat-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); max-width: 52rem; }
.cat-list > li { border-bottom: 1px solid var(--rule); }
.cat-list a { display: flex; align-items: center; gap: 1.1rem; padding: .95rem 0; text-decoration: none; }
.cat-list a:hover .cat-title { color: var(--accent); }
.cat-num { font-size: 1.9rem; line-height: 1; color: var(--muted); min-width: 2.2ch; }
.cat-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cat-title { font-weight: 700; font-size: 1.12rem; line-height: 1.3; }
.cat-list .state .icon { width: 1.6em; height: 1.6em; }

/* ---------- one category ---------- */
.cat-head h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
.cat-intro { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2.5rem; margin-bottom: 2.75rem; align-items: start; }
.rules { border-top: 3px solid var(--ink); padding-top: .55rem; }
.rules dl { margin: .7rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; }
.rules dt { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .07em; padding-top: .15rem; }
.rules dd { margin: 0; }
@media (max-width: 52rem) { .cat-intro { grid-template-columns: 1fr; gap: 1.5rem; } }

.vote-status { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; font-size: .95rem; }
.ballot-section { max-width: 52rem; }

.slots { list-style: none; margin: 0; padding: 0; }
.slot { display: flex; align-items: center; gap: .9rem; padding: .55rem 0; border-bottom: 1px solid var(--rule); position: relative; }
.slot .rank { width: 3.2rem; flex: none; display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.slot .rank .num { font-size: 2rem; }
.slot .rank small { font-size: .68rem; color: var(--muted); font-weight: 600; margin-top: .15rem; white-space: nowrap; }
.slot:not(.empty) .rank .num { color: var(--accent); }
.slot-body { flex: 1; min-width: 0; position: relative; }
.slot-tools { display: flex; gap: 0; flex: none; }
.slot-tools .btn-quiet { padding: .4rem; }
.slot.empty .slot-tools { display: none; }
.picked { display: flex; align-items: center; gap: .8rem; min-height: 3.4rem; }
.picked-text { display: flex; flex-direction: column; min-width: 0; }
.picked-name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cover { width: 2.5rem; height: 3.35rem; flex: none; background: var(--paper-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover:empty::after { content: ""; display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, transparent 47%, var(--rule) 47% 53%, transparent 53%); }
.finder input { padding-block: .75rem; }

.options { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30; list-style: none; margin: 0; padding: 0;
  background: var(--paper); border: 1px solid var(--ink); max-height: 23rem; overflow-y: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.options [role=option] { display: flex; align-items: center; gap: .7rem; padding: .45rem .7rem; cursor: pointer; border-bottom: 1px solid var(--rule); }
.options [role=option]:last-child { border-bottom: 0; }
.options [role=option][aria-selected=true], .options [role=option]:hover { background: var(--gold-soft); }
.options .cover { width: 2rem; height: 2.65rem; }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.opt-name { font-weight: 600; line-height: 1.25; }
.option-suggest { color: var(--accent); }
.option-suggest .opt-name { font-weight: 700; }
.option-suggest .opt-detail { color: var(--ink-2); }
.option-note { padding: .55rem .7rem; border-bottom: 1px solid var(--rule); }

.ballot-submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 0; }
.ballot-submit button { padding: .8rem 1.5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.ballot.dirty .ballot-submit { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--ink); z-index: 5; }
.ballot.readonly .slot { padding: .45rem 0; }

.cat-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--ink); padding-top: .8rem; margin-top: 2rem; max-width: 52rem; }
.cat-nav a { display: flex; flex-direction: column; text-decoration: none; font-weight: 700; max-width: 48%; }
.cat-nav .next { text-align: right; margin-left: auto; }
.cat-nav a:hover { color: var(--accent); }

@media (max-width: 44rem) {
  .slot { gap: .6rem; align-items: flex-start; }
  .slot .rank { width: 2.3rem; padding-top: .55rem; }
  .slot .rank .num { font-size: 1.6rem; }
  .slot-tools { flex-direction: column; }
  .slot-tools .btn-quiet { padding: .25rem; }
  .slot.empty .slot-tools { display: none; }
  .picked { min-height: 3rem; }
  .ballot-submit { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--ink); z-index: 5; }
  .ballot-submit button { flex: 1; }
}

/* ---------- login ---------- */
.btn-discord, button.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; padding: .85rem 1.2rem; font-size: 1rem; }
.btn-discord:hover, button.btn-discord:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-discord .icon { width: 1.35em; height: 1.35em; }
.discord-form { margin: 1.5rem 0 .6rem; }
.password-login { margin-top: 2.25rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.password-login summary { cursor: pointer; font-weight: 600; }
.password-login form { margin-top: 1.25rem; }
.account-head { align-items: center; }

/* ---------- results ---------- */
.podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: end; }
.podium li { display: flex; flex-direction: column; gap: .3rem; }
.podium .place { font-size: 2.6rem; line-height: 1; color: var(--muted); }
.podium .place-1 .place { color: var(--accent); font-size: 3.6rem; }
.podium .cover { width: 100%; height: auto; aspect-ratio: 3 / 4; }
.podium .place-1 .cover { outline: 3px solid var(--accent); outline-offset: 3px; }
.podium-name { font-weight: 800; font-size: 1.1rem; line-height: 1.2; }
.rows.rest { margin-top: 1.5rem; }
.place-small { min-width: 2ch; color: var(--muted); }
@media (max-width: 44rem) {
  .podium { grid-template-columns: 1fr; }
  .podium li { display: grid; grid-template-columns: auto 3.6rem 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; }
  .podium .place { grid-row: span 2; font-size: 2.2rem; }
  .podium .place-1 .place { font-size: 2.6rem; }
  .podium .cover { grid-row: span 2; }
}

/* ---------- organisers ---------- */
.subnav, .tabs { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: -1rem 0 2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); }
.subnav a, .tabs a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.subnav a:hover, .tabs a:hover { color: var(--ink); }
.subnav a[aria-current], .tabs a[aria-current] { color: var(--ink); box-shadow: 0 2px 0 var(--accent); }
.tabs { margin: 0 0 1rem; border-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; margin-bottom: 1rem; }
.filters .tabs { margin: 0; padding: 0; }
.filters input[type=search] { max-width: 18rem; }
.figure a { text-decoration: none; }
.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.person { display: flex; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: flex-start; }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.person-main blockquote { margin: .2rem 0; padding-left: .8rem; border-left: 3px solid var(--rule); color: var(--ink-2); }
.person-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; align-items: center; max-width: 24rem; }
.note-form, .inline-form { display: flex; gap: .4rem; align-items: center; max-width: 34rem; }
.note-form input, .inline-form input { padding: .35rem .55rem; font-size: .9rem; }
.inline-form .year { max-width: 6rem; }
.resolve { width: 24rem; max-width: 100%; display: flex; flex-direction: column; gap: .6rem; }
.resolve .slot { border: 0; padding: 0; }
.resolve details summary { cursor: pointer; color: var(--muted); }
.resolve details form { margin-top: .5rem; }
.link-form { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.link-form .slot { width: 100%; }
.copy-field { font-family: var(--mono); font-size: .85rem; margin-top: .5rem; }
.form-wide { max-width: 44rem; }
.check-field .switch-row { text-transform: none; }
tr.far { color: var(--muted); }
@media (max-width: 44rem) {
  .person { flex-direction: column; gap: .75rem; }
  .person-actions { justify-content: flex-start; }
  .resolve { width: 100%; }
}
.person-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 60; top: 1rem; right: 1rem; display: flex; flex-direction: column; gap: .5rem;
  width: min(26rem, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: .7rem; padding: .75rem .6rem .75rem .9rem;
  background: var(--ink); color: var(--paper); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-weight: 500; line-height: 1.4;
  animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s; }
.toast.leaving { opacity: 0; transform: translateX(1rem); }
.toast-mark { width: .6rem; height: .6rem; background: var(--accent); flex: none; margin-top: .4rem; }
.toast.error .toast-mark { background: #e5322d; }
.toast-text { flex: 1; }
.toast-close, button.toast-close { border: 0; padding: .15rem; background: none; color: inherit; opacity: .6; }
.toast-close:hover, button.toast-close:hover { background: none; color: inherit; opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-.5rem); } }
@media (max-width: 44rem) { .toasts { top: auto; bottom: 5.5rem; right: 1rem; left: 1rem; width: auto; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }

/* ---------- drag and drop ---------- */
[data-grip] { touch-action: none; }
.slot:not(.empty) .rank[data-grip] { cursor: grab; }
.grip { display: inline-flex; align-items: center; padding: .4rem; color: var(--muted); cursor: grab; }
.grip:hover { color: var(--accent); }
.slot.empty .grip { display: none; }
.slots.sorting, .slots.sorting * { cursor: grabbing !important; user-select: none; }
.slot.dragging { background: var(--gold-soft); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); z-index: 10; }
.slot.dropped { animation: dropped .6s ease-out; }
@keyframes dropped { from { background: var(--gold-soft); } }
@media (max-width: 44rem) { .grip { padding: .25rem; } }
@media (max-width: 44rem) { .slot-tools [data-move] { display: none; } .slot-tools { flex-direction: row; align-items: center; } }
