/* ───────── Tokens ───────── */
:root {
  --bg: #f6f3ee;
  --surface: #fffdfa;
  --surface-2: #f3efe8;
  --surface-3: #e9e3d9;
  --border: #e7e1d6;
  --text: #1d1b18;
  --muted: #736e66;
  --faint: #a8a298;
  --accent: #d4663f;
  --accent-2: #eb9670;
  --accent-soft: #fbe8de;
  --on-accent: #ffffff;
  --blue: #3b7dd8;
  --green: #3a9a5f;
  --amber: #c7861a;
  --violet: #7a5cd6;
  --rose: #cf5078;
  --danger: #c8453a;
  --shadow-sm: 0 1px 2px rgba(40, 30, 20, .05);
  --shadow: 0 1px 2px rgba(40, 30, 20, .04), 0 8px 24px -8px rgba(40, 30, 20, .10);
  --shadow-lg: 0 20px 50px -12px rgba(40, 30, 20, .25);
  --hero-mix: 55%;
  --radius: 18px;
  --radius-sm: 11px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110; --surface: #1b1a18; --surface-2: #232120; --surface-3: #2e2b28; --border: #302d29;
    --text: #efece6; --muted: #a29d94; --faint: #6d685f;
    --accent: #ec8a62; --accent-2: #f3a684; --accent-soft: #3a241b; --on-accent: #1a0f0a;
    --blue: #72a8f2; --green: #6dca90; --amber: #e8b54f; --violet: #a88ff2; --rose: #ef88a8; --danger: #ef7b6e;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.6);
    --hero-mix: 16%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110; --surface: #1b1a18; --surface-2: #232120; --surface-3: #2e2b28; --border: #302d29;
  --text: #efece6; --muted: #a29d94; --faint: #6d685f;
  --accent: #ec8a62; --accent-2: #f3a684; --accent-soft: #3a241b; --on-accent: #1a0f0a;
  --blue: #72a8f2; --green: #6dca90; --amber: #e8b54f; --violet: #a88ff2; --rose: #ef88a8; --danger: #ef7b6e;
  --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.6);
  --hero-mix: 16%;
  color-scheme: dark;
}

/* ───────── Base ───────── */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); min-height: 1em; }
code, kbd { background: var(--surface-2); border: 1px solid var(--border); padding: 0 5px; border-radius: 5px; font-size: .9em; }
.ico { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ───────── Layout ───────── */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 420px; min-height: 100vh; }
.main { padding: 22px 26px 30px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.foot { text-align: center; padding-top: 4px; }

/* ───────── Hero ───────── */
.hero {
  --h1: #ffb68f; --h2: #ffd6a8; --h3: #f7a8c4;
  position: relative; overflow: hidden; overflow: clip; /* clip: decorative glow must not make the hero scrollable */
  display: flex; justify-content: space-between; gap: 20px;
  padding: 26px 28px; border-radius: 24px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--h1) var(--hero-mix), var(--surface)) 0%, transparent 60%),
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--h3) var(--hero-mix), var(--surface)) 0%, transparent 65%),
    color-mix(in srgb, var(--h2) calc(var(--hero-mix) * .6), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: rise .5s ease both;
}
.hero.afternoon { --h1: #9cc8ff; --h2: #cfe6ff; --h3: #a8e0bf; }
.hero.evening { --h1: #ffab8a; --h2: #f5c2de; --h3: #b3a8ff; }
.hero.night { --h1: #8a86f0; --h2: #c3a3ea; --h3: #f0a3bd; }
.hero::after { /* soft decorative glow */
  content: ""; position: absolute; width: 320px; height: 320px; right: -80px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--h1) 45%, transparent), transparent 70%);
  filter: blur(10px); opacity: .55; pointer-events: none;
}
.hero-main { position: relative; z-index: 1; min-width: 0; flex: 1; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.hero-summary { margin: 8px 0 14px; font-size: 15px; color: var(--muted); max-width: 60ch; }
.hero-summary strong { color: var(--text); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  backdrop-filter: blur(6px);
}
.pill .ico { color: var(--pc, var(--muted)); }
.pill b { font-variant-numeric: tabular-nums; }
.pill.warn { color: var(--danger); }
.dayline { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); max-width: 460px; }
.dayline-track { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.dayline-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 1s ease; }

.hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }
.hero-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font-size: 16px;
  background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--border); color: var(--text);
  transition: transform .15s ease, background .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--surface); }
.conn { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 6px 11px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--border); color: var(--muted); }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.conn.ok .conn-dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.conn.off { cursor: pointer; color: var(--danger); }
.conn.off .conn-dot { background: var(--danger); }
.ring-wrap { position: relative; width: 104px; height: 104px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: color-mix(in srgb, var(--text) 9%, transparent); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 226.2; stroke-dashoffset: 226.2; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring-wrap.full .ring-fg { stroke: var(--green); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.ring-label span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.clock { white-space: nowrap; font-family: var(--display); font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ───────── Section heads ───────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; flex-wrap: wrap; }
.section-head h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.section-head h2 .ico { color: var(--accent); }

/* ───────── Focus ───────── */
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.focus-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: rise .45s ease both;
}
.focus-card:nth-child(2) { animation-delay: .05s; } .focus-card:nth-child(3) { animation-delay: .1s; }
.focus-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.focus-card:focus-within { border-color: var(--accent); }
.focus-num { font-family: var(--display); font-size: 28px; line-height: 1; font-weight: 600; color: color-mix(in srgb, var(--accent) 55%, var(--faint)); min-width: 30px; }
.focus-body { flex: 1; min-width: 0; }
.focus-body input { width: 100%; border: 0; background: none; padding: 2px 0; font-size: 15px; font-weight: 500; }
.focus-body input:focus { outline: none; }
.focus-body input::placeholder { color: var(--faint); font-weight: 400; }
.focus-hint { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.focus-card.done { background: color-mix(in srgb, var(--green) 8%, var(--surface)); border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.focus-card.done input { text-decoration: line-through; color: var(--muted); }
.focus-card.done .focus-num { color: var(--green); }

/* Round check button, shared by focus + tasks */
.check {
  width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--faint); background: transparent;
  display: grid; place-items: center; padding: 0; color: transparent; transition: all .18s ease; margin-top: 1px;
}
.check .ico { width: 13px; height: 13px; stroke-width: 3; }
.check:hover { border-color: var(--accent); color: color-mix(in srgb, var(--accent) 60%, transparent); }
.check.on { background: var(--green); border-color: var(--green); color: #fff; animation: pop .3s ease; }

/* ───────── Cards ───────── */
.card {
  --c: var(--accent);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); min-width: 0; animation: rise .5s ease both;
}
.c-blue { --c: var(--blue); } .c-green { --c: var(--green); } .c-amber { --c: var(--amber); }
.c-violet { --c: var(--violet); } .c-rose { --c: var(--rose); } .c-accent { --c: var(--accent); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { display: flex; align-items: center; gap: 10px; }
.card-title h2 { font-size: 15px; font-weight: 600; }
.card-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.card-sub { font-size: 12px; color: var(--muted); }
.count:empty { display: none; }
.count { font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 1px 8px; border-radius: 99px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 18px 10px; color: var(--muted); font-size: 13px; }
.empty button { border: 1px dashed var(--border); background: none; border-radius: 99px; padding: 5px 12px; font-size: 12px; color: var(--accent); }
.empty button:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Forms */
.btn { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px; padding: 8px 14px; font-weight: 600; transition: filter .15s ease, transform .15s ease; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ghost-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--border); border-radius: 10px; padding: 6px 11px; color: var(--muted); font-size: 12.5px; }
.ghost-btn:hover { color: var(--text); background: var(--surface-2); }
input, select, textarea { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; min-width: 0; transition: border-color .15s ease, background .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.add-row { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; }
.add-row input:not([type]), .add-row input[name="title"], .add-row input[name="name"], .add-row input[name="note"], .add-row input[name="next"] { flex: 1 1 150px; }
.add-row .narrow { flex: 0 1 110px; }
.adder { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.adder summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); padding: 4px 8px; margin-left: -8px; border-radius: 8px; }
.adder summary::-webkit-details-marker { display: none; }
.adder summary:hover { color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.adder[open] summary { color: var(--c); }
.x { background: none; border: 0; color: var(--faint); opacity: 0; padding: 4px; border-radius: 7px; display: grid; place-items: center; transition: opacity .15s ease, color .15s ease, background .15s ease; }
li:hover .x, .tl-item:hover .x, .x:focus-visible { opacity: 1; }
.x:hover { color: var(--danger); background: var(--surface-2); }

/* ───────── Timeline ───────── */
.timeline { display: flex; flex-direction: column; }
.tl-day { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; }
.tl-day:first-child { margin-top: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 54px 18px 1fr auto; align-items: start; gap: 6px; padding: 5px 0; }
.tl-time { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 2px; text-align: right; }
.tl-dot { position: relative; justify-self: center; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); z-index: 1; }
.tl-item:not(:last-child) .tl-dot::after { content: ""; position: absolute; left: 50%; top: 10px; width: 2px; height: 36px; transform: translateX(-50%); background: var(--border); }
.tl-body { min-width: 0; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 6%, transparent); overflow-wrap: anywhere; }
.tl-body small { display: block; color: var(--muted); font-size: 11.5px; }
.tl-item.past { opacity: .5; }
.tl-item.now .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 2s infinite; }
.tl-item.now .tl-body { background: var(--accent-soft); }
.tl-item.now .tl-time { color: var(--accent); }
.now-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--accent); margin-left: 6px; }

/* ───────── Habits ───────── */
.habits { display: flex; flex-direction: column; gap: 4px; }
.habit-days-head, .habit { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px 22px; align-items: center; gap: 10px; }
.habit-days-head { font-size: 10.5px; color: var(--faint); font-weight: 600; }
.habit { padding: 7px 0; border-bottom: 1px solid var(--border); }
.habit:last-child { border-bottom: 0; }
.habit-name { font-weight: 500; overflow-wrap: anywhere; }
.days { display: grid; grid-template-columns: repeat(7, 22px); gap: 5px; }
.days span { text-align: center; }
.day { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--surface-2); padding: 0; transition: transform .12s ease, background .15s ease; }
.day:hover { transform: scale(1.12); border-color: var(--green); }
.day.on { background: var(--green); border-color: var(--green); }
.day.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in srgb, var(--green) 55%, transparent); }
.streak { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--faint); justify-content: flex-end; }
.streak.hot { color: var(--amber); }

/* ───────── Tasks ───────── */
.quick-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 6px 6px 12px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 8px; }
.quick-add > .ico { color: var(--accent); }
.quick-add input, .quick-add select { background: transparent; border-color: transparent; }
.quick-add input:focus, .quick-add select:focus { background: var(--surface); }
.quick-add #task-input { flex: 1 1 200px; font-weight: 500; }
.quick-add .narrow { flex: 0 1 110px; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 4px 11px; border-radius: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: flex-start; gap: 11px; padding: 10px 8px 10px 10px; border-radius: 12px; border-left: 3px solid transparent; transition: background .15s ease, opacity .3s ease, transform .3s ease; }
.task:hover { background: var(--surface-2); }
.task.p-high { border-left-color: var(--danger); }
.task.p-medium { border-left-color: var(--amber); }
.task.p-low { border-left-color: var(--border); }
.task .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task .title { font-weight: 500; }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.task.leaving { opacity: 0; transform: translateX(12px); }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.tag.overdue { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); font-weight: 600; }
.tag.today { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tag.prio-high { color: var(--danger); }

/* ───────── Money ───────── */
.money-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kpi .l { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.kpi .v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi.in .v { color: var(--green); } .kpi.neg .v { color: var(--danger); }
.split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-3); margin: 10px 0 6px; }
.split span { transition: width .8s ease; }
.split .in { background: var(--green); } .split .out { background: var(--amber); }
.tx { list-style: none; margin: 0; padding: 0; }
.tx li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tx li:last-child { border-bottom: 0; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.tx .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.income { color: var(--green); }

/* ───────── Projects ───────── */
.projects { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.project { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .15s ease; }
.project:hover { border-color: var(--border); }
.project-top { display: flex; align-items: center; gap: 8px; }
.project-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.status { appearance: none; border: 0; border-radius: 99px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--sc); background: color-mix(in srgb, var(--sc) 15%, transparent); }
.status.s-active { --sc: var(--blue); } .status.s-waiting { --sc: var(--amber); } .status.s-idea { --sc: var(--violet); } .status.s-done { --sc: var(--green); }
.next-input { width: 100%; border: 0; background: none; padding: 3px 0; margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); border-radius: 0; }
.next-input:focus { background: none; color: var(--text); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--violet) var(--p), var(--surface-3) var(--p)); }
.progress::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--violet); box-shadow: var(--shadow-sm); }
.progress::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--violet); }
.pct { width: 38px; text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ───────── Notes ───────── */
.note-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.note-form textarea { flex: 1; resize: vertical; min-height: 44px; }
.notes { list-style: none; padding: 0; margin: 0; columns: 3 220px; column-gap: 12px; }
.note {
  --nt: var(--amber);
  break-inside: avoid; margin: 0 0 12px; position: relative; cursor: pointer; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--nt) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--nt) 22%, var(--border));
  transition: transform .18s ease, box-shadow .18s ease;
}
.note:hover { transform: translateY(-2px) rotate(-.3deg); box-shadow: var(--shadow); }
.note.t1 { --nt: var(--blue); } .note.t2 { --nt: var(--green); } .note.t3 { --nt: var(--rose); } .note.t4 { --nt: var(--violet); }
.note .nt { font-weight: 600; padding-right: 22px; overflow-wrap: anywhere; }
.note .nb { font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.note.open .nb { -webkit-line-clamp: unset; display: block; }
.note .nd { font-size: 11px; color: var(--faint); margin-top: 8px; }
.note .x { position: absolute; top: 8px; right: 8px; }
.note:hover .x { opacity: 1; }

/* ───────── Claude panel ───────── */
.claude { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); }
.claude-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; }
.claude-id { display: flex; align-items: center; gap: 11px; }
.orb { width: 38px; height: 38px; border-radius: 50%; flex: none; background: conic-gradient(from 0deg, var(--accent), var(--rose), var(--violet), var(--accent-2), var(--accent)); animation: spin 8s linear infinite; position: relative; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.orb::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 60%), var(--surface); opacity: .85; }
.claude.thinking .orb { animation-duration: 1.4s; }
.claude-name { font-weight: 700; font-size: 16px; }
.claude-status { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 14px; border-bottom: 1px solid var(--border); }
.chips button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; font-weight: 500; transition: all .15s ease; }
.chips button .ico { color: var(--accent); }
.chips button:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.chips button:disabled { opacity: .5; cursor: wait; transform: none; }
.messages { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.welcome h3 { font-family: var(--display); font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.welcome p { margin: 0 0 14px; color: var(--muted); }
.suggest { display: grid; gap: 8px; }
.suggest button { text-align: left; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface-2); transition: all .15s ease; }
.suggest button:hover { border-color: var(--accent); transform: translateX(3px); }
.suggest .ico { color: var(--accent); margin-top: 2px; }
.suggest b { display: block; font-weight: 600; font-size: 13px; }
.suggest span { font-size: 12px; color: var(--muted); }
.msg { max-width: 100%; overflow-wrap: anywhere; animation: rise .3s ease both; }
.msg.user { align-self: flex-end; max-width: 86%; padding: 9px 13px; border-radius: 16px 16px 5px 16px; background: var(--accent); color: var(--on-accent); white-space: pre-wrap; }
.msg.assistant { display: flex; gap: 10px; }
.msg.assistant .mini-orb { width: 24px; height: 24px; flex: none; border-radius: 50%; margin-top: 1px; background: conic-gradient(var(--accent), var(--rose), var(--violet), var(--accent)); }
.msg.assistant .content { flex: 1; min-width: 0; }
.msg.assistant p { margin: 0 0 8px; }
.msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 8px; padding-left: 20px; }
.msg.assistant li { margin: 2px 0; }
.msg.assistant h4 { font-size: 14px; margin: 10px 0 4px; }
.msg.error, .msg.notice { font-size: 13px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); white-space: pre-wrap; }
.msg.notice { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.tool { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 2px 9px; animation: rise .25s ease both; }
.tool .ico { color: var(--green); }
.tool.fail .ico { color: var(--danger); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin: 12px 18px 4px; padding: 6px 6px 6px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); transition: border-color .15s ease, box-shadow .15s ease; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.composer textarea { flex: 1; resize: none; border: 0; background: none; padding: 7px 0; max-height: 160px; line-height: 1.45; }
.composer textarea:focus { background: none; }
.send { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 16px; transition: transform .15s ease, filter .15s ease; }
.send:hover { transform: translateY(-1px); filter: brightness(1.06); }
.send:disabled { opacity: .5; cursor: wait; transform: none; }
.composer-hint { margin: 0 18px 14px; font-size: 11px; color: var(--faint); text-align: center; }

/* ───────── Toasts, flash, confetti ───────── */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .3s cubic-bezier(.2,.9,.3,1.2) both; }
.toast .ico { color: var(--accent-2); }
.toast.out { animation: toast-out .25s ease forwards; }
.flash { animation: flash 2.2s ease; }
.confetti { position: fixed; width: 7px; height: 7px; border-radius: 2px; pointer-events: none; z-index: 60; animation: confetti .9s cubic-bezier(.15,.7,.3,1) forwards; }

/* ───────── Dialog ───────── */
dialog { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); padding: 24px; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(10, 8, 6, .45); backdrop-filter: blur(3px); }
dialog h2 { font-family: var(--display); font-size: 22px; font-weight: 600; }
dialog label { display: flex; flex-direction: column; gap: 5px; margin: 14px 0; font-size: 13px; font-weight: 600; }
dialog input { width: 100%; font-weight: 400; }
.connect-help { background: var(--surface-2); border-radius: 12px; padding: 11px 13px; margin: 14px 0 4px; font-size: 13px; }
.connect-help ol { margin: 6px 0 0; padding-left: 18px; }
.connect-help li { margin: 3px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* ───────── Motion ───────── */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 5%, transparent); } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ───────── Responsive ───────── */
@media (max-width: 1200px) {
  .app { grid-template-columns: 1fr; }
  .claude { position: static; height: 85vh; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 820px) {
  .main { padding: 16px; }
  .grid, .focus-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hero { flex-direction: column; padding: 22px 20px; }
  .hero-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; width: 100%; }
  .hero-tools { order: -1; width: 100%; }
  .conn { margin-right: auto; }
  .ring-wrap { width: 84px; height: 84px; }
  .ring-label strong { font-size: 18px; }
  .ring-label span { font-size: 8.5px; }
  .x { opacity: 1; }
  .days { grid-template-columns: repeat(7, 18px); gap: 4px; }
  .day { width: 18px; height: 18px; }
}

/* ───────── Work tracker ─────────
   Signal colours: green = completed, yellow = in progress or paused,
   red = due soon or overdue, black = not started. */
:root {
  --sig-green: #2f9457; --sig-yellow: #dba400; --sig-red: #d23c2f; --sig-black: #15120f;
  --sig-black-edge: #15120f; --on-yellow: #2b2000;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sig-green: #5fc487; --sig-yellow: #f0c23c; --sig-red: #f0695c; --sig-black: #000000; --sig-black-edge: #8d877d; }
}
:root[data-theme="dark"] { --sig-green: #5fc487; --sig-yellow: #f0c23c; --sig-red: #f0695c; --sig-black: #000000; --sig-black-edge: #8d877d; }

.view[hidden] { display: none; }
.view { display: flex; flex-direction: column; gap: 16px; }
.views { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.views button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 8px 16px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.views button.on { background: var(--accent); color: var(--on-accent); }
.badge { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--sig-red); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.badge:empty { display: none; }

.wsummary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wtile { text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .15s ease, border-color .15s ease; min-width: 0; }
.wtile:hover { transform: translateY(-1px); }
.wtile.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.wtile-n { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wtile-l { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--sig, var(--faint)); border: 1.5px solid var(--sig-edge, transparent); }
.t-all .sdot { display: none; }
.t-red, .s-red { --sig: var(--sig-red); }
.t-yellow, .s-yellow { --sig: var(--sig-yellow); }
.t-green, .s-green { --sig: var(--sig-green); }
.t-black, .s-black { --sig: var(--sig-black); --sig-edge: var(--sig-black-edge); }
.t-red .wtile-n { color: var(--sig-red); }

.wtoolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wtoolbar input[type="search"] { flex: 1 1 180px; background: var(--surface); }
.wtoolbar .btn { display: inline-flex; align-items: center; gap: 6px; }

.followups-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow-sm); }
.followups-panel summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.followups-panel summary::-webkit-details-marker { display: none; }
.followups-panel summary::after { content: "Hide"; margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.followups-panel:not([open]) summary::after { content: "Show"; }
.followups-panel summary .ico { color: var(--accent); }
.fu-list { list-style: none; margin: 10px 0 0; padding: 0; }
#followups { columns: 2 300px; column-gap: 24px; max-height: 260px; overflow-y: auto; }
.fu { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; break-inside: avoid; border-bottom: 1px solid var(--border); }
.fu .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fu.hot > .grow > div:first-child { font-weight: 600; }
.fu.done .title { text-decoration: line-through; color: var(--muted); }
.fu-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.linkish { border: 0; background: none; padding: 0; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.linkish:hover { color: var(--accent); }
.fu input[type="date"] { padding: 4px 8px; font-size: 12px; }

.wcat { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 10px 2px 0; }
.wgroup > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 8px; }
.wgroup h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.wcard {
  position: relative; cursor: pointer; padding: 14px 16px 14px 20px; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; min-width: 0;
}
.wcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--sig); }
.wcard.s-black::before { border-right: 1px solid var(--sig-edge); }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--sig) 50%, var(--border)); }
.wcard.s-red { background: color-mix(in srgb, var(--sig-red) 6%, var(--surface)); }
.wcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wcard h4 { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.spill { flex: none; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: var(--sig); color: #fff; border: 1px solid var(--sig-edge, transparent); }
.s-yellow .spill, .spill.s-yellow { color: var(--on-yellow); }
.s-green .spill, .spill.s-green { color: #06210f; }
.s-black .spill, .spill.s-black { color: #fff; }
.wsum { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wprog { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.wbar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.wbar span { display: block; height: 100%; border-radius: inherit; background: var(--sig); transition: width .6s ease; }
.s-black .wbar span { background: var(--sig-black-edge); }
.wpct { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.wnext { display: flex; gap: 6px; margin: 8px 0 0; font-size: 12.5px; }
.wnext .ico { margin-top: 3px; color: var(--accent); }
.wcard .meta { margin-top: 10px; }
.tag.unconfirmed { border: 1px dashed var(--faint); background: none; }

/* Task dialog */
#work-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.wd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wd-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.wd-row label { margin: 8px 0; }
dialog textarea, dialog select { width: 100%; font-weight: 400; }
dialog .progress { padding: 0; }
.wd-followups { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.wd-followups h3, .account h3 { font-size: 14px; font-weight: 700; }
.notice { background: color-mix(in srgb, var(--sig-yellow) 16%, transparent); border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dialog-actions .spacer { flex: 1; }
.ghost-btn.danger { color: var(--danger); }
.account { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }
.account p { margin: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pw-form { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.pw-form .btn { align-self: flex-start; }

/* Sign-in page */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, #ffb68f var(--hero-mix), var(--bg)), transparent 60%),
              radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, #b3a8ff var(--hero-mix), var(--bg)), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 30px 28px; box-shadow: var(--shadow-lg); }
.login-mark { margin-bottom: 14px; }
.login-card h1 { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.login-card > p { margin: 6px 0 0; }
.login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.login-card form[hidden], .login-card label[hidden] { display: none; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.login-card input { font-weight: 400; padding: 11px 12px; font-size: 15px; }
.login-card .btn { padding: 12px; font-size: 15px; margin-top: 4px; }
.login-card .btn:disabled { opacity: .6; cursor: wait; }
.login-card .error:empty { display: none; }

@media (max-width: 820px) {
  .wsummary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wsummary .t-all { grid-column: span 2; }
  .wgrid { grid-template-columns: 1fr; }
  .views { align-self: stretch; }
  .views button { flex: 1; justify-content: center; }
  .wtoolbar .seg { width: 100%; }
  .wtoolbar .seg button { flex: 1; padding: 6px 4px; }
}

/* Work tracker refinements */
#followups { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; max-height: 250px; overflow-y: auto; }
.wcard-top { flex-direction: column; align-items: flex-start; gap: 7px; }
.wcard-top .spill { order: -1; }
.login-mark .orb { display: block; width: 46px; height: 46px; }

/* ───────── Helm brand: Jonspire navy and gold ───────── */
:root {
  --bg: #f7f4ee; --surface: #ffffff; --surface-2: #f3efe6; --surface-3: #e8e1d3; --border: #e4ddd0;
  --text: #1b2233; --muted: #5b6475; --faint: #a3a8b3;
  --accent: #0f1f3a; --accent-2: #b8904a; --accent-soft: #e8ecf4; --on-accent: #ffffff;
  --gold: #b8904a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1322; --surface: #111c30; --surface-2: #18243b; --surface-3: #22304a; --border: #25334d;
    --text: #eef1f6; --muted: #9aa5b8; --faint: #66728a;
    --accent: #d9b77a; --accent-2: #f0d9ae; --accent-soft: #2a2718; --on-accent: #14100a;
    --gold: #d9b77a;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1322; --surface: #111c30; --surface-2: #18243b; --surface-3: #22304a; --border: #25334d;
  --text: #eef1f6; --muted: #9aa5b8; --faint: #66728a;
  --accent: #d9b77a; --accent-2: #f0d9ae; --accent-soft: #2a2718; --on-accent: #14100a;
  --gold: #d9b77a;
}
.hero { --h1: #d9b77a; --h2: #f3e3c3; --h3: #9fb4dc; }
.hero.afternoon { --h1: #9fb4dc; --h2: #f3e3c3; --h3: #d9b77a; }
.hero.evening { --h1: #d9b77a; --h2: #c9b8e8; --h3: #7f95c4; }
.hero.night { --h1: #5d76ad; --h2: #9fb4dc; --h3: #d9b77a; }
.section-head h2 .ico, .card-icon { color: var(--gold); }
.card-icon { background: color-mix(in srgb, var(--gold) 16%, transparent); }
.orb, .msg.assistant .mini-orb { background: conic-gradient(from 0deg, #0f1f3a, #b8904a, #f3e3c3, #2a4270, #0f1f3a); }
.brand { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; letter-spacing: .04em; margin-right: 8px; }
.brand img { border-radius: 5px; }
.foot a { color: inherit; }

/* Bell, mic, install */
.bell { position: relative; }
.bell .badge { position: absolute; top: -6px; right: -6px; }
.mic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 16px; }
.mic:hover { border-color: var(--accent); }
.mic.recording, #work-voice.recording { background: var(--sig-red); border-color: var(--sig-red); color: #fff; animation: pulse-rec 1.2s infinite; }
@keyframes pulse-rec { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sig-red) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.composer { padding-left: 6px; }

/* Settings blocks, team, links */
.settings-block { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.settings-block h3 { font-size: 14px; font-weight: 700; }
.settings-block p { margin: 6px 0; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }
a.ghost-btn { text-decoration: none; }
.link-box { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); overflow-wrap: anywhere; }
.link-box code { display: block; margin: 6px 0; padding: 6px 8px; user-select: all; }
.tx li .ghost-btn { flex: none; font-size: 12px; padding: 4px 9px; }
.cmd-result { white-space: pre-wrap; margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
#settings { max-height: calc(100vh - 24px); width: min(520px, calc(100vw - 24px)); }
#notif-dialog { width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.avatar .ico { width: 15px; height: 15px; }

/* Sign-in page */
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand img { border-radius: 12px; }
.login-brand strong { display: block; font-family: var(--display); font-size: 22px; line-height: 1.1; }
.login-brand span { font-size: 12px; color: var(--muted); }
.login-card .linkish { align-self: center; font-size: 13px; padding: 4px; }
.login-card .notice[hidden], .login-card .linkish[hidden], .login-card .btn[hidden] { display: none; }
.login-foot { margin-top: 18px !important; text-align: center; }
.login-card input[readonly] { opacity: .7; }
.login-body { background: radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, #d9b77a var(--hero-mix), var(--bg)), transparent 60%), radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, #5d76ad var(--hero-mix), var(--bg)), transparent 60%), var(--bg); }

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }
