:root {
  --bg: #07070f;
  --bg-2: #0a0a1a;
  --surface: #0f1024;
  --surface-2: #141432;
  --surface-3: #1e1e5a;
  --text: #eef0ff;
  --text-2: #7e85b6;
  --text-secondary: #c8ccf0;
  --muted: #8b8fb4;
  --line: rgba(129, 140, 248, .14);
  --line-strong: rgba(129, 140, 248, .28);
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-glow: #a5b4fc;
  --good: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 20px;
  --radius-lg: 26px;
  --shadow-elegant: 0 20px 60px -20px rgba(79, 70, 229, .35), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 32px -12px rgba(0, 0, 0, .5);
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a78bfa 100%);
  --gradient-surface: linear-gradient(155deg, rgba(30, 30, 90, .55) 0%, rgba(15, 16, 36, .85) 100%);
  --gradient-glow: radial-gradient(600px 400px at 15% -10%, rgba(99, 102, 241, .22), transparent 60%),
    radial-gradient(500px 320px at 90% 10%, rgba(167, 139, 250, .14), transparent 60%);
  --panel-bg: linear-gradient(155deg, #171d31, #0f1424);
  --input-bg: linear-gradient(155deg, #0d1120, #141a2d);
  --card-bg: linear-gradient(155deg, #141a2d, #0f1424);
}

html[data-theme="light"] {
  --bg: #eef0f7;
  --bg-2: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --surface-3: #e9ecf5;
  --text: #12142b;
  --text-2: #12142bbb;
  --text-secondary: #2a2d4a;
  --muted: #5a6284;
  --line: rgba(20, 20, 50, .09);
  --line-strong: rgba(20, 20, 50, .16);
  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-glow: #818cf8;
  --shadow-elegant: 0 20px 45px -20px rgba(79, 70, 229, .28), 0 6px 20px -10px rgba(20, 20, 50, .08);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 8px 24px -14px rgba(20, 20, 50, .14);
  --gradient-surface: linear-gradient(155deg, rgba(255, 255, 255, .9), rgba(245, 246, 251, .9));
  --gradient-glow: radial-gradient(600px 400px at 15% -10%, rgba(99, 102, 241, .14), transparent 60%),
    radial-gradient(500px 320px at 90% 10%, rgba(167, 139, 250, .10), transparent 60%);
  --panel-bg: linear-gradient(155deg, rgba(255, 255, 255, .92), rgba(245, 246, 251, .92));
  --input-bg: linear-gradient(155deg, #f0f2f8, #e8ebf3);
  --card-bg: linear-gradient(155deg, rgba(255, 255, 255, .88), rgba(245, 246, 251, .88));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Proxima Nova", "Inter", -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  background-image: var(--gradient-glow);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

html[data-theme="light"] body {
  background: var(--bg);
  background-image: var(--gradient-glow);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 700px at 80% 90%, rgba(30, 30, 90, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(79, 70, 229, .18), transparent 55%);
}

html[data-theme="light"] body::before {
  background:
    radial-gradient(1000px 600px at 80% 90%, rgba(99, 102, 241, .08), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(167, 139, 250, .10), transparent 55%);
}

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

*::-webkit-scrollbar-thumb {
  background: rgba(129, 140, 248, .18);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, .32);
  background-clip: padding-box;
}

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

h1,
h2,
h3,
.brand strong,
.metric-card strong,
.readiness-score,
.big-score,
.capacity-ring span,
.local-clock-card strong,
.world-clock strong,
.weather-card strong {
  font-family: "Space Grotesk", "Proxima Nova", "Inter", sans-serif !important;
  letter-spacing: -.025em;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .brand strong,
html[data-theme="light"] .metric-card strong,
html[data-theme="light"] .readiness-score,
html[data-theme="light"] .big-score,
html[data-theme="light"] .capacity-ring span,
html[data-theme="light"] .local-clock-card strong,
html[data-theme="light"] .world-clock strong,
html[data-theme="light"] .weather-card strong {
  color: var(--text) !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, rgba(15, 16, 36, .85), rgba(10, 10, 26, .9));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid rgba(255, 255, 255, .04);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: 18px 0 40px -18px rgba(0, 0, 0, .75), inset -1px 0 0 rgba(255, 255, 255, .03);
}

html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(244, 246, 251, .92));
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 40px -18px rgba(0, 0, 0, .12), inset -1px 0 0 rgba(255, 255, 255, .7);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, .64);
  z-index: 15;
}

.sidebar-backdrop.show {
  display: block;
}

.sidebar-backdrop:not(.show) {
  pointer-events: none;
}

html[data-theme="light"] .sidebar-backdrop {
  background: rgba(200, 210, 230, .5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 24px;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 6px 6px 16px rgba(0, 0, 0, .55), -5px -5px 14px rgba(120, 130, 180, .06), inset 1px 1px 0 rgba(255, 255, 255, .10);
}

html[data-theme="light"] .brand-logo-img {
  box-shadow: 6px 6px 16px rgba(0, 0, 0, .08), -5px -5px 14px rgba(255, 255, 255, .7), inset 1px 1px 0 rgba(255, 255, 255, .8);
}

.brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--text);
}

.brand span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .02em;
}

.nav {
  display: grid;
  gap: 3px;
  margin-bottom: auto;
}

.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 13px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  transition: box-shadow .2s ease, color .2s ease, background .2s ease;
  position: relative;
}

.nav-item span {
  opacity: .75;
  font-size: 15px;
  width: 20px;
  text-align: center;
  transition: transform .2s;
}

.nav-item:hover {
  background: linear-gradient(155deg, #171d31, #111627);
  color: var(--text);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .5), -5px -5px 12px rgba(120, 130, 180, .045);
}

html[data-theme="light"] .nav-item:hover {
  background: rgba(99, 102, 241, .06);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .06), -5px -5px 12px rgba(255, 255, 255, .7);
  color: var(--text);
}

.nav-item:hover span {
  transform: translateX(1px);
}

.nav-item.active {
  background: linear-gradient(155deg, #101527, #171d31);
  color: #fff;
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .55), inset -3px -3px 8px rgba(120, 130, 180, .05);
}

html[data-theme="light"] .nav-item.active {
  background: rgba(99, 102, 241, .1);
  color: var(--accent);
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .04), inset -3px -3px 8px rgba(255, 255, 255, .7);
}

.nav-item.active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
  margin-right: 2px;
}

html[data-theme="light"] .nav-item.active::before {
  box-shadow: 0 0 12px rgba(99, 102, 241, .4);
}

.help-nav {
  margin-top: 14px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  width: 100%;
}

.sidebar-card {
  margin-top: auto;
  background: var(--gradient-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .sidebar-card {
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
}

.sidebar-card .eyebrow {
  color: var(--accent-glow);
}

.sidebar-card strong,
.sidebar-card p {
  display: block;
  margin: 6px 0;
}

.sidebar-card p {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer {
  padding: 16px 4px 0;
  font-size: 11px;
  opacity: .7;
  color: var(--muted);
}

.main {
  padding: 0 28px 48px;
  min-width: 0;
  max-width: none;
  width: 100%;
}

.topbar {
position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px 75px;
  gap: 16px;
  background: linear-gradient(#07070f 80%, #00000000);
  min-height: 120px;
}

html[data-theme="light"] .topbar {
  background: linear-gradient(var(--bg) 80%, transparent);
}

.topbar .eyebrow {
  color: var(--accent-glow);
  letter-spacing: .18em;
}

.topbar h1 {
  font-family: "Space Grotesk", "Proxima Nova", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -.028em;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  margin: 4px 0;
  background: linear-gradient(120deg, #ffffff 0%, #c7cdff 55%, #7c6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

html[data-theme="light"] .topbar h1 {
  background: linear-gradient(120deg, #12142b 0%, #4f46e5 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -.005em;
  transition: box-shadow .18s ease, transform .18s ease, color .18s ease;
}

html[data-theme="light"] .btn {
  border-color: var(--line);
}

.btn.primary {
  background: linear-gradient(135deg, #7c6cff 0%, #4ab8ff 100%);
  color: #fff;
  border: 0;
  box-shadow: 8px 8px 22px rgba(76, 60, 220, .45), -4px -4px 12px rgba(120, 130, 180, .05), inset 1px 1px 0 rgba(255, 255, 255, .28), inset -1px -1px 0 rgba(0, 0, 0, .2);
}

.btn.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn.primary:active {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .35), inset -3px -3px 8px rgba(255, 255, 255, .14);
  transform: translateY(1px);
}

html[data-theme="light"] .btn.primary {
  box-shadow: 8px 8px 22px rgba(76, 60, 220, .25), -4px -4px 12px rgba(255, 255, 255, .7), inset 1px 1px 0 rgba(255, 255, 255, .6);
}

.btn.secondary {
  background: linear-gradient(155deg, #181e33, #10152600);
  background-color: #141930;
  color: #e6ecff;
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .55), -5px -5px 12px rgba(120, 130, 180, .055), inset 1px 1px 0 rgba(255, 255, 255, .04);
}

html[data-theme="light"] .btn.secondary {
  background: rgba(255, 255, 255, .8);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .06), -5px -5px 12px rgba(255, 255, 255, .7), inset 1px 1px 0 rgba(255, 255, 255, .8);
}

.btn.secondary:hover {
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .5), -3px -3px 8px rgba(120, 130, 180, .05), inset 2px 2px 6px rgba(0, 0, 0, .35);
}

html[data-theme="light"] .btn.secondary:hover {
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .08), -3px -3px 8px rgba(255, 255, 255, .7), inset 2px 2px 6px rgba(0, 0, 0, .03);
}

.btn.secondary:active {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .6), inset -3px -3px 8px rgba(120, 130, 180, .05);
  transform: translateY(1px);
}

.btn.ghost {
  background: linear-gradient(155deg, #181e33, #10152600);
  background-color: #141930;
  color: #e6ecff;
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .55), -5px -5px 12px rgba(120, 130, 180, .055), inset 1px 1px 0 rgba(255, 255, 255, .04);
}

html[data-theme="light"] .btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.btn.ghost:hover {
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .5), -3px -3px 8px rgba(120, 130, 180, .05), inset 2px 2px 6px rgba(0, 0, 0, .35);
}

html[data-theme="light"] .btn.ghost:hover {
  background: rgba(99, 102, 241, .06);
  box-shadow: none;
}

.btn.ghost:active {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .6), inset -3px -3px 8px rgba(120, 130, 180, .05);
  transform: translateY(1px);
}

.btn.small {
  padding: 7px 12px;
  font-size: 12px;
}

.danger-btn {
  background: rgba(255, 107, 122, .1);
  border-color: rgba(255, 107, 122, .35);
  color: var(--danger);
}

html[data-theme="light"] .danger-btn {
  background: rgba(255, 107, 122, .08);
  border-color: rgba(255, 107, 122, .25);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(155deg, #181e33, #10152600);
  background-color: #141930;
  color: #e6ecff;
  border: 1px solid rgba(255, 255, 255, .05);
  cursor: pointer;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .55), -5px -5px 12px rgba(120, 130, 180, .055), inset 1px 1px 0 rgba(255, 255, 255, .04);
  transition: box-shadow .18s ease, transform .18s ease;
}

html[data-theme="light"] .icon-btn {
  background: rgba(255, 255, 255, .8);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .06), -5px -5px 12px rgba(255, 255, 255, .7), inset 1px 1px 0 rgba(255, 255, 255, .8);
}

.icon-btn:hover {
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .5), -3px -3px 8px rgba(120, 130, 180, .05), inset 2px 2px 6px rgba(0, 0, 0, .35);
}

html[data-theme="light"] .icon-btn:hover {
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .08), -3px -3px 8px rgba(255, 255, 255, .7), inset 2px 2px 6px rgba(0, 0, 0, .03);
}

.icon-btn:active {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .6), inset -3px -3px 8px rgba(120, 130, 180, .05);
  transform: translateY(1px);
}

.text-btn {
  border: 0;
  background: none;
  color: var(--accent-glow);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.text-btn:hover {
  color: var(--accent-2);
}

html[data-theme="light"] .text-btn {
  color: var(--accent);
}

html[data-theme="light"] .text-btn:hover {
  color: var(--accent-2);
}

.mini-btn {
  border: 1px solid rgba(255, 255, 255, .04);
  background: linear-gradient(155deg, #161c2f, #10152500);
  background-color: #131830;
  color: var(--muted);
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 3px 3px 7px rgba(0, 0, 0, .5), -2px -2px 6px rgba(120, 130, 180, .045);
  transition: box-shadow .2s ease, color .2s ease;
}

html[data-theme="light"] .mini-btn {
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  border-color: var(--line);
  box-shadow: 3px 3px 7px rgba(0, 0, 0, .04), -2px -2px 6px rgba(255, 255, 255, .7);
}

.mini-btn:hover {
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .5), inset -2px -2px 6px rgba(120, 130, 180, .05);
  color: #fff;
}

html[data-theme="light"] .mini-btn:hover {
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .06), inset -2px -2px 6px rgba(255, 255, 255, .7);
  color: var(--text);
}

.mini-btn.danger {
  color: var(--danger);
}

.mini-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  background: linear-gradient(155deg, #0d1120, #141a2d);
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: #eef2ff;
  min-height: 44px;
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .55), inset -3px -3px 8px rgba(120, 130, 180, .045);
  transition: border-color .18s, background .18s;
  outline: none;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #f0f2f8;
  color: var(--text);
  border-color: var(--line);
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .04), inset -3px -3px 8px rgba(255, 255, 255, .7);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .55), inset -3px -3px 8px rgba(120, 130, 180, .045), 0 0 0 3px rgba(124, 108, 255, .28);
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .04), inset -3px -3px 8px rgba(255, 255, 255, .7), 0 0 0 3px rgba(124, 108, 255, .2);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: .5;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: var(--muted);
  opacity: .7;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-panel {
  display: grid;
  gap: 14px;
}

.form-panel label {
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  display: grid;
  gap: 7px;
}

html[data-theme="light"] .form-panel label {
  color: var(--muted);
}

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

.check-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check-line input {
  width: auto;
  min-height: auto;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 100px auto;
  gap: 8px;
  margin-top: 12px;
}

.checklist-add {
  grid-template-columns: 1fr auto;
}

.inline-form input,
.inline-form select {
  min-height: 44px;
}

.task-check,
.check-item input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(155deg, #0d1120, #151a2d);
  box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .6), inset -2px -2px 6px rgba(120, 130, 180, .05);
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .04);
  flex-shrink: 0;
}

html[data-theme="light"] .task-check,
html[data-theme="light"] .check-item input[type="checkbox"] {
  background: #f0f2f8;
  box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .04), inset -2px -2px 6px rgba(255, 255, 255, .7);
  border-color: var(--line);
}

.task-check:checked,
.check-item input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #7c6cff, #4ab8ff);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .5), inset 1px 1px 0 rgba(255, 255, 255, .3);
}

html[data-theme="light"] .task-check:checked,
html[data-theme="light"] .check-item input[type="checkbox"]:checked {
  box-shadow: 2px 2px 6px rgba(79, 70, 229, .3), inset 1px 1px 0 rgba(255, 255, 255, .5);
}

.task-check:checked::after,
.check-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
section.view {
  max-width: 1920px;
  margin: 20px auto 0;
}
select{
  color: var(--text-2);
}
.view {
  display: none;
}

.view.active {
  display: block;
}

.section-intro {
  padding: 12px 0 22px;
  max-width: 900px;
}

.section-intro p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  max-width: 640px;
}

.section-intro h2 {
  font-family: "Space Grotesk", "Proxima Nova", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
  font-size: 26px;
  margin: 4px 0;
  background: linear-gradient(120deg, #ffffff 0%, #c7cdff 55%, #7c6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

html[data-theme="light"] .section-intro h2 {
  background: linear-gradient(120deg, #12142b 0%, #4f46e5 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.analytics-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  max-width: none;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .55), -10px -10px 28px rgba(120, 130, 180, .045), inset 1px 1px 0 rgba(255, 255, 255, .035), inset -1px -1px 0 rgba(0, 0, 0, .35);
  transition: border-color .2s, transform .2s;
}

html[data-theme="light"] .panel {
  background: rgba(255, 255, 255, .85);
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .06), -10px -10px 28px rgba(255, 255, 255, .5), inset 1px 1px 0 rgba(255, 255, 255, .8), inset -1px -1px 0 rgba(0, 0, 0, .02);
  border-color: var(--line);
}

.panel:hover {
  border-color: var(--line-strong);
}

html[data-theme="light"] .panel:hover {
  border-color: var(--line-strong);
}

.panel h2 {
  font-family: "Space Grotesk", "Proxima Nova", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
  font-size: 20px;
  margin: 4px 0;
  background: linear-gradient(120deg, #ffffff 0%, #c7cdff 55%, #7c6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

html[data-theme="light"] .panel h2 {
  background: linear-gradient(120deg, #12142b 0%, #4f46e5 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.readiness-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: radial-gradient(400px 260px at 8% 0%, rgba(99, 102, 241, .28), transparent 60%), radial-gradient(500px 300px at 100% 100%, rgba(167, 139, 250, .16), transparent 60%), var(--panel-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-elegant);
}

html[data-theme="light"] .readiness-card {
  background: radial-gradient(400px 260px at 8% 0%, rgba(99, 102, 241, .08), transparent 60%), radial-gradient(500px 300px at 100% 100%, rgba(167, 139, 250, .06), transparent 60%), rgba(255, 255, 255, .85);
}

.readiness-score {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  font: 600 32px/1 "Space Grotesk", sans-serif;
  background: conic-gradient(from -90deg, var(--accent) 0%, var(--accent-glow) 30%, transparent 30%);
  box-shadow: 12px 12px 28px rgba(0, 0, 0, .6), -8px -8px 22px rgba(120, 130, 180, .06), inset 2px 2px 6px rgba(255, 255, 255, .06);
}

html[data-theme="light"] .readiness-score {
  box-shadow: 12px 12px 28px rgba(0, 0, 0, .08), -8px -8px 22px rgba(255, 255, 255, .7), inset 2px 2px 6px rgba(255, 255, 255, .8);
}

.readiness-score:before {
  content: "";
  position: absolute;
  inset: 8px;
  background: radial-gradient(circle at 30% 25%, #1a2038, #0e1222 70%);
  border-radius: 50%;
  box-shadow: inset 6px 6px 16px rgba(0, 0, 0, .7), inset -6px -6px 16px rgba(120, 130, 180, .05);
}

html[data-theme="light"] .readiness-score:before {
  background: radial-gradient(circle at 30% 25%, #f0f2f8, #e8ebf3 70%);
  box-shadow: inset 6px 6px 16px rgba(0, 0, 0, .04), inset -6px -6px 16px rgba(255, 255, 255, .7);
}

.readiness-score span,
.readiness-score small {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .readiness-score span {
  color: var(--text);
}

html[data-theme="light"] .readiness-score small {
  color: var(--muted);
}

.readiness-score small {
  font-size: 12px;
  color: var(--muted);
}

.readiness-copy {
  min-width: 0;
}

.readiness-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
  font-size: 24px;
  margin: 8px 0 6px;
  color: var(--text);
}

.readiness-copy p {
  color: var(--muted);
  margin: 0;
  max-width: 700px;
}

html[data-theme="light"] .readiness-copy h2 {
  color: var(--text);
}

html[data-theme="light"] .readiness-copy p {
  color: var(--muted);
}

.readiness-actions {
  display: flex;
  gap: 10px;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .45), inset -2px -2px 5px rgba(120, 130, 180, .05), 0 1px 0 rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .035);
}

html[data-theme="light"] .status-pill {
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .04), inset -2px -2px 5px rgba(255, 255, 255, .7), 0 1px 0 rgba(255, 255, 255, .8);
}

.status-pill.warning {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}

.status-pill.good {
  background: color-mix(in srgb, var(--good) 14%, transparent);
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 30%, transparent);
}

.status-pill.danger {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

html[data-theme="light"] .status-pill.warning {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: #b45309;
  border-color: color-mix(in srgb, var(--warn) 20%, transparent);
}

html[data-theme="light"] .status-pill.good {
  background: color-mix(in srgb, var(--good) 12%, transparent);
  color: #065f46;
  border-color: color-mix(in srgb, var(--good) 20%, transparent);
}

html[data-theme="light"] .status-pill.danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: #991b1b;
  border-color: color-mix(in srgb, var(--danger) 20%, transparent);
}

.factor-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.factor-list span {
  background: rgba(129, 140, 248, .06);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 11px;
  font-size: 11.5px;
  color: var(--muted);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .45), inset -2px -2px 5px rgba(120, 130, 180, .05), 0 1px 0 rgba(255, 255, 255, .02);
}

html[data-theme="light"] .factor-list span {
  background: rgba(255, 255, 255, .6);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .03), inset -2px -2px 5px rgba(255, 255, 255, .7), 0 1px 0 rgba(255, 255, 255, .8);
  color: var(--text);
}

.factor-list b {
  color: var(--accent-glow);
  margin-right: 4px;
  font-weight: 700;
}

html[data-theme="light"] .factor-list b {
  color: var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .55), -10px -10px 28px rgba(120, 130, 180, .045), inset 1px 1px 0 rgba(255, 255, 255, .035), inset -1px -1px 0 rgba(0, 0, 0, .35);
}

html[data-theme="light"] .metric-card {
  background: rgba(255, 255, 255, .85);
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .06), -10px -10px 28px rgba(255, 255, 255, .5), inset 1px 1px 0 rgba(255, 255, 255, .8), inset -1px -1px 0 rgba(0, 0, 0, .02);
  border-color: var(--line);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(200px 120px at 100% 0%, rgba(129, 140, 248, .10), transparent 60%);
}

html[data-theme="light"] .metric-card::before {
  background: radial-gradient(200px 120px at 100% 0%, rgba(99, 102, 241, .04), transparent 60%);
}

.metric-card span {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.metric-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
  font-size: 22px;
  margin: 10px 0 6px;
  color: var(--text);
}

.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

html[data-theme="light"] .metric-card span {
  color: var(--muted);
}

html[data-theme="light"] .metric-card strong {
  color: var(--text);
}

html[data-theme="light"] .metric-card small {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 16px;
}

.stack {
  display: grid;
  gap: 18px;
}

.timeline {
  display: grid;
  gap: 2px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 64px 4px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

html[data-theme="light"] .timeline-item {
  border-bottom-color: var(--line);
}

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

.timeline-time {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.timeline-dot {
  width: 4px;
  height: 44px;
  border-radius: 99px;
  box-shadow: 0 0 12px currentColor;
  filter: saturate(1.1);
}

.timeline-dot.family {
  background: #fb7185;
  color: #fb7185;
}

.timeline-dot.sleep {
  background: #38bdf8;
  color: #38bdf8;
}

.timeline-dot.commute {
  background: #fbbf24;
  color: #fbbf24;
}

.timeline-dot.health {
  background: #34d399;
  color: #34d399;
}

.timeline-dot.personal,
.timeline-dot.work {
  background: var(--accent-2);
  color: var(--accent-2);
}

html[data-theme="light"] .timeline-dot.personal,
html[data-theme="light"] .timeline-dot.work {
  background: var(--accent);
  color: var(--accent);
}

.timeline-content strong {
  display: block;
  font-size: 14px;
  letter-spacing: -.005em;
}

.timeline-content small {
  color: var(--muted);
  font-size: 12px;
}

.energy-badge {
  font-size: 10.5px;
  letter-spacing: .04em;
  background: rgba(129, 140, 248, .08);
  border: 1px solid var(--line);
  color: var(--accent-glow);
  padding: 5px 9px;
  border-radius: 8px;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .45), inset -2px -2px 5px rgba(120, 130, 180, .05), 0 1px 0 rgba(255, 255, 255, .02);
}

html[data-theme="light"] .energy-badge {
  background: rgba(99, 102, 241, .06);
  color: var(--accent);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .03), inset -2px -2px 5px rgba(255, 255, 255, .7), 0 1px 0 rgba(255, 255, 255, .8);
}

.item-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

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

.task-item {
  display: flex;
  gap: 11px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .45), -4px -4px 12px rgba(120, 130, 180, .04);
}

html[data-theme="light"] .task-item {
  background: rgba(255, 255, 255, .7);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .04), -4px -4px 12px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.task-item.done {
  opacity: .55;
}

.task-item.done .task-name {
  text-decoration: line-through;
}

.task-name {
  flex: 1;
  color: var(--text);
}

html[data-theme="light"] .task-name {
  color: var(--text);
}

.task-energy {
  font-size: 11px;
  color: var(--muted);
}

.warning-list {
  display: grid;
  gap: 10px;
}

.warning-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .45), -4px -4px 12px rgba(120, 130, 180, .04);
}

html[data-theme="light"] .warning-item {
  background: rgba(255, 255, 255, .7);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .04), -4px -4px 12px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.warning-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(251, 191, 36, .10);
  border: 1px solid rgba(251, 191, 36, .28);
  border-radius: 10px;
  color: var(--warn);
  font-size: 15px;
}

html[data-theme="light"] .warning-icon {
  background: rgba(251, 191, 36, .08);
  border-color: rgba(251, 191, 36, .2);
}

.warning-item strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}

.warning-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.entry-list {
  display: grid;
  gap: 10px;
}

.entry-item {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .45), -4px -4px 12px rgba(120, 130, 180, .04);
}

html[data-theme="light"] .entry-item {
  background: rgba(255, 255, 255, .7);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .04), -4px -4px 12px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.entry-main strong {
  display: block;
  color: var(--text);
}

.entry-main small {
  color: var(--muted);
}

.entry-values {
  text-align: right;
}

.entry-values strong {
  display: block;
  color: var(--text);
}

.entry-actions {
  display: flex;
  gap: 6px;
}

html[data-theme="light"] .entry-main strong {
  color: var(--text);
}

html[data-theme="light"] .entry-main small {
  color: var(--muted);
}

html[data-theme="light"] .entry-values strong {
  color: var(--text);
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  gap: 11px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .45), -4px -4px 12px rgba(120, 130, 180, .04);
}

html[data-theme="light"] .check-item {
  background: rgba(255, 255, 255, .7);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .04), -4px -4px 12px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.check-item.done>span {
  text-decoration: line-through;
  color: var(--muted);
}

.check-item span {
  flex: 1;
  color: var(--text);
}

html[data-theme="light"] .check-item span {
  color: var(--text);
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .45), -4px -4px 12px rgba(120, 130, 180, .04);
}

html[data-theme="light"] .insight-item {
  background: rgba(255, 255, 255, .7);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .04), -4px -4px 12px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.insight-item span {
  color: var(--accent-2);
  font-weight: 900;
}

.insight-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

html[data-theme="light"] .insight-item span {
  color: var(--accent);
}

html[data-theme="light"] .insight-item p {
  color: var(--text-secondary);
}

.delete-btn {
  border: 0;
  background: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.delete-btn:hover {
  color: #ff4757;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

html[data-theme="light"] .empty-state {
  border-color: var(--line-strong);
  color: var(--muted);
}

.live-context-panel {
  margin: 18px 0;
}

.context-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr 1fr;
  gap: 14px;
}

.local-clock-card,
.weather-card,
.next-reminder-card,
.world-clock-grid>* {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color .2s;
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .55), -10px -10px 28px rgba(120, 130, 180, .045), inset 1px 1px 0 rgba(255, 255, 255, .035), inset -1px -1px 0 rgba(0, 0, 0, .35);
}

html[data-theme="light"] .local-clock-card,
html[data-theme="light"] .weather-card,
html[data-theme="light"] .next-reminder-card,
html[data-theme="light"] .world-clock-grid>* {
  background: rgba(255, 255, 255, .8);
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .06), -10px -10px 28px rgba(255, 255, 255, .5), inset 1px 1px 0 rgba(255, 255, 255, .8), inset -1px -1px 0 rgba(0, 0, 0, .02);
  border-color: var(--line);
}

.local-clock-card:hover,
.weather-card:hover,
.next-reminder-card:hover {
  border-color: var(--line-strong);
}

.context-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.local-clock-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -.02em;
  margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.local-clock-card small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.world-clock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.world-clock-grid[hidden] {
  display: none !important;
}

.world-clock {
  padding: 12px 14px;
  font-size: 12px;
}

.world-clock strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 20px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -.01em;
}

.world-clock small {
  display: block;
  color: var(--muted);
}

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

.weather-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 28px;
  margin: 8px 0 4px;
  color: var(--text);
}

.weather-card small {
  display: block;
  color: var(--muted);
}

.weather-details {
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  line-height: 1.7;
}

.next-reminder-card strong {
  display: block;
  font-size: 15px;
  margin: 8px 0 4px;
  color: var(--text);
}

.next-reminder-card small {
  display: block;
  color: var(--muted);
}

.next-reminder-card .text-btn {
  margin-top: 12px;
  padding: 0;
}

.planner-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.capacity-panel {
  text-align: center;
}

.capacity-ring {
  width: 180px;
  height: 180px;
  margin: 18px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(from 180deg, rgba(124, 108, 255, .6), rgba(74, 184, 255, .4), rgba(124, 108, 255, .6));
  box-shadow: 12px 12px 28px rgba(0, 0, 0, .6), -8px -8px 22px rgba(120, 130, 180, .06), inset 2px 2px 6px rgba(255, 255, 255, .06);
}

html[data-theme="light"] .capacity-ring {
  box-shadow: 12px 12px 28px rgba(0, 0, 0, .08), -8px -8px 22px rgba(255, 255, 255, .7), inset 2px 2px 6px rgba(255, 255, 255, .8);
}

.capacity-ring:before {
  content: "";
  position: absolute;
  inset: 14px;
  background: radial-gradient(circle at 30% 25%, #1a2038, #0e1222 70%);
  border-radius: 50%;
  box-shadow: inset 6px 6px 16px rgba(0, 0, 0, .7), inset -6px -6px 16px rgba(120, 130, 180, .05);
}

html[data-theme="light"] .capacity-ring:before {
  background: radial-gradient(circle at 30% 25%, #f0f2f8, #e8ebf3 70%);
  box-shadow: inset 6px 6px 16px rgba(0, 0, 0, .04), inset -6px -6px 16px rgba(255, 255, 255, .7);
}

.capacity-ring span {
  position: relative;
  font: 800 36px "Space Grotesk", sans-serif;
  color: var(--text);
}

html[data-theme="light"] .capacity-ring span {
  color: var(--text);
}

.capacity-panel p {
  color: var(--muted);
}

.breakdown {
  display: grid;
  gap: 8px;
  text-align: left;
  margin-top: 20px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}

html[data-theme="light"] .breakdown-row {
  border-bottom-color: var(--line);
  color: var(--text);
}

.recovery-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.recovery-grid>.panel {
  min-height: 310px;
}

.recovery-hero {
  text-align: center;
  display: grid;
  place-items: center;
}

.big-score {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 88px;
  letter-spacing: -.04em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.recovery-hero p {
  color: var(--muted);
  max-width: 430px;
}

.sleep-history {
  display: grid;
  gap: 10px;
  min-height: 70px;
}

.sleep-entry {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .45), -4px -4px 12px rgba(120, 130, 180, .04);
}

html[data-theme="light"] .sleep-entry {
  background: rgba(255, 255, 255, .7);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, .04), -4px -4px 12px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.sleep-entry strong {
  display: block;
  color: var(--text);
}

.sleep-entry small {
  display: block;
  color: var(--muted);
}

html[data-theme="light"] .sleep-entry strong {
  color: var(--text);
}

html[data-theme="light"] .sleep-entry small {
  color: var(--muted);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 260px;
}

.analytics-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-controls .compact-select {
  min-width: 190px;
}

.compact-select {
  width: auto;
  min-width: 180px;
}

.analytics-lower {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 0;
}

.matrix-wrap {
  overflow: auto;
}

.matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  font-size: 12px;
}

.matrix th {
  color: var(--muted);
  font-weight: 700;
}

.matrix td {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(129, 140, 248, .04);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.matrix td.moderate {
  background: color-mix(in srgb, var(--accent) 22%, rgba(129, 140, 248, .04));
}

.matrix td.strong {
  background: color-mix(in srgb, var(--accent) 45%, rgba(129, 140, 248, .04));
  color: #fff;
}

html[data-theme="light"] .matrix td {
  background: rgba(99, 102, 241, .04);
  color: var(--text);
}

html[data-theme="light"] .matrix td.moderate {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, .8));
  color: var(--text);
}

html[data-theme="light"] .matrix td.strong {
  background: color-mix(in srgb, var(--accent) 35%, rgba(255, 255, 255, .9));
  color: var(--text);
}

.fine-print {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.data-panel {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.data-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

html[data-theme="light"] .data-panel p {
  color: var(--muted);
}

.file-label {
  cursor: pointer;
}

.file-label input {
  display: none;
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 18px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-nav strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  min-width: 140px;
  text-align: center;
  color: var(--text);
}

html[data-theme="light"] .calendar-nav strong {
  color: var(--text);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 4px 10px;
}

.calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  min-height: 104px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  position: relative;
  box-shadow: 5px 5px 12px rgba(0, 0, 0, .45), -3px -3px 10px rgba(120, 130, 180, .035);
  transition: box-shadow .2s ease;
}

html[data-theme="light"] .calendar-day {
  background: rgba(255, 255, 255, .7);
  box-shadow: 5px 5px 12px rgba(0, 0, 0, .04), -3px -3px 10px rgba(255, 255, 255, .5);
  border-color: var(--line);
}

.calendar-day:hover {
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, .5), inset -2px -2px 6px rgba(120, 130, 180, .05);
}

html[data-theme="light"] .calendar-day:hover {
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, .04), inset -2px -2px 6px rgba(255, 255, 255, .7);
}

.calendar-day.outside {
  opacity: .35;
}

.calendar-day.today {
  outline: 0;
  box-shadow: 5px 5px 12px rgba(0, 0, 0, .45), -3px -3px 10px rgba(120, 130, 180, .035), inset 0 0 0 2px var(--accent);
}

html[data-theme="light"] .calendar-day.today {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, .04), -3px -3px 10px rgba(255, 255, 255, .5), inset 0 0 0 2px var(--accent);
}

.calendar-day.selected {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}

html[data-theme="light"] .calendar-day.selected {
  background: var(--gradient-primary);
  color: #fff;
}

.calendar-date {
  font-size: 12px;
  font-weight: 800;
}

.calendar-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.calendar-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--accent);
}

.calendar-dot.medication {
  background: #48d597;
}

.calendar-dot.family {
  background: #fb7185;
}

.calendar-dot.work {
  background: #38bdf8;
}

.calendar-dot.meal {
  background: #fbbf24;
}

.calendar-event-count {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 8px;
}

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

.permission-status {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

html[data-theme="light"] .permission-status {
  background: rgba(255, 255, 255, .6);
  border-color: var(--line);
  color: var(--muted);
}

.reminder-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-2);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: linear-gradient(155deg, #1a2038, #10152a);
  color: #eaf0ff;
  padding: 12px 20px;
  border-radius: 16px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 60;
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 12px 12px 28px rgba(0, 0, 0, .55), -6px -6px 18px rgba(120, 130, 180, .06), inset 1px 1px 0 rgba(255, 255, 255, .05);
  max-width: 90vw;
}

html[data-theme="light"] .toast {
  background: rgba(255, 255, 255, .95);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 12px 12px 28px rgba(0, 0, 0, .08), -6px -6px 18px rgba(255, 255, 255, .7), inset 1px 1px 0 rgba(255, 255, 255, .9);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  color: var(--text);
  width: min(560px, calc(100% - 28px));
  padding: 22px;
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .55), -10px -10px 28px rgba(120, 130, 180, .045), inset 1px 1px 0 rgba(255, 255, 255, .035), inset -1px -1px 0 rgba(0, 0, 0, .35);
}

html[data-theme="light"] dialog {
  background: rgba(255, 255, 255, .95);
  box-shadow: 14px 14px 34px rgba(0, 0, 0, .08), -10px -10px 28px rgba(255, 255, 255, .5), inset 1px 1px 0 rgba(255, 255, 255, .8), inset -1px -1px 0 rgba(0, 0, 0, .02);
  border-color: var(--line);
}

dialog::backdrop {
  backdrop-filter: blur(14px);
  background: rgba(4, 6, 12, .72);
}

html[data-theme="light"] dialog::backdrop {
  background: rgba(200, 210, 230, .5);
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-form label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  display: grid;
  gap: 7px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 5px 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
}

.form-error {
  min-height: 16px;
  color: var(--danger);
  font-size: 12px;
  margin: -6px 0;
}

.guide-dialog {
  width: min(620px, calc(100% - 28px));
}

.guide-progress {
  margin: 20px 0;
}

.guide-progress span {
  font-size: 12px;
  color: var(--muted);
}

.guide-progress>div {
  height: 7px;
  background: var(--surface-2);
  border-radius: 999px;
  margin-top: 8px;
  overflow: hidden;
}

html[data-theme="light"] .guide-progress>div {
  background: var(--line);
}

.guide-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: .25s;
}

.guide-content {
  text-align: center;
  padding: 24px 10px;
}

.guide-icon {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(124, 108, 255, .16);
  color: var(--accent-2);
  font: 800 28px "Space Grotesk", sans-serif;
  margin: auto;
}

html[data-theme="light"] .guide-icon {
  background: rgba(124, 108, 255, .1);
  color: var(--accent);
}

.guide-content h3 {
  font: 700 26px "Space Grotesk", sans-serif;
  margin: 18px 0 10px;
  color: var(--text);
}

.guide-content p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin: auto;
}

html[data-theme="light"] .guide-content h3 {
  color: var(--text);
}

html[data-theme="light"] .guide-content p {
  color: var(--text-secondary);
}

.guide-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .btn,
  .icon-btn,
  .nav-item,
  .mini-btn {
    transition: none !important;
  }
}

[data-reduce-motion="true"] * {
  animation-duration: .001ms !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

.no-scroll {
  overflow: hidden;
}

.mobile-only {
  display: none;
}

@media (max-width: 1200px) {
  .context-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .world-clock-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }

  .dashboard-grid,
  .planner-grid,
  .recovery-grid,
  .chart-grid,
  .analytics-lower {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 0 22px 40px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-110%);
    transition: transform .25s ease;
    width: 280px;
    height: 100vh;
    box-shadow: var(--shadow-elegant);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-grid;
    place-items: center;
  }

  .readiness-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    padding: 22px;
  }

  .readiness-score {
    margin: auto;
  }

  .readiness-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .readiness-actions .btn {
    width: 100%;
  }

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

  .planner-grid,
  .recovery-grid,
  .analytics-lower {
    grid-template-columns: 1fr !important;
  }

  .main {
    padding: 0 18px 40px;
  }

  .topbar {
    gap: 10px;
    padding: 18px 0 16px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .topbar-actions .btn {
    display: none;
  }

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

  .calendar-layout {
    grid-template-columns: 1fr;
  }

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

  .analytics-intro {
    display: grid;
    align-items: stretch;
  }

  .analytics-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .analytics-controls .compact-select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 52px 5px 1fr;
  }

  .timeline-item .item-actions {
    grid-column: 3;
  }

  .timeline-item .energy-badge {
    display: none;
  }

  .check-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .check-item .item-actions {
    width: 100%;
    padding-left: 31px;
  }

  .data-panel {
    display: grid;
    align-items: stretch;
  }

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

  .inline-form {
    grid-template-columns: 1fr;
  }

  .note-actions .btn {
    flex: 1;
  }

  .panel {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .sidebar-backdrop {
    display: none;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  body {
    background-attachment: scroll !important;
  }
}

@media (max-width: 640px) {
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .readiness-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .readiness-score {
    margin: 0 auto;
  }

  .chart-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .icon-btn:first-child {
    display: none;
  }

  .world-clock-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 68px;
    border-radius: 10px;
    padding: 6px;
  }

  .calendar-date {
    font-size: 11px;
  }

  .calendar-dots {
    margin-top: 4px;
    gap: 3px;
  }

  .calendar-dot {
    width: 5px;
    height: 5px;
  }

  .calendar-event-count {
    display: none;
  }

  .analytics-controls {
    grid-template-columns: 1fr;
  }

  .analytics-controls .compact-select {
    grid-column: auto;
  }

  .panel {
    padding: 16px;
  }

  .button-row {
    align-items: stretch;
  }

  .data-panel .button-row {
    display: grid;
  }

  .toast {
    left: 14px;
    right: 14px;
    text-align: center;
  }

  .factor-list {
    justify-content: center;
  }

  .readiness-card {
    text-align: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .view.active {
    animation: viewFade .32s cubic-bezier(.2, .7, .2, 1);
  }

  @keyframes viewFade {
    from {
      opacity: 0;
      transform: translateY(6px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  .panel,
  .metric-card {
    will-change: transform;
  }
}