/* Daily Intercept (/daily, v3.59.0). One calm column, phone first, inside the site's dark Matrix shell.
   The transmission is a strip of teleprinter tape: the one bright surface on the page.
   An on-screen keyboard sits at the bottom so phones never open the system keyboard over the tape. */
.daily-page {
    --di-panel: #06140b;
    --di-panel-2: #0b1f12;
    --di-line: rgba(0, 255, 0, 0.28);
    --di-phos: #3cff8c;
    --di-phos-dim: #1e7a44;
    --di-text: #d2f5dc;
    --di-muted: #8fbf9c;
    --di-gold: #ffd23f;
    --di-tape: #ece6d3;
    --di-tape-edge: #d0c7aa;
    --di-ink: #23271f;
    --di-ink-soft: #5f5a49;
    --di-pen: #1d4ea6;
    --di-stamp: #b8321d;
    --di-hint: #8a4a00;
}

.daily-header .subtitle { letter-spacing: 1px; }

/* The game sits on a near-solid panel, so the digital rain keeps falling around it without
   showing through the text and tools (Joe, v3.59.2). The tape and the keyboard are fully solid. */
.daily {
    max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; color: var(--di-text);
    background: rgba(0, 6, 2, 0.94); border: 1px solid var(--di-line); border-radius: 8px; padding: 18px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.8);
}
.daily > *, .daily-solved > * { min-width: 0; }
.daily [hidden] { display: none !important; }   /* the flex and grid rules below must not undo [hidden] */
.daily-admin-note, .daily-empty { max-width: 760px; margin: 0 auto 16px; }
.daily-small { color: var(--di-muted); font-size: 0.85em; }
.daily-spacer { flex: 1; }

/* guest sign-up band: the first thing a guest sees, above the game */
.daily-signup {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 16px;
    background: rgba(255, 210, 63, 0.09); border: 2px solid var(--di-gold); border-radius: 8px;
}
.daily-signup-text { margin: 0; flex: 1 1 280px; line-height: 1.5; color: var(--di-text); }
.daily-signup-text strong { color: var(--di-gold); }
.daily-signup-text .is-hot { color: var(--di-gold); font-weight: bold; }
.daily-signup-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* meta row */
.daily-meta { display: flex; gap: 22px; justify-content: flex-end; }
.daily-meta div, .daily-statrow div { display: grid; }
.daily-meta b, .daily-statrow b { font-weight: normal; color: var(--di-phos); font-size: 1.3em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.daily-meta b { font-size: 1.1em; }
.daily-meta span, .daily-statrow span { font-size: 0.7em; color: var(--di-muted); letter-spacing: 0.14em; text-transform: uppercase; }

/* tier tabs */
.daily-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--di-line); }
.daily-tab {
    font: inherit; cursor: pointer; background: var(--di-panel); color: var(--di-muted); border: 0; border-right: 1px solid var(--di-line);
    padding: 8px 4px; display: grid; justify-items: center; text-align: center; border-radius: 0; min-width: 0;
}
.daily-tab:last-child { border-right: 0; }
.daily-tab .tn { font-size: 1em; color: var(--di-text); font-weight: bold; }
.daily-tab .tf { font-size: 0.8em; }
.daily-tab .tk { font-size: 0.75em; }
.daily-tab.is-done .tk { color: var(--di-phos); }
.daily-tab[aria-selected="true"] { background: var(--di-phos); color: #000; }
.daily-tab[aria-selected="true"] .tn, .daily-tab[aria-selected="true"] .tk { color: #000; }
.daily-tab:focus-visible { outline: 2px solid var(--di-gold); outline-offset: -3px; }

.daily-brief { color: var(--di-muted); display: grid; gap: 8px; font-size: 0.9em; line-height: 1.45; }
.daily-brief p { margin: 0; }
.daily-clues { display: flex; flex-wrap: wrap; gap: 6px; }
.daily-clue { border: 1px solid var(--di-gold); color: var(--di-gold); padding: 3px 9px; font-size: 0.85em; overflow-wrap: anywhere; }
.daily-clue.is-locked { border-style: dashed; color: var(--di-muted); border-color: var(--di-muted); }

/* tape */
.daily-tape {
    position: relative; background: var(--di-tape); color: var(--di-ink); font-family: 'Courier New', Courier, monospace;
    padding: 14px 14px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border-top: 6px dotted var(--di-tape-edge); border-bottom: 6px dotted var(--di-tape-edge);
}
.daily-tapehead {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; font-size: 0.75em; color: var(--di-ink-soft);
    letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--di-tape-edge); padding: 0 9.5em 7px 0; margin-bottom: 14px;
}
.daily-stamp {
    position: absolute; right: 12px; top: 10px; transform: rotate(-7deg); border: 2px solid var(--di-stamp); color: var(--di-stamp);
    padding: 1px 7px; font-weight: bold; font-size: 0.8em; letter-spacing: 0.14em; opacity: 0.85; pointer-events: none;
}
.daily-stamp.is-done { border-color: var(--di-pen); color: var(--di-pen); }

.daily-keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 16px; }
.daily-lbl { font-size: 0.8em; letter-spacing: 0.14em; color: var(--di-ink-soft); }
.daily-keyboxes { display: flex; flex-wrap: wrap; gap: 4px; }
.daily-kbox {
    font: inherit; font-weight: bold; font-size: 1.4em; width: 36px; height: 42px; padding: 0; cursor: pointer;
    border: 2px solid var(--di-ink-soft); background: #f7f2e2; color: var(--di-pen); border-radius: 0; touch-action: manipulation;
}
.daily-kbox.is-sel { background: #e5c95e; border-color: var(--di-pen); }
.daily-kbox.is-hint { color: var(--di-hint); border-style: dotted; }
.daily-kbox:focus-visible { outline: 2px solid var(--di-pen); outline-offset: 1px; }
.daily-tape.is-solved .daily-kbox { color: var(--di-ink); cursor: default; background: transparent; }

.daily-grid { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.daily-word { display: flex; gap: 2px; }
.daily-cell {
    font: inherit; width: 1.9em; padding: 0; border: 0; border-radius: 0; cursor: pointer; background: transparent; color: var(--di-ink);
    display: grid; justify-items: stretch; font-size: 16px; touch-action: manipulation;
}
.daily-cell .ct { font-weight: bold; font-size: 17px; text-align: center; min-height: 24px; }
.daily-cell .ct svg.glyph { width: 22px; height: 22px; display: block; margin: 0 auto 2px; }
.daily-cell .pt {
    height: 32px; display: grid; place-items: center; border-bottom: 2px solid var(--di-ink-soft); color: var(--di-pen); font-weight: bold; font-size: 21px;
}
.daily-cell.is-same .pt { background: #f3e3a3; }
.daily-cell.is-sel .pt { background: #e5c95e; border-bottom-color: var(--di-pen); }
.daily-cell.is-dup .pt { color: var(--di-stamp); background: #f4d2c8; }
.daily-cell.is-dup.is-sel .pt { background: #eab8a9; }
.daily-cell.is-hint .pt { color: var(--di-hint); border-bottom-style: dotted; }
.daily-cell.is-given .pt { color: var(--di-ink); border-bottom-style: double; border-bottom-width: 3px; }
.daily-cell.is-ro { cursor: default; }
.daily-cell .pt.is-unk { color: var(--di-ink-soft); font-weight: normal; }
.daily-cell:focus-visible { outline: 2px solid var(--di-pen); outline-offset: 1px; }
.daily-tape.is-solved .daily-cell { cursor: default; }
.daily-tape.is-solved .daily-cell .pt { color: var(--di-ink); border-bottom-color: transparent; background: transparent; }
.daily-status { margin-top: 14px; font-size: 0.85em; color: var(--di-ink-soft); min-height: 1.5em; }
.daily-status.is-bad { color: var(--di-stamp); }
.daily-status a { color: var(--di-pen); }

/* actions */
.daily-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.daily .btn { min-height: 40px; touch-action: manipulation; }

/* on-screen keyboard */
.daily-kb {
    position: sticky; bottom: 0; z-index: 5; background: #000; padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    display: grid; gap: 6px; border-top: 1px solid var(--di-line);
}
.daily-krow { display: flex; gap: 5px; justify-content: center; }
.daily-key {
    font: inherit; font-size: 17px; flex: 1 1 0; max-width: 46px; min-width: 0; height: 46px; border-radius: 0; cursor: pointer;
    background: var(--di-panel-2); color: var(--di-text); border: 1px solid var(--di-line); padding: 0; touch-action: manipulation;
}
.daily-key.is-wide { flex: 1.6 1 0; max-width: 74px; font-size: 13px; }
.daily-key.is-used { color: var(--di-muted); background: var(--di-panel); }
.daily-key:active { background: var(--di-phos-dim); color: #000; }
.daily-key:focus-visible { outline: 2px solid var(--di-phos); outline-offset: -2px; }
.daily-key.is-go { background: var(--di-phos); color: #000; border-color: var(--di-phos); }
.daily-key.is-go:disabled { background: var(--di-panel); color: var(--di-muted); border-color: var(--di-line); opacity: 0.6; cursor: default; }

/* tools */
.daily-tools { display: grid; gap: 8px; }
.daily-tools h2 { margin: 0 0 2px; font-size: 0.75em; font-weight: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--di-muted); }
.daily-tools details { background: var(--di-panel); border: 1px solid var(--di-line); }
.daily-tools summary { cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; list-style: none; min-height: 44px; align-items: center; }
.daily-tools summary::-webkit-details-marker { display: none; }
.daily-tools summary::before { content: "▸"; color: var(--di-phos-dim); }
.daily-tools details[open] summary::before { content: "▾"; }
.daily-tools summary .nm { flex: 1; color: var(--di-text); }
.daily-tools summary .used { font-size: 0.8em; color: var(--di-muted); }
.daily-tools details.is-on summary .used { color: var(--di-phos); }
.daily-tools summary:focus-visible { outline: 2px solid var(--di-phos); outline-offset: -2px; }
.daily-tools .tbody { padding: 0 14px 14px; display: grid; gap: 10px; }
.daily-tools .note { margin: 0; font-size: 0.85em; color: var(--di-muted); }
.fq { display: grid; gap: 4px; }
.fqrow { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) 2em; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.fqrow svg.glyph { width: 18px; height: 18px; display: block; }
.fqtrack { height: 10px; }
.fqbar { height: 10px; background: var(--di-phos-dim); }
.fqrow:first-child .fqbar { background: var(--di-phos); }
.fqn { color: var(--di-muted); text-align: right; font-size: 0.85em; }
.eng { font-size: 0.85em; color: var(--di-muted); }
.eng b { color: var(--di-text); font-weight: normal; letter-spacing: 0.18em; }
.preview { background: #000; border: 1px solid var(--di-line); padding: 8px 10px; color: var(--di-text); letter-spacing: 0.06em; overflow-wrap: anywhere; }
.dialrow { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.dialrow output { min-width: 4.5em; display: grid; place-items: center; border: 1px solid var(--di-line); color: var(--di-phos); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.cribin { font: inherit; font-size: 16px; text-transform: uppercase; letter-spacing: 0.1em; background: #000; color: var(--di-phos); border: 1px solid var(--di-phos-dim); padding: 8px 10px; min-width: 0; flex: 1; border-radius: 0; }
.cribin:focus { outline: none; border-color: var(--di-phos); }
.afrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--di-muted); }
.afrow select { font: inherit; font-size: 16px; background: #000; color: var(--di-phos); border: 1px solid var(--di-phos-dim); padding: 6px 8px; border-radius: 0; min-height: 40px; }
.afrow select:focus-visible { outline: 2px solid var(--di-phos); outline-offset: 1px; }
.afsol { display: grid; gap: 8px; }
.afsol .k { color: var(--di-text); }
.afsol .k b { color: var(--di-phos); font-weight: normal; }
.crib { max-height: 232px; overflow-y: auto; border: 1px solid var(--di-line); background: #000; }
.daily-crib-empty { padding: 10px; }
.crow {
    font: inherit; width: 100%; display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 10px; align-items: center;
    background: transparent; color: var(--di-muted); border: 0; border-bottom: 1px solid var(--di-line); padding: 7px 10px; text-align: left; cursor: pointer; border-radius: 0;
}
.crow:hover, .crow:focus-visible { background: var(--di-panel-2); color: var(--di-text); outline: none; }
.crow .frag { letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow b { font-weight: normal; color: var(--di-phos); letter-spacing: 0.3em; font-size: 16px; overflow-wrap: anywhere; }
.crow .use { font-size: 0.75em; color: var(--di-phos-dim); }
.daily-pkey svg.pigpen-key { width: 100%; max-width: 420px; height: auto; display: block; background: var(--di-tape); padding: 8px; }
.pigpen-key text { font-family: 'Courier New', monospace; font-weight: bold; font-size: 15px; fill: var(--di-ink); text-anchor: middle; dominant-baseline: central; }
.pigpen-key line { stroke: var(--di-ink); stroke-width: 2; }
.pigpen-key circle { fill: var(--di-ink); }

/* solved */
.daily-solved { display: grid; gap: 13px; border-color: var(--di-phos-dim); }
.daily-solved h2 { margin: 0; }
.daily-plain { font-size: 1.15em; color: var(--di-text); overflow-wrap: anywhere; letter-spacing: 0.04em; }
.daily-plain small { display: block; font-size: 0.75em; color: var(--di-muted); margin-top: 4px; }
.daily-note-line { margin: 0; color: var(--di-gold); font-size: 0.9em; }
.daily-achievements { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.daily-achievements li { border: 1px solid var(--di-gold); padding: 6px 10px; color: var(--di-text); }
.daily-achievements .ico { margin-right: 6px; }
.daily-achievements b { color: var(--di-gold); }
.daily-share { margin: 0; white-space: pre; overflow-x: auto; background: #000; border: 1px solid var(--di-line); padding: 11px 13px; color: var(--di-phos); font-size: 14px; line-height: 1.6; }
.daily-statrow { display: flex; gap: 20px; flex-wrap: wrap; }
.daily-guest-cta { margin: 0; color: var(--di-text); }
.daily-next { margin: 0; color: var(--di-muted); }
.daily-next b { color: var(--di-text); font-weight: normal; font-variant-numeric: tabular-nums; }
.daily-how p:last-child { margin-bottom: 0; }

@media (max-width: 400px) {
    .daily-cell { width: 1.7em; }
    .daily-cell .pt { font-size: 19px; height: 30px; }
    .daily-grid { gap: 12px 14px; }
    .daily-key { height: 44px; font-size: 16px; }
    .daily-kbox { width: 32px; height: 40px; font-size: 1.25em; }
    .daily-meta { justify-content: space-between; }
}
@media (max-width: 600px) {
    .daily { padding: 12px; }
    .daily-header { margin-bottom: 0; }
    .daily-header .subtitle { margin: 0; }
    .daily { gap: 12px; }
}

/* The site's button style is roomy; the game's action rows need to fit beside the tape on a phone.
   (#daily outranks the site-wide button:not(…) rule.) */
#daily .daily-actions .btn, #daily .daily-tools .btn, #daily .daily-signup-actions .btn { padding: 8px 14px; font-size: 0.9em; min-height: 40px; }

/* part C: day navigation, archive notes, streak protection */
.daily-daynav { max-width: 760px; margin: 0 auto 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.daily-daynav a { color: #0ff; text-decoration: none; padding: 4px 8px; border: 1px solid rgba(0, 255, 255, 0.35); border-radius: 4px; background: rgba(0, 0, 0, 0.75); font-size: 0.9em; }
.daily-daynav a:hover, .daily-daynav a:focus-visible { background: rgba(0, 255, 255, 0.12); }
.daily-locked-day { max-width: 760px; margin: 0 auto 16px; }
.daily-locked-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.daily-shield { margin: 0; color: #9fdcff; font-size: 0.9em; }

/* archive calendar (/daily/archive) */
.daily-archive-meta { justify-content: space-between; flex-wrap: wrap; }
.daily-cal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.daily-cal-head h2 { margin: 0; font-size: 1.3em; }
.daily-cal-head a { color: #0ff; text-decoration: none; font-size: 0.9em; white-space: nowrap; }
.daily-cal-sum { margin: 0; }
.daily-cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.daily-cal-wd { text-align: center; font-size: 0.75em; color: var(--di-muted); letter-spacing: 1px; text-transform: uppercase; }
.daily-cal-day > a, .daily-cal-day > span {
    position: relative; display: grid; gap: 4px; align-content: start; min-height: 64px; padding: 6px; box-sizing: border-box; height: 100%;
    background: var(--di-panel-2); border: 1px solid var(--di-line); border-radius: 6px; color: var(--di-text); text-decoration: none;
}
.daily-cal-day > a:hover, .daily-cal-day > a:focus-visible { border-color: var(--di-phos); box-shadow: 0 0 12px rgba(60, 255, 140, 0.3); }
.daily-cal-day.is-empty > span { background: transparent; border-style: dashed; opacity: 0.45; }
.daily-cal-day.is-today > a { border: 2px solid #0ff; }
.daily-cal-day.is-full > a { border-color: var(--di-gold); }
.daily-cal-day.is-locked > a { opacity: 0.75; }
.daily-cal-n { font-weight: bold; }
.daily-cal-lock { position: absolute; top: 4px; right: 4px; font-size: 0.75em; }
.daily-cal-pips { display: flex; gap: 2px; flex-wrap: wrap; }
.pip { font-style: normal; font-size: 0.65em; width: 1.6em; height: 1.6em; display: inline-grid; place-items: center; border: 1px solid var(--di-line); border-radius: 3px; color: var(--di-muted); }
.pip.is-day { background: var(--di-phos); color: #000; border-color: var(--di-phos); }
.pip.is-arch { background: #0aa; color: #000; border-color: #0aa; }
.daily-cal-key .pip { font-size: 0.8em; vertical-align: middle; }
@media (max-width: 480px) {
    .daily-cal { gap: 3px; }
    .daily-cal-day > a, .daily-cal-day > span { min-height: 52px; padding: 4px 3px; }
    .pip { width: 1.3em; height: 1.3em; font-size: 0.6em; }
    .daily-cal-wd { font-size: 0.6em; letter-spacing: 0; }
}
