/* Daily contests (2026-11-26): the organiser screen (organise.html) and the daily contest page (daily.js, on the
   contest page /contests/<id>/). On lmi.css's tokens and type scale; general form fields (.field input, select, textarea) are in lmi.css. */

/* ---- organiser screen ---- */
.og-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.og-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.og-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--acc-ink); background: var(--chip); padding: 4px 10px; border-radius: 999px; }
.og-status.live { color: #16100A; background: var(--acc); }
.og-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.og-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.og-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.og-sec, .card.og-check, .card.og-after, .card.og-alert { padding: 16px 18px; }
.og-sec { display: flex; flex-direction: column; gap: 14px; }
.og-sec > h2 { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; margin: 0; }
.og-sec > .small-note { margin-top: -10px; }
.og-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.og-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.og-help { font-size: var(--fs-sm); font-weight: 400; color: var(--fg2); }
.og-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.og-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 46px; }
.og-person { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--soft); color: var(--fg); font-size: var(--fs-sm); font-weight: 600; }
.og-person button { width: 22px; height: 22px; border: 0; border-radius: 999px; background: transparent; color: var(--fg2); cursor: pointer; font-size: var(--fs-md); line-height: 1; }
.og-person button:hover { background: var(--line); color: var(--fg); }
.og-add { display: inline-flex; gap: 6px; align-items: center; }
.og-add input { height: 32px; width: 150px; border: 1.5px dashed var(--line2); border-radius: 999px; padding: 0 12px; font: 600 var(--fs-sm) var(--ff); color: var(--fg); background: transparent; }
.og-add input:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: transparent; }
.og-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--line2); border-radius: 12px; }
.og-logo img { max-width: min(100%, 300px); max-height: 72px; height: auto; }
.og-nologo { width: 200px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--soft); color: var(--fg2); font-size: var(--fs-sm); font-weight: 600; }
.og-logo .field { flex: 1; min-width: 220px; gap: 6px; }
.og-logo .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.og-sched { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); color: var(--fg2); }
.og-sched b { color: var(--fg); font-weight: 600; }

.og-rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.og-rules textarea { min-height: 260px; }
.og-preview { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); font-size: var(--fs-md); max-height: 300px; overflow-y: auto; overflow-wrap: anywhere; }
.og-preview p { margin: 0 0 10px; max-width: 70ch; }
.og-preview p:last-child { margin-bottom: 0; }
.og-pv-lbl { font-size: var(--fs-sm); font-weight: 600; color: var(--fg2); margin-bottom: 4px; }

.og-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.og-p { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) 128px 76px 76px 76px 24px; align-items: center; gap: 10px; padding: 9px 12px;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; font: inherit; font-size: var(--fs-sm); color: var(--fg); cursor: pointer; }
.og-p:hover { background: var(--soft); }
.og-p:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }
.og-p.hd { cursor: default; background: var(--soft); color: var(--fg2); font-weight: 600; }
.og-p .n { color: var(--fg2); font-weight: 600; font-variant-numeric: tabular-nums; }
.og-p .nm { font-size: var(--fs-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-p .var { color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-p .when { font-variant-numeric: tabular-nums; color: var(--fg3); white-space: nowrap; }
.og-ok, .og-no, .og-part { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.og-ok { color: var(--ok); }
.og-no { color: var(--bad); }
.og-part { color: var(--fg2); font-variant-numeric: tabular-nums; }
.og-p .chev { justify-self: end; color: var(--fg2); transition: transform .15s; }
.og-p[aria-expanded="true"] .chev { transform: rotate(90deg); }
.og-now { display: inline-flex; font-size: var(--fs-sm); font-weight: 700; color: #16100A; background: var(--acc); padding: 2px 8px; border-radius: 999px; }
.og-p[aria-expanded="true"] { background: var(--current); border-bottom: 0; }
.og-gap { padding: 6px 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--fg2); background: var(--bg); border-bottom: 1px solid var(--line); }
.og-edit { padding: 4px 16px 16px; background: var(--current); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.og-edit .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.og-edit .form-error { margin: 0; }
.og-edit .og-preview { background: var(--card); }
.og-fill { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--fg2); font-weight: 600; }
.og-fill select { height: 34px; border: 1.5px solid var(--line2); border-radius: 8px; padding: 0 8px; font: 600 var(--fs-sm) var(--ff); color: var(--fg); background: var(--card); }

.og-check { display: flex; flex-direction: column; gap: 10px; }
.og-check h2, .og-after h2, .og-alert h2 { font-size: var(--fs-md); font-weight: 600; margin: 0; }
.og-ci { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; font-size: var(--fs-sm); }
.og-ci svg { margin-top: 1px; }
.og-ci .ok { color: var(--ok); }
.og-ci .no { color: var(--bad); }
.og-ci b { font-weight: 600; }
.og-ci span.c { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg2); }
.og-bar { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.og-bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.og-after { display: flex; flex-direction: column; gap: 8px; }
.og-after .btn[disabled] { opacity: .55; cursor: not-allowed; }
.og-alert { border-color: var(--bad); background: var(--bad-soft); display: flex; flex-direction: column; gap: 8px; }
.og-alert h2 { color: var(--bad); }
.og-alert p { margin: 0; font-size: var(--fs-sm); }
.og-new { max-width: 760px; }

@media (max-width: 1000px) { .og-layout { grid-template-columns: minmax(0, 1fr); } .og-side { position: static; order: -1; } .og-rules { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .og-p { grid-template-columns: 30px minmax(0, 1fr) 72px 20px; }
  .og-p > :nth-child(3), .og-p > :nth-child(4), .og-p > :nth-child(5), .og-p > :nth-child(6) { display: none; }
  .og-row, .og-row3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the daily contest page (from redesign/daily-mockup.html) ---- */
/* Daily contest */
.dc-head { display: flex; flex-direction: column; gap: 6px; }
.dc-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.dc-tag.live { color: #16100A; background: var(--acc); }
.dc-tag.soon { color: var(--acc-ink); background: var(--chip); font-weight: 600; }
.dc-tag.done { color: var(--ok); background: var(--ok-soft); font-weight: 600; }
.dc-tabs { max-width: 680px; }
.dc-at { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--fg2); font-variant-numeric: tabular-nums; }
.dc-copy { position: relative; z-index: 1; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--fg2); cursor: pointer; }
.dc-copy:hover { background: var(--line); color: var(--fg); }
.dc-copy:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.dc-chip { height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-md); cursor: pointer; }
.dc-chip b { font-size: var(--fs-sm); font-weight: 600; color: var(--fg2); font-variant-numeric: tabular-nums; }
.dc-chip:hover { border-color: var(--line2); }
.dc-chip[aria-pressed="true"] { background: var(--chip); border-color: var(--acc); }
.dc-chip.add { color: var(--fg2); font-size: var(--fs-sm); font-weight: 600; }
.dc-stats h2 { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; margin: 0 0 4px; }
.dc-stats .small-note { margin: 0 0 10px; }
.dc-stats td.nm { white-space: nowrap; }
.dc-stats td.nm small { display: block; }
.dc-medals { white-space: nowrap; font-size: var(--fs-sm); }
.dc-medals i { font-style: normal; color: var(--fg2); font-weight: 700; margin-right: 3px; }

/* Now open: the one thing a daily player comes for, on the landing page */
.dc-now { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; background: var(--current); border: 1.5px solid var(--acc); border-radius: 14px; padding: 14px 16px; }
.dc-now .what { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.dc-now .lbl { font-size: var(--fs-sm); font-weight: 700; color: var(--acc-ink); }
.dc-now strong { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.15; }
.dc-now strong a { color: inherit; text-decoration: none; }
.dc-now strong a:hover { text-decoration: underline; }
.dc-now .meta { font-size: var(--fs-sm); color: var(--fg2); }
.dc-now.solved { background: var(--card); border-color: var(--line); }
.dc-now.solved .lbl { color: var(--ok); }
.dc-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dc-explain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.dc-text { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.dc-text h2 { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; margin: 0; }
.dc-text h3 { font-size: var(--fs-lg); font-weight: 600; margin: 8px 0 0; }
.dc-text p { margin: 0; max-width: 70ch; }
.dc-text ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.dc-text ul ul { margin-top: 6px; }
.dc-text img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); align-self: flex-start; }
.dc-text .small-note { margin-top: 2px; }

/* Puzzle cards */
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.dc-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 152px; transition: border-color .15s; }
.dc-card:hover { border-color: var(--line2); }
.dc-card .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dc-card h3 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.dc-card h3 a { color: inherit; text-decoration: none; }
.dc-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }   /* the whole card opens the puzzle page */
.dc-card h3 a:focus-visible { outline: none; }
.dc-card:has(h3 a:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }
.dc-react { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--fg2); font-variant-numeric: tabular-nums; }
.dc-meta { font-size: var(--fs-sm); color: var(--fg2); }
.dc-times { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: var(--fs-sm); color: var(--fg2); font-variant-numeric: tabular-nums; margin-top: auto; }
.dc-times b { font-size: var(--fs-md); font-weight: 600; color: var(--fg); }
.dc-times .pen { color: var(--bad); font-weight: 600; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); color: var(--fg2); font-variant-numeric: tabular-nums; }
.dc-stars { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.dc-stars svg { color: var(--acc); }
.dc-card .btn { position: relative; z-index: 1; margin-top: auto; }
.dc-card.now { border: 1.5px solid var(--acc); background: var(--current); }
.dc-left { font-size: var(--fs-sm); font-weight: 700; color: var(--acc-ink); }
.dc-card.locked { background: var(--soft); border-style: dashed; color: var(--fg2); }
.dc-card.locked h3 { color: var(--fg2); }
.dc-opens { margin-top: auto; margin-bottom: -4px; display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; }
.dc-note { font-size: var(--fs-sm); color: var(--fg2); }

/* Leaderboards and standings */
.dc-lbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dc-lbs h2, .dc-pz h2 { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; margin: 0 0 4px; }
.dc-lbs .small-note { margin: 0 0 10px; }
.dc-scroll { overflow-x: auto; border-radius: 12px; }
.dc-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.dc-table th { text-align: left; font-size: var(--fs-sm); font-weight: 600; color: var(--fg2); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.dc-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.dc-table tr:last-child td { border-bottom: 0; }
.dc-table .num { text-align: right; white-space: nowrap; }
.dc-table .rk { width: 1%; white-space: nowrap; color: var(--fg2); font-weight: 600; }
.dc-table a { color: var(--fg); text-decoration: none; font-weight: 600; }
.dc-table a:hover { text-decoration: underline; }
.dc-table tr.me td { background: var(--me-soft); }
.dc-table tr.gap td { padding: 2px 10px; color: var(--fg2); text-align: center; background: var(--card); }
.dc-table .u { font-size: var(--fs-sm); font-weight: 700; color: var(--fg2); }
.dc-table small { color: var(--fg2); font-size: var(--fs-sm); }
.dc-table .rp { font-size: var(--fs-sm); }
.dc-more { display: block; text-align: center; padding: 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--acc-ink); text-decoration: none; }
.dc-more:hover { text-decoration: underline; }

/* Puzzle page */
.dc-pzhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dc-pzhead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-mine { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dc-pz { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.dc-prevnext { display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-sm); font-weight: 600; }
.dc-prevnext a { color: var(--fg2); text-decoration: none; }
.dc-prevnext a:hover { color: var(--fg); }
.dc-own { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.dc-own h2 { font-size: var(--fs-md); font-weight: 600; margin: 0; }
.dc-own p { margin: 0; max-width: 70ch; }
.dc-startbox { padding: 18px; display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.dc-startbox .what { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.dc-startbox .what b { font-weight: 600; }
.dc-shut { display: flex; align-items: center; gap: 12px; padding: 20px; border: 1px dashed var(--line2); border-radius: 14px; background: var(--soft); color: var(--fg2); font-size: var(--fs-md); }
.dc-shut svg { flex: none; }
.dc-react-card { display: flex; flex-direction: column; overflow: hidden; }
.dc-react-card > h2 { padding: 14px 16px 0; }
.dc-react-card > .small-note { padding: 0 16px 8px; }
.dc-rlist { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; border-top: 1px solid var(--line); }
.dc-r { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.dc-r .av { width: 30px; height: 30px; flex: none; border-radius: 999px; background: var(--soft); color: var(--fg3); font-size: var(--fs-sm); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dc-r .b { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dc-r .h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--fg2); }
.dc-r .h strong { color: var(--fg); font-size: var(--fs-md); }
.dc-r .h .pos { font-weight: 600; color: var(--ok); }
.dc-r .t { overflow-wrap: anywhere; }
.dc-r .t.emoji { font-size: var(--fs-xl); line-height: 1.2; }
.dc-compose { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }
.dc-compose textarea { width: 100%; min-height: 64px; border: 1.5px solid var(--line2); border-radius: 10px; padding: 8px 12px; font: 400 var(--fs-md) var(--ff); color: var(--fg); background: var(--card); resize: vertical; }
.dc-compose textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.dc-compose .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dc-emo { display: flex; gap: 2px; flex-wrap: wrap; }
.dc-emo button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; font-size: var(--fs-lg); cursor: pointer; }
.dc-emo button:hover { background: var(--soft); }


@media (max-width: 1000px) {
  .dc-lbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-lbs > :last-child { grid-column: 1 / -1; }
  .dc-pz { grid-template-columns: minmax(0, 1fr); }
  .dc-explain { grid-template-columns: minmax(0, 1fr); }
  .dc-mine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-lbs { grid-template-columns: minmax(0, 1fr); }
  .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-mine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result .row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-now .btn, .dc-startbox .btn { width: 100%; }
}

/* Rating, the emoji picker, "show all" buttons (2026-11-26, not in the mock) */
.dc-rate { display: inline-flex; gap: 2px; }
.dc-rate button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--line2); cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.dc-rate button.on { color: var(--acc); }
.dc-rate button:hover { background: var(--soft); }
.dc-rate button:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.dc-pick { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 16px 12px; }
.dc-pick button { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; font-size: var(--fs-lg); cursor: pointer; }
.dc-pick button:hover { background: var(--soft); }
button.dc-more { width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: var(--fs-sm); font-weight: 600; }
.dc-headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dc-r .t a { color: var(--acc-ink); }
