/* Inbox Drill inside the Ṣọ Email Security site.
   Token overrides take the site's own palette and type. The kit files are untouched. */
:root {
  /* The site's system, from docs/design-system.md: green-black ink, paper band,
     dark square buttons on paper, emerald only where something is live. */
  --ink:        #040806;
  --ink-2:      #081512;
  --ink-3:      #10201a;
  --paper:      #e9eee9;
  --paper-2:    #dfe6df;
  --paper-3:    #cdd8ce;
  --on-ink:     #f4f8f5;
  --on-ink-mute:#9fb8a7;
  --on-paper:   #07110d;
  --on-paper-mute:#4a5f53;

  /* Buttons on paper are dark, as on the homepage's light bands. */
  --accent:     #06100d;
  --accent-hi:  #0f2019;
  --accent-lo:  #047857;
  --accent-ink: #052e16;
  --live:       #10b981;

  /* System colour for "time is up". Not a brand colour. */
  --alarm:      #b91c1c;

  --line-dark:  rgba(255,255,255,.10);
  --line-dark-2:rgba(255,255,255,.16);
  --line-light: rgba(7,17,13,.15);

  /* Square buttons and fields. Panels keep a soft corner. */
  --radius:     0px;
  --radius-lg:  12px;

  --font-display: 'DM Sans', 'Manrope', system-ui, sans-serif;
  --font-body:    'Manrope', 'DM Sans', system-ui, sans-serif;
}

/* Email mock, used inside the drill. */
.mail { color: var(--on-paper); font-size: var(--t-small); line-height: 1.5; background: #fff; }
.mail-bar { display: flex; justify-content: space-between; padding: .6rem 1rem; border-bottom: 1px solid var(--line-light); font-weight: 600; }
.mail-head { padding: .75rem 1rem; border-bottom: 1px solid var(--line-light); display: grid; gap: .25rem; }
.mail-row { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; overflow-wrap: anywhere; }
.mail-body { padding: 1rem; display: grid; gap: .75rem; white-space: pre-line; }
.mail-note { padding: .5rem 1rem .75rem; font-size: .75rem; color: var(--on-paper-mute); }

.small { font-size: var(--t-small); }

/* ---------- Drill view ---------- */
.drill { min-height: 100svh; }
.drill-top { position: sticky; top: 0; z-index: 20; background: rgba(233,238,233,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-light); }
.drill-top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .75rem; }
.drill-top h2 { font-size: var(--t-h3); line-height: 1.2; }
.drill-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.brand-link { color: var(--accent-lo); font-weight: 600; text-decoration: none; }
.brand-link:hover { text-decoration: underline; }
.progress { height: 3px; background: var(--paper-3); }
.progress > div { height: 100%; width: 0; background: var(--live); transition: width var(--dur) var(--ease-out); }
.timer { display: flex; align-items: center; gap: .75rem; font-variant-numeric: tabular-nums; }
.timer-clock { font-size: 1.6rem; font-weight: 600; letter-spacing: var(--track-snug); }
.timer.is-over .timer-clock { color: var(--alarm); }
.timer-note { font-size: var(--t-small); color: var(--on-paper-mute); }
.timer.is-over .timer-note { color: var(--alarm); }
.btn-small { min-height: 36px; padding: .4rem .8rem; }
.drill-body { padding-block: 2.5rem 3rem; display: grid; gap: 1.75rem; max-width: 760px; }
.drill-body .lead { max-width: none; }
.prompt { font-weight: 600; letter-spacing: var(--track-snug); font-size: 1.05rem; max-width: var(--measure); border-left: 3px solid var(--live); padding-left: 1rem; }
.drill-body .mail { margin-inline: 0; }
.call { padding: 1.25rem; display: grid; gap: .5rem; background: #fff; }
.call strong { color: var(--on-paper); }
.drill-nav { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; padding-block: 1rem 4rem; max-width: 760px; }
.drill-nav .left { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Fields */
.field { display: grid; gap: .5rem; }
.field > label { font-weight: 600; letter-spacing: var(--track-snug); }
input[type="text"], input[type="date"], textarea, select {
  font: inherit; color: inherit; width: 100%;
  padding: .7rem .8rem; border: 1px solid var(--line-light); border-radius: var(--radius);
  background: #fff;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent-lo); outline-offset: 2px; border-color: transparent; }
textarea { resize: vertical; min-height: 6.5rem; line-height: 1.5; }
.rule-list { border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.role-row, .contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem 1.25rem; padding: .9rem 0; align-items: center; }
.role-name, .contact-label { display: grid; gap: .15rem; }
.role-name .mute, .contact-label .mute { font-size: var(--t-small); }
.contact-inputs { display: grid; gap: .5rem; }
@media (max-width: 600px) { .role-row, .contact-row { grid-template-columns: 1fr; } }
.check-row { display: grid; grid-template-columns: 1.4rem 1fr; gap: .75rem; padding: .75rem 0; align-items: start; }
.check-row.owned { grid-template-columns: 1.4rem 1fr 11rem; }
@media (max-width: 600px) { .check-row.owned { grid-template-columns: 1.4rem 1fr; } .check-row.owned select { grid-column: 2; } }
.check-row label { font-weight: 400; cursor: pointer; }
.check-row input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; accent-color: var(--accent-lo); }
.check-row select { padding: .4rem .5rem; font-size: var(--t-small); }
.commit-row { display: grid; grid-template-columns: 1.5rem minmax(0, 2fr) minmax(0, 1fr) 10rem; gap: .5rem; padding: .75rem 0; align-items: center; }
.commit-n { font-weight: 600; color: var(--on-paper-mute); }
@media (max-width: 700px) { .commit-row { grid-template-columns: 1.5rem 1fr; } .commit-row > :nth-child(n+3) { grid-column: 2; } }
.reference h4 { margin-bottom: .5rem; }

/* The clock before it starts, and the "about N min left" line */
.timer.is-idle .timer-clock { color: var(--on-paper-mute); }
#btn-pause { white-space: nowrap; }
@media (max-width: 600px) {
  .drill-total-wrap, #drill-minutes { display: none; }
  .timer { flex-wrap: wrap; }
  .timer-note { flex-basis: 100%; order: 9; }
}

/* An earlier email shown again on a later step */
.recap summary { cursor: pointer; font-weight: 600; letter-spacing: var(--track-snug); margin-bottom: .75rem; }
.recap:not([open]) summary { margin-bottom: 0; }

/* A one-time "are you sure" before moving on with an empty step */
.nudge { display: grid; gap: .75rem; justify-items: start; padding: 1rem 1.25rem; border-left: 3px solid var(--live); background: var(--paper-2); }
.nudge p { max-width: var(--measure); }
.reveal { border-top: 1px solid var(--line-light); padding-top: 1rem; }
.reveal summary { cursor: pointer; font-weight: 600; color: var(--accent-lo); }
.reveal p { margin-top: .75rem; max-width: var(--measure); }

/* ---------- Plan view ---------- */
.plan { min-height: 100svh; }
.plan-meta { padding-top: 1.25rem; }
.plan-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-block: 1rem 1.5rem; border-bottom: 1px solid var(--line-light); }
.plan-body { padding-block: 2.5rem 3rem; max-width: 760px; display: grid; gap: 2rem; }
.plan-title { font-size: var(--t-h2); }
.plan-sec { display: grid; gap: .6rem; }
.plan-sec h3 { font-size: var(--t-h3); }
.plan-sec ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.plan-sec p { white-space: pre-line; max-width: var(--measure); }
.plan-rule { border-left: 3px solid var(--live); padding-left: 1rem; font-weight: 600; }
.plan-next { max-width: 760px; margin-bottom: 5rem; padding: 1.5rem; display: grid; gap: 1.25rem; background: #fff; }
.plan-next p { margin-top: .4rem; max-width: var(--measure); }
.plan-next .btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.plan-next .btn { text-decoration: none; }

@media print {
  body { background: #fff; color: #000; }
  .plan-meta, .plan-actions, .plan-next, #drill { display: none !important; }
  .plan-body { max-width: none; padding: 0; }
  .plan-rule { border-color: #000; }
  a { text-decoration: none; }
}

/* The hidden attribute must beat any display rule. */
[hidden] { display: none !important; }

/* Email mock entrance as CSS keyframes. No script has to run for it to appear. */
[data-hero] { opacity: 1; transform: none; transition: none; animation: hero-in .7s var(--ease-out) both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { [data-hero] { animation: none; } }

/* Phones: no staged entrances at all. */
@media (max-width: 720px) {
  [data-hero], [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
}

/* ---------- Motion, matching the site ---------- */
/* Each step arrives in order. The nodes are rebuilt on every step, and CSS
   animations start on insertion, so this needs no script. */
.drill-body > *, .plan-body > * { animation: hero-in .52s var(--ease-out) both; }
.drill-body > *:nth-child(2), .plan-body > *:nth-child(2) { animation-delay: 50ms; }
.drill-body > *:nth-child(3), .plan-body > *:nth-child(3) { animation-delay: 100ms; }
.drill-body > *:nth-child(4), .plan-body > *:nth-child(4) { animation-delay: 150ms; }
.drill-body > *:nth-child(n+5), .plan-body > *:nth-child(n+5) { animation-delay: 200ms; }
/* Buttons give a little under the finger. */
.btn { transition-property: color, background-color, border-color, transform; transition-duration: 180ms; }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn-primary { font-weight: 700; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .drill-body > *, .plan-body > * { animation: none; }
  .btn:active:not(:disabled) { transform: none; }
}
