/* Let the Agent Do It: a work morning, played on the page. Load after lab.css and /lab/due-by-3/day.css, which hold
   the shared frame (the bar, messages, buttons, the note). Nothing here hides the readable version: every rule that hides
   anything sits under html.day-on, which agent.js adds only after it has loaded. */

/* ── The readable version ────────────────────────────────── */
.ag-mail { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 12px; margin: 0 0 16px; box-shadow: 0 2px 8px rgba(12,35,80,.05); overflow: hidden; }
.ag-head { margin: 0; padding: 10px 14px; background: var(--tt-surface-2); border-bottom: 1px solid var(--tt-line); font-size: 14.5px; }
.ag-head > div { display: flex; gap: 8px; margin: 2px 0; }
.ag-head dt { flex: none; width: 4.6em; color: var(--tt-ink-muted); font-weight: 600; }
.ag-head dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--lab-ink); }
.ag-name, .ag-subject { font-weight: 700; }
.ag-addr { color: var(--tt-ink-soft); }
.ag-body { padding: 10px 14px 4px; font-size: 15.5px; line-height: 1.5; }
.ag-body p { margin: 0 0 10px; }
.ag-list { margin: 0 0 10px; padding-left: 22px; }
.ag-list li { margin-bottom: 7px; }
.ag-hidden { border: 1.5px dashed var(--lab-wrong); border-radius: 10px; padding: 8px 12px 2px; margin: 4px 0 10px; background: #fff7f5; }
.ag-hidden-label { font-size: 13.5px; font-weight: 700; color: var(--lab-wrong); }
.ag-hidden-text { font-size: 14.5px; color: var(--lab-ink); }
.ag-inq { padding-left: 20px; }
.ag-inq li { margin-bottom: 7px; font-size: 15.5px; line-height: 1.45; }
.ag-report { display: grid; gap: 10px; margin: 0 0 18px; }
.ag-report > div { background: #fff; border: 1px solid var(--tt-line); border-radius: 12px; padding: 10px 14px 2px; box-shadow: var(--tt-shadow-card); }
.ag-report h3 { font-family: var(--tt-font-display); font-size: 16.5px; font-weight: 700; color: var(--tt-navy-deep); margin: 0 0 6px; }
.ag-says, .ag-did { font-size: 15px; line-height: 1.5; margin: 0 0 8px; }
.ag-says b, .ag-did b { display: block; font-size: 12.5px; letter-spacing: .3px; text-transform: uppercase; color: var(--tt-ink-muted); }
.ag-did { background: var(--tt-surface-2); border-radius: 8px; padding: 7px 10px; font-family: var(--lab-mono); font-size: 13.5px; }
.ag-did b { font-family: var(--tt-font-body, inherit); }
.ag-doc { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 10px; padding: 4px 14px 6px; margin: 0 0 16px; box-shadow: 0 2px 8px rgba(12,35,80,.05); }
.ag-doc.is-trash { border-color: var(--lab-wrong); }
.ag-doc-title { font-family: var(--tt-font-display); font-size: 17px; font-weight: 700; color: var(--tt-navy-deep); margin: 12px 0 6px; }
.ag-doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 8px; }
.ag-doc th, .ag-doc td { text-align: left; vertical-align: top; padding: 6px 4px; border-bottom: 1px solid var(--tt-line); }
.ag-doc th { width: 36%; color: var(--tt-ink-muted); font-weight: 600; }
.ag-doc th, .ag-doc td { overflow-wrap: anywhere; }
.ag-doc-note { font-size: 14.5px; color: var(--tt-ink-soft); margin: 4px 0 10px; }
.ag-files { list-style: none; margin: 0 0 6px; padding: 0; font-size: 15px; }
.ag-files li { padding: 6px 2px 6px 26px; border-bottom: 1px solid var(--tt-line); position: relative; }
.ag-files li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 13px; height: 11px; border-radius: 2px; background: #c9d6ec; }

/* ── The answers ─────────────────────────────────────────── */
.ag-truth { display: grid; gap: 10px; margin: 0 0 18px; }
.ag-truth > div { background: #fff; border: 1px solid var(--tt-line); border-left: 4px solid var(--lab-right); border-radius: 12px; padding: 12px 14px 4px; box-shadow: var(--tt-shadow-card); }
.ag-truth > div.is-bad { border-left-color: var(--lab-wrong); }
.ag-truth h3 { font-family: var(--tt-font-display); font-size: 17.5px; font-weight: 700; color: var(--tt-navy-deep); margin: 0 0 6px; }
.ag-truth p { font-size: 15.5px; line-height: 1.5; margin: 0 0 10px; }
.ag-h3 { font-family: var(--tt-font-display); font-size: 19px; font-weight: 700; color: var(--tt-navy-deep); margin: 22px 0 8px; }
.ag-facts { padding-left: 20px; }
.ag-facts li { margin-bottom: 12px; font-size: 15.5px; line-height: 1.5; }
.ag-project { padding-left: 22px; }
.ag-project li { margin-bottom: 10px; font-size: 15.5px; line-height: 1.5; }
.ag-project-meta { font-size: 15px; color: var(--tt-ink-soft); background: var(--tt-surface-2); border-radius: 10px; padding: 10px 12px; }

/* ── Faces ───────────────────────────────────────────────── */
.day-face.is-casey { background: #0d7a6f; }
.day-face.is-agent { background: #3b2f8f; }
.day-face.is-dee { background: #a8450b; }
.day-face.is-sv { background: #7a5a12; }

/* ── The game ────────────────────────────────────────────── */
.ag-bar .day-clock { font-size: 15px; }
.ag-in { margin: 0 12px 12px; animation: dayIn .25s ease; }
.ag-tabs { grid-template-columns: repeat(5, 1fr); }
.ag-tabs .day-tab { font-size: 13px; min-height: 42px; padding: 4px 2px; line-height: 1.2; }
.ag-panel { padding-top: 10px; }
.day-ping.is-in { max-height: 240px; }
.day-ping p { margin: 0; }
.day-ping p + p { margin-top: 4px; }

/* The permission sheet */
.ag-sheet-intro { padding: 12px 14px 0; font-size: 15px; line-height: 1.5; color: var(--lab-ink); }
.ag-sheet-intro p { margin: 0 0 8px; }
.ag-sheet { list-style: none; margin: 0; padding: 4px 12px 8px; display: grid; gap: 10px; counter-reset: job; }
.ag-sheet-row { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 12px; padding: 10px 12px; counter-increment: job; }
.ag-sheet-job { margin: 0 0 8px; font-size: 14.5px; line-height: 1.45; color: var(--lab-ink); }
.ag-sheet-job::before { content: counter(job) ". "; font-weight: 700; color: var(--tt-navy-deep); }
.ag-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ag-seg-btn { font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25; min-height: 44px; padding: 6px 6px; border-radius: 9px; border: 1.5px solid var(--tt-line-strong); background: #fff; color: var(--tt-navy-deep); cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.ag-seg-btn:hover { border-color: var(--tt-navy); background: #f3f7ff; }
.ag-seg-btn:active { transform: scale(.98); }
.ag-seg-btn:focus-visible { outline: 3px solid var(--tt-cyan); outline-offset: 2px; }
.ag-seg-btn[aria-pressed="true"] { background: var(--tt-navy); border-color: var(--tt-navy); color: #fff; }

/* Jobs */
.ag-jobs, .ag-list-mail { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.ag-job, .ag-row { display: grid; width: 100%; text-align: left; font: inherit; background: #fff; border: 1.5px solid var(--tt-line-strong); border-radius: 11px; padding: 10px 12px; cursor: pointer; color: var(--lab-ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.ag-job { grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.ag-job:hover, .ag-row:hover { border-color: var(--tt-navy); box-shadow: 0 3px 10px rgba(12,35,80,.08); }
.ag-job:active, .ag-row:active { transform: scale(.99); }
.ag-job:focus-visible, .ag-row:focus-visible, .ag-back:focus-visible { outline: 3px solid var(--tt-cyan); outline-offset: 2px; }
.ag-job-n { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tt-surface-2); color: var(--tt-navy-deep); font-weight: 700; font-size: 14px; }
.ag-job-what { font-weight: 700; font-size: 15px; }
.ag-job-st { font-size: 13.5px; color: var(--tt-ink-soft); }
.ag-job.is-new { border-color: var(--tt-navy); background: #f3f7ff; }
.ag-job.is-new .ag-job-st { color: var(--tt-navy); font-weight: 700; }
.ag-job.is-done .ag-job-n { background: #e5f4ec; color: #1e6b45; }
.ag-row { grid-template-columns: 1fr auto; gap: 2px 10px; }
.ag-row-who { font-weight: 600; font-size: 15px; }
.ag-row-when { font-size: 13px; color: var(--tt-ink-muted); grid-row: 1; grid-column: 2; }
.ag-row-what { grid-column: 1 / -1; font-size: 14px; color: var(--tt-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row.is-new { border-color: var(--tt-navy); background: #f3f7ff; }
.ag-row.is-new .ag-row-who { font-weight: 700; }
.ag-row.is-new .ag-row-who::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tt-cyan); margin-right: 6px; vertical-align: 1px; }
.ag-back { display: inline-block; margin: 0 0 10px; padding: 6px 2px; min-height: 44px; background: none; border: 0; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--tt-navy); text-decoration: underline; cursor: pointer; }
.ag-back:hover { color: var(--tt-navy-deep); }
.ag-asked { background: var(--tt-surface-2); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; }
.ag-asked p { margin: 0; }
.ag-asked-label { font-size: 12.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--tt-ink-muted); }
.ag-tools { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.ag-tools:empty { display: none; }
.ag-tools .day-btn { flex: 1 1 210px; text-align: left; }
.day-btn.is-off, .day-btn.is-off:hover { background: var(--tt-surface-2); color: var(--lab-ink); border-color: var(--tt-line-strong); box-shadow: none; transform: none; cursor: not-allowed; }
.ag-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ag-edge { font-weight: 700; color: var(--tt-navy-deep); }
.day-btn.is-wait { min-height: 42px; font-size: 14.5px; }
.ag-waits { display: flex; gap: 7px; }
.ag-waits .day-btn { flex: 1 1 0; }

/* What the agent says, and what it did */
.ag-agent { background: var(--day-panel); color: var(--day-ai-ink); border-radius: 14px; padding: 10px 14px 4px; margin: 0 0 12px; font-size: 15px; line-height: 1.5; animation: dayIn .2s ease; }
.day-scene > .ag-agent { margin: 0 12px 12px; }
.ag-agent p { margin: 0 0 8px; color: var(--day-ai-ink); }
.ag-agent .ag-agent-name { font-family: var(--tt-font-display); font-weight: 700; font-size: 13px; letter-spacing: .3px; color: var(--tt-ice); margin-bottom: 4px; }
.ag-log { border: 1px solid var(--tt-line-strong); border-radius: 10px; background: var(--tt-surface-2); padding: 8px 12px 2px; margin: 0 0 12px; font-family: var(--lab-mono); font-size: 13.5px; line-height: 1.5; animation: dayIn .2s ease; }
.ag-log p { margin: 0 0 8px; }
.ag-log .ag-log-label { font-family: var(--tt-font-display); font-size: 12.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--tt-ink-muted); }
.ag-found { background: #eef6ff; border-left: 4px solid var(--tt-navy); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; }
.ag-drafts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ag-draft { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 10px; padding: 8px 12px; }
.ag-draft p { margin: 0 0 6px; }
.ag-draft-to { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 14.5px; }
.ag-draft-tag { font-size: 12.5px; font-weight: 700; color: var(--tt-ink-muted); }
.ag-draft-body { font-size: 14.5px; line-height: 1.45; }
.ag-draft-files { font-size: 13.5px; color: var(--tt-ink-soft); background: var(--tt-surface-2); border: 1px dashed var(--tt-line-strong); border-radius: 8px; padding: 6px 9px; }
.ag-draft-fix { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.ag-draft .day-btn { margin-top: 2px; }
.ag-back-hint { margin: 0 12px 10px; }

/* Hidden until you open the original: the white text in Jessie's email. Only while the game runs. */
html.day-on .day-app .ag-mail:not(.is-orig) .ag-hidden { display: none; }
html.day-on .day-app .ag-mail { margin-bottom: 12px; }
html.day-on .day-app .ag-hidden-label::after { content: " (shown here because you opened the original)"; font-weight: 400; }

/* The card and the phone */
.ag-card { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; box-shadow: 0 2px 8px rgba(12,35,80,.05); }
.ag-card-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--tt-ink-muted); text-transform: uppercase; letter-spacing: .4px; }
.ag-card-bal { margin: 2px 0 2px; font-family: var(--tt-font-display); font-size: 30px; font-weight: 700; color: var(--tt-navy-deep); font-variant-numeric: tabular-nums; }
.ag-card-note { margin: 0 0 10px; font-size: 14px; color: var(--tt-ink-soft); }
.ag-card-log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--tt-line); }
.ag-card-log li { font-size: 14px; line-height: 1.4; padding: 8px 0; border-bottom: 1px solid var(--tt-line); }
.ag-vendors .ag-doc { margin-bottom: 10px; }
.ag-text { border-top: 1px solid var(--tt-line); padding-top: 10px; margin-top: 4px; }
.ag-text-head { font-family: var(--tt-font-display); font-size: 14px; font-weight: 700; color: var(--tt-navy-deep); margin: 0 0 6px; }

/* The note */
.ag-note-line { margin: 12px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--tt-ink-soft); }

/* Email: Inbox and Sent */
.ag-switch { display: inline-flex; gap: 4px; margin: 0 0 10px; padding: 3px; border-radius: 10px; background: var(--tt-surface-2); }
.ag-switch-btn { font: inherit; font-size: 14px; font-weight: 600; min-height: 38px; padding: 4px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--tt-navy-deep); cursor: pointer; transition: background .15s, color .15s; }
.ag-switch-btn:hover { background: #fff; }
.ag-switch-btn:focus-visible { outline: 3px solid var(--tt-cyan); outline-offset: 2px; }
.ag-switch-btn[aria-pressed="true"] { background: var(--tt-navy); color: #fff; }
.ag-sent { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.ag-sent li { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 10px; padding: 8px 12px; }
.ag-sent p { margin: 0 0 6px; }
.ag-sent-to { font-weight: 600; font-size: 14.5px; }
.ag-draft.is-held { opacity: .8; border-style: dashed; }

/* The drive plan editor */
.ag-plan { background: #fff; border: 1px solid var(--tt-line-strong); border-radius: 12px; padding: 8px 12px 12px; margin: 0 0 12px; }
.ag-plan-head { font-size: 13px; font-weight: 700; color: var(--tt-ink-muted); text-transform: uppercase; letter-spacing: .3px; margin: 8px 0 6px; }
.ag-seg.is-two { grid-template-columns: repeat(2, 1fr); }

/* The note */
.ag-mark { font-weight: 700; }

/* A phone held sideways: let the actions scroll with the page, so the morning has room. */
@media (max-height: 480px) { .day-app .day-actions { position: static; } }
