:root {
  --brand-ink: #182238;
  --brand-slate: #4d5b71;
  --brand-blue: #004ed2;
  --brand-blue-hover: #0845b0;
  --brand-surface: #f4f7fc;
  --ink: var(--brand-ink);
  --ink-2: var(--brand-slate);
  --blue: var(--brand-blue);
  --blue-dark: var(--brand-blue-hover);
  --blue-ink: var(--brand-blue);
}

body {
  background: radial-gradient(ellipse 70% 340px at 76% 0%, #edf4ff, transparent),
    linear-gradient(180deg, #fff 0%, var(--brand-surface) 620px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.brand-symbol {
  flex: none;
  display: block;
  width: 40px;
  height: 40px;
}

.wordmark {
  color: var(--brand-ink);
  font-size: 22px;
  font-weight: 730;
}

.wordmark-caption {
  color: var(--brand-slate);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-blue-hover);
}

.intro-copy,
.intro-note {
  color: var(--brand-slate);
}

@media (max-width: 480px) {
  .brand-lockup { gap: 8px; }
  .brand-symbol { width: 34px; height: 34px; }
  .wordmark { font-size: 19px; }
  .wordmark-caption { font-size: 11px; }
}

@media (max-width: 350px) {
  .brand-symbol { width: 30px; height: 30px; }
  .wordmark { font-size: 18px; }
}

.habit-card[hidden], .profile-dialog [hidden] { display: none !important; }

.habit-card {
  margin: 14px 0 22px;
  background: #fff;
}

.habit-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.habit-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #e8f2ff;
  color: var(--brand-blue);
  font-size: 24px;
  font-weight: 750;
}

.habit-heading h2 { font-size: 16px; margin: 0; letter-spacing: 0; }
.habit-count { font-size: 28px; font-weight: 750; margin: 0; }
.habit-card p { margin-bottom: 4px; }
.habit-card p:empty { display: none; }

.profile-dialog { width: min(470px, calc(100% - 28px)); }
.profile-dialog h2 { margin: 6px 0 20px; }
.profile-dialog legend { font-weight: 650; margin-bottom: 10px; }
.profile-dialog label:not(.mode-option) { display: block; margin: 11px 0 5px; font-size: 14px; }
.profile-dialog .tiny { margin-top: 9px; }
.profile-actions { display: grid; gap: 6px; margin-top: 20px; }
.profile-dialog .mode-option input { min-height: 0; }

@keyframes habit-arrive {
  0% { transform: scale(.96); }
  55% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.habit-result {
  display: table;
  margin: 0 auto 18px;
  padding: 9px 15px;
  border-radius: 14px;
  background: #e8f2ff;
  color: var(--brand-blue);
  text-align: center;
  font-weight: 650;
}
.habit-result[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .habit-result:not([hidden]) { animation: habit-arrive 350ms ease-out; }
}
