/* =========================================================
   WAYCON DAILY — COMPLETE APPLICATION STYLESHEET
   ========================================================= */


/* =========================================================
   1. Theme and global defaults
   ========================================================= */

:root {
  color-scheme: light;

  --wd-bg: #faf8f3;
  --wd-card: #ffffff;
  --wd-ink: #202622;
  --wd-muted: #656c65;
  --wd-border: #e0e2da;
  --wd-accent: #315d43;
  --wd-soft: #edf2e9;
  --wd-shadow: none;

  --calm-bg: var(--wd-bg);
  --calm-surface: var(--wd-card);
  --calm-text: var(--wd-ink);
  --calm-muted: var(--wd-muted);
  --calm-line: var(--wd-border);
  --calm-accent: var(--wd-accent);
  --calm-soft: var(--wd-soft);
  --calm-shadow: var(--wd-shadow);

  --surface: var(--wd-card);
  --border: var(--wd-border);
  --text: var(--wd-ink);
  --muted: var(--wd-muted);
  --surface-color: var(--wd-card);
  --border-color: var(--wd-border);
  --muted-color: var(--wd-muted);

  --primary-bg: #315d43;
  --primary-hover: #244a34;
  --primary-text: #ffffff;
  --field-bg: #ffffff;
  --surface-subtle: #f2f2eb;
  --focus-color: #315d43;

  --success-text: #21663e;
  --success-bg: #e8f5ec;
  --success-border: #b6ddc3;
  --warning-text: #885000;
  --warning-bg: #fff3dc;
  --warning-border: #ead3a6;
  --danger-text: #a72d27;
  --danger-bg: #fff0ee;
  --danger-border: #e8bcb8;
  --info-text: #245f91;
  --info-bg: #eaf3fc;
  --info-border: #bfd6ec;

  --radius-card: 12px;
  --radius-control: 8px;
  --page-width: 1280px;

  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--wd-ink);
  background: var(--wd-bg);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --wd-bg: #171a17;
  --wd-card: #202420;
  --wd-ink: #f4f3eb;
  --wd-muted: #b5bcb2;
  --wd-border: #383e36;
  --wd-accent: #a5c99b;
  --wd-soft: #2b392b;
  --wd-shadow: none;

  --primary-bg: #a5c99b;
  --primary-hover: #bedbb5;
  --primary-text: #172317;
  --field-bg: #1b1f1b;
  --surface-subtle: #272d26;
  --focus-color: #a5c99b;

  --success-text: #a3e1b9;
  --success-bg: #233e30;
  --success-border: #3c6650;
  --warning-text: #f5d28b;
  --warning-bg: #443820;
  --warning-border: #74603a;
  --danger-text: #ffb5ad;
  --danger-bg: #442b30;
  --danger-border: #75474c;
  --info-text: #a1cff5;
  --info-bg: #233d52;
  --info-border: #42647f;
}

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

html {
  min-height: 100%;
  scroll-padding-top: 110px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--wd-ink);
  background: var(--wd-bg);
  font-family: inherit;
  line-height: 1.55;
}

img,
svg {
  vertical-align: middle;
}

img {
  max-width: 100%;
}

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

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--wd-accent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  color: inherit;
  line-height: 1.25;
}

h1,
h2 {
  font-family: "Old Standard TT", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
}

p {
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}

.container {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding: 32px 28px 48px;
}

.site-footer {
  padding: 24px;
  color: var(--wd-muted);
  text-align: center;
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

.muted,
.helptext,
.help-text,
.optional,
.calm-muted {
  color: var(--wd-muted);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--wd-accent);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* =========================================================
   2. Header, branding, and navigation
   ========================================================= */

.topbar,
.topbar.is-scrolled {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--wd-card);
  border-bottom: 1px solid var(--wd-border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--wd-ink);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
}

.brand-main-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: #020e20;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-weight: 800;
}

.wd-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--wd-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--wd-border);
  border-radius: 50%;
  color: var(--wd-ink);
  background: var(--wd-bg);
  font-size: 1.15rem;
  cursor: pointer;
}

.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--wd-accent);
  background: var(--wd-soft);
}

.menu-toggle {
  display: none;
}

.navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.navigation > a,
.nav-dropdown > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--wd-ink);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.navigation > a:hover,
.navigation > a:focus-visible,
.nav-dropdown > summary:hover,
.nav-dropdown > summary:focus-visible,
.nav-dropdown[open] > summary {
  color: var(--wd-accent);
  background: var(--wd-soft);
}

.navigation .nav-home[aria-current="page"],
.navigation .nav-profile-summary,
.simple-navigation .profile-link {
  color: var(--wd-accent);
  background: var(--wd-soft);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin: -4px 0 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-dropdown[open] > summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: max-content;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--wd-border);
  border-radius: 14px;
  color: var(--wd-ink);
  background: var(--wd-card);
  box-shadow: 0 12px 30px rgb(0 0 0 / 10%);
}

.dropdown-menu-right {
  right: 0;
  left: auto;
}

.dropdown-menu a,
.nav-link-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--wd-ink);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible,
.nav-link-button:hover,
.nav-link-button:focus-visible {
  color: var(--wd-accent);
  background: var(--wd-soft);
}

.nav-form {
  margin: 4px 0 0;
  padding-top: 4px;
  border-top: 1px solid var(--wd-border);
}

.nav-profile-dropdown {
  margin-left: 4px;
}

.nav-profile-summary::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #2e9b6f;
}

.simple-navigation {
  flex: 1;
}

.simple-navigation .nav-spacer {
  flex: 1;
}

.simple-navigation .nav-form-inline {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.simple-navigation .logout-button {
  width: auto;
  white-space: nowrap;
}

.mobile-tabs {
  display: none;
}


/* =========================================================
   3. Buttons, cards, headings, and messages
   ========================================================= */

.button,
.button-secondary,
.button-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--primary-bg);
  border-radius: var(--radius-control);
  color: var(--primary-text);
  background: var(--primary-bg);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.button:hover,
.button:focus-visible {
  color: var(--primary-text);
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  text-decoration: none;
}

.button.secondary,
.button-secondary,
.button-muted {
  color: var(--wd-ink);
  background: var(--wd-card);
  border-color: var(--wd-border);
}

.button.secondary:hover,
.button.secondary:focus-visible,
.button-secondary:hover,
.button-secondary:focus-visible,
.button-muted:hover,
.button-muted:focus-visible {
  color: var(--wd-accent);
  background: var(--wd-soft);
  border-color: var(--wd-accent);
}

.button-small {
  flex-shrink: 0;
  padding: 9px 13px;
  font-size: 0.82rem;
}

.button-group,
.hero-actions,
.finance-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.panel,
.form-card,
.card,
.summary-card,
.analytics-stat,
.overview-card,
.quick-action-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--wd-border);
  border-radius: var(--radius-card);
  color: var(--wd-ink);
  background: var(--wd-card);
  box-shadow: var(--wd-shadow);
}

.panel {
  margin-bottom: 18px;
}

.panel h2,
.daily-progress h2 {
  margin-top: 4px;
}

.panel a {
  text-decoration: none;
}

.panel a:hover {
  text-decoration: underline;
}

.panel-heading,
.section-heading,
.page-header,
.finance-header,
.analytics-header,
.planner-month-header,
.planner-year-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--wd-border);
}

.panel-heading h2,
.section-heading h2 {
  margin: 0;
}

.panel-heading > span {
  color: var(--wd-muted);
  font-size: 0.85rem;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--wd-muted);
}

.page-header,
.finance-header,
.analytics-header,
.planner-month-header,
.planner-year-header {
  margin-bottom: 24px;
}

.page-header h1,
.finance-header h1,
.analytics-header h1,
.planner-month-header h1,
.planner-year-header h1 {
  margin: 4px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.page-header > div > p:last-child,
.finance-header p,
.analytics-header > div > p:last-child,
.planner-month-header p:last-child,
.planner-year-header p:last-child {
  margin-bottom: 0;
  color: var(--wd-muted);
}

.messages {
  margin-bottom: 18px;
}

.message {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--info-border);
  border-left: 4px solid var(--info-text);
  border-radius: 12px;
  color: var(--info-text);
  background: var(--info-bg);
}

.message.success {
  color: var(--success-text);
  background: var(--success-bg);
  border-color: var(--success-border);
  border-left-color: var(--success-text);
}

.message.warning {
  color: var(--warning-text);
  background: var(--warning-bg);
  border-color: var(--warning-border);
  border-left-color: var(--warning-text);
}

.message.error {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-color: var(--danger-border);
  border-left-color: var(--danger-text);
}

.message a {
  color: inherit;
  text-decoration: underline;
}

.empty {
  padding: 28px;
  color: var(--wd-muted);
  text-align: center;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--wd-border);
  border-radius: 14px;
  background: var(--surface-subtle);
  text-align: center;
}

.empty-state h3 {
  margin-top: 0;
}

.empty-state p {
  color: var(--wd-muted);
}

.empty-state .button {
  margin-top: 6px;
}

.compact-empty-state {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-subtle);
}

.compact-empty-state p {
  margin-top: 0;
}


/* =========================================================
   4. Shared grids and progress
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}

.dashboard-grid,
.health-dashboard .dashboard-grid,
.two-column-grid,
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.two-column-grid {
  margin-top: 22px;
}

.dashboard-grid > .panel,
.analytics-grid > .panel {
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stats article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--wd-border);
  border-radius: 18px;
  background: var(--wd-card);
}

.stats strong {
  display: block;
  margin-bottom: 3px;
  color: var(--wd-accent);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  overflow-wrap: anywhere;
}

.stats span {
  color: var(--wd-muted);
}

progress {
  accent-color: var(--wd-accent);
}

.goal progress,
.planner-goal progress,
.card progress,
.daily-progress progress,
.analytics-overview progress,
.analytics-grid progress,
.category-row progress,
.analytics-goals progress,
.calm-progress {
  display: block;
  width: 100%;
  height: 9px;
  margin: 12px 0 4px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--wd-border);
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--wd-border);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--wd-accent);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--wd-accent);
}

.progress-track {
  width: 100%;
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--wd-border);
}

.progress-fill,
.goal-grid .progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--wd-accent);
}


/* =========================================================
   5. Forms and authentication
   ========================================================= */

.form-page {
  max-width: 880px;
  margin-inline: auto;
}

.form-heading {
  max-width: 680px;
  margin-bottom: 24px;
}

.form-heading h1 {
  margin: 6px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.form-heading > p:last-child {
  color: var(--wd-muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 18px;
  color: var(--wd-accent);
  text-decoration: none;
  font-weight: 650;
}

.form-card {
  margin: 0;
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.form-field {
  min-width: 0;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-card label,
.app-form label,
.auth-card label {
  display: block;
  margin-bottom: 6px;
  font-weight: 650;
}

.form-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.optional {
  font-size: 0.75rem;
  font-weight: 400;
}

.form-card :is(input, select, textarea),
.app-form :is(input, select, textarea),
.auth-card :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  color: var(--wd-ink);
  background: var(--field-bg);
  font: inherit;
  font-size: 1rem;
}

.form-card :is(input, select, textarea) {
  margin-top: 7px;
}

.form-card textarea,
.app-form textarea,
.auth-card textarea {
  resize: vertical;
}

.form-card :is(input, select, textarea):focus,
.app-form :is(input, select, textarea):focus,
.auth-card :is(input, select, textarea):focus {
  border-color: var(--wd-accent);
}

input::placeholder,
textarea::placeholder {
  color: var(--wd-muted);
  opacity: 1;
}

.form-card input[type="checkbox"],
.form-card input[type="radio"],
.app-form input[type="checkbox"],
.app-form input[type="radio"],
.auth-card input[type="checkbox"],
.auth-card input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--wd-accent);
}

.checkbox-setting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-setting input {
  flex-shrink: 0;
}

.help-text,
.field-error {
  display: block;
  margin-top: 7px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.field-error,
.errorlist,
.form-errors,
.calm-error,
.calm-urgent {
  color: var(--danger-text);
}

.field-error {
  font-weight: 650;
}

.errorlist {
  margin: 6px 0;
  padding-left: 20px;
}

.form-alert {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  color: var(--danger-text);
  background: var(--danger-bg);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--wd-border);
}

.cancel {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 12px;
  color: var(--wd-muted);
  text-decoration: none;
}

.auth-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 65vh;
  padding: 24px 0;
}

.auth-card {
  width: 100%;
  max-width: 620px;
  padding: 28px;
  border: 1px solid var(--wd-border);
  border-radius: var(--radius-card);
  color: var(--wd-ink);
  background: var(--wd-card);
  box-shadow: var(--wd-shadow);
}

.auth-card h1 {
  margin: 4px 0 10px;
}

.auth-card form p,
.app-form p {
  margin: 18px 0;
}

.auth-card .helptext {
  font-size: 0.85rem;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
}


/* =========================================================
   6. Shared tasks and goals
   ========================================================= */

.task {
  display: flex;
  gap: 14px;
  margin: 12px 0;
  padding: 15px;
  border: 1px solid var(--wd-border);
  border-left: 4px solid var(--wd-border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.task-title strong {
  overflow-wrap: anywhere;
}

.task p {
  margin: 6px 0 0;
}

.task small {
  color: var(--wd-muted);
}

.check {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--wd-border);
  border-radius: 50%;
  color: var(--wd-accent);
  background: var(--wd-card);
  cursor: pointer;
}

.check:hover {
  border-color: var(--wd-accent);
  background: var(--wd-soft);
}

.task-details,
.dashboard-task-meta,
.dashboard-day-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--wd-muted);
  font-size: 0.82rem;
}

.badge,
.urgency-label,
.urgency-badge,
.status-badge,
.month-progress {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.urgency-label-5,
.urgency-badge.urgency-5 {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.urgency-label-4,
.urgency-badge.urgency-4,
.urgency-label-3 {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.urgency-label-2 {
  color: var(--info-text);
  background: var(--info-bg);
}

.urgency-label-1 {
  color: var(--success-text);
  background: var(--success-bg);
}

.goal {
  margin: 16px 0;
}

.goal > div,
.planner-goal > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.goal small,
.planner-goal small {
  display: block;
  margin-top: 6px;
  color: var(--wd-muted);
}

.goal-grid,
.year-goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}

.goal-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--wd-border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.goal-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.goal-card p {
  margin: 10px 0 0;
  color: var(--wd-muted);
  font-size: 0.85rem;
}

.goal-grid .goal-card > strong {
  display: block;
  margin-top: 9px;
  color: var(--wd-accent);
  font-size: 0.82rem;
}


/* =========================================================
   7. Calm dashboard
   ========================================================= */

.calm-dashboard {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  color: var(--calm-text);
}

.calm-greeting {
  padding: 8px 4px 4px;
}

.calm-greeting h1 {
  margin: 0 0 7px;
  color: var(--calm-text);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.calm-greeting p {
  margin: 0;
  color: var(--calm-muted);
  font-size: 1rem;
}

.calm-assistant {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--calm-line);
  border-radius: 999px;
  background: var(--calm-surface);
  box-shadow: var(--calm-shadow);
}

.calm-chat-entry {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--calm-muted);
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.calm-spark {
  color: var(--calm-accent);
  font-size: 1.7rem;
}

.calm-microphone {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--primary-text);
  background: var(--primary-bg);
}

.calm-assistant button:disabled {
  opacity: 1;
  cursor: default;
}

.calm-availability {
  margin: -10px 8px 0;
  color: var(--calm-muted);
  font-size: 0.78rem;
}

.calm-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--calm-line);
  border-radius: 22px;
  background: var(--calm-surface);
  box-shadow: var(--calm-shadow);
}

.calm-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.calm-heading h2 {
  margin: 0;
  color: var(--calm-text);
  font-size: 1.2rem;
  line-height: 1.35;
}

.calm-heading > time,
.calm-heading > span {
  color: var(--calm-muted);
  font-size: 0.84rem;
}

.calm-dashboard a:not(.button) {
  color: var(--calm-accent);
  text-decoration: none;
}

.calm-dashboard a:not(.button):hover {
  text-decoration: underline;
}

.calm-dashboard a.calm-chat-entry {
  color: var(--calm-muted);
  text-decoration: none;
}

.calm-dashboard a.calm-chat-entry:hover {
  color: var(--calm-accent);
  text-decoration: none;
}

.calm-heading > a {
  font-size: 0.84rem;
}

.calm-timeline {
  margin-top: 22px;
}

.calm-event {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 24px;
}

.calm-event:last-child {
  padding-bottom: 0;
}

.calm-event:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 35px;
  bottom: -10px;
  left: 21px;
  width: 2px;
  background: var(--calm-line);
}

.calm-complete-form {
  position: relative;
  z-index: 1;
  margin: 0;
}

.calm-complete {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--calm-accent);
  background: var(--calm-soft);
  font-size: 1rem;
  cursor: pointer;
}

.calm-complete:hover {
  box-shadow: inset 0 0 0 2px var(--calm-accent);
}

.calm-event-content {
  min-width: 0;
  padding-top: 2px;
}

.calm-dashboard a.calm-event-link {
  display: grid;
  gap: 3px;
  color: var(--calm-text);
  overflow-wrap: anywhere;
}

.calm-event-time {
  font-size: 0.94rem;
  font-weight: 750;
}

.calm-event-link strong {
  font-size: 1rem;
  font-weight: 600;
}

.calm-event-description {
  color: var(--calm-muted);
  font-size: 0.84rem;
}

.calm-event-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 6px;
  color: var(--calm-muted);
  font-size: 0.78rem;
}

.calm-plan-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--calm-line);
}

.calm-plan-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.84rem;
  font-weight: 650;
}

.calm-empty {
  padding: 4px 0 8px;
}

.calm-empty p {
  margin: 0 0 5px;
}

.calm-empty span,
.calm-muted {
  font-size: 0.88rem;
}

.calm-empty span {
  color: var(--calm-muted);
}

.calm-progress {
  height: 7px;
  margin: 16px 0 0;
}

.calm-progress-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: var(--calm-muted);
  font-size: 0.8rem;
}

.calm-attention {
  border-left: 3px solid var(--warning-text);
}

.calm-attention > p {
  margin-bottom: 0;
  color: var(--calm-muted);
}

.calm-snapshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calm-dashboard a.calm-snapshot {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  padding: 17px 28px 17px 17px;
  border: 1px solid var(--calm-line);
  border-radius: 20px;
  color: var(--calm-text);
  background: var(--calm-surface);
  box-shadow: var(--calm-shadow);
}

.calm-summary-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.calm-fitness-icon {
  color: var(--success-text);
  background: var(--success-bg);
}

.calm-finance-icon {
  color: var(--info-text);
  background: var(--info-bg);
}

.calm-snapshot-copy {
  flex: 1 1 90px;
  min-width: 0;
}

.calm-snapshot strong,
.calm-snapshot small {
  display: block;
  overflow-wrap: anywhere;
}

.calm-snapshot strong {
  font-size: 0.98rem;
}

.calm-snapshot small {
  margin-top: 4px;
  color: var(--calm-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.calm-chevron {
  position: absolute;
  top: 15px;
  right: 13px;
  color: var(--calm-muted);
}

.calm-goal {
  margin-top: 18px;
}

.calm-goal .calm-heading strong {
  min-width: 0;
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.calm-details {
  padding-block: 8px;
}

.calm-details > summary {
  min-height: 44px;
  padding: 13px 0;
  color: var(--calm-text);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}

.calm-details-body {
  padding: 8px 0 14px;
}

.calm-detail-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--calm-line);
}

.calm-detail-row p {
  margin: 7px 0;
}

.calm-detail-row form {
  margin-top: 12px;
}

.calm-facts {
  margin: 0;
}

.calm-facts > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--calm-line);
  font-size: 0.86rem;
}

.calm-facts dt {
  color: var(--calm-muted);
}

.calm-facts dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.calm-extra-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.calm-extra-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.82rem;
}


/* Desktop dashboard composition. Single column is the small-screen default. */
.calm-workspace,
.calm-main-column,
.calm-side-column,
.calm-support-grid {
  display: grid;
  gap: 20px;
  min-width: 0;
  align-items: start;
}

.calm-main-column,
.calm-side-column {
  align-content: start;
}

.calm-plan > .calm-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--calm-line);
}

.calm-plan .calm-empty {
  padding: 24px 0;
}

.calm-progress-card .calm-progress {
  height: 12px;
  margin-top: 24px;
}

.calm-calendar .calm-details-body {
  padding-bottom: 0;
}

.calm-calendar .calm-detail-row {
  overflow-wrap: anywhere;
}

.calm-support-grid > .calm-details {
  width: 100%;
}

@media (min-width: 1001px) {
  .calm-dashboard {
    gap: 24px;
  }

  .calm-workspace {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 24px;
  }

  .calm-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calm-dashboard > .calm-greeting {
    padding: 6px 0 0;
  }

  .calm-dashboard > .calm-greeting h1 {
    font-size: clamp(2rem, 3vw, 2.75rem);
  }

  .calm-dashboard .calm-card {
    border-radius: 18px;
    padding: 24px;
  }

  .calm-dashboard .calm-details {
    padding-block: 8px;
  }

  .calm-plan .calm-event-content {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--calm-line);
  }

  .calm-plan .calm-event:last-child .calm-event-content {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .calm-plan a.calm-event-link {
    grid-template-columns: minmax(130px, 0.85fr) minmax(0, 1.15fr);
    column-gap: 20px;
    min-height: 44px;
    align-content: center;
  }

  .calm-plan .calm-event-time {
    grid-column: 1;
    grid-row: 1 / span 2;
    color: var(--calm-muted);
    font-weight: 500;
  }

  .calm-plan .calm-event-link strong,
  .calm-plan .calm-event-description {
    grid-column: 2;
  }

  .calm-plan .calm-event-notes {
    margin-top: 10px;
  }

  .calm-side-column .calm-snapshot {
    padding: 18px;
    border-radius: 18px;
  }
}

/* =========================================================
   8. Ask Waycon chat
   ========================================================= */

.waycon-chat {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  padding-bottom: 24px;
  color: var(--calm-text);
}

/* The weekly review keeps each item compact until its details are opened. */
.week-review .form-card { padding: clamp(18px, 4vw, 28px); }
.week-review-note { color: var(--wd-muted); font-size: .9rem; line-height: 1.5; }
.week-review-list { margin: 20px 0; border-top: 1px solid var(--wd-border); }
.week-review-item { border-bottom: 1px solid var(--wd-border); }
.week-review-item > summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 13px 0;
  cursor: pointer;
  list-style: none;
}
.week-review-item > summary::-webkit-details-marker { display: none; }
.week-review-item > summary:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 3px; }
.week-review-date, .week-review-description { display: grid; gap: 3px; min-width: 0; }
.week-review-date strong { color: var(--wd-accent); }
.week-review-date small, .week-review-description small { color: var(--wd-muted); font-size: .76rem; }
.week-review-description strong { overflow-wrap: anywhere; }
.week-review-edit { color: var(--wd-accent); font-size: .82rem; font-weight: 700; }
.week-review-fields { padding: 0 0 18px; }
.week-review-fields p { margin: 14px 0; }
.week-review-conflict { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.week-review-conflict label { margin: 0; }
.week-review-save, .week-review-discard { width: 100%; }
.week-review-discard { margin-top: 10px; }

.waycon-chat .calm-greeting > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 8px;
  color: var(--calm-accent);
  text-decoration: none;
}

.chat-status {
  margin: 0;
  color: var(--calm-muted);
  font-size: 0.82rem;
}

.chat-thread {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.chat-bubble {
  width: fit-content;
  min-width: 0;
  max-width: 90%;
  padding: 16px 18px;
  border: 1px solid var(--calm-line);
  border-radius: 20px;
  background: var(--calm-surface);
  overflow-wrap: anywhere;
}

.chat-bubble-assistant {
  justify-self: start;
  border-bottom-left-radius: 6px;
}

.chat-bubble-user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--calm-soft);
}

.chat-speaker {
  display: block;
  color: var(--calm-accent);
  font-size: 0.8rem;
}

.chat-bubble p {
  margin: 8px 0 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.chat-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chat-page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--calm-line);
  border-radius: 12px;
  color: var(--calm-accent);
  background: var(--calm-soft);
  text-decoration: none;
}

.chat-page-links a:hover {
  text-decoration: underline;
}

.chat-compose-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--calm-line);
  border-radius: 22px;
  background: var(--calm-surface);
}

.chat-compose-card form {
  margin: 0;
}

.chat-compose-card label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.chat-compose-card textarea {
  display: block;
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--calm-line);
  border-radius: 14px;
  color: var(--calm-text);
  background: var(--field-bg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.chat-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.chat-compose-footer small {
  flex: 1 1 180px;
  color: var(--calm-muted);
  line-height: 1.5;
}

.chat-compose-footer button {
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-text);
  background: var(--primary-bg);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.chat-compose-footer button:hover {
  background: var(--primary-hover);
}


/* =========================================================
   9. Current weekly and monthly planner
   ========================================================= */

.wd-planner {
  padding-block: 8px 24px;
}

.wd-planner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.wd-planner-header h1 {
  margin: 5px 0 10px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -0.035em;
}

.wd-planner-header p {
  margin: 0;
  color: var(--wd-muted);
}

.wd-planner-header .eyebrow {
  color: var(--wd-accent);
}

.wd-view-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--wd-border);
  border-radius: 14px;
  background: var(--wd-card);
}

.wd-view-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 10px;
  color: var(--wd-ink);
  text-decoration: none;
}

.wd-view-switch [aria-current="page"] {
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-weight: 750;
}

.wd-navigation,
.week-navigation,
.month-navigation,
.year-navigation {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.wd-navigation {
  justify-content: flex-start;
  margin-bottom: 16px;
}

.week-navigation {
  margin-top: 20px;
}

.wd-jump {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.wd-filters {
  padding: 5px 16px;
  border: 1px solid var(--wd-border);
  border-radius: 14px;
  background: var(--wd-card);
}

.wd-filters summary {
  min-height: 48px;
  padding: 12px 0;
  font-weight: 700;
  cursor: pointer;
}

.wd-planner label {
  display: block;
  font-weight: 650;
}

.wd-planner :is(input, select, textarea),
.wd-task-form :is(input, select, textarea) {
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  color: var(--wd-ink);
  background: var(--field-bg);
  font: inherit;
  font-size: 1rem;
}

.wd-filters :is(input, select),
.wd-task-form :is(input, select, textarea) {
  width: 100%;
}

.wd-task-form input[type="checkbox"],
.wd-task-form input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
}

.wd-summary {
  color: var(--wd-muted);
  font-size: 0.94rem;
}

.wd-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  background: var(--wd-border);
}

.wd-weekday {
  padding: 12px;
  color: var(--wd-muted);
  background: var(--wd-card);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.wd-day {
  min-width: 0;
  min-height: 170px;
  padding: 8px;
  background: var(--wd-card);
}

.wd-day.is-today {
  box-shadow: inset 0 0 0 2px var(--wd-accent);
}

.wd-day.outside-month {
  background: var(--surface-subtle);
}

.wd-day-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.wd-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--wd-ink);
  font-weight: 750;
  text-decoration: none;
}

.wd-date:hover,
.wd-task-link:hover {
  background: var(--wd-soft);
}

.wd-month-grid .wd-day-name {
  display: none;
}

.wd-today {
  padding-left: 8px;
  color: var(--wd-accent);
  font-size: 0.75rem;
  font-weight: 750;
}

.wd-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-width: 0;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  background: var(--wd-card);
}

.wd-entry:hover {
  border-color: var(--wd-accent);
}

.wd-entry form {
  flex: 0 0 44px;
  margin: 0;
}

.wd-check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--wd-accent);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.wd-check:hover {
  background: var(--wd-soft);
}

.wd-task-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 6px 10px 0;
  color: var(--wd-ink);
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wd-task-link strong {
  color: var(--wd-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.wd-task-link small {
  color: var(--wd-muted);
  font-size: 0.78rem;
}

.wd-task-link .wd-task-time {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  max-width: 100%;
  margin: 2px 0;
  padding: 4px 8px;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.wd-task-time::before {
  content: "◷";
  flex-shrink: 0;
  font-size: 0.95rem;
}

.wd-entry.is-complete .wd-task-link strong {
  color: var(--wd-muted);
  text-decoration: line-through;
}

.wd-entry.is-complete .wd-task-time {
  color: var(--wd-muted);
  background: var(--surface-subtle);
}

.wd-empty {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  color: var(--wd-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.wd-week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wd-week-grid .wd-day {
  padding: 14px;
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  box-shadow: var(--wd-shadow);
}

.wd-week-grid .wd-entry {
  margin-bottom: 10px;
}

.wd-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.wd-bottom .panel {
  margin: 0;
}

.wd-bottom textarea {
  width: 100%;
  min-height: 150px;
}

.wd-task-form {
  max-width: 820px;
  margin: 12px auto;
}

.wd-task-form .form-card {
  padding: 24px;
}

.wd-task-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.wd-task-form .form-field-wide {
  grid-column: 1 / -1;
}


/* =========================================================
   10. Planner search and date controls
   ========================================================= */

.task-filter-panel {
  margin-top: 20px;
}

.task-filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.task-filter-heading h2,
.task-filter-heading p {
  margin: 0;
}

.task-filter-heading h2 {
  margin-top: 4px;
}

.active-filter-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--wd-border);
  border-radius: 999px;
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.task-filter-form {
  display: grid;
  grid-template-columns:
    minmax(200px, 2fr)
    repeat(3, minmax(120px, 1fr))
    auto;
  align-items: end;
  gap: 14px;
}

.task-filter-form > div {
  min-width: 0;
}

.task-filter-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--wd-ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.task-filter-form input,
.task-filter-form select {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  color: var(--wd-ink);
  background: var(--field-bg);
  font: inherit;
}

.task-filter-actions {
  display: flex;
  gap: 8px;
}

.task-filter-actions .button {
  white-space: nowrap;
}

.wd-filters .task-filter-form {
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  padding: 12px 0;
}

.wd-filters .task-search-field {
  grid-column: auto;
}

.wd-filters .task-filter-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.task-filter-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--wd-border);
  color: var(--wd-muted);
}

.task-filter-summary strong {
  color: var(--wd-ink);
}

.filter-empty-state {
  padding: 38px 24px;
  text-align: center;
}

.filter-empty-state h2 {
  margin-top: 0;
}

.filter-empty-state p {
  color: var(--wd-muted);
}

.planner-date-jump {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  background: var(--wd-card);
}

.planner-date-jump p,
.planner-date-jump h2 {
  margin: 0;
}

.planner-date-jump h2 {
  margin-top: 4px;
  font-size: 1.15rem;
}

.planner-date-jump-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.planner-date-jump-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  white-space: nowrap;
  clip-path: inset(50%);
}

.planner-date-jump-form input[type="date"],
.planner-date-jump-form input[type="number"] {
  min-width: 170px;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  color: var(--wd-ink);
  background: var(--field-bg);
  font: inherit;
}

.planner-date-jump-form .button {
  white-space: nowrap;
}


/* =========================================================
   11. Earlier planner components
   ========================================================= */

.week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.week-day {
  min-width: 0;
  margin-bottom: 0;
}

.week-day.today {
  border: 2px solid var(--wd-accent);
}

.week-day.today .eyebrow {
  color: var(--wd-accent);
}

.week-day .task {
  padding: 13px;
}

.week-day .empty {
  padding: 20px 10px;
}

.paper-planner {
  padding: 22px;
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  background: var(--wd-card);
}

.planner-calendar-shell {
  width: 100%;
  overflow-x: auto;
}

.planner-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(135px, 1fr));
  min-width: 980px;
  border-top: 1px solid var(--wd-border);
  border-left: 1px solid var(--wd-border);
}

.planner-weekday {
  padding: 12px 8px;
  border-right: 1px solid var(--wd-border);
  border-bottom: 1px solid var(--wd-border);
  background: var(--surface-subtle);
  font-weight: 700;
  text-align: center;
}

.planner-day {
  min-height: 180px;
  padding: 10px;
  border-right: 1px solid var(--wd-border);
  border-bottom: 1px solid var(--wd-border);
  background: var(--wd-card);
}

.planner-day.outside-month {
  color: var(--wd-muted);
  background: var(--surface-subtle);
}

.planner-day.is-today {
  position: relative;
  background: var(--wd-soft);
  box-shadow: inset 0 0 0 2px var(--wd-accent);
}

.planner-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.planner-day-heading time {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 700;
}

.planner-day.is-today .planner-day-heading time {
  color: var(--primary-text);
  background: var(--primary-bg);
}

.planner-day-heading span {
  color: var(--wd-muted);
  font-size: 0.75rem;
}

.planner-day-lines {
  display: grid;
  gap: 7px;
}

.writing-line,
.note-lines span {
  display: block;
  min-height: 23px;
  border-bottom: 1px solid var(--wd-border);
}

.planner-entry {
  display: flex;
  gap: 6px;
  min-width: 0;
  padding: 5px 4px;
  border-left: 3px solid var(--wd-border);
  border-radius: 4px;
  background: var(--surface-subtle);
  font-size: 0.8rem;
}

.planner-entry-check {
  flex-shrink: 0;
  font-weight: 700;
}

.planner-entry div {
  min-width: 0;
}

.planner-entry strong,
.planner-entry small {
  display: block;
}

.planner-entry strong {
  overflow-wrap: anywhere;
}

.planner-entry small {
  margin-top: 2px;
  color: var(--wd-muted);
}

.planner-entry.completed {
  color: var(--wd-muted);
  text-decoration: line-through;
}

.planner-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.planner-notes,
.planner-goals {
  min-width: 0;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  background: var(--wd-card);
}

.planner-notes h2,
.planner-goals h2 {
  margin-top: 4px;
}

.note-lines {
  display: grid;
  gap: 9px;
}

.planner-goal {
  margin: 16px 0;
}

.monthly-notes-form,
.monthly-notes-form .field {
  display: grid;
  gap: 14px;
}

.monthly-notes-form .field {
  gap: 8px;
}

.monthly-notes-form label {
  font-weight: 700;
}

.monthly-notes-form textarea {
  width: 100%;
  min-height: 190px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  color: var(--wd-ink);
  background: var(--field-bg);
  font: inherit;
  line-height: 1.7;
}

.monthly-notes-form .button {
  justify-self: start;
}


/* =========================================================
   12. Yearly planner
   ========================================================= */

.planner-year-header p:last-child {
  max-width: 680px;
}

.year-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--wd-accent);
  font-size: 2rem;
}

.summary-label {
  color: var(--wd-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.year-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.year-month-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  background: var(--wd-card);
  box-shadow: var(--wd-shadow);
}

.year-month-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.year-month-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.year-month-header h3 a {
  color: var(--wd-ink);
  text-decoration: none;
}

.year-month-header p {
  margin: 4px 0 0;
  color: var(--wd-muted);
  font-size: 0.78rem;
}

.month-progress {
  flex-shrink: 0;
}

.mini-calendar-weekdays,
.mini-calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mini-calendar-weekdays {
  margin-bottom: 5px;
  color: var(--wd-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

.mini-calendar-week {
  margin-bottom: 4px;
}

.mini-calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--wd-ink);
  background: var(--surface-subtle);
  text-decoration: none;
  font-size: 0.8rem;
}

.mini-calendar-day:hover,
.mini-calendar-day:focus-visible {
  border-color: var(--wd-accent);
  background: var(--wd-soft);
}

.mini-calendar-day.has-tasks:not(.is-today) {
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-weight: 750;
}

.mini-calendar-day.is-today {
  border-color: var(--primary-bg);
  color: var(--primary-text);
  background: var(--primary-bg);
  font-weight: 750;
}

.mini-calendar-day small {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-size: 0.6rem;
}

.mini-calendar-day.is-outside-month {
  visibility: hidden;
}

.important-task-list {
  display: grid;
  gap: 12px;
}

.important-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border: 1px solid var(--wd-border);
  border-left: 4px solid var(--warning-text);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.important-task h3 {
  margin: 8px 0 0;
}

.important-task p {
  margin: 6px 0 0;
  color: var(--wd-muted);
}

.important-task-date {
  flex-shrink: 0;
  text-align: right;
}

.important-task-date span,
.important-task-date time {
  display: block;
}

.important-task-date span {
  margin-bottom: 3px;
  color: var(--wd-muted);
  font-size: 0.75rem;
}

.important-task-date time {
  font-weight: 750;
}


/* =========================================================
   13. Finance
   ========================================================= */

.finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.finance-summary-card {
  min-width: 0;
  padding: 22px;
}

.finance-summary-card h2 {
  margin: 6px 0;
  color: var(--wd-accent);
  font-size: clamp(1.5rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

.finance-summary-card p:last-child {
  margin-bottom: 0;
  color: var(--wd-muted);
}

.positive-amount {
  color: var(--success-text) !important;
}

.negative-amount {
  color: var(--danger-text) !important;
}

.finance-section {
  margin-top: 30px;
}

.finance-list {
  display: grid;
  gap: 14px;
}

.finance-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: 20px;
}

.finance-list-item h3 {
  margin: 0 0 6px;
}

.finance-list-item p {
  margin: 5px 0;
  color: var(--wd-muted);
}

.finance-amount {
  flex-shrink: 0;
  color: var(--wd-ink);
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.finance-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.finance-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.status-badge.muted {
  color: var(--wd-muted);
  background: var(--surface-subtle);
}

.debt-priority-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--wd-border);
  border-left: 4px solid var(--wd-accent);
  border-radius: var(--radius-card);
  color: var(--wd-ink);
  background: var(--wd-soft);
}

.debt-priority-card h2 {
  margin: 5px 0 8px;
}

.debt-priority-card p {
  margin: 5px 0;
  color: var(--wd-muted);
}

.debt-priority-amount {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  flex-shrink: 0;
  text-align: right;
}

.debt-priority-amount span,
.debt-priority-amount small {
  color: var(--wd-muted);
}

.debt-priority-amount strong {
  margin: 4px 0;
  color: var(--wd-accent);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.debt-list-item {
  align-items: stretch;
}

.debt-main-content {
  flex: 1;
  min-width: 0;
}

.debt-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(125px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.debt-detail-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--wd-border);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.debt-detail-grid span,
.debt-detail-grid strong {
  display: block;
}

.debt-detail-grid span {
  margin-bottom: 4px;
  color: var(--wd-muted);
  font-size: 0.8rem;
}

.debt-detail-grid strong {
  overflow-wrap: anywhere;
}

.debt-balance {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  min-width: 150px;
  padding-left: 20px;
  border-left: 1px solid var(--wd-border);
  text-align: right;
}

.debt-balance span,
.debt-balance small {
  color: var(--wd-muted);
}

.debt-balance strong {
  margin: 5px 0;
}

.debt-notes {
  margin-top: 14px !important;
  padding: 11px 13px;
  border-left: 3px solid var(--wd-accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface-subtle);
}

.finance-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--wd-border);
  border-radius: 14px;
  background: var(--wd-card);
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-table th,
.finance-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--wd-border);
  text-align: left;
  white-space: nowrap;
}

.finance-table th {
  color: var(--wd-muted);
  background: var(--surface-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finance-table tbody tr:last-child td {
  border-bottom: 0;
}

.finance-table tbody tr:hover {
  background: var(--wd-soft);
}

.finance-table td strong,
.finance-table td small {
  display: block;
}

.finance-table td small {
  margin-top: 3px;
  color: var(--wd-muted);
}


/* =========================================================
   14. Health and fitness
   ========================================================= */

.card > h2 {
  margin: 6px 0;
  color: var(--wd-accent);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.stack-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--wd-border);
}

.list-item:first-child {
  border-top: 0;
}

.list-item h3,
.list-item p {
  margin: 0;
}

.list-item p {
  margin-top: 4px;
  color: var(--wd-muted);
}

.highlight-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  background: var(--wd-soft);
}

.highlight-card strong {
  color: var(--wd-accent);
  font-size: 1.65rem;
}

.highlight-card p {
  margin: 5px 0 0;
  color: var(--wd-muted);
}

.wellness-row,
.upcoming-task {
  padding: 10px 0;
  border-bottom: 1px solid var(--wd-border);
}

.wellness-row,
.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.upcoming-task strong,
.upcoming-task small {
  display: block;
}

.upcoming-task small {
  margin-top: 4px;
  color: var(--wd-muted);
}

.daily-progress {
  margin-bottom: 18px;
}


/* =========================================================
   15. Analytics
   ========================================================= */

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.analytics-stat {
  padding: 18px;
}

.analytics-stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--wd-muted);
  font-size: 0.82rem;
}

.analytics-stat strong {
  display: block;
  font-size: 1.75rem;
  overflow-wrap: anywhere;
}

.analytics-stat-success {
  border-top: 3px solid var(--success-text);
}

.analytics-stat-danger {
  border-top: 3px solid var(--danger-text);
}

.analytics-stat-primary {
  border-top: 3px solid var(--wd-accent);
}

.analytics-rate {
  color: var(--wd-accent);
  font-size: 1.6rem;
}

.analytics-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
}

.analytics-breakdown span {
  color: var(--wd-muted);
  font-size: 0.85rem;
}

.analytics-breakdown strong {
  display: block;
  margin-bottom: 3px;
  color: var(--wd-ink);
  font-size: 1.25rem;
}

.weekly-analytics {
  display: grid;
  grid-template-columns: repeat(7, minmax(56px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 240px;
  margin-top: 24px;
  overflow-x: auto;
}

.activity-day {
  min-width: 56px;
  text-align: center;
}

.activity-bar-track {
  display: flex;
  align-items: flex-end;
  width: 42px;
  height: 150px;
  margin: 0 auto 10px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--wd-border);
}

.activity-bar {
  width: 100%;
  min-height: 0;
  border-radius: 10px;
  background: var(--wd-accent);
}

.activity-day strong,
.activity-day span,
.activity-day small {
  display: block;
}

.activity-day span {
  margin-top: 5px;
  font-weight: 700;
}

.activity-day small {
  margin-top: 3px;
  color: var(--wd-muted);
}

.category-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--wd-border);
}

.category-row:last-child {
  border-bottom: 0;
}

.category-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.category-heading small {
  display: block;
  margin-top: 4px;
  color: var(--wd-muted);
}

.wellness-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.wellness-stats article {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-subtle);
}

.wellness-stats span,
.wellness-stats strong {
  display: block;
}

.wellness-stats span {
  margin-bottom: 7px;
  color: var(--wd-muted);
  font-size: 0.8rem;
}

.wellness-stats strong {
  font-size: 1.3rem;
}

.wellness-stats .streak-card {
  grid-column: 1 / -1;
  background: var(--wd-soft);
}

.wellness-stats .streak-card strong {
  color: var(--wd-accent);
}

.analytics-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.analytics-goals .goal {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--wd-border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.analytics-goals .goal > div > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wellness-history {
  margin-top: 16px;
}

.wellness-history-row {
  display: grid;
  grid-template-columns: 90px repeat(5, minmax(90px, 1fr));
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wd-border);
  font-size: 0.85rem;
}

.wellness-history-row:last-child {
  border-bottom: 0;
}


/* =========================================================
   16. Morning briefing
   ========================================================= */

.briefing-focus {
  border-top: 3px solid var(--wd-accent);
}

.briefing-focus h2 {
  margin-bottom: 8px;
}

.briefing-focus > p:last-of-type {
  color: var(--wd-muted);
}

.briefing-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.briefing-stats span {
  padding: 12px;
  border-radius: 10px;
  color: var(--wd-muted);
  background: var(--surface-subtle);
  font-size: 0.85rem;
}

.briefing-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--wd-ink);
  font-size: 1.05rem;
}

.briefing-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.briefing-summary > div {
  min-width: 0;
  padding: 16px 10px;
  border-radius: 12px;
  background: var(--surface-subtle);
  text-align: center;
}

.briefing-summary strong,
.briefing-summary span {
  display: block;
}

.briefing-summary strong {
  margin-bottom: 6px;
  color: var(--wd-accent);
  font-size: 1.65rem;
}

.briefing-summary span {
  color: var(--wd-muted);
  font-size: 0.8rem;
}

.priority-reminder {
  border-left: 4px solid var(--wd-accent);
}

.priority-reminder p:last-child {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.task-list {
  display: grid;
  gap: 14px;
}

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--wd-border);
  border-left: 4px solid var(--wd-border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.task-card-content {
  flex: 1;
  min-width: 0;
}

.task-card h3 {
  margin: 9px 0 0;
  overflow-wrap: anywhere;
}

.task-card p {
  margin: 8px 0 0;
  color: var(--wd-muted);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--wd-muted);
  background: var(--wd-card);
  font-size: 0.75rem;
  font-weight: 650;
}

.task-date,
.task-goal {
  font-size: 0.82rem;
}

.task-card .task-goal {
  color: var(--wd-accent);
  font-weight: 700;
}

.warning-panel {
  border-top: 3px solid var(--danger-text);
}

.warning-panel .section-heading > span {
  color: var(--danger-text);
  font-weight: 750;
}

.overdue-panel {
  border-left: 4px solid var(--danger-text);
}

.compact-list {
  display: grid;
}

.compact-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wd-border);
}

.compact-list-item:last-child {
  border-bottom: 0;
}

.compact-list-item div {
  min-width: 0;
}

.compact-list-item strong,
.compact-list-item small {
  display: block;
  overflow-wrap: anywhere;
}

.compact-list-item small {
  margin-top: 5px;
  color: var(--wd-muted);
}

.compact-list-item > span {
  flex-shrink: 0;
  color: var(--wd-accent);
  font-size: 0.85rem;
  font-weight: 750;
}


/* =========================================================
   17. Notifications and email settings
   ========================================================= */

.notification-panel {
  margin-bottom: 24px;
}

.notification-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--wd-border);
  border-radius: 14px;
  color: var(--wd-ink);
  background: var(--wd-card);
}

.notification-item p {
  margin: 6px 0;
}

.notification-item small {
  color: var(--wd-muted);
}

.notification-item form {
  flex-shrink: 0;
}

.email-settings-card {
  border-top: 3px solid var(--wd-accent);
}

.email-address-summary,
.email-master-setting {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--wd-border);
  border-radius: 13px;
  background: var(--surface-subtle);
}

.email-master-setting {
  background: var(--wd-soft);
}

.email-address-summary span,
.email-address-summary strong {
  display: block;
}

.email-address-summary span {
  margin-bottom: 5px;
  color: var(--wd-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.email-address-summary strong {
  color: var(--wd-accent);
  overflow-wrap: anywhere;
}

.email-address-summary p {
  margin: 6px 0 0;
  color: var(--wd-muted);
}

.email-preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.email-preference-grid .checkbox-setting {
  height: 100%;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--wd-border);
  border-radius: 13px;
  background: var(--wd-card);
}


/* =========================================================
   18. Earlier dashboard components
   ========================================================= */

.hero,
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--wd-border);
  border-radius: 22px;
  color: var(--wd-ink);
  background: var(--wd-soft);
}

.hero h1,
.dashboard-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.hero p:last-child,
.dashboard-hero-copy > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--wd-muted);
}

.dashboard-shell {
  display: grid;
  gap: 20px;
}

.dashboard-primary-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-action-grid,
.dashboard-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  text-decoration: none;
}

.quick-action-card:hover {
  border-color: var(--wd-accent);
}

.quick-action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--wd-accent);
  background: var(--wd-soft);
  font-size: 1.15rem;
  font-weight: 750;
}

.quick-action-card strong,
.quick-action-card small {
  display: block;
}

.quick-action-card small {
  margin-top: 3px;
  color: var(--wd-muted);
}

.overview-card {
  padding: 20px;
  border-left: 3px solid var(--wd-accent);
}

.overview-card-success {
  border-left-color: var(--success-text);
}

.overview-card-warning {
  border-left-color: var(--warning-text);
}

.overview-label,
.overview-card small {
  display: block;
  color: var(--wd-muted);
}

.overview-label {
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overview-card strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--wd-accent);
  font-size: clamp(1.8rem, 4vw, 2.2rem);
}

.dashboard-progress-card,
.dashboard-side-card {
  margin: 0;
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
  align-items: start;
  gap: 22px;
}

.dashboard-priority-panel {
  min-width: 0;
  padding: 24px;
}

.dashboard-task-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.dashboard-task-list .task {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--wd-border);
  background: var(--wd-card);
}

.dashboard-task-list .task form {
  margin: 0;
}

.dashboard-task-list .check {
  color: var(--wd-accent);
  background: var(--wd-soft);
}

.dashboard-sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.side-card-heading,
.life-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.side-card-heading h2,
.side-card-heading p,
.life-summary-heading h2,
.life-summary-heading p {
  margin: 0;
}

.side-card-heading h2,
.life-summary-heading h2 {
  margin-top: 4px;
}

.dashboard-goal + .dashboard-goal,
.dashboard-upcoming-task + .dashboard-upcoming-task {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--wd-border);
}

.dashboard-upcoming-task {
  display: grid;
  gap: 4px;
}

.dashboard-empty-state {
  padding: 32px 20px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: var(--success-text);
  background: var(--success-bg);
  font-size: 1.4rem;
  font-weight: 750;
}

.dashboard-overdue-card {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.dashboard-overdue-card h2 {
  margin: 4px 0;
}

.dashboard-life-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.life-summary-card {
  margin: 0;
  border-top: 3px solid var(--success-text);
}

.finance-summary-card-main {
  border-top-color: var(--wd-accent);
}

.life-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.life-summary-stats > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--wd-border);
  border-radius: 13px;
  background: var(--surface-subtle);
}

.life-summary-stats strong,
.life-summary-stats span {
  display: block;
}

.life-summary-stats strong {
  color: var(--wd-accent);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  overflow-wrap: anywhere;
}

.health-summary-card .life-summary-stats strong {
  color: var(--success-text);
}

.life-summary-stats span,
.life-summary-stats small {
  margin-top: 3px;
  color: var(--wd-muted);
  font-size: 0.84rem;
}

.dashboard-focused > .panel {
  margin-bottom: 0;
}

.dashboard-clock {
  margin: 0 0 7px;
  color: var(--wd-accent);
  font-size: 0.95rem;
  font-weight: 750;
}

a.dashboard-task-name {
  color: var(--wd-ink);
  text-decoration: none;
}

a.dashboard-task-name:hover {
  color: var(--wd-accent);
  text-decoration: underline;
}

.dashboard-day-summary strong {
  color: var(--wd-ink);
}

.dashboard-more {
  margin-top: 14px;
  border-top: 1px solid var(--wd-border);
}

.dashboard-more > summary {
  min-height: 44px;
  padding: 12px 0;
  color: var(--wd-accent);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-extra-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Preserve urgency colors on task components. */

:is(.task, .task-card, .planner-entry, .important-task).urgency-5 {
  border-left-color: var(--danger-text);
}

:is(.task, .task-card, .planner-entry, .important-task).urgency-4 {
  border-left-color: #cc8036;
}

:is(.task, .task-card, .planner-entry, .important-task).urgency-3 {
  border-left-color: #a78922;
}

:is(.task, .task-card, .planner-entry, .important-task).urgency-2 {
  border-left-color: var(--info-text);
}

:is(.task, .task-card, .planner-entry, .important-task).urgency-1 {
  border-left-color: var(--success-text);
}


/* =========================================================
   19. Tablet layouts
   ========================================================= */

@media (max-width: 1100px) {
  .task-filter-form,
  .wd-filters .task-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-search-field {
    grid-column: 1 / -1;
  }

  .wd-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-action-grid,
  .dashboard-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .wd-month-grid .wd-entry {
    flex-direction: column;
  }

  .wd-month-grid .wd-entry form {
    flex-basis: auto;
  }

  .wd-month-grid .wd-task-link {
    width: 100%;
    padding: 8px;
  }
}

@media (max-width: 1050px) {
  .year-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 1000px) {
  .analytics-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debt-detail-grid {
    grid-template-columns: repeat(2, minmax(125px, 1fr));
  }

  .wellness-history-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .topbar-heading {
    width: 100%;
  }

  .topbar-heading .brand {
    flex: 1;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .navigation {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--wd-border);
  }

  .navigation.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    max-height: 60vh;
    max-height: 60dvh;
    overflow-y: auto;
  }

  .navigation > a,
  .nav-dropdown > summary {
    width: 100%;
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-menu,
  .dropdown-menu-right {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 4px 0 8px;
    box-shadow: none;
  }

  .nav-profile-dropdown {
    margin-left: 0;
  }

  .simple-navigation .nav-spacer {
    display: none;
  }

  .simple-navigation .nav-form-inline,
  .simple-navigation .logout-button {
    width: 100%;
  }

  .dashboard-life-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero,
  .dashboard-hero,
  .page-header,
  .finance-header,
  .analytics-header,
  .planner-month-header,
  .planner-year-header {
    flex-direction: column;
    align-items: stretch;
  }

  .grid,
  .dashboard-grid,
  .health-dashboard .dashboard-grid,
  .two-column-grid,
  .analytics-grid,
  .analytics-goals,
  .dashboard-content-grid,
  .planner-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions,
  .button-group,
  .finance-actions,
  .dashboard-primary-actions {
    justify-content: flex-start;
  }

  .task-card {
    flex-direction: column;
    align-items: stretch;
  }

  .task-card form,
  .task-card form .button {
    width: 100%;
  }

  .paper-planner {
    padding: 12px;
  }
}


/* =========================================================
   20. Phone layout and bottom navigation
   ========================================================= */

@media (max-width: 760px) {
  html {
    scroll-padding-top: 90px;
    scroll-padding-bottom: 110px;
  }

  /* Let the document scroll naturally; keep focused fields above the tabs. */
  input,
  select,
  textarea {
    font-size: max(16px, 1em);
    max-width: 100%;
    scroll-margin-block: 100px 120px;
  }

  .keyboard-open .mobile-tabs {
    display: none;
  }

  .keyboard-open .mobile-tabs ~ .site-footer {
    padding-bottom: 24px;
  }

  .topbar,
  .topbar.is-scrolled {
    padding: 8px 14px;
    background: var(--wd-bg);
    border-bottom-color: transparent;
  }

  .topbar-heading {
    gap: 8px;
    min-height: 48px;
  }

  .brand-main-logo {
    width: auto;
    max-width: 100%;
    height: 44px;
    border-radius: 8px;
  }

  .theme-toggle,
  .menu-toggle {
    background: var(--wd-card);
  }

  .container {
    padding: 22px 16px;
  }

  .navigation.is-open {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--wd-border);
    border-radius: 14px;
    background: var(--wd-card);
  }

  .mobile-tabs {
    position: fixed;
    inset: auto 0 0;
    z-index: 1100;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--wd-border);
    background: var(--wd-card);
  }

  .mobile-tabs a,
  .mobile-tabs button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    border-radius: 12px;
    color: var(--wd-muted);
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .mobile-tabs a > span:first-child {
    font-size: 1.35rem;
    line-height: 1;
  }

  .mobile-tabs a:hover {
    color: var(--wd-accent);
    background: var(--wd-soft);
  }

  .mobile-tabs a[aria-current="page"],
  .mobile-tabs a[aria-current="true"] {
    color: var(--wd-accent);
  }

  .mobile-tabs a[aria-current="page"]::after,
  .mobile-tabs a[aria-current="true"]::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: var(--wd-accent);
    transform: translateX(-50%);
  }

  .mobile-tabs ~ .site-footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .calm-greeting h1 {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  .calm-card {
    padding: 18px;
  }

  .calm-details {
    padding-block: 6px;
  }

  .chat-bubble {
    max-width: 95%;
  }

  .wd-planner {
    padding-top: 0;
  }

  .wd-planner-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .wd-planner-header > .button {
    align-self: flex-start;
  }

  .wd-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .wd-navigation a:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .wd-jump {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .wd-jump label {
    grid-column: 1 / -1;
  }

  .wd-filters .task-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-month-grid,
  .wd-week-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .wd-weekday {
    display: none;
  }

  .wd-month-grid .wd-day-name {
    display: inline;
  }

  .wd-month-grid .outside-month {
    display: none;
  }

  .wd-day,
  .wd-week-grid .wd-day {
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--wd-border);
    border-radius: 14px;
  }

  .wd-date {
    font-size: 1.05rem;
  }

  .wd-entry {
    margin-top: 8px;
  }

  .wd-task-link {
    padding: 12px 10px 12px 0;
  }

  .wd-task-link strong {
    font-size: 1rem;
  }

  .wd-task-link small {
    font-size: 0.85rem;
  }

  .wd-task-link .wd-task-time {
    font-size: 0.82rem;
  }

  .wd-bottom,
  .wd-task-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-task-form .form-field-wide {
    grid-column: auto;
  }

  .wd-task-form .form-card,
  .wd-bottom .panel {
    padding: 18px;
  }

  .dashboard-shell {
    gap: 16px;
  }

  .dashboard-hero {
    padding: 22px;
    gap: 18px;
  }

  .quick-action-card,
  .overview-card {
    padding: 14px;
  }

  .quick-action-card {
    flex-wrap: wrap;
  }

  .quick-action-card > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .overview-label {
    font-size: 0.74rem;
  }

  .dashboard-task-list .task {
    gap: 10px;
    padding: 12px;
  }

  .dashboard-focused .dashboard-hero {
    padding: 18px;
    gap: 12px;
  }

  .dashboard-focused .dashboard-empty-state {
    padding: 16px 8px;
  }

  .wellness-history-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .year-summary-grid,
  .year-calendar-grid,
  .email-preference-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-heading,
  .finance-list-item,
  .debt-priority-card,
  .important-task {
    flex-direction: column;
    align-items: stretch;
  }

  .debt-priority-amount {
    align-items: flex-start;
    text-align: left;
  }

  .debt-balance {
    align-items: flex-start;
    min-width: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--wd-border);
    border-left: 0;
    text-align: left;
  }

  .important-task-date {
    text-align: left;
  }
}

@media (max-width: 650px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-field-wide {
    grid-column: auto;
  }

  .form-card,
  .auth-card {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }

  .planner-date-jump,
  .planner-date-jump-form {
    flex-direction: column;
    align-items: stretch;
  }

  .planner-date-jump-form input[type="date"],
  .planner-date-jump-form input[type="number"] {
    width: 100%;
    min-width: 0;
  }

  .notification-item {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .panel,
  .card,
  .summary-card {
    padding: 18px;
  }

  .progress-heading,
  .task-title,
  .task-filter-heading,
  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .week-navigation,
  .month-navigation,
  .year-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .week-navigation .button,
  .month-navigation .button,
  .year-navigation .button {
    width: 100%;
  }

  .task-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-search-field {
    grid-column: auto;
  }

  .task-filter-actions {
    flex-wrap: wrap;
  }

  .task-filter-actions .button {
    flex: 1 1 100px;
  }

  .task-filter-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .button-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-primary-actions .button {
    flex: 1 1 120px;
  }

  .dashboard-extra-links .button {
    flex: 1 1 150px;
  }
}

@media (max-width: 500px) {
  .finance-summary,
  .debt-detail-grid,
  .briefing-stats,
  .briefing-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-summary-card,
  .finance-list-item,
  .debt-priority-card {
    padding: 18px;
  }

  .compact-list-item,
  .life-summary-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .analytics-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .finance-actions,
  .wellness-stats,
  .wellness-history-row,
  .quick-action-grid,
  .dashboard-overview,
  .calm-snapshots {
    grid-template-columns: minmax(0, 1fr);
  }

  .calm-heading h2 {
    font-size: 1.1rem;
  }

  .calm-card,
  .chat-compose-card {
    padding-inline: 14px;
  }
}


/* =========================================================
   21. Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Task locations and map links */

.wd-task-content {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.wd-task-location {
  overflow-wrap: anywhere;
}

.wd-task-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 0 8px 8px;
}

.wd-task-map-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  color: var(--wd-accent);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wd-task-map-actions a:hover {
  text-decoration: underline;
}
/* Chat scheduling conflict confirmation */

.waycon-chat .chat-conflict-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.waycon-chat .chat-conflict-choice input[type="checkbox"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 11px 0;
  padding: 0;
  accent-color: var(--calm-accent);
  cursor: pointer;
}

.waycon-chat .chat-conflict-choice label {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}


/* Shared editorial finish: all application pages use the same palette and type. */
.brand-wordmark {
  font-family: Gabriela, Georgia, serif;
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  font-weight: 400;
  white-space: nowrap;
}
.topbar, .topbar.is-scrolled { background: var(--wd-bg); }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.panel, .card, .chat-compose-card { box-shadow: none; border-radius: var(--radius-card); }
.calm-dashboard { gap: 28px; }
.calm-dashboard .calm-card {
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--wd-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.calm-dashboard .calm-plan { border-top: 0; }
.calm-greeting h1 { margin-top: 10px; letter-spacing: -0.025em; }
.calm-event-content { padding-bottom: 18px; border-bottom: 1px solid var(--wd-border); }
.calm-event:last-child .calm-event-content { border-bottom: 0; }
.calm-assistant { position: sticky; bottom: 20px; z-index: 20; margin-top: 8px; }
.calm-availability { font-size: .75rem; }
.calm-calendar > summary { min-height: 44px; cursor: pointer; font-weight: 500; }
.syllabus-page { max-width: 1000px; margin-inline: auto; }
.syllabus-page .page-header p { max-width: 55ch; }
.syllabus-steps {
  display: flex; gap: 16px; padding: 0; margin: 0 0 36px;
  list-style: none; max-width: 520px;
}
.syllabus-steps li {
  display: flex; flex: 1; gap: 9px; align-items: center;
  color: var(--wd-muted); font-size: .85rem;
}
.syllabus-steps li span {
  display: grid; place-items: center; flex: 0 0 30px; height: 30px;
  border: 1px solid var(--wd-border); border-radius: 50%;
}
.syllabus-steps li[aria-current] { color: var(--wd-accent); font-weight: 600; }
.syllabus-steps li[aria-current] span { background: var(--primary-bg); color: var(--primary-text); border-color: transparent; }
.syllabus-layout { align-items: start; gap: 40px; }
.syllabus-page .panel { padding: 24px; }
.syllabus-upload-card { padding-block: 20px; border-bottom: 1px solid var(--wd-border); }
.syllabus-upload-card h3 { margin: 0; font-size: 1rem; }
.assignment-review-list { display: grid; gap: 0; }
.assignment-review-card { min-width: 0; padding: 24px 0; border-bottom: 1px solid var(--wd-border); }
.assignment-selection { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.assignment-selection input { width: 22px; height: 22px; accent-color: var(--wd-accent); }
.assignment-selection label { padding-block: 8px; }
.assignment-field-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.assignment-field-grid > * { min-width: 0; }
.assignment-source { margin-top: 12px; color: var(--wd-muted); }
.assignment-source summary { min-height: 44px; cursor: pointer; }
.syllabus-page .form-actions { margin-top: 28px; }
@media (max-width: 1000px) {
  .calm-workspace { gap: 28px; }

  .calm-availability { margin-bottom: 16px; }
  .mobile-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-more { font: inherit; color: var(--wd-muted); }
  .mobile-more > span:first-child { font-size: 1.5rem; line-height: 1; }
  .syllabus-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  .syllabus-page .panel { padding: 20px 16px; }
  .syllabus-page .page-header { display: block; }
  .syllabus-page .page-header > a { margin-top: 12px; }
  .assignment-field-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .syllabus-page .form-actions { display: grid; }
  .syllabus-steps { gap: 8px; }
  .syllabus-steps li { gap: 6px; font-size: .8rem; }
  .calm-dashboard .calm-greeting h1 { font-size: 2rem; }
}

@media (max-width: 760px) {
  .calm-assistant {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    left: 16px; right: 16px; min-height: 60px;
    box-shadow: 0 4px 18px rgb(0 0 0 / 8%);
  }
  .calm-dashboard { padding-bottom: 90px; }
  .keyboard-open .calm-assistant { bottom: 12px; }
}

.next-commitment { padding: 20px; background: var(--surface-subtle); border-radius: 12px; }
.calm-dashboard .next-commitment a { display: flex; align-items: center; gap: 20px; color: var(--wd-ink); }
.next-commitment time { font-size: 1.3rem; white-space: nowrap; }
.next-commitment a > span { padding-left: 20px; border-left: 1px solid var(--wd-border); min-width: 0; }
.next-commitment strong, .next-commitment small { display: block; overflow-wrap: anywhere; }
.next-commitment small { margin-top: 4px; color: var(--wd-muted); }

/* Compact syllabus intake, with accessible native file selection. */
.syllabus-page .syllabus-intake { padding: 0; border: 0; border-radius: 0; background: transparent; }
.syllabus-form { display: grid; gap: 20px; min-width: 0; }
.syllabus-course { display: grid; gap: 8px; }
.syllabus-form label { font-size: .9rem; font-weight: 500; }
.syllabus-course input[type="text"] {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--wd-border); border-radius: 10px;
  color: var(--wd-ink); background: var(--field-bg); font-size: 16px;
}
.syllabus-course input[type="text"]:focus { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.syllabus-picker {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 24px 16px; border: 1px dashed var(--wd-border);
  border-radius: 14px; background: var(--surface-subtle); text-align: center;
}
.syllabus-picker > svg { color: var(--wd-accent); pointer-events: none; }
.syllabus-picker > label { font-size: 1.1rem; font-weight: 600; }
.syllabus-picker > p { margin: 0; color: var(--wd-muted); font-size: .85rem; }
.syllabus-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.syllabus-picker:focus-within { outline: 2px solid var(--focus-color); outline-offset: 3px; }
.syllabus-picker-action { margin-top: 6px; padding: 10px 22px; border: 1px solid var(--wd-border); border-radius: 8px; background: var(--wd-card); color: var(--wd-ink); font-size: .9rem; }
.syllabus-filename { display: block; width: 100%; min-width: 0; overflow-wrap: anywhere; color: var(--wd-muted); font-size: .8rem; }
.syllabus-extra { border-block: 1px solid var(--wd-border); }
.syllabus-extra > summary { display: flex; align-items: center; gap: 8px; min-height: 52px; font-size: .9rem; cursor: pointer; list-style: none; }
.syllabus-extra > summary::-webkit-details-marker { display: none; }
.syllabus-extra > summary::before { content: "+"; color: var(--wd-accent); font-size: 1.2rem; }
.syllabus-extra[open] > summary::before { content: "−"; }
.syllabus-extra > summary > span { margin-left: auto; color: var(--wd-muted); font-size: .8rem; }
.syllabus-extra-body { padding-bottom: 18px; }
.syllabus-extra-body input[type="file"] { display: block; width: 100%; min-width: 0; font-size: .85rem; color: var(--wd-muted); }
.syllabus-extra-body input::file-selector-button { padding: 10px 12px; margin-right: 10px; border: 1px solid var(--wd-border); border-radius: 8px; color: var(--wd-ink); background: var(--wd-card); font: inherit; }
.syllabus-form .syllabus-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 10px; font-size: .95rem; font-weight: 600; }
.syllabus-reassurance { margin: -8px 0 0; font-size: .8rem; line-height: 1.5; color: var(--wd-muted); text-align: center; }
.syllabus-form .errorlist { margin: 0; padding-left: 20px; color: var(--danger-text); font-size: .85rem; }
@media (max-width: 760px) {
  .syllabus-page .page-header { margin-bottom: 20px; }
  .syllabus-page .page-header h1 { margin-block: 6px 10px; font-size: 1.9rem; }
  .syllabus-page .page-header p:not(.eyebrow) { font-size: .9rem; line-height: 1.5; }
  .syllabus-page .eyebrow { font-size: .65rem; }
  .syllabus-steps { margin-bottom: 24px; }
  .syllabus-form { gap: 18px; }
  .syllabus-page .panel:not(.syllabus-intake) { padding: 20px 0; border: 0; border-top: 1px solid var(--wd-border); border-radius: 0; background: transparent; }
  .syllabus-page .panel > h2 { margin-top: 0; font-size: 1.4rem; }
}

/* Compact Today layout; the conversation dock is a separate shell row. */
html[data-theme="dark"] { --wd-bg:#181a1b; --wd-card:#222526; --wd-ink:#f4f4ef; --wd-muted:#b5bbb8; --wd-border:#383d3b; --surface-subtle:#222625; }
.today-page { max-width:850px; margin-inline:auto; display:grid; gap:24px; }
.today-heading > p { margin:0 0 8px; font-size:.82rem; color:var(--wd-muted); }
.today-heading > div,.today-section-heading,.today-progress > div { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.today-page h1,.today-page h2 { font-family:Inter,system-ui,sans-serif; font-weight:600; letter-spacing:-.025em; }
.today-heading h1 { margin:0; font-size:1.8rem; }
.today-page h2 { font-size:1rem; margin:0; }
.today-add { border:1px solid var(--wd-accent); border-radius:8px; padding:8px 12px; text-decoration:none; font-size:.85rem; white-space:nowrap; }
.today-empty { padding:24px 8px 4px; text-align:center; }
.today-empty svg { color:var(--wd-muted); margin-bottom:16px; }
.today-empty h2 { font-size:1.1rem; }
.today-empty p { color:var(--wd-muted); font-size:.85rem; margin:8px 0 18px; }
.today-empty .button { min-height:44px; padding:10px 22px; font-size:.9rem; border-radius:8px; }
.today-task { display:grid; grid-template-columns:32px minmax(0,1fr); gap:10px; padding-block:14px; border-bottom:1px solid var(--wd-border); }
.today-task form { margin:0; }
.today-check { min-height:44px; width:32px; border:0; background:transparent; color:var(--wd-accent); font-size:1.4rem; cursor:pointer; }
.today-task a { display:grid; gap:4px; text-decoration:none; color:var(--wd-ink); min-width:0; }
.today-task strong { overflow-wrap:anywhere; font-size:.95rem; }
.today-task-time,.today-task small { color:var(--wd-muted); font-size:.78rem; }
.today-progress { font-size:.8rem; color:var(--wd-muted); }
.today-progress progress { width:100%; height:6px; margin-top:10px; accent-color:var(--wd-accent); }
.today-upcoming,.today-explore { padding-top:20px; border-top:1px solid var(--wd-border); }
.today-section-heading > a { font-size:.8rem; text-decoration:none; }
.today-upcoming-row { display:grid; grid-template-columns:98px minmax(0,1fr) 14px; gap:14px; align-items:center; min-height:70px; border-bottom:1px solid var(--wd-border); text-decoration:none; color:var(--wd-ink); font-size:.85rem; }
.today-upcoming-row time { border-right:1px solid var(--wd-border); }
.today-upcoming-row small { display:block; color:var(--wd-muted); font-size:.75rem; }
.today-upcoming-row strong { font-weight:500; overflow-wrap:anywhere; }
.today-no-upcoming { color:var(--wd-muted); font-size:.85rem; }
.today-explore nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.today-explore a { display:grid; gap:6px; min-height:60px; justify-items:center; text-decoration:none; font-size:.8rem; color:var(--wd-ink); }
.today-explore a > span { font-size:1.8rem; color:var(--wd-accent); line-height:1; }
.today-more { border-top:1px solid var(--wd-border); color:var(--wd-muted); font-size:.85rem; }
.today-more > summary { padding-block:14px; cursor:pointer; }
.today-more .calm-card { border:0; background:transparent; padding:14px 0; }
.today-attention { font-size:.85rem; }
.today-chat-dock { padding:12px 20px; background:var(--wd-bg); border-top:1px solid var(--wd-border); }
.today-chat-dock > a { display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:850px; min-height:48px; margin-inline:auto; padding:6px 8px 6px 18px; border:1px solid var(--wd-border); border-radius:28px; color:var(--wd-muted); background:var(--wd-card); text-decoration:none; font-size:.9rem; }
.today-chat-arrow { display:grid; place-items:center; width:36px; height:36px; flex-shrink:0; border-radius:50%; color:var(--primary-text); background:var(--primary-bg); font-size:1.3rem; }
.plan-view-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:4px; margin-bottom:24px; border:1px solid var(--wd-border); border-radius:10px; background:var(--surface-subtle); }
.plan-view-tabs > a { display:grid; place-items:center; min-height:44px; border-radius:7px; color:var(--wd-muted); font-size:.88rem; text-decoration:none; }
.plan-view-tabs > a[aria-current="page"] { background:var(--wd-card); color:var(--wd-accent); font-weight:600; }
.daily-planner > .wd-day { margin-top:20px; }
@media (max-width:760px) {
 .today-shell { height:100vh; height:100dvh; min-height:0; overflow:hidden; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; }
 .today-shell > .topbar { position:relative; padding:8px 16px; }
 .today-shell > main.container { min-height:0; overflow-y:auto; overscroll-behavior-y:contain; padding:20px 20px 24px; }
 .today-shell > .mobile-tabs { position:relative; inset:auto; padding-top:4px; padding-bottom:calc(4px + env(safe-area-inset-bottom,0px)); }
 .today-shell > .site-footer { display:none; }
 .today-shell .brand-wordmark { font-size:1.2rem; }
 .today-shell .theme-toggle,.today-shell .menu-toggle { width:38px; height:38px; flex-basis:38px; font-size:.95rem; }
 .today-shell .topbar-heading { min-height:44px; }
 .today-page { gap:22px; }
 .today-chat-dock { padding:10px 16px; }
 .today-more .calm-support-grid { display:block; }
 .today-shell.keyboard-open > .mobile-tabs { display:none; }
}

/* Timeline home: one schedule, one add action, one conversation entry. */
.timeline-home { max-width:760px; margin-inline:auto; display:grid; gap:24px; }
.timeline-heading > p { margin:0 0 10px; color:var(--wd-muted); font-size:.82rem; }
.timeline-heading h1 { margin:0; font-family:"Old Standard TT",Georgia,serif; font-size:clamp(2rem,7vw,2.6rem); line-height:1.08; font-weight:400; letter-spacing:-.025em; }
.daily-feature { margin-top:14px; max-width:48ch; }
.daily-feature p { margin:0; font-size:.78rem; color:var(--wd-muted); line-height:1.5; }
.daily-feature .daily-word strong { font-weight:600; color:var(--wd-ink); }
.daily-feature .daily-quote { margin-top:3px; font-style:italic; }
.timeline-next { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 18px; border-radius:12px; background:var(--surface-subtle); }
.timeline-next p { margin:0 0 6px; text-transform:uppercase; letter-spacing:.07em; color:var(--wd-muted); font-size:.65rem; }
.timeline-next time,.timeline-next strong,.timeline-next small { display:block; }
.timeline-next time { font-size:1.1rem; font-weight:500; }
.timeline-next strong { margin-top:2px; font-size:.95rem; font-weight:500; overflow-wrap:anywhere; }
.timeline-next small { color:var(--wd-muted); font-size:.78rem; margin-top:2px; }
.timeline-next > div { min-width:0; }
.timeline-next > svg { color:var(--wd-accent); flex-shrink:0; }
.timeline-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.timeline-title h2 { margin:0; font-family:"Old Standard TT",Georgia,serif; font-size:1.45rem; font-weight:400; }
.timeline-title > a { display:grid; align-items:center; min-height:44px; font-size:.85rem; text-decoration:none; }
.timeline-row { position:relative; display:grid; grid-template-columns:64px 44px minmax(0,1fr); align-items:start; gap:6px; padding-bottom:12px; }
.timeline-row:not(:last-child)::before { content:""; position:absolute; top:22px; bottom:-22px; left:91px; width:1px; background:var(--wd-border); }
.timeline-time { font-size:.72rem; color:var(--wd-muted); padding-top:12px; white-space:nowrap; }
.timeline-row form { margin:0; position:relative; z-index:1; }
.timeline-dot { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; background:transparent; cursor:pointer; }
.timeline-dot > span { width:9px; height:9px; border-radius:50%; background:var(--wd-accent); }
.timeline-dot:hover > span { outline:3px solid var(--wd-soft); outline-offset:2px; }
.timeline-task { display:grid; gap:4px; padding-top:9px; text-decoration:none; color:var(--wd-ink); min-width:0; }
.timeline-task strong { font-size:.9rem; font-weight:500; overflow-wrap:anywhere; }
.timeline-task small { color:var(--wd-muted); font-size:.76rem; }
.timeline-empty { margin:0; padding:10px 0 24px; color:var(--wd-muted); font-size:.9rem; line-height:1.6; max-width:40ch; }
.today-avatar { display:none; }
.more-page { max-width:760px; margin-inline:auto; }
.more-menu { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-block:24px; }
.more-menu > a { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:54px; padding:14px 16px; border:1px solid var(--wd-border); border-radius:10px; color:var(--wd-ink); background:var(--wd-card); text-decoration:none; font-size:.92rem; }
@media (max-width:760px) {
 .today-shell .theme-toggle,.today-shell .menu-toggle { display:none; }
 .today-shell .topbar-heading { justify-content:space-between; }
 .today-shell .topbar-heading .brand { flex:initial; }
 .today-shell .today-avatar { order:2; display:grid; place-items:center; width:36px; height:36px; border-radius:50%; color:var(--wd-ink); background:var(--wd-soft); text-decoration:none; font-size:.78rem; }
 .today-shell > main.container { padding-top:12px; }
 .timeline-home { gap:22px; }
 .timeline-heading h1 { font-size:2.15rem; }
}
@media (max-width:380px) { .more-menu { grid-template-columns:minmax(0,1fr); } }
