/* Daily Task v4 (owner 2026-11-30): the daily link page and the portal's Daily Task page. Everything sits under
   .dv4 so it never touches the rest of the portal. Mobile first (360 px), two languages side by side from 720 px. */
.dv4 { --rec: var(--s-daily); font-family: var(--v4-font); color: var(--v4-ink); background: var(--v4-paper); line-height: 1.55; font-size: 16px; -webkit-text-size-adjust: 100%; }
.dv4 *, .dv4 *::before, .dv4 *::after { box-sizing: border-box; }
.dv4 :focus-visible { outline: 3px solid var(--v4-ink); outline-offset: 2px; border-radius: 4px; }
.dv4 h1, .dv4 h2, .dv4 h3, .dv4 p, .dv4 ol, .dv4 ul { margin: 0; }
.dv4 .wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.dv4 .muted { color: var(--v4-muted); }
.dv4 .num { font-variant-numeric: tabular-nums; }
.dv4 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dv4 [hidden] { display: none !important; }

/* two languages: English and Egyptian Arabic, stacked on phones, side by side from 720 px */
.dv4 .pair { display: grid; gap: 6px; }
.dv4 .ar { direction: rtl; text-align: right; }
@media (min-width: 720px) { .dv4 .pair.side { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; } }

/* the top: the academy, then the page title over its signal line */
.dv4 .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.dv4 .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; color: inherit; }
.dv4 .brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--v4-ink); display: grid; place-items: center; color: #fff; }
.dv4 .brand-mark svg { width: 18px; height: 18px; }
.dv4 .head { padding: 18px 0 8px; }
.dv4 .head h1 { font-size: clamp(28px, 7.4vw, 44px); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
.dv4 .head h1 .ar { display: block; font-size: 0.72em; letter-spacing: 0; font-weight: 500; margin-top: 6px; color: var(--accent-ink); }
.dv4 .head .signal { margin-top: 14px; }
.dv4 .head .date { margin-top: 8px; color: var(--v4-muted); font-size: 15px; }

.dv4 .card { background: var(--v4-surface); border: 1px solid var(--v4-line); border-radius: var(--v4-r); padding: 18px; }
.dv4 .stack > * + * { margin-top: 16px; }
.dv4 .section { margin-top: 20px; }
.dv4 h2 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.dv4 h2 .ar { display: block; font-weight: 500; font-size: 17px; margin-top: 2px; }

/* today's focus: the one coloured panel on the page */
.dv4 .focus { background: var(--accent-wash); border-radius: var(--v4-r-lg); padding: 20px; }
.dv4 .focus .kicker { font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.dv4 .focus .big { font-size: 22px; font-weight: 600; line-height: 1.25; margin-top: 4px; }
.dv4 .focus .tip { margin-top: 10px; font-size: 15px; }

/* the 20 questions: numbered, because they are answered in order */
.dv4 .qs { list-style: none; padding: 0; counter-reset: q; }
.dv4 .qs li { counter-increment: q; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--v4-line); font-size: 16px; direction: ltr; text-align: left; }
.dv4 .qs li:first-child { border-top: 0; }
.dv4 .qs li::before { content: counter(q); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent-ink); background: var(--accent-wash); border-radius: 8px; height: 30px; display: grid; place-items: center; font-size: 14px; }

.dv4 .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--v4-tap); padding: 0 22px; border-radius: 999px; border: 1px solid var(--v4-line-strong); background: var(--v4-surface); color: var(--v4-ink); font: inherit; font-weight: 500; font-size: 16px; cursor: pointer; text-decoration: none; touch-action: manipulation; }
.dv4 .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dv4 .btn-primary { background: var(--v4-ink); border-color: var(--v4-ink); color: #fff; }
.dv4 .btn-accent { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.dv4 .btn-wide { width: 100%; }
.dv4 .btn svg { width: 20px; height: 20px; flex: none; }
.dv4 .row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.dv4 .row-btns .btn { flex: 1 1 140px; }

/* the record key: the memorable thing. A big round red key with a halo that breathes while recording */
.dv4 .rec-zone { display: grid; justify-items: center; gap: 12px; padding: 24px 0 8px; text-align: center; }
.dv4 .rec-key { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--rec); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 10px var(--s-daily-wash), var(--v4-shadow-lift); touch-action: manipulation; }
.dv4 .rec-key svg { width: 40px; height: 40px; }
.dv4 .rec-key:active { transform: scale(0.97); }
.dv4 .rec-caption { font-weight: 600; font-size: 18px; }

/* the sticky bar at the bottom: always reachable while scrolling the questions */
.dv4 .dock { position: fixed; left: 0; right: 0; bottom: var(--dock-bottom, 0px); z-index: 40; background: #fff; border-top: 1px solid var(--v4-line); box-shadow: 0 -6px 24px rgba(19, 24, 43, 0.08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.dv4 .dock-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.dv4 .dock .timer { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 20px; min-width: 62px; }
.dv4 .dock .wave { flex: 1; min-width: 0; height: 40px; }
.dv4 .dock .wave canvas { width: 100%; height: 40px; display: block; }
.dv4 .dock .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rec); flex: none; }
.dv4 .dock .icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--v4-line-strong); background: var(--v4-surface); display: grid; place-items: center; cursor: pointer; flex: none; color: var(--v4-ink); }
.dv4 .dock .icon-btn.stop { background: var(--v4-ink); border-color: var(--v4-ink); color: #fff; }
.dv4 .dock .icon-btn svg { width: 22px; height: 22px; }
.dv4 .dock .start { flex: 1; background: var(--rec); border-color: var(--rec); color: #fff; font-weight: 600; }
.dv4 .dock-spacer { height: 96px; }
@media (prefers-reduced-motion: no-preference) {
  .dv4 .recording .dot { animation: dv4-blink 1.2s steps(2, start) infinite; }
}
@keyframes dv4-blink { to { visibility: hidden; } }

.dv4 .notice { border-radius: var(--v4-r-sm); padding: 12px 14px; font-size: 15px; background: var(--v4-warn-wash); color: var(--v4-ink); border-inline-start: 4px solid #D9A21B; }
.dv4 .notice.bad { background: var(--v4-bad-wash); border-color: var(--v4-bad); }
.dv4 .notice.ok { background: var(--v4-ok-wash); border-color: var(--v4-ok); }
.dv4 .notice.info { background: var(--v4-surface); border: 1px solid var(--v4-line); border-inline-start: 4px solid var(--accent); }

.dv4 .field { display: grid; gap: 6px; }
.dv4 .field label, .dv4 legend { font-weight: 500; font-size: 15px; }
.dv4 .input { min-height: var(--v4-tap); width: 100%; border: 1px solid var(--v4-line-strong); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 17px; background: var(--v4-surface); color: var(--v4-ink); }
.dv4 .input[aria-invalid="true"] { border-color: var(--v4-bad); }
.dv4 .err { color: var(--v4-bad); font-size: 14px; font-weight: 500; }
.dv4 .names { display: grid; gap: 14px; }
@media (min-width: 520px) { .dv4 .names { grid-template-columns: 1fr 1fr; } }
.dv4 fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.dv4 .levels { display: grid; gap: 10px; margin-top: 8px; }
.dv4 .level { position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--v4-line-strong); border-radius: 14px; background: var(--v4-surface); cursor: pointer; }
.dv4 .level input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dv4 .level .code { font-weight: 700; font-size: 18px; color: var(--accent-ink); background: var(--accent-wash); border-radius: 10px; height: 44px; display: grid; place-items: center; }
.dv4 .level .t { font-size: 15px; }
.dv4 .level .t .ar { display: block; color: var(--v4-muted); font-size: 14px; }
.dv4 .level.checked { border-color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent-ink) inset; }
.dv4 .level:focus-within { outline: 3px solid var(--v4-ink); outline-offset: 2px; }
.dv4 .honest { font-size: 14px; color: var(--v4-muted); }

/* the welcome hero: a drawn waveform over the title, the one load moment of this page */
.dv4 .hero { padding: 24px 0 6px; }
.dv4 .hero-wave { display: flex; align-items: center; gap: 5px; height: 76px; margin-bottom: 18px; }
.dv4 .hero-wave i { display: block; width: 7px; border-radius: 4px; background: var(--rec); }
@media (prefers-reduced-motion: no-preference) {
  .dv4 .hero-wave i { animation: dv4-rise 900ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 28ms); }
}
@keyframes dv4-rise { from { transform: scaleY(0.08); } to { transform: scaleY(1); } }

.dv4 audio { width: 100%; }
.dv4 .progress { height: 12px; border-radius: 999px; background: var(--v4-line); overflow: hidden; }
.dv4 .progress > i { display: block; height: 100%; width: 0; background: var(--accent-ink); transition: width 200ms linear; }
.dv4 .calm { display: grid; justify-items: center; gap: 14px; padding: 28px 0; text-align: center; }
.dv4 .calm .bars { display: flex; gap: 6px; height: 36px; align-items: center; }
.dv4 .calm .bars i { width: 6px; height: 100%; border-radius: 3px; background: var(--accent); transform: scaleY(0.5); }
@media (prefers-reduced-motion: no-preference) {
  .dv4 .calm .bars i { animation: dv4-calm 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * 120ms); }
}
@keyframes dv4-calm { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.dv4 .thanks { font-size: clamp(30px, 8vw, 44px); line-height: 1.2; font-weight: 600; }

/* ---- results ---- */
.dv4 .score { display: flex; align-items: flex-end; gap: 10px; }
.dv4 .score .n { font-size: 72px; line-height: 0.9; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.dv4 .score .of { font-size: 22px; color: var(--v4-muted); padding-bottom: 6px; }
.dv4 .meter10 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 14px; }
.dv4 .meter10 i { height: 10px; border-radius: 3px; background: var(--v4-line); }
.dv4 .meter10 i.on { background: var(--accent); }
.dv4 .covers { font-size: 14px; color: var(--v4-muted); }
.dv4 .quote { font-size: 17px; line-height: 1.6; direction: ltr; text-align: left; }
.dv4 .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dv4 .chip { font-size: 13px; font-weight: 600; border-radius: 8px; padding: 3px 9px; background: var(--accent-wash); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.dv4 .words { list-style: none; padding: 0; }
.dv4 .words > li { padding: 14px 0; border-top: 1px solid var(--v4-line); }
.dv4 .words > li:first-child { border-top: 0; }
.dv4 .wordrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dv4 .word { font-weight: 600; font-size: 18px; direction: ltr; }
.dv4 .mark { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; border-radius: 8px; padding: 3px 10px; }
.dv4 .mark svg { width: 16px; height: 16px; }
.dv4 .mark.ok { background: var(--v4-ok-wash); color: var(--v4-ok); }
.dv4 .mark.work { background: var(--v4-bad-wash); color: var(--v4-bad); }
.dv4 .hear { min-height: 40px; padding: 0 14px; font-size: 14px; }
.dv4 .fix + .fix { border-top: 1px solid var(--v4-line); padding-top: 14px; margin-top: 14px; }
.dv4 .fix .said { color: var(--v4-muted); border-inline-start: 3px solid var(--v4-line-strong); padding-inline-start: 10px; direction: ltr; text-align: left; }
.dv4 .fix .better { font-weight: 600; font-size: 18px; border-inline-start: 3px solid var(--v4-ok); padding-inline-start: 10px; margin-top: 6px; direction: ltr; text-align: left; }
.dv4 .fix .why { margin-top: 8px; font-size: 15px; }
.dv4 .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dv4 .stat { background: var(--v4-paper); border-radius: 12px; padding: 12px; }
.dv4 .stat .v { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dv4 .stat .k { font-size: 13px; color: var(--v4-muted); margin-top: 2px; }
.dv4 .good { font-size: 18px; font-weight: 500; direction: ltr; text-align: left; border-inline-start: 3px solid var(--accent); padding-inline-start: 10px; }
.dv4 .history { list-style: none; padding: 0; }
.dv4 .history li a { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0; border-top: 1px solid var(--v4-line); color: inherit; text-decoration: none; min-height: 48px; }
.dv4 .help ol { padding-inline-start: 22px; }
.dv4 .help li + li { margin-top: 6px; }
.dv4 details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
/* a word row at 360 px: the word on its own line when the mark and "Hear it" need the room */
.dv4 .wordrow .row-btns { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
.dv4 .wordrow .row-btns .btn { flex: 0 0 auto; }
.dv4 .quote, .dv4 .said, .dv4 .better, .dv4 .good, .dv4 .word, .dv4 .pair p { overflow-wrap: anywhere; }
.dv4 .stat { min-width: 0; }
.dv4 .stat .k { overflow-wrap: anywhere; }
