/* ==========================================================================
   Daymark — foundation styles
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #08070b;
  --bg-soft: #0d0b12;
  --surface: #121019;
  --surface-raised: #17131f;
  --surface-glass: rgba(20, 17, 28, 0.74);

  --text: #f5f2fa;
  --text-soft: #d8d2e3;
  --muted: #a49db3;
  --muted-2: #8b8498;
  --muted-3: #6f687c;

  --accent: #8b5cf6;
  --accent-strong: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-deep: #6d3ee8;
  --accent-wash: rgba(139, 92, 246, 0.12);

  --success: #6ee7b7;
  --warning: #fbbf24;
  --danger: #fb7185;
  --info: #60a5fa;
  --pink: #f472b6;

  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.13);
  --border-accent: rgba(167, 139, 250, 0.22);

  --font-sans: "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-xl: 32px;

  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --shadow-float: 0 28px 80px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.07);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@property --progress {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-dialog-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

h1:focus {
  outline: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(139, 92, 246, 0.42);
  color: #fff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
  background-clip: padding-box;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

/* ---------- Shared primitives ---------- */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--xs {
  width: 15px;
  height: 15px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.08), 0 0 12px rgba(110, 231, 183, 0.4);
}

.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow .icon {
  color: var(--accent-strong);
}

.kicker {
  letter-spacing: 0.14em;
}

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1000px 650px at 50% -240px, rgba(109, 62, 232, 0.22), transparent 68%),
    radial-gradient(800px 560px at 110% 22%, rgba(76, 29, 149, 0.16), transparent 72%),
    radial-gradient(760px 620px at -10% 72%, rgba(59, 30, 108, 0.1), transparent 70%),
    linear-gradient(180deg, #08070b 0%, #09080d 48%, #07060a 100%);
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.65;
  will-change: transform;
}

.ambient__glow--one {
  top: -220px;
  left: 50%;
  width: 560px;
  height: 400px;
  margin-left: -280px;
  background: rgba(124, 58, 237, 0.18);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.ambient__glow--two {
  top: 32%;
  right: -260px;
  width: 540px;
  height: 540px;
  background: rgba(91, 33, 182, 0.11);
  animation: ambientDrift 24s ease-in-out -8s infinite alternate-reverse;
}

.ambient__noise {
  position: absolute;
  inset: 0;
  opacity: 0.026;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
}

/* ---------- App shell ---------- */
.app-shell {
  position: relative;
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 26px 152px;
}

.app-main {
  position: relative;
}

.screen[hidden] {
  display: none;
}

.screen--enter {
  animation: screenIn 0.5s var(--ease-out) both;
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 2px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 4px;
  margin: -4px;
  border-radius: 15px;
}

.brand__mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(145deg, #9b6cff 0%, #7c3aed 54%, #5b21b6 100%);
  box-shadow:
    0 9px 26px rgba(109, 62, 232, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}

.brand__mark .icon {
  width: 22px;
  height: 22px;
  fill: #fff;
  stroke: none;
  filter: drop-shadow(0 1px 3px rgba(30, 10, 70, 0.28));
}

.brand:hover .brand__mark {
  transform: rotate(-5deg) scale(1.05);
  box-shadow:
    0 12px 32px rgba(109, 62, 232, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brand__word {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.brand__word span {
  color: var(--accent-strong);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s var(--ease-out);
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.icon-button:active {
  transform: scale(0.93);
}

.icon-button--small {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.icon-button--small .icon {
  width: 16px;
  height: 16px;
}

.notify-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border: 2px solid #121019;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.85);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-spring);
}

.notify-dot.is-hidden {
  opacity: 0;
  transform: scale(0);
}

.avatar-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.16), transparent 44%),
    linear-gradient(145deg, #2d233f, #18131f);
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s var(--ease-spring), border-color 0.25s ease;
}

.avatar-button:hover {
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-2px);
}

.avatar-button:active {
  transform: scale(0.94);
}

.avatar-button__initials {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s var(--ease-out),
    box-shadow 0.22s ease;
}

.button:active {
  transform: scale(0.97);
}

.button--primary {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(135deg, #9b6cff, #7c3aed 58%, #6d28d9);
  color: #fff;
  box-shadow:
    0 9px 26px rgba(109, 62, 232, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.button--primary:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 48%),
    linear-gradient(135deg, #a57aff, #8b5cf6 58%, #7c3aed);
  box-shadow:
    0 12px 32px rgba(109, 62, 232, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.button--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.button--ghost:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}

.button--compact {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 11px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  margin-bottom: 20px;
  padding: 40px 42px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.17);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(660px 350px at 92% -15%, rgba(139, 92, 246, 0.29), transparent 65%),
    radial-gradient(440px 280px at 6% 110%, rgba(88, 28, 135, 0.15), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.022));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.hero::before {
  position: absolute;
  top: -190px;
  right: -80px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(196, 181, 253, 0.08);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 58px rgba(196, 181, 253, 0.025),
    0 0 0 118px rgba(196, 181, 253, 0.015);
}

.hero::after {
  position: absolute;
  right: 20%;
  bottom: -130px;
  width: 280px;
  height: 220px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  content: "";
  filter: blur(70px);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero__title {
  max-width: 680px;
  margin: 19px 0 14px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero__title span {
  background: linear-gradient(105deg, #fff 4%, #e9e1ff 34%, #b79cff 72%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  max-width: 540px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 23px;
}

.hero-pill {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  color: #d6c9fb;
  font-size: 11.5px;
  font-weight: 600;
}

.hero-pill strong {
  font-weight: 800;
}

.hero-pill .icon {
  width: 14px;
  height: 14px;
  color: var(--accent-strong);
}

.hero-pill--quiet {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.hero__progress {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 17px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 26px;
  background: rgba(8, 7, 11, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(8px);
}

.progress-ring {
  --progress: 0;
  position: relative;
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--accent-bright) 0%,
    var(--accent-strong) 22%,
    var(--accent-deep) calc(var(--progress) * 1%),
    rgba(255, 255, 255, 0.075) 0
  );
  box-shadow:
    0 0 46px rgba(124, 58, 237, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: --progress 1.15s var(--ease-out);
}

.progress-ring::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 26%, rgba(139, 92, 246, 0.15), transparent 54%),
    #100d16;
  content: "";
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.45);
}

.progress-ring__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.progress-ring__inner strong {
  display: block;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.progress-ring__inner span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-caption {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
}

.progress-caption strong {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

/* ---------- Quick actions ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.quick-action {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 17px;
  padding: 15px 16px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.047), rgba(255, 255, 255, 0.017));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition:
    transform 0.28s var(--ease-out),
    border-color 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease;
}

.quick-action::after {
  position: absolute;
  top: -50px;
  right: -55px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.12);
  content: "";
  opacity: 0;
  filter: blur(28px);
  transition: opacity 0.3s ease;
}

.quick-action:hover {
  border-color: rgba(167, 139, 250, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.023));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.quick-action:hover::after {
  opacity: 1;
}

.quick-action:active {
  transform: translateY(-1px) scale(0.99);
}

.quick-action--primary {
  border-color: rgba(167, 139, 250, 0.26);
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(196, 181, 253, 0.14), transparent 70%),
    linear-gradient(145deg, rgba(124, 58, 237, 0.3), rgba(76, 29, 149, 0.09));
}

.quick-action--primary .quick-action__icon {
  border-color: rgba(196, 181, 253, 0.2);
  background: rgba(196, 181, 253, 0.15);
  color: #e7deff;
}

.quick-action__top {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.quick-action__icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.09);
  color: var(--accent-strong);
}

.quick-action__icon .icon {
  width: 17px;
  height: 17px;
}

.quick-action__arrow {
  width: 15px;
  height: 15px;
  color: var(--muted-3);
  transition: color 0.25s ease, transform 0.25s var(--ease-out);
}

.quick-action:hover .quick-action__arrow {
  color: var(--accent-strong);
  transform: translate(2px, -2px);
}

.quick-action__label {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.quick-action__sub {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

/* ---------- Dashboard layout ---------- */
.dashboard-grid {
  display: grid;
  grid-template-areas:
    "tasks reminders"
    "tasks quote"
    "summary summary";
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 20px;
}

.dashboard-column {
  display: contents;
}

.tasks-card {
  grid-area: tasks;
}

.reminders-card {
  grid-area: reminders;
}

.summary-card {
  grid-area: summary;
}

.quote-card {
  grid-area: quote;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(139, 92, 246, 0.035), transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.047), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.3s ease,
    transform 0.3s var(--ease-out),
    box-shadow 0.3s ease;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.card-head h2,
.summary-card h2 {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.card-footer {
  border-top: 1px solid var(--border);
}

/* ---------- Tasks ---------- */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 -10px;
  padding: 11px 10px;
  border-radius: 14px;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.033);
}

.task-check {
  display: grid;
  width: 23px;
  height: 23px;
  flex: none;
  padding: 0;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s var(--ease-spring);
}

.task-check:hover {
  border-color: var(--accent-strong);
  background: rgba(139, 92, 246, 0.12);
}

.task-check:active {
  transform: scale(0.88);
}

.task-check .icon {
  width: 11px;
  height: 11px;
  opacity: 0;
  stroke-width: 3.2;
  transform: scale(0.55);
  transition: opacity 0.18s ease, transform 0.25s var(--ease-spring);
}

.task-item.is-done .task-check {
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--accent-strong), var(--accent-deep));
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.09), 0 4px 12px rgba(109, 62, 232, 0.25);
}

.task-item.is-done .task-check .icon {
  opacity: 1;
  transform: scale(1);
}

.task-body {
  min-width: 0;
  flex: 1;
  transition: opacity 0.2s ease;
}

.task-title {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 500;
}

.task-meta .icon {
  width: 11px;
  height: 11px;
  opacity: 0.75;
}

.meta-sep {
  color: var(--muted-3);
}

.category-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-2);
}

.category-dot--work {
  background: var(--accent-strong);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.35);
}

.category-dot--personal {
  background: var(--pink);
}

.category-dot--health {
  background: var(--success);
}

.category-dot--learning {
  background: var(--info);
}

.priority-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.075);
  color: #f8c957;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-item.is-done .task-title {
  color: var(--muted-2);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.18);
}

.task-item.is-done .task-body {
  opacity: 0.72;
}

.task-item.is-done .priority-badge {
  opacity: 0.5;
}

.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 13px;
  padding-top: 16px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 550;
}

.mini-progress {
  width: 88px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright));
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
  transition: width 0.65s var(--ease-out);
}

/* ---------- Reminders ---------- */
.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -10px;
  padding: 11px 10px;
  border-radius: 14px;
  transition:
    background 0.2s ease,
    opacity 0.22s ease,
    transform 0.22s var(--ease-out);
}

.reminder-item:hover {
  background: rgba(255, 255, 255, 0.033);
}

.reminder-item.is-next {
  background: rgba(139, 92, 246, 0.075);
  box-shadow: inset 2px 0 0 rgba(167, 139, 250, 0.65);
}

.reminder-item.is-next:hover {
  background: rgba(139, 92, 246, 0.1);
}

.reminder-item.is-removing {
  opacity: 0;
  transform: translateX(12px);
}

.reminder-time {
  width: 48px;
  flex: none;
  text-align: right;
}

.reminder-time strong {
  display: block;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.reminder-time span {
  display: block;
  margin-top: 1px;
  color: var(--muted-3);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reminder-body {
  min-width: 0;
  flex: 1;
  padding-left: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.reminder-body p {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.reminder-meta .next-label {
  color: var(--accent-bright);
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reminder-check {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-2);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease-spring);
}

.reminder-check .icon {
  width: 12px;
  height: 12px;
}

.reminder-item:hover .reminder-check,
.reminder-check:focus-visible {
  opacity: 1;
}

.reminder-check:hover {
  background: rgba(110, 231, 183, 0.1);
  color: var(--success);
}

.reminder-check:active {
  transform: scale(0.86);
}

.card-link {
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  padding: 10px 12px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: var(--accent-bright);
}

.card-link .icon {
  width: 13px;
  height: 13px;
}

.empty-state {
  display: flex;
  min-height: 140px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  color: var(--muted-2);
  text-align: center;
}

.empty-state .icon {
  width: 21px;
  height: 21px;
  color: var(--accent-strong);
}

.empty-state strong {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.empty-state span {
  max-width: 210px;
  font-size: 10.5px;
  line-height: 1.55;
}

/* ---------- Quote ---------- */
.quote-card {
  min-height: 208px;
  overflow: hidden;
  border-color: rgba(167, 139, 250, 0.15);
  background:
    radial-gradient(340px 220px at 95% 0%, rgba(139, 92, 246, 0.18), transparent 70%),
    linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(255, 255, 255, 0.018) 66%);
}

.quote-card::before {
  position: absolute;
  top: -70px;
  right: 20px;
  color: rgba(196, 181, 253, 0.07);
  content: "\201C";
  font-family: var(--font-serif);
  font-size: 210px;
  line-height: 1;
  pointer-events: none;
}

.quote-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quote-card__head .icon-button.is-spinning .icon {
  animation: spinIcon 0.55s var(--ease-out);
}

@keyframes spinIcon {
  to {
    transform: rotate(180deg);
  }
}

.quote-text {
  position: relative;
  z-index: 1;
  margin: 15px 0 18px;
  color: #eee8fb;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.6vw, 30px);
  font-style: italic;
  letter-spacing: -0.012em;
  line-height: 1.17;
  text-wrap: balance;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.quote-text.is-fading {
  opacity: 0;
  transform: translateY(4px);
}

.quote-author {
  position: relative;
  z-index: 1;
  color: var(--muted-2);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quote-author::before {
  margin-right: 6px;
  color: var(--accent-strong);
  content: "—";
}

.quote-card__glow {
  position: absolute;
  right: -55px;
  bottom: -70px;
  width: 180px;
  height: 150px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.16);
  filter: blur(46px);
  pointer-events: none;
}

/* ---------- Summary ---------- */
.summary-card {
  overflow: hidden;
}

.summary-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.summary-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(110, 231, 183, 0.13);
  border-radius: 999px;
  background: rgba(110, 231, 183, 0.06);
  color: #9ef3ce;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-badge .status-dot {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.5);
}

.summary-badge.is-resting {
  border-color: rgba(167, 139, 250, 0.15);
  background: rgba(139, 92, 246, 0.07);
  color: var(--accent-bright);
}

.summary-badge.is-resting .status-dot {
  background: var(--accent-strong);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.summary-card__copy {
  max-width: 450px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.metric {
  min-width: 0;
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.1;
  white-space: nowrap;
}

.metric strong span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.metric > span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-bar {
  height: 4px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.summary-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-strong), var(--accent-bright));
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.45);
  transition: width 0.7s var(--ease-out);
}

/* ---------- Placeholder screens ---------- */
.screen-heading {
  padding: 14px 3px 30px;
}

.screen-heading .eyebrow {
  margin-bottom: 17px;
}

.screen-heading h1 {
  max-width: 760px;
  font-size: clamp(38px, 5.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.01;
  text-wrap: balance;
}

.screen-heading > p:last-child {
  max-width: 520px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

.placeholder-card {
  display: flex;
  min-height: 530px;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  overflow: hidden;
  border-color: rgba(167, 139, 250, 0.12);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(680px 380px at 100% -10%, rgba(139, 92, 246, 0.18), transparent 66%),
    radial-gradient(460px 300px at 0% 110%, rgba(88, 28, 135, 0.1), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.017));
}

.placeholder-card__glow {
  position: absolute;
  top: -120px;
  right: 8%;
  width: 340px;
  height: 260px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  filter: blur(70px);
  pointer-events: none;
}

.placeholder-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 25px;
}

.placeholder-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, 0.2);
  border-radius: 21px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(139, 92, 246, 0.44), rgba(76, 29, 149, 0.16));
  color: #f2ecff;
  box-shadow:
    0 16px 38px rgba(76, 29, 149, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.placeholder-icon .icon {
  width: 27px;
  height: 27px;
  stroke-width: 1.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(110, 231, 183, 0.14);
  border-radius: 999px;
  background: rgba(110, 231, 183, 0.055);
  color: #9ef3ce;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-pill--soon {
  border-color: rgba(167, 139, 250, 0.16);
  background: rgba(139, 92, 246, 0.075);
  color: var(--accent-bright);
}

.status-pill--soon .status-dot {
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08), 0 0 12px rgba(167, 139, 250, 0.4);
}

.placeholder-card h2 {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-top: 2px;
  font-size: clamp(28px, 3.7vw, 39px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-wrap: balance;
}

.placeholder-card > p {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
  text-wrap: pretty;
}

.feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.feature-item__icon {
  display: grid;
  width: 31px;
  height: 31px;
  margin-bottom: 4px;
  place-items: center;
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.09);
  color: var(--accent-strong);
}

.feature-item__icon .icon {
  width: 15px;
  height: 15px;
}

.feature-item strong {
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-item > span:last-child {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.placeholder-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 31px;
}

.placeholder-note {
  color: var(--muted-3);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Settings preview ---------- */
.placeholder-card--settings {
  min-height: 500px;
}

.settings-preview {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 640px;
  flex-direction: column;
  gap: 1px;
  margin-top: 27px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.022);
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.012);
}

.settings-row + .settings-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-row__icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(167, 139, 250, 0.1);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.07);
  color: var(--accent-strong);
}

.settings-row__icon .icon {
  width: 14px;
  height: 14px;
}

.settings-row__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.settings-row__copy strong {
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 650;
}

.settings-row__copy span {
  color: var(--muted-2);
  font-size: 9.5px;
}

.settings-row__value {
  flex: none;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.bottom-nav__inner {
  display: flex;
  width: min(100%, 610px);
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 25px;
  background: rgba(17, 14, 23, 0.82);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(26px) saturate(150%);
  pointer-events: auto;
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 5px 8px;
  border: 0;
  border-radius: 19px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease-out);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.nav-item:active {
  transform: scale(0.96);
}

.nav-item.is-active {
  background:
    linear-gradient(180deg, rgba(167, 139, 250, 0.2), rgba(124, 58, 237, 0.09));
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(167, 139, 250, 0.14),
    0 6px 18px rgba(76, 29, 149, 0.16);
}

.nav-item.is-active::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 12px rgba(196, 181, 253, 0.7);
  content: "";
  transform: translateX(-50%);
}

.nav-item__icon {
  display: grid;
  width: 25px;
  height: 22px;
  place-items: center;
}

.nav-item__icon .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease-spring), stroke-width 0.2s ease;
}

.nav-item.is-active .nav-item__icon .icon {
  stroke-width: 2.15;
  transform: translateY(-1px);
}

.nav-item__label {
  overflow: hidden;
  max-width: 100%;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Dialogs ---------- */
.sheet {
  width: min(92vw, 520px);
  max-height: 90dvh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--text);
}

.sheet::backdrop {
  background: rgba(3, 2, 6, 0.72);
  backdrop-filter: blur(10px);
  animation: backdropIn 0.25s ease both;
}

.sheet[open] {
  animation: sheetIn 0.35s var(--ease-out) both;
}

.sheet__form {
  max-height: 90dvh;
  padding: 27px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(420px 230px at 100% 0%, rgba(139, 92, 246, 0.15), transparent 70%),
    #14111c;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sheet__handle {
  display: none;
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 23px;
}

.sheet__head h2 {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field__label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field__optional {
  color: var(--muted-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.field__input {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.field__input::placeholder {
  color: var(--muted-3);
}

.field__input:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.field__input:focus {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.field__select {
  padding-right: 38px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a49db3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field--fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.segmented__option {
  position: relative;
  cursor: pointer;
}

.segmented__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented__option span {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 650;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.segmented__option:hover span {
  color: var(--text-soft);
}

.segmented__option input:checked + span {
  background: rgba(139, 92, 246, 0.2);
  color: #ede6ff;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.18);
}

.segmented__option input:focus-visible + span {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.sheet__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid var(--border);
}

/* ---------- Toast ---------- */
.toast-region {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: calc(106px + env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  pointer-events: none;
}

.toast {
  display: flex;
  max-width: min(92vw, 380px);
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 999px;
  background: rgba(23, 19, 31, 0.94);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition:
    opacity 0.25s ease,
    transform 0.35s var(--ease-spring);
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast__icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.18);
  color: var(--accent-bright);
}

.toast__icon .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

/* ---------- Motion ---------- */
.reveal {
  animation: revealUp 0.75s var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ambientDrift {
  from {
    transform: translate3d(-18px, 0, 0) scale(1);
  }
  to {
    transform: translate3d(24px, 18px, 0) scale(1.08);
  }
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sheetInMobile {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hover polish (pointer devices only) ---------- */
@media (hover: hover) {
  .card:hover {
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    transform: translateY(-2px);
  }

  .quote-card:hover {
    border-color: rgba(167, 139, 250, 0.24);
  }
}

@media (min-width: 901px) {
  .tasks-card {
    display: flex;
    flex-direction: column;
  }

  .tasks-card .task-list {
    flex: 1;
  }

  .tasks-card .task-footer {
    margin-top: auto;
  }

  .summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(330px, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 38px;
    align-items: start;
  }

  .summary-card__head,
  .summary-card__copy {
    grid-column: 1;
  }

  .summary-metrics {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: stretch;
    margin-top: 0;
    padding: 4px 0 4px 32px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .summary-bar {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1020px) {
  .hero {
    padding: 36px;
  }

  .quick-action {
    padding: 14px;
  }

  .quick-action__sub {
    font-size: 10px;
  }

  .card {
    padding: 23px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding-bottom: 142px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .hero__progress {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 20px;
    padding: 15px 17px;
  }

  .progress-ring {
    width: 100px;
    height: 100px;
  }

  .progress-ring__inner strong {
    font-size: 26px;
  }

  .progress-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 10px;
  }

  .progress-caption strong {
    font-size: 13px;
  }

  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .dashboard-column {
    display: contents;
  }

  .tasks-card {
    order: 1;
  }

  .reminders-card {
    order: 2;
  }

  .summary-card {
    order: 3;
  }

  .quote-card {
    order: 4;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 10px;
    align-items: center;
  }

  .feature-item__icon {
    grid-row: span 2;
    margin: 0;
  }

  .feature-item > span:last-child {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding-right: 18px;
    padding-left: 18px;
  }

  .topbar {
    padding-top: 21px;
    padding-bottom: 20px;
  }

  .hero {
    padding: 29px 25px;
    border-radius: 28px;
  }

  .hero__title {
    font-size: clamp(34px, 9vw, 46px);
  }

  .hero__subtitle {
    font-size: 13.5px;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .quick-action {
    padding: 14px;
    gap: 15px;
  }

  .quick-action__sub {
    font-size: 10px;
  }

  .card {
    padding: 21px;
    border-radius: 23px;
  }

  .screen-heading {
    padding-top: 10px;
    padding-bottom: 24px;
  }

  .screen-heading h1 {
    font-size: clamp(35px, 9.5vw, 46px);
  }

  .screen-heading > p:last-child {
    font-size: 13px;
  }

  .placeholder-card {
    min-height: 0;
    padding: 27px 22px;
    border-radius: 28px;
  }

  .placeholder-card__top {
    margin-bottom: 22px;
  }

  .placeholder-icon {
    width: 57px;
    height: 57px;
    border-radius: 18px;
  }

  .placeholder-icon .icon {
    width: 23px;
    height: 23px;
  }

  .placeholder-card > p {
    font-size: 12px;
  }

  .feature-grid {
    margin-top: 24px;
  }

  .placeholder-card__footer {
    margin-top: 25px;
  }

  .sheet {
    width: 100%;
    max-width: none;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .sheet[open] {
    animation-name: sheetInMobile;
    animation-duration: 0.42s;
  }

  .sheet__form {
    max-height: 94dvh;
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 28px 28px 0 0;
  }

  .sheet__handle {
    display: block;
    width: 36px;
    height: 4px;
    margin: -5px auto 17px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
  }

  .bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 0 10px;
  }

  .bottom-nav__inner {
    border-radius: 23px;
  }

  .nav-item {
    padding: 8px 3px 7px;
    border-radius: 17px;
  }

  .nav-item__label {
    font-size: 9.4px;
  }

  .toast-region {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 460px) {
  .app-shell {
    padding-right: 15px;
    padding-bottom: 132px;
    padding-left: 15px;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand__word {
    font-size: 18px;
  }

  .icon-button {
    width: 39px;
    height: 39px;
    border-radius: 13px;
  }

  .avatar-button {
    width: 39px;
    height: 39px;
  }

  .hero {
    padding: 22px 20px;
    gap: 19px;
  }

  .hero__title {
    margin-top: 14px;
    margin-bottom: 11px;
    font-size: 33px;
  }

  .hero__subtitle {
    font-size: 12.3px;
    line-height: 1.6;
  }

  .hero__meta {
    margin-top: 16px;
  }

  .hero-pill {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .hero__progress {
    padding: 12px 14px;
  }

  .progress-ring {
    width: 84px;
    height: 84px;
  }

  .progress-ring::before {
    inset: 5px;
  }

  .progress-ring__inner strong {
    font-size: 22px;
  }

  .progress-ring__inner span {
    font-size: 7px;
  }

  .quick-action {
    min-height: 94px;
    gap: 12px;
    padding: 12px;
  }

  .quick-action__icon {
    width: 34px;
    height: 34px;
  }

  .quick-action__label {
    font-size: 12.5px;
  }

  .quick-action__sub {
    display: -webkit-box;
    overflow: hidden;
    font-size: 9.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .card {
    padding: 19px 17px;
  }

  .card-head h2,
  .summary-card h2 {
    font-size: 18px;
  }

  .task-item {
    gap: 10px;
    margin: 0 -6px;
    padding: 10px 6px;
  }

  .task-title {
    font-size: 12.5px;
  }

  .task-meta {
    font-size: 9.5px;
  }

  .priority-badge {
    display: none;
  }

  .reminder-item {
    gap: 9px;
    margin: 0 -6px;
    padding: 10px 6px;
  }

  .reminder-time {
    width: 43px;
  }

  .reminder-time strong {
    font-size: 11.5px;
  }

  .reminder-body {
    padding-left: 9px;
  }

  .reminder-body p {
    font-size: 11.5px;
  }

  .reminder-check {
    opacity: 1;
  }

  .summary-card__head {
    gap: 10px;
  }

  .summary-badge {
    padding: 4px 7px;
    font-size: 7.5px;
  }

  .summary-card__copy {
    font-size: 11px;
  }

  .summary-metrics {
    gap: 8px;
  }

  .metric strong {
    font-size: 19px;
  }

  .metric > span {
    font-size: 7.5px;
    letter-spacing: 0.07em;
  }

  .quote-text {
    font-size: 25px;
  }

  .screen-heading h1 {
    font-size: 36px;
  }

  .placeholder-card {
    padding: 24px 18px;
  }

  .placeholder-card h2 {
    font-size: 27px;
  }

  .status-pill {
    font-size: 7.5px;
  }

  .placeholder-card__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .settings-row {
    padding: 12px;
  }

  .settings-row__copy span {
    font-size: 8.5px;
  }

  .bottom-nav__inner {
    gap: 1px;
    padding: 5px;
  }

  .nav-item {
    padding: 8px 1px 7px;
  }

  .nav-item__label {
    font-size: 8.9px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sheet__head h2 {
    font-size: 22px;
  }
}

@media (max-width: 360px) {
  .hero__title {
    font-size: 32px;
  }

  .nav-item__label {
    font-size: 8.2px;
  }

  .summary-badge {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
