/* Coach web UI — mobile-first, ExpertWatch-ish dark dashboard */

:root {
  --bg: #0a0e14;
  --bg-elevated: #121820;
  --bg-card: #161c26;
  --border: #2a3344;
  --text: #e8ecf1;
  --text-muted: #8b95a8;
  --accent: #3d9ae8;
  --accent-dim: #2a6fa8;
  --run: #4ade80;
  --well: #fbbf24;
  --strength: #a78bfa;
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --touch: 48px;
  --nav-height: 56px;
  --header-height: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(61, 154, 232, 0.08), transparent),
    linear-gradient(180deg, var(--bg) 0%, #080b10 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: rgba(10, 14, 20, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: var(--header-height);
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 50%;
}

.auth-signin-button {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  min-height: 44px;
}

.auth-prompt {
  margin-top: 20px;
  border-color: rgba(245, 166, 35, 0.35);
}

.main-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-height) + var(--safe-bottom) + 24px);
}

.page-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-lead {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.muted {
  color: var(--text-muted);
}

.meta-line {
  margin: 0;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--mono);
}

.date-display {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.today-header {
  margin-bottom: 20px;
}

/* Cards */
.card,
.prescription-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.card-link:active,
.card-link:hover {
  border-color: var(--accent-dim);
  background: var(--bg-elevated);
}

.card-label {
  display: block;
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 4px;
}

.card-desc {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.card-heading {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sign-in-card {
  margin-top: 8px;
}

.notes-card p {
  margin: 0;
  font-size: 0.9375rem;
}

.alert-card {
  border-color: var(--accent-dim);
  background: rgba(61, 154, 232, 0.06);
}

.today-prompt {
  margin-bottom: 20px;
}

/* WELL page */
.well-page .page-lead strong {
  color: var(--well);
  font-weight: 600;
}

.well-explainer {
  margin-bottom: 12px;
}

.well-explainer-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  list-style: none;
}

.well-explainer-summary::-webkit-details-marker {
  display: none;
}

.well-explainer-summary::before {
  content: "▸ ";
  color: var(--well);
}

.well-explainer[open] .well-explainer-summary::before {
  content: "▾ ";
}

.well-explainer-body {
  margin-top: 12px;
}

.well-explainer-body p {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.run-inline {
  font-weight: 700;
  color: var(--run);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.well-inline {
  font-weight: 700;
  color: var(--well);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.pillar-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pillar-list li {
  font-size: 0.9375rem;
}

.well-logged-card {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

.well-logged-card p {
  margin: 0;
}

.well-logged-meta {
  margin-top: 8px !important;
  font-family: var(--mono);
  font-size: 0.8125rem !important;
}

.well-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
}

.well-card-cta {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--well);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  flex: 1;
  min-width: 88px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chip:active {
  transform: scale(0.98);
}

.chip-done {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--success);
}

.chip-partial {
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--well);
}

.chip-skip {
  border-color: rgba(139, 149, 168, 0.4);
  color: var(--text-muted);
}

.well-textarea {
  min-height: 140px !important;
  font-size: 1.0625rem !important;
  line-height: 1.45;
}

.field-date-toggle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field-date-toggle summary {
  cursor: pointer;
  padding: 8px 0;
}

.field-date-toggle[open] summary {
  margin-bottom: 8px;
}

.well-submit-bar {
  position: sticky;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  z-index: 50;
  padding-top: 4px;
}

.well-form {
  padding-bottom: 8px;
}

.well-today-card {
  margin-bottom: 12px;
}

.well-prescription {
  margin-bottom: 8px;
}

.well-plain {
  margin: 0 0 14px;
  padding: 12px 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: var(--radius-sm);
}

.well-plain-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--well);
  margin-bottom: 6px;
}

.strength-plain {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: var(--radius-sm);
}

.strength-plain-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--strength);
  margin-bottom: 6px;
}

.week-day-plain {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-style: italic;
}

.well-inline-form {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.well-logged-inline {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.well-logged-inline p {
  margin: 0;
  font-size: 0.9375rem;
}

.well-logged-label {
  font-size: 0.75rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success) !important;
  margin-bottom: 6px !important;
}

.week-snapshot-card {
  margin-top: 4px;
}

.week-snapshot {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.week-day {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.week-day-today {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.06);
}

.week-day-past {
  opacity: 0.55;
}

.week-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.week-day-label {
  font-weight: 700;
  font-size: 0.9375rem;
  min-width: 2.5rem;
}

.week-day-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.week-day-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--well);
}

.week-day-run,
.week-day-strength,
.week-day-well {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.week-day-well {
  margin-bottom: 0;
}

.week-line-tag.strength-tag {
  background: rgba(167, 139, 250, 0.15);
  color: var(--strength);
}

.week-line-tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.week-line-tag.run-tag {
  background: rgba(74, 222, 128, 0.15);
  color: var(--run);
}

.week-line-tag.well-tag {
  background: rgba(251, 191, 36, 0.15);
  color: var(--well);
}

.install-hint {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  text-align: center;
}

.install-hint strong {
  color: var(--text);
  font-weight: 600;
}

.today-prompt p {
  margin: 8px 0 0;
}

/* Prescription blocks */
.prescription-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.prescription-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.run-tag {
  background: rgba(74, 222, 128, 0.15);
  color: var(--run);
}

.well-tag {
  background: rgba(251, 191, 36, 0.15);
  color: var(--well);
}

.strength-tag {
  background: rgba(167, 139, 250, 0.15);
  color: var(--strength);
}

.prescription-body {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.workout-actual {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--run);
}

.prescription-plan {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.plan-label {
  font-weight: 600;
  color: var(--text-muted);
}

.run-card {
  border-left: 3px solid var(--run);
}

.well-card {
  border-left: 3px solid var(--well);
}

.strength-card {
  border-left: 3px solid var(--strength);
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.status-complete,
.status-auto {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.status-partial {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.status-pending,
.status-manual {
  background: rgba(139, 149, 168, 0.15);
  color: var(--text-muted);
}

.status-skipped {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

.pillar-badge {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--well);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #4aa8f0;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
  margin-top: 12px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 154, 232, 0.2);
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.field-inline {
  min-height: var(--touch);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  cursor: pointer;
  font-size: 1rem;
}

.checkbox-label input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.form-message {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.form-message.success {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.form-message.error {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Health page */
.steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 44px;
  margin-bottom: 24px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
  background: rgba(61, 154, 232, 0.12);
  border-radius: 50%;
}

.step h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.step p {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.step-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.inline-code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  word-break: break-all;
}

.code-block {
  margin: 0;
  padding: 14px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--run);
}

.field-ref {
  margin: 0;
}

.field-ref dt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-top: 10px;
}

.field-ref dt:first-child {
  margin-top: 0;
}

.field-ref dd {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-meta {
  margin-top: 24px;
  font-size: 0.8125rem;
  text-align: center;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  min-height: var(--nav-height);
  padding-bottom: var(--safe-bottom);
  background: rgba(10, 14, 20, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nav-height);
  padding: 8px 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link:active {
  background: rgba(255, 255, 255, 0.04);
}

/* Google Sign-In container */
.g_id_signin {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.dash-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.dash-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dash-expert {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.dash-good .dash-status-dot { background: #3dd68c; }
.dash-warn .dash-status-dot { background: #f5a623; }
.dash-low .dash-status-dot { background: #ff6b6b; }
.dash-neutral .dash-status-dot { background: var(--accent); }

.dash-title {
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-value {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dash-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.dash-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dash-detail {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Easy / Normal choice cards */
.choice-hint {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.choice-option {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.choice-easy {
  border-color: rgba(245, 166, 35, 0.45);
}

.choice-normal {
  border-color: rgba(61, 214, 140, 0.45);
}

.choice-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.choice-sub {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.choice-body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--text);
}

.week-line-tag.normal-tag {
  background: rgba(61, 214, 140, 0.18);
  color: #3dd68c;
}

/* Fitness projection chart */
.fitness-card {
  margin-top: 16px;
}

.fitness-lead {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.fitness-chart {
  width: 100%;
  overflow-x: auto;
}

.fitness-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.fit-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.fit-axis {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: inherit;
}

.fit-line {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fit-actual {
  stroke: #5b9fd4;
}

.fit-normal {
  stroke: #3dd68c;
  stroke-dasharray: 7 5;
  stroke-width: 2;
}

.fit-easy {
  stroke: #f5a623;
  stroke-dasharray: 2 4;
  stroke-width: 2;
}

.fit-today-line {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.7;
}

.fit-check-line {
  stroke: #ff6b6b;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  opacity: 0.85;
}

.fitness-legend {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.fitness-legend .swatch {
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 2px;
}

.swatch-actual { background: #5b9fd4; }
.swatch-normal {
  background: repeating-linear-gradient(
    90deg,
    #3dd68c 0 6px,
    transparent 6px 10px
  );
}
.swatch-easy {
  background: repeating-linear-gradient(
    90deg,
    #f5a623 0 3px,
    transparent 3px 6px
  );
}

.fitness-note {
  margin: 10px 0 0;
  font-size: 0.75rem;
}

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

.pillar-bars {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pillar-bar-row {
  display: grid;
  grid-template-columns: 32px 1fr 24px;
  align-items: center;
  gap: 8px;
}

.pillar-bar-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pillar-bar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pillar-bar-fill {
  height: 100%;
  border-radius: 3px;
  min-width: 2px;
}

.pillar-INT { background: #6c9eff; }
.pillar-FAM { background: #ff8fab; }
.pillar-WRK { background: #ffd166; }
.pillar-GRD { background: #3dd68c; }

.pillar-bar-count {
  font-size: 0.75rem;
  text-align: right;
  color: var(--text-muted);
}

/* Full plan browse */
.plan-jump {
  margin: 0 0 12px;
  font-size: 0.875rem;
}

.plan-jump a {
  color: var(--accent);
}

.plan-weeks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-week {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.plan-week-current {
  border-color: rgba(108, 158, 255, 0.45);
}

.plan-week-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.plan-week-summary::-webkit-details-marker {
  display: none;
}

.plan-week-title {
  font-weight: 700;
  font-size: 1rem;
}

.plan-week-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.plan-week-badge,
.plan-day-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(108, 158, 255, 0.18);
  color: var(--accent);
}

.plan-week-notes {
  margin: 0;
  padding: 0 16px 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

.plan-days {
  list-style: none;
  margin: 0;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-day {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.plan-day-today {
  background: rgba(108, 158, 255, 0.06);
  margin: 0 -8px;
  padding: 12px 8px 0;
  border-radius: var(--radius);
}

.plan-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.plan-day-label {
  font-weight: 700;
  font-size: 0.875rem;
}

.plan-day-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.plan-line {
  margin: 4px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.plan-line-plain {
  margin: 4px 0 0 36px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.plan-pillars-card {
  margin-top: 20px;
}

.pillar-legend {
  margin: 0;
}

.pillar-legend-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.pillar-legend-row:last-child {
  margin-bottom: 0;
}

.pillar-code {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
}

.pillar-legend dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Wider screens */
@media (min-width: 480px) {
  .main-content {
    padding-left: 24px;
    padding-right: 24px;
  }

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

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

  .sign-in-card {
    grid-column: 1 / -1;
  }
}
