/* The Dashboard: a calm cream-and-ink sheet with one orange accent.
   Two tones (paper + ink), orange used sparingly for what matters. No boxes around
   content and no divider lines: whitespace and type do the separating. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #e9e4d9;            /* the table the sheet sits on */
  --surface: #f8f5ee;       /* the sheet */
  --surface-2: #eeeadf;     /* soft fields */
  --text: #1c1b19;          /* ink */
  --muted: #837e72;
  --border: rgba(28, 27, 25, 0.1);
  --accent: #ee6420;
  --accent-text: #ffffff;
  --accent-soft: #fbe1d2;
  --accent-ink: #b84a12;    /* accent for small text */
  --good: #3f6b46;
  --good-soft: #e1eadb;
  --warn: #b7791f;
  --warn-soft: #f3e6c8;
  --bad: #c4401a;
  --bad-soft: #f7dccf;
  --track: rgba(28, 27, 25, 0.09);
  --c3: #6d6a62;
  --c4: #a9a499;
  --c5: #d2cdc1;
  --tile-bg: #efe6d6;       /* soft sand: a gentle step up from the sheet */
  --tile-fg: #1c1b19;
  --radius: 28px;
  --radius-sm: 14px;
  --bw: 0px;
  --shadow: none;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  color-scheme: light;
}
:root[data-mode="dark"] {
  --bg: #0d0c0b;
  --surface: #171614;
  --surface-2: #22201d;
  --text: #f2eee5;
  --muted: #9b958a;
  --border: rgba(242, 238, 229, 0.1);
  --accent: #ff7a3a;
  --accent-text: #1a0e06;
  --accent-soft: #3a2316;
  --accent-ink: #ff9a68;
  --good: #8fc79a;
  --good-soft: #1f2d22;
  --warn: #e0b04f;
  --warn-soft: #34290f;
  --bad: #ff8a5c;
  --bad-soft: #3a2118;
  --track: rgba(242, 238, 229, 0.1);
  --c3: #b9b3a6;
  --c4: #7b766c;
  --c5: #4a4741;
  --tile-bg: #27231f;
  --tile-fg: #f2eee5;
  color-scheme: dark;
}

body { background: var(--bg); font-size: 15px; }
h1, h2, h3 { font-variation-settings: 'opsz' 96; word-spacing: 0.07em; }

/* ============ the sheet ============ */
.shell {
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "brand nav date" "main main main";
  align-items: center; column-gap: 20px;
  max-width: 1320px; margin: 28px auto; min-height: calc(100dvh - 56px);
  padding: 22px 46px 60px; background: var(--surface); border-radius: 38px;
  align-content: start;
}
@media (max-width: 1376px) { .shell { margin: 16px; } }
.masthead { display: contents; }
.m-name { grid-area: brand; white-space: nowrap; display: flex; align-items: center; gap: 10px; font: 500 21px var(--font-display); letter-spacing: -0.02em; }
.m-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.m-right { grid-area: date; justify-self: end; display: flex; align-items: center; gap: 14px; }
.m-date { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
@media (max-width: 1100px) { .m-date { display: none; } }
.mode-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text); transition: background .15s, transform .15s;
}
.mode-toggle:hover { background: color-mix(in srgb, var(--text) 14%, var(--surface-2)); transform: rotate(14deg); }
.main { grid-area: main; max-width: none; padding: 50px 0 0; width: 100%; }

@media (min-width: 861px) {
  .nav {
    grid-area: nav; position: static; height: auto; flex-direction: row; gap: 2px; padding: 5px;
    background: var(--surface-2); border: 0; border-radius: 999px;
  }
  .brand, .nav .spacer { display: none; }
  .nav a.item {
    padding: 8px 16px; border-radius: 999px; gap: 0; font-size: 13.5px; font-weight: 500; color: var(--muted);
    transition: background .15s, color .15s;
  }
  .nav a.item .icon { display: none; }
  .nav a.item:hover { background: transparent; color: var(--text); }
  .nav a.item.active { background: var(--text); color: var(--surface); }
  .badge-dot { margin-left: 8px; height: 18px; min-width: 18px; padding: 0 5px; font-size: 11px; background: var(--accent); color: var(--accent-text); }
}
@media (max-width: 860px) {
  .shell { display: block; margin: 0; border-radius: 0; padding: 20px 20px 0; min-height: 100dvh; }
  .masthead { display: flex; align-items: center; justify-content: space-between; }
  .m-name { font-size: 19px; }
  .m-date { display: none; }
  .mode-toggle { width: 36px; height: 36px; }
  .main { padding: 26px 0 calc(100px + env(safe-area-inset-bottom)); }
  .nav { background: var(--surface); border-top: 1px solid var(--border); }
  .nav a.item { color: var(--muted); }
  .nav a.item.active { background: none; color: var(--accent); }
  .badge-dot { background: var(--accent); color: var(--accent-text); }
}

/* ============ page + section headings ============ */
.page-head { margin-bottom: 38px; align-items: flex-end; }
.page-head h1 { font: 400 clamp(40px, 5vw, 60px)/1 var(--font-display); letter-spacing: -0.04em; }
.page-head p { margin-top: 12px; font-size: 15px; }
.card h2 { font: 500 21px var(--font-display); letter-spacing: -0.015em; margin-bottom: 14px; }
.card h2 .count { font: 400 14px var(--font); }
.card h2 a { color: var(--muted); font-weight: 500; }
.card h2 .icon { display: none; }
.group-label { font: 500 13.5px var(--font); letter-spacing: 0; text-transform: none; color: var(--muted); margin: 30px 0 6px; }
.group-label.overdue { color: var(--accent-ink); }
.day { margin-top: 34px; }
.day h3 { font: 500 22px var(--font-display); letter-spacing: -0.02em; margin-bottom: 6px; }
.day h3.today { color: var(--accent-ink); }

/* ============ no boxes: sections are just space ============ */
.card { background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
.card.banner { background: var(--warn-soft); border-radius: 20px; padding: 14px 18px; }
a.card { background: transparent; }
.grid { gap: 44px 56px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card.form-row { margin-bottom: 40px; gap: 10px; align-items: flex-end; }
section.card + section.card { margin-top: 44px; }

/* stat rows on the tracker pages: big numerals, nothing around them */
.stats { gap: 24px 64px; margin-bottom: 44px; }
.stats .stat { padding: 0; border: 0; }
.stat:hover { border-color: transparent; }
.stat .label { font-size: 14px; }
.stat .icon { display: none; }
.stat .value { font: 400 clamp(44px, 5vw, 64px)/1 var(--font-display); letter-spacing: -0.045em; margin-top: 10px; font-variation-settings: 'opsz' 144; }
.stat .sub { margin-top: 8px; font-size: 14px; }

/* ============ lists ============ */
.list > li { padding: 12px 12px; margin: 0 -12px; border: 0; border-radius: 18px; transition: background .12s; }
.list > li:hover { background: var(--surface-2); }
.list .title { font: 500 15.5px var(--font); }
.list .meta { font-size: 13px; margin-top: 3px; }
.list .meta .overdue { color: var(--accent-ink); }
.event-time { font-size: 13px; width: 76px; }
.check { width: 22px; height: 22px; border: 1.5px solid color-mix(in srgb, var(--text) 32%, transparent); }
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
li.done .title { color: var(--muted); }
@media (hover: hover) {
  .list > li .icon-btn { opacity: 0; transition: opacity .12s; }
  .list > li:hover .icon-btn, .list > li:focus-within .icon-btn { opacity: 1; }
}
.edit-row input { background: var(--surface); }

/* ============ controls ============ */
input, select, textarea {
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: 14px; padding: 11px 15px;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); background: var(--surface); }
input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
label.field { font-size: 13px; font-weight: 500; }
.btn { background: var(--surface-2); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 500; }
.btn:hover { background: color-mix(in srgb, var(--text) 12%, var(--surface-2)); }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.06); }
.btn.small { border-radius: 999px; padding: 6px 13px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn.round { width: 44px; height: 44px; padding: 0; flex: none; }
.icon-btn { border-radius: 50%; }
.tabs { background: var(--surface-2); border-radius: 999px; padding: 4px; }
.tabs button { border-radius: 999px; padding: 7px 15px; font-weight: 500; }
.tabs button.on { background: var(--text); color: var(--surface); box-shadow: none; }
.pill { background: var(--surface-2); color: var(--muted); font-weight: 500; padding: 2px 10px; }
.pill.academic { background: var(--accent-soft); color: var(--accent-ink); }
.heat { gap: 5px; max-width: 700px; }
.heat button { border-radius: 5px; background: var(--track); }
.heat button.l1 { background: color-mix(in srgb, var(--accent) 42%, var(--track)); }
.heat button.l2 { background: var(--accent); }
.heat button.sel { outline: 2px solid var(--text); }
.bar-track { height: 6px; background: var(--track); }
.bar-fill { background: var(--text); }
.chart .bar { fill: var(--text); rx: 6; }
.chart .bar.low { fill: var(--accent); }

/* ============ charts ============ */
.ring { position: relative; flex: none; }
.ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.vbars { width: 100%; }
.vbars-plot { position: relative; display: flex; align-items: flex-end; gap: 6px; }
.vbar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.vbar { width: 100%; max-width: 22px; border-radius: 7px; background: color-mix(in srgb, var(--text) 17%, transparent); transition: height .3s; }
.vbar.hi { background: var(--accent); }
.vbar.low { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.vbar.none { height: 4px; background: var(--track); }
.vbars-target { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--text) 30%, transparent); pointer-events: none; }
.vbars-labels { display: flex; gap: 6px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.vbars-labels span { flex: 1; text-align: center; }
.vbars-labels .hi { color: var(--accent-ink); font-weight: 600; }
.dots { display: flex; gap: 8px; margin-top: 14px; }
.dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--track); }
.dots span.on { background: var(--accent); }

/* ============ the dashboard ============ */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-bottom: 46px; }
.greet h1 { font: 400 clamp(44px, 5.6vw, 72px)/1 var(--font-display); letter-spacing: -0.045em; font-variation-settings: 'opsz' 144; }
.greet p { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.greet p a { color: var(--accent-ink); font-weight: 500; }
.quick { display: flex; gap: 10px; width: min(420px, 100%); }
.quick input { background: var(--surface-2); padding: 13px 18px; border-radius: 999px; }

.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 52px 44px; }
.dash > * { min-width: 0; }
.w-hero { grid-column: span 8; }
.w-tasks { grid-column: span 4; }
.w-sleep, .w-gym, .w-goals { grid-column: span 4; }
.w-next { grid-column: span 7; }
.w-inbox { grid-column: span 5; }
.w-next.wide { grid-column: span 12; }
@media (max-width: 1180px) {
  .w-hero, .w-next, .w-inbox { grid-column: span 12; }
  .w-tasks, .w-sleep, .w-gym, .w-goals { grid-column: span 6; }
}
@media (max-width: 700px) { .dash { grid-template-columns: minmax(0, 1fr); gap: 46px; } .dash > * { grid-column: auto !important; } }

.w-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.w-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.w-head a { font-size: 13px; color: var(--muted); }
.w-head a:hover { color: var(--text); text-decoration: none; }
.w-num { word-spacing: 0.06em; font: 400 clamp(40px, 4vw, 58px)/1 var(--font-display); letter-spacing: -0.045em; font-variation-settings: 'opsz' 144; }
.w-num.sm { font-size: 38px; }
.w-unit { font: 400 15px var(--font); letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.w-sub { color: var(--muted); font-size: 14px; margin-top: 8px; }
.w-sub.tight { margin-top: 2px; font-size: 13px; }
.w-sub.gap { margin: 22px 0 10px; }
.warn-line { color: var(--accent-ink); font-weight: 500; font-size: 15px; }
.w-sleep .vbars, .w-gym .vbars { margin-top: 22px; }

.tile.ink {
  background: var(--tile-bg); color: var(--tile-fg); border-radius: 32px; padding: 32px 36px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px;
}
.tile.ink .w-label, .tile.ink .w-head a, .tile.ink .w-unit { color: color-mix(in srgb, var(--tile-fg) 55%, transparent); }
.tile.ink .w-head a:hover { color: var(--tile-fg); }
.tile.ink .vbar { background: color-mix(in srgb, var(--tile-fg) 24%, transparent); }
.tile.ink .vbar.hi { background: var(--accent); }
.tile.ink .vbar.none { background: color-mix(in srgb, var(--tile-fg) 10%, transparent); }
.tile.ink .vbars-labels { color: color-mix(in srgb, var(--tile-fg) 50%, transparent); }
.tile.ink .vbars-labels .hi { color: var(--accent); }
.hero-week .vbars { margin-top: 26px; }
@media (max-width: 760px) { .tile.ink { grid-template-columns: minmax(0, 1fr); padding: 26px 24px; gap: 34px; } }

.timeline { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 62px 10px minmax(0, 1fr); gap: 12px; align-items: start; }
.tl-time { font-size: 13px; color: color-mix(in srgb, var(--tile-fg) 55%, transparent); padding-top: 2px; font-variant-numeric: tabular-nums; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.tl-body { display: grid; gap: 2px; }
.tl-title { font-weight: 500; font-size: 15.5px; }
.tl-meta { font-size: 13px; color: color-mix(in srgb, var(--tile-fg) 55%, transparent); }
.timeline .tl-more { display: block; color: color-mix(in srgb, var(--tile-fg) 55%, transparent); font-size: 13px; padding-left: 84px; }

.task-ring { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.task-ring-text { display: grid; gap: 4px; }
.task-ring-text .w-sub { margin-top: 0; }

.rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 30px 24px; }
.gring { display: grid; justify-items: start; gap: 8px; }
.gring-pct { font: 400 24px var(--font-display); letter-spacing: -0.03em; }
.gring-pct.sm { font-size: 16px; }
.gring-title { font-weight: 500; font-size: 14.5px; line-height: 1.25; margin-top: 4px; }

/* goals page: ring + controls on one line */
.list > li .ring { margin-right: 4px; }

/* ============ login, toasts ============ */
.auth { background: var(--bg); }
.auth .card { background: var(--surface); border-radius: 36px; padding: 44px 40px; }
.auth h1 { font: 400 42px/1 var(--font-display); letter-spacing: -0.04em; }
.toast { background: var(--text); color: var(--surface); border-radius: 999px; padding: 12px 20px; }
.banner { border-radius: 20px; }


/* ============ mail ============ */
.mail { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 48px; align-items: start; }
.mail-list { position: sticky; top: 20px; max-height: calc(100dvh - 60px); overflow: auto; margin: 0 -12px; padding: 0 12px 12px; }
.mail-tools { display: grid; gap: 12px; margin-bottom: 14px; }
.mail-tools .tabs { flex-wrap: wrap; justify-self: start; }
.mail-search input { border-radius: 999px; padding: 11px 18px; }
.mrows { display: grid; gap: 2px; }
.mrow {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; cursor: pointer; color: inherit;
  background: none; border: 0; border-radius: 20px; padding: 13px 14px 13px 12px; transition: background .12s;
}
.mrow:hover, .mrow.sel { background: var(--surface-2); }
.mrow-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: transparent; }
.mrow.unread .mrow-dot { background: var(--accent); }
.mrow-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.mrow-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.mrow-from { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-count { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.mrow-date { color: var(--muted); font-size: 12.5px; flex: none; }
.mrow-subj { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-snip { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow.unread .mrow-from, .mrow.unread .mrow-subj { font-weight: 600; }
.mrow-star { color: var(--accent); margin-top: 3px; } .mrow-star svg { fill: var(--accent); }
.mrows .more { justify-self: center; margin-top: 14px; }

.mail-read { min-width: 0; min-height: 360px; }
.mail-empty { display: grid; justify-items: center; align-content: center; gap: 10px; padding: 80px 20px; color: var(--muted); text-align: center; }
.mail-setup { max-width: 560px; font-size: 16px; line-height: 1.6; }
.reader-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.reader-bar .bar-gap { flex: 1; }
.reader-bar .back { display: none; }
.icon-btn.starred { color: var(--accent); } .icon-btn.starred svg { fill: var(--accent); }
.reader-subject { font: 400 clamp(26px, 3vw, 38px)/1.12 var(--font-display); letter-spacing: -0.035em; margin-bottom: 26px; }
.thread { display: grid; gap: 4px; }
.msg-head {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer; color: inherit;
  background: none; border: 0; padding: 12px; border-radius: 22px;
}
.msg:not(.open) .msg-head:hover { background: var(--surface-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); }
.msg-who { display: grid; min-width: 0; flex: 1; }
.msg-name { font-weight: 600; }
.msg-addr { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.msg-sub { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date { color: var(--muted); font-size: 13px; flex: none; }
.msg-body { padding: 4px 12px 22px 64px; }
.mail-frame { width: 100%; border: 0; display: block; min-height: 40px; color-scheme: light; }
.mail-frame.rich { background: #fff; border-radius: 18px; }
.img-bar { background: var(--surface-2); border-radius: 14px; padding: 10px 16px; margin-bottom: 12px; font-size: 13.5px; color: var(--muted); }
.attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip { display: inline-flex; gap: 7px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--surface-2); color: inherit; cursor: pointer; font-size: 13.5px; }
.chip:hover { background: color-mix(in srgb, var(--text) 12%, var(--surface-2)); }
.chip-size { color: var(--muted); font-size: 12px; }
.reply-pill {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-top: 22px; cursor: pointer;
  border: 0; border-radius: 999px; background: var(--surface-2); padding: 15px 22px; color: var(--muted); font-size: 14.5px;
}
.reply-pill:hover { color: var(--text); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }

.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(12, 10, 8, 0.5); backdrop-filter: blur(3px); }
.compose {
  width: min(700px, 100%); max-height: calc(100dvh - 40px); overflow: auto; display: grid; gap: 14px;
  background: var(--surface); border-radius: 32px; padding: 28px 30px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}
.compose-head { display: flex; align-items: center; justify-content: space-between; }
.compose-head h3 { font: 500 24px var(--font-display); letter-spacing: -0.02em; }
.compose-text { border-radius: 20px; min-height: 230px; line-height: 1.6; resize: vertical; padding: 16px 18px; }
.compose-foot { display: flex; gap: 10px; }
.cc-link { justify-self: start; font-size: 13.5px; margin-top: -6px; }

@media (max-width: 960px) {
  .mail { display: block; }
  .mail-list { position: static; max-height: none; overflow: visible; margin: 0; padding: 0; }
  .mail.open .mail-list, .mail:not(.open) .mail-read { display: none; }
  .reader-bar .back { display: inline-flex; }
  .msg-body { padding-left: 12px; }
  .msg-addr { display: none; }
  .msg-head { gap: 12px; }
  .compose { padding: 22px 20px; border-radius: 26px; }
}

/* ============ inbox card on the dashboard ============ */
.inbox-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 6px; }
.inbox-list a { display: grid; gap: 1px; padding: 8px 12px; margin: 0 -12px; border-radius: 16px; color: inherit; }
.inbox-list a:hover { background: var(--surface-2); text-decoration: none; }
.ib-from { font-weight: 500; font-size: 14.5px; }
.ib-subj { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ calendar views ============ */
.cal-bar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.linkrow { background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; font: inherit; }
.linkrow:hover .title { text-decoration: underline; text-underline-offset: 3px; }

/* event colours: three quiet tones, chosen per calendar */
.t0 { background: var(--accent-soft); color: var(--accent-ink); --bar: var(--accent); }
.t1 { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); --bar: color-mix(in srgb, var(--text) 55%, transparent); }
.t2 { background: color-mix(in srgb, var(--c3) 17%, transparent); color: var(--text); --bar: var(--c4); }

.tg { --grid: color-mix(in srgb, var(--text) 8%, transparent); overflow-x: auto; }
.tg-inner { min-width: calc(56px + var(--cols) * 118px); }
.tg-row { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tg-day { background: none; border: 0; cursor: pointer; color: inherit; display: grid; justify-items: center; gap: 2px; padding: 2px 0 10px; }
.tg-day .dow { font-size: 12.5px; color: var(--muted); }
.tg-day .num { font: 400 24px var(--font-display); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.tg-day:hover .num { background: var(--surface-2); }
.tg-day.today .num { background: var(--accent); color: var(--accent-text); }
.tg-day.today .dow { color: var(--accent-ink); }
.tg-allday { align-items: start; padding-bottom: 12px; }
.tg-label { font-size: 11.5px; color: var(--muted); padding: 4px 10px 0 0; text-align: right; }
.tg-allday .cell { display: grid; gap: 3px; padding: 0 3px; min-width: 0; }
.chip-ev { border: 0; border-radius: 9px; padding: 3px 9px; font: 500 12.5px var(--font); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-task { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-scroll { max-height: calc(100dvh - 380px); min-height: 420px; overflow-y: auto; }
.tg-hours { position: relative; height: calc(24 * var(--hour)); }
.tg-hours span { position: absolute; right: 10px; font-size: 11.5px; color: var(--muted); transform: translateY(-50%); }
.tg-col {
  position: relative; height: calc(24 * var(--hour)); cursor: cell; box-shadow: inset 1px 0 0 var(--grid);
  background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 100% var(--hour);
}
.ev {
  position: absolute; z-index: 2; display: grid; align-content: start; gap: 1px; text-align: left; cursor: pointer; overflow: hidden;
  border: 0; border-radius: 12px; padding: 5px 9px; font: inherit; box-shadow: inset 3px 0 0 var(--bar);
}
.ev:hover { filter: brightness(0.97); z-index: 4; }
.ev-title { font-weight: 600; font-size: 12.5px; line-height: 1.25; }
.ev-time { font-size: 11.5px; opacity: 0.75; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); pointer-events: none; z-index: 5; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.mo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mo-dow { font-size: 12.5px; color: var(--muted); padding: 0 8px 4px; }
.mo-cell { min-height: 124px; border-radius: 20px; padding: 8px; display: grid; align-content: start; gap: 3px; cursor: pointer; background: color-mix(in srgb, var(--text) 4%, transparent); min-width: 0; }
.mo-cell.out { background: transparent; opacity: 0.45; }
.mo-num { justify-self: start; border: 0; background: none; color: inherit; cursor: pointer; font: 500 13.5px var(--font); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.mo-num:hover { background: var(--surface-2); }
.mo-cell.today .mo-num { background: var(--accent); color: var(--accent-text); }
.mo-ev { border: 0; border-radius: 8px; padding: 2px 7px; text-align: left; font: 400 12px var(--font); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-ev b { font-weight: 600; }
.mo-task { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-more { justify-self: start; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0 6px; }
@media (max-width: 700px) {
  .mo { gap: 3px; }
  .mo-cell { min-height: 84px; padding: 5px 4px; border-radius: 14px; }
  .mo-ev { font-size: 10.5px; padding: 1px 4px; }
  .mo-ev b, .mo-task { display: none; }
  .cal-bar { justify-content: flex-start; }
}
.ev-modal { max-width: 520px; }
.ev-modal .compose-head h3 { font-size: 26px; }
.ev-line { font-size: 15.5px; }

/* ============ tasks by list ============ */
.list-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 38px; }
.chip-toggle { border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; background: var(--surface-2); color: var(--muted); font: 500 13.5px var(--font); }
.chip-toggle:hover { color: var(--text); }
.chip-toggle.on { background: var(--text); color: var(--surface); }
.chip-n { opacity: 0.6; font-size: 12px; }
.tboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 52px 48px; align-items: start; }
.tcol h2 { font: 500 23px var(--font-display); letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.tcol h2 .count { font: 400 14px var(--font); color: var(--muted); }
.tcol-add { display: flex; align-items: center; gap: 10px; background: var(--surface-2); color: var(--accent-ink); border-radius: 999px; padding: 0 18px; margin-bottom: 8px; }
.tcol-add input, .tcol-add input:focus { background: none; border: 0; padding: 13px 0; border-radius: 0; box-shadow: none; }
.tcol-empty { padding: 8px 4px 12px; }
.tcol-done { margin-top: 12px; font-size: 13.5px; }

.sug-toggle { margin-left: auto; font: 500 13.5px var(--font); }
