/* Entirely My Day. Colours, type and spacing come from tokens/ (copied from entirely-ai-visibility). */
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans, system-ui, sans-serif); color: var(--color-text, #111); background: var(--color-bg, #fff); }
[hidden] { display: none !important; }

.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-card { max-width: 480px; display: grid; gap: 8px; }
.gate-eyebrow { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; margin: 0; }
.gate-title { font-size: 1.5rem; margin: 0; }
.gate-message { margin: 0; line-height: 1.5; }
.gate-action { justify-self: start; margin-top: 8px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.lockup { height: 20px; }
.divider { width: 1px; height: 20px; background: rgba(0, 0, 0, 0.2); }
.app-name { font-weight: 600; }
.who { font-size: 0.9rem; opacity: 0.8; }
.btn { font: inherit; padding: 6px 12px; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 6px; background: transparent; cursor: pointer; color: inherit; }
.btn.primary { background: #003e26; border-color: #003e26; color: #fff; }
.btn.small, .btn-small { padding: 3px 10px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: default; }

.main { max-width: 1120px; margin: 0 auto; padding: 24px; display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.source .meta { margin-right: auto; }
.card { border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.h2 { font-size: 1.2rem; margin: 0; }
.h3 { font-size: 0.95rem; margin: 16px 0 8px; }
.meta { font-size: 0.85rem; opacity: 0.7; }
.summary { margin: 0; line-height: 1.55; font-size: 1.05rem; }
.brief { background: rgba(0, 62, 38, 0.04); }

.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.side { display: grid; gap: 16px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.empty { opacity: 0.7; }
.mail, .priority { border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; background: #fff; overflow-wrap: anywhere; }
.mail.unread .mail-subject { font-weight: 600; }
.marked { opacity: 0.55; }
.mail-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; }
.mail-from { font-weight: 500; }
.mail-when { opacity: 0.65; white-space: nowrap; }
.mail-preview { font-size: 0.85rem; opacity: 0.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.mark-buttons { display: inline-flex; gap: 6px; margin-left: auto; }
.badge { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.08); }
.link { font-size: 0.85rem; color: #003e26; }

.priority { grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 10px; }
.priority .priority-why, .priority .mail-foot { grid-column: 1 / -1; }
.priority-subject { font-weight: 600; }
.priority-from { font-size: 0.85rem; opacity: 0.7; }
.priority-why { font-size: 0.9rem; }
.action { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 8px; border-radius: 999px; background: #003e26; color: #fff; }

.day { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.6; margin-top: 8px; }
.event, .meeting, .receipt { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.9rem; overflow-wrap: anywhere; }
.event-time, .receipt-when { opacity: 0.7; white-space: nowrap; font-variant-numeric: tabular-nums; }
.event-subject { font-weight: 500; }
.event-meta, .receipt-from { opacity: 0.7; font-size: 0.85rem; }
.meeting .priority-why { flex-basis: 100%; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 8px; background: #111; color: #fff; font-size: 0.9rem; }

@media (max-width: 800px) {
  .columns { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .main { padding: 16px; }
  .card { padding: 16px; }
  .who { display: none; }
}

/* ---------- the CEO Cockpit view (cockpit.js) ---------- */
.tabs { display: flex; gap: 4px; padding: 8px 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); overflow-x: auto; }
.tab { font: inherit; border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; color: inherit; }
.tab:hover { background: rgba(0, 0, 0, 0.06); }
.tab[aria-current="page"] { background: #003e26; color: #fff; }
.count { font-size: 0.75rem; padding: 0 7px; border-radius: 999px; background: #c7f100; color: #000; margin-left: 2px; }
.count:empty { display: none; }
.stack, .cockpit-today, .cockpit-view { display: grid; gap: 16px; min-width: 0; }
.grow { flex: 1 1 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.75rem; padding: 1px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.07); white-space: nowrap; }
.chip-ok { background: #e3f5e8; color: #1b462f; }
.chip-info { background: #e3ecfd; color: #1942f5; }
.chip-warn { background: #fff5c2; color: #8a4a00; }
.chip-bad { background: #f1e6fa; color: #7b16a2; }
.notice { border: 1px solid #fca800; background: #fff5c2; color: #8a4a00; border-radius: 8px; padding: 10px 14px; }
.notice-info { border-color: #1942f5; background: #e3ecfd; color: #1942f5; }
.ai { background: rgba(0, 62, 38, 0.05); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; }
.ai p { margin: 4px 0; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, 0.06); }
.input { font: inherit; color: inherit; width: 100%; padding: 6px 10px; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 6px; background: #fff; }
.input.cell { min-width: 110px; padding: 3px 8px; font-size: 0.88rem; }
.input.num, .input.cur { min-width: 70px; max-width: 110px; }
label.meta { display: grid; gap: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; align-items: end; }
.hero .big { font-size: 3rem; font-weight: 300; line-height: 1; }
.bar { position: relative; height: 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.08); }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #00d932; }
.bar > b { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #000; }
.risk { font-size: 0.92rem; padding-left: 10px; border-left: 3px solid #fca800; }
.matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quad { border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; padding: 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.quad-do { background: rgba(0, 217, 50, 0.06); }
.h3.flush { margin: 0; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th { text-align: left; font-weight: 500; opacity: 0.7; padding: 6px 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); white-space: nowrap; }
td { padding: 6px 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); vertical-align: top; }
.chat { display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.msg { padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; display: grid; gap: 6px; }
.msg.me { background: rgba(0, 62, 38, 0.08); justify-self: end; max-width: 90%; }
.msg.ai { background: rgba(0, 0, 0, 0.04); }
@media (max-width: 760px) {
  .matrix { grid-template-columns: 1fr; }
  .tabs { padding: 8px 12px; }
}
