/* This Day Quiz: a tear-off desk calendar. White paper, vermilion header, ink navy type.
   Every rule is scoped to body.tdq because the quiz frame page loads this file too. */
[hidden]{display:none!important}
.tdq{--paper:#fff;--desk:#e8edf2;--ink:#16213a;--red:#d6311f;--green:#1f7a4d;--soft:#5a6478;--rule:#c3cad5;
  margin:0;background:var(--desk);color:var(--ink);font:18px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%}
.tdq *{box-sizing:border-box}
.tdq a{color:var(--ink);text-decoration-color:var(--red);text-decoration-thickness:2px;text-underline-offset:3px}
.tdq a:hover{color:var(--red)}
.tdq button,.tdq input,.tdq textarea{font-family:inherit}
.tdq h1,.tdq h2{font-family:Georgia,"Times New Roman",serif;line-height:1.15;margin:0}
.tdq .stamp{font:700 15px/1 ui-monospace,Menlo,Consolas,monospace;color:var(--red);border:2px solid var(--red);padding:5px 7px;display:inline-block;transform:rotate(-2deg);background:var(--paper);align-self:start;justify-self:start}

/* masthead */
.tdq .mast{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:820px;margin:0 auto;padding:14px 16px}
.tdq .brand{display:flex;align-items:center;gap:10px;text-decoration:none;font:700 20px/1 Georgia,"Times New Roman",serif;letter-spacing:.01em}
.tdq .brand-leaf{width:34px;height:36px;border:2px solid var(--ink);background:var(--paper);display:grid;grid-template-rows:9px 1fr;box-shadow:2px 2px 0 var(--ink)}
.tdq .brand-leaf i{background:var(--red);border-bottom:2px solid var(--ink)}
.tdq .brand-leaf b{font:700 15px/1 ui-monospace,Menlo,Consolas,monospace;display:grid;place-items:center}
.tdq .mast-nav{display:flex;gap:16px;font-size:15px;font-weight:600}
.tdq .mast-nav a{text-decoration:none;border-bottom:2px solid transparent}
.tdq .mast-nav a:hover{border-color:var(--red)}

/* front: headline + calendar leaf */
.tdq .front{max-width:820px;margin:0 auto;padding:4px 16px 8px}
.tdq .dateline{margin:0 0 6px;font:700 13px/1.3 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.12em;text-transform:uppercase;color:var(--red)}
.tdq h1{font-size:clamp(27px,5.2vw,42px)}
.tdq .standfirst{margin:8px 0 16px;color:var(--soft);font-size:17px;max-width:60ch}
.tdq .leaf{background:var(--paper);border:3px solid var(--ink);box-shadow:8px 8px 0 var(--ink)}
.tdq .leaf-holes{height:30px;background:var(--red);border-bottom:3px solid var(--ink);
  background-image:radial-gradient(circle,var(--desk) 0 6px,var(--ink) 6px 8px,transparent 8.5px);background-size:46px 30px;background-position:center}
.tdq .stage{position:relative;width:100%;height:clamp(520px,64vh,640px);background:var(--paper);overflow:hidden}
.tdq .stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:var(--paper)}
.tdq .stage:fullscreen{height:100%}
.tdq .cover,.tdq .loader{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:16px;background:var(--paper)}
.tdq .cover{background-image:repeating-linear-gradient(to bottom,transparent 0 35px,#eef1f5 35px 36px)}
.tdq .cover p{margin:0}
.tdq .cover-month{font:700 clamp(20px,4vw,28px)/1 Georgia,"Times New Roman",serif;letter-spacing:.3em;text-transform:uppercase;color:var(--red);padding-left:.3em}
.tdq .cover-day{font:700 clamp(130px,30vw,220px)/.95 Georgia,"Times New Roman",serif;letter-spacing:-.03em}
.tdq .cover-span{font:700 14px/1.4 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.08em;text-transform:uppercase;margin-bottom:18px!important}
.tdq .start{background:var(--red);color:#fff;border:3px solid var(--ink);border-radius:3px;padding:16px 26px;font-size:clamp(19px,4.4vw,24px);font-weight:800;line-height:1.1;cursor:pointer;box-shadow:5px 5px 0 var(--ink);transition:transform .08s,box-shadow .08s}
.tdq .start:hover,.tdq .start:focus-visible{transform:translate(2px,2px);box-shadow:3px 3px 0 var(--ink);outline:0}
.tdq .start:active{transform:translate(5px,5px);box-shadow:none}
.tdq .cover-fine{margin-top:14px!important;font-size:14px;color:var(--soft)}
.tdq .cover-skip{margin-top:8px!important;font-size:15px;font-weight:700}
.tdq .cover-skip a{background:var(--paper);padding:2px 4px}
.tdq .loader p{margin:22px 0 0;font:700 15px/1.4 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.06em}
.tdq .flip{position:relative;width:110px;height:120px;perspective:500px}
.tdq .flip span{position:absolute;inset:0;display:grid;place-items:center;background:var(--paper);border:3px solid var(--ink);border-top:16px solid var(--red);font:700 54px/1 Georgia,"Times New Roman",serif;transform-origin:top center;animation:tdq-tear 1.8s infinite}
.tdq .flip span:nth-child(1){z-index:3}
.tdq .flip span:nth-child(2){z-index:2;animation-delay:.6s}
.tdq .flip span:nth-child(3){z-index:1;animation:none}
@keyframes tdq-tear{0%,20%{transform:rotateX(0);opacity:1}60%{transform:rotateX(-80deg) translateY(30px);opacity:0}100%{transform:rotateX(-80deg) translateY(30px);opacity:0}}
@media (prefers-reduced-motion:reduce){.tdq .flip span{animation:none}.tdq .flip span:nth-child(-n+2){display:none}}

/* desk: buttons under the leaf */
.tdq .desk{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:22px 0 6px}
.tdq .key{display:inline-flex;align-items:center;gap:7px;min-height:46px;background:var(--paper);color:var(--ink);border:2px solid var(--ink);border-radius:3px;padding:8px 14px;font-size:16px;font-weight:700;line-height:1;text-decoration:none;cursor:pointer;box-shadow:3px 3px 0 var(--ink)}
.tdq .key:hover{background:#fdf0ee;color:var(--ink)}
.tdq .key b{font-family:ui-monospace,Menlo,Consolas,monospace}
.tdq .key-like[aria-pressed="true"]{background:var(--red);color:#fff;box-shadow:none;transform:translate(3px,3px)}
.tdq .key-ink{background:var(--ink);color:#fff}
.tdq .key-ink:hover{background:var(--red);color:#fff}
.tdq .desk-msg{font-size:15px;color:var(--green);font-weight:700}

/* sheets of copy */
.tdq .sheet{max-width:820px;margin:0 auto;padding:30px 16px 0}
.tdq .sheet h2{font-size:clamp(23px,4vw,30px);padding-top:16px;border-top:3px solid var(--ink)}
.tdq .sheet h2 small{font:700 15px/1 ui-monospace,Menlo,Consolas,monospace;color:var(--soft)}
.tdq .sheet p,.tdq .sheet li{max-width:68ch}
.tdq .sheet-plain{padding-top:10px}
.tdq .sheet-plain h1{margin-bottom:10px}
.tdq .prose h2{font-size:23px;margin-top:28px}
.tdq .prose code{font-size:.9em;background:var(--paper);padding:1px 5px;border:1px solid var(--rule)}
.tdq .steps{padding:0;margin:16px 0;list-style:none;counter-reset:s}
.tdq .steps li{counter-increment:s;position:relative;padding:0 0 14px 52px;min-height:44px}
.tdq .steps li::before{content:counter(s);position:absolute;left:0;top:2px;width:36px;height:36px;display:grid;place-items:center;background:var(--paper);border:2px solid var(--ink);border-top:8px solid var(--red);font:700 16px/1 ui-monospace,Menlo,Consolas,monospace}
.tdq .print-row{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 0;max-width:none}
.tdq .ledger{list-style:none;padding:0;margin:18px 0 0;background:var(--paper);border:2px solid var(--ink)}
.tdq .ledger>li{display:grid;grid-template-columns:70px 1fr;gap:6px 12px;padding:14px;border-bottom:1px dashed var(--rule);max-width:none}
.tdq .ledger>li:last-child{border-bottom:0}
.tdq .ledger p,.tdq .ledger h3{margin:0}
.tdq .ledger-q{font-size:1em;line-height:inherit;font-weight:700;scroll-margin-top:14px}
.tdq .ledger-o{color:var(--soft);font-size:16px}
.tdq details summary{cursor:pointer;font-weight:700}
.tdq .ledger details{margin-top:6px}
.tdq .ledger summary{color:var(--red);font-size:15px}
.tdq .ledger details p{margin-top:4px;border-left:4px solid var(--green);padding-left:10px}
.tdq .rail{list-style:none;margin:18px 0 0;padding:0;border-left:3px solid var(--ink)}
.tdq .rail li{display:grid;grid-template-columns:70px 1fr;gap:12px;align-items:start;padding:0 0 16px 14px;position:relative}
.tdq .rail li::before{content:"";position:absolute;left:-9px;top:6px;width:15px;height:15px;background:var(--red);border:3px solid var(--ink);border-radius:50%}
.tdq .rail p{margin:0}
.tdq .ticks{padding-left:22px}
.tdq .ticks li{margin-bottom:8px}
.tdq .ticks li::marker{color:var(--red)}
.tdq .folds{margin-top:16px;border:2px solid var(--ink);background:var(--paper)}
.tdq .folds details{border-bottom:1px dashed var(--rule);padding:12px 14px}
.tdq .folds details:last-child{border-bottom:0}
.tdq .folds details[open] summary{color:var(--red)}
.tdq .folds p{margin:8px 0 0}

/* comments */
.tdq .post{display:grid;gap:10px;margin:16px 0;padding:14px;background:var(--paper);border:2px solid var(--ink)}
.tdq .post label{display:grid;gap:4px;font-size:15px;font-weight:700}
.tdq .post input,.tdq .post textarea{font-size:17px;padding:10px;border:2px solid var(--ink);border-radius:3px;background:#fff;color:var(--ink);width:100%}
.tdq .post-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.tdq .post-to{margin:0;font-weight:700;color:var(--red)}
.tdq .post-to:empty,.tdq .post:not([data-gf-replying]) [data-gf-reply-cancel]{display:none}
.tdq .talk-empty,.tdq .talk-off{display:none;color:var(--soft)}
.tdq .sheet:has([data-gf-comments][data-gf-empty]) .talk-empty{display:block}
.tdq .sheet:has([data-gf-comments][data-gf-off]) .talk-off{display:block}
.tdq .sheet:has([data-gf-comments][data-gf-off]) .post{display:none}
.tdq .note{padding:12px 0;border-bottom:1px dashed var(--rule)}
.tdq .note p{margin:0}
.tdq .note-head{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;font-size:15px}
.tdq .note-head time{color:var(--soft);font:13px/1 ui-monospace,Menlo,Consolas,monospace}
.tdq .note-owner{background:var(--red);color:#fff;font-size:12px;font-weight:700;padding:2px 6px;text-transform:uppercase;letter-spacing:.06em}
.tdq .note[data-gf-owner]{border-left:4px solid var(--red);padding-left:10px}
.tdq .note-to{color:var(--red);font-weight:700}
.tdq .note-reply{background:none;border:0;padding:4px 0;color:var(--soft);font-size:14px;font-weight:700;text-decoration:underline;cursor:pointer}
.tdq .note-replies{margin-left:18px}
.tdq .note-sub{border-bottom:0;padding:8px 0 0}

/* colophon */
.tdq .colophon{max-width:820px;margin:44px auto 0;padding:20px 16px 36px;border-top:3px solid var(--ink);font-size:15px;color:var(--soft)}
.tdq .colophon p{margin:0 0 6px;max-width:68ch}
.tdq .colophon-name{font:700 18px/1.2 Georgia,"Times New Roman",serif;color:var(--ink)}
.tdq .colophon-links{display:flex;flex-wrap:wrap;gap:6px 16px;font-weight:700}

@media (max-width:600px){
  .tdq{font-size:17px}
  .tdq .mast-nav{gap:12px;font-size:14px}
  .tdq .mast-nav a:nth-child(n+3){display:none}
  .tdq .front,.tdq .sheet,.tdq .mast,.tdq .colophon{padding-left:12px;padding-right:12px}
  .tdq .leaf{box-shadow:5px 5px 0 var(--ink)}
  .tdq .stage{height:640px}
  .tdq .ledger>li,.tdq .rail li{grid-template-columns:1fr}
  .tdq .key{padding:8px 11px;font-size:15px}
}

/* Print: on a quiz page only the site name, the date headline and the numbered question list
   go on paper, in large type. script.js opens the answers first; body.print-bare leaves them out
   (and drops the "questions and answers" heading, since that sheet has no answers). */
@media print{
  .tdq{background:#fff;font-size:16pt}
  .tdq .mast-nav,.tdq .print-row,.tdq .front>*:not(h1),.tdq main>.sheet:not(#questions),.tdq #questions>p,.tdq .ledger summary,.tdq .colophon>*:not(.colophon-fine){display:none!important}
  .tdq .mast,.tdq .front,.tdq .sheet,.tdq .colophon{max-width:none;padding-left:0;padding-right:0}
  .tdq .brand-leaf{box-shadow:none}
  .tdq .sheet{padding-top:10pt}
  .tdq .ledger{border:0;counter-reset:q}
  .tdq .ledger>li{break-inside:avoid;padding:10pt 0}
  .tdq .ledger-q::before{counter-increment:q;content:counter(q) ". "}
  .tdq .ledger-o{font-size:1em;color:var(--ink)}
  .tdq.print-bare .ledger details,.tdq.print-bare #questions>h2{display:none}
  .tdq .colophon{margin-top:14pt;padding-bottom:0}
}
