/* TubeHabit design system. One stylesheet for every page; no per-page CSS.
   Tokens first, then base, layout, components, page-specific bits. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --border: #e5e5e5;
  --text: #0f0f0f;
  --text-muted: #606060;
  --brand: #2e8b43;
  --brand-strong: #237a36;
  --brand-weak: #e7f3ea;
  --brand-contrast: #ffffff;
  --success: #2e8b43;
  --success-weak: #e7f3ea;
  --warning: #9a5b06;
  --warning-weak: #fbefd9;
  --danger: #c23434;
  --danger-weak: #fbe9e9;
  --focus: #1a73e8;
  --focus-ring: rgba(26, 115, 232, 0.45);
  --backdrop: rgba(16, 24, 20, 0.5);

  --font: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 20, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 20, 0.12);
  --shadow-focus: 0 0 0 3px var(--focus-ring);

  --max-width: 1280px;
  --topbar-h: 56px;
  --sidebar-w: 240px;
  --sidebar-mini-w: 72px;
  --radius-btn: 18px;
  --header-h: 64px;
  --tabbar-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0f0f0f;
    --surface: #1f1f1f;
    --surface-2: #272727;
    --border: #3a3a3a;
    --text: #f1f1f1;
    --text-muted: #aaaaaa;
    --brand: #49c05f;
    --brand-strong: #7ad48c;
    --brand-weak: rgba(73, 192, 95, 0.14);
    --brand-contrast: #06130a;
    --success: #49c05f;
    --success-weak: rgba(73, 192, 95, 0.14);
    --warning: #e0a94a;
    --warning-weak: rgba(224, 169, 74, 0.16);
    --danger: #e8706e;
    --danger-weak: rgba(232, 112, 110, 0.16);
    --focus: #78aaff;
    --focus-ring: rgba(120, 170, 255, 0.5);
    --backdrop: rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f0f0f;
  --surface: #1f1f1f;
  --surface-2: #272727;
  --border: #3a3a3a;
  --text: #f1f1f1;
  --text-muted: #aaaaaa;
  --brand: #49c05f;
  --brand-strong: #7ad48c;
  --brand-weak: rgba(73, 192, 95, 0.14);
  --brand-contrast: #06130a;
  --success: #49c05f;
  --success-weak: rgba(73, 192, 95, 0.14);
  --warning: #e0a94a;
  --warning-weak: rgba(224, 169, 74, 0.16);
  --danger: #e8706e;
  --danger-weak: rgba(232, 112, 110, 0.16);
  --focus: #78aaff;
  --focus-ring: rgba(120, 170, 255, 0.5);
  --backdrop: rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
}
h2 {
  font-size: var(--text-2xl);
}
h3 {
  font-size: var(--text-xl);
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

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

.icon {
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 100;
  padding: var(--s2) var(--s4);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.skip-link:focus {
  top: var(--s2);
}

.muted {
  color: var(--text-muted);
}
.small {
  font-size: var(--text-sm);
}
.stack > * + * {
  margin-top: var(--s4);
}
.stack-sm > * + * {
  margin-top: var(--s2);
}
.stack-lg > * + * {
  margin-top: var(--s6);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}
.row-between {
  justify-content: space-between;
}
.center {
  text-align: center;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--s4);
}

.container-narrow {
  max-width: 720px;
}



.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--brand-contrast);
}
.brand-mark .icon {
  width: 18px;
  height: 18px;
}




.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--brand-weak);
  color: var(--brand-strong);
  font-weight: 700;
}

.site-main {
  flex: 1;
  padding: var(--s6) 0 var(--s8);
}



.footer-links {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
}


.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
}
.page-head p {
  color: var(--text-muted);
  margin-top: var(--s1);
}

.section:not(:first-child) {
  margin-top: var(--s7);
}

.grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.grid-tight {
  gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-contrast);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-strong);
}
:root[data-theme='dark'] .btn-primary:hover:not(:disabled) {
  background: var(--brand-strong);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-strong);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--brand-weak);
}

.btn-danger {
  background: var(--danger-weak);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  min-height: 36px;
  padding: 0 var(--s3);
  font-size: var(--text-sm);
}
.btn-lg {
  min-height: 52px;
  padding: 0 var(--s5);
  font-size: var(--text-lg);
}
.btn-block {
  width: 100%;
}
.btn-icon {
  padding: 0;
  width: 44px;
}
.btn-icon.btn-sm {
  width: 36px;
}

.htmx-request.btn,
.htmx-request .btn[type='submit'] {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- Forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.field + .field {
  margin-top: var(--s4);
}

.label {
  font-weight: 600;
  font-size: var(--text-sm);
}

.help {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.textarea {
  min-height: 96px;
  resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--shadow-focus);
}
.input::placeholder {
  color: var(--text-muted);
}

.input-code {
  font-size: var(--text-2xl);
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

input[type='checkbox'],
input[type='radio'] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.inline-form {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
.inline-form .input {
  flex: 1 1 240px;
}

.form-grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}
.form-grid .field + .field {
  margin-top: 0;
}

/* Toggle switch: <label class="toggle"><input type="checkbox" role="switch"><span class="toggle-track"></span> Label</label> */
.toggle {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background-color 0.15s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.toggle input:checked + .toggle-track {
  background: var(--brand);
  border-color: var(--brand);
}
.toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
}
.toggle input:focus-visible + .toggle-track {
  box-shadow: var(--shadow-focus);
}
.toggle input:disabled + .toggle-track {
  opacity: 0.5;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body {
  padding: var(--s5);
}
.card-pad {
  padding: var(--s5);
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
}

.thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: var(--surface-2);
}
.thumb-empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.clamp-1,
.clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-1 {
  -webkit-line-clamp: 1;
}
.clamp-2 {
  -webkit-line-clamp: 2;
}

/* Calendar / playlist card */
.habit-card {
  display: flex;
  flex-direction: column;
}
.habit-card .card-body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
  flex: 1;
}
.habit-title {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.35;
  min-height: calc(2 * 1.35em);
}
.habit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.habit-actions {
  display: flex;
  gap: var(--s2);
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--s2);
}

.progress {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.progress-track {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand);
}
.progress-label {
  font-variant-numeric: tabular-nums;
  min-width: 3.5em;
  text-align: right;
}

/* Video row */
.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.video-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-md);
}
.video-row:hover {
  background: var(--surface-2);
}
.video-row .thumb {
  width: 96px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}
.video-row-main {
  flex: 1;
  min-width: 0;
}
.video-row-title {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
a.video-row-title:hover {
  color: var(--brand-strong);
}
.video-row-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.video-row.is-watched .video-row-title {
  color: var(--text-muted);
  text-decoration: line-through;
}
.watch-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.watch-toggle:hover {
  background: var(--brand-weak);
  color: var(--brand-strong);
}
.is-watched .watch-toggle {
  color: var(--brand);
}
.day-group + .day-group {
  margin-top: var(--s5);
}
.day-heading {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 var(--s2) var(--s3);
}

/* ---------- Feedback ---------- */

.empty-state {
  text-align: center;
  padding: var(--s7) var(--s4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}
.empty-state .empty-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--brand-weak);
  color: var(--brand-strong);
}
.empty-state .empty-icon .icon {
  width: 28px;
  height: 28px;
}
.empty-state p {
  color: var(--text-muted);
  max-width: 40ch;
}

.alert {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  border-left: 3px solid currentColor;
}
.alert-success {
  background: var(--success-weak);
  color: var(--text);
  border-left-color: var(--success);
}
.alert-error {
  background: var(--danger-weak);
  color: var(--text);
  border-left-color: var(--danger);
}
.alert-warning {
  background: var(--warning-weak);
  color: var(--text);
  border-left-color: var(--warning);
}
.alert-info {
  background: var(--surface-2);
  color: var(--text);
  border-left-color: var(--border);
}

.toasts {
  position: fixed;
  top: var(--s4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  pointer-events: none;
}
.toast {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: var(--s3) var(--s4);
  font-weight: 500;
  animation: toast-in 0.2s ease-out;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 2px var(--s2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.pill-brand {
  background: var(--brand-weak);
  color: var(--brand-strong);
}
.pill-warning {
  background: var(--warning-weak);
  color: var(--warning);
}

/* ---------- Dialog ---------- */

dialog {
  width: min(560px, calc(100% - 2 * var(--s4)));
  border: 0;
  padding: var(--s6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  background: var(--backdrop);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  margin-top: var(--s5);
  flex-wrap: wrap;
}

/* ---------- Tabs / segmented ---------- */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.segmented a,
.segmented button {
  min-height: 36px;
  padding: 0 var(--s4);
  border: 0;
  border-radius: calc(var(--radius-md) - 3px);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.segmented [aria-selected='true'],
.segmented [aria-current='page'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table th,
.table td {
  padding: var(--s2) var(--s4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text-muted);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table tr:last-child td {
  border-bottom: 0;
}

/* ---------- Pages ---------- */

.hero {
  display: grid;
  gap: var(--s6);
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
  padding: var(--s5) 0 var(--s7);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}
.hero-lead {
  font-size: var(--text-xl);
  color: var(--text-muted);
  max-width: 34ch;
}
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 35%;
}
@media (max-width: 800px) {
  .hero-media img {
    aspect-ratio: 4 / 3;
    object-position: 50% 30%;
  }
}
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
}

.steps {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  counter-reset: step;
}
.step {
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--s3);
  border-radius: var(--radius-pill);
  background: var(--brand-weak);
  color: var(--brand-strong);
  font-weight: 700;
}

.auth-card {
  max-width: 420px;
  margin: var(--s6) auto;
}

.split {
  display: grid;
  gap: var(--s5);
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}
.split-aside {
  position: sticky;
  top: calc(var(--header-h) + var(--s4));
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split-aside {
    position: static;
  }
}

.playlist-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--s5);
  align-items: center;
  margin-bottom: var(--s6);
}
.playlist-hero .thumb {
  border-radius: var(--radius-lg);
}
@media (max-width: 640px) {
  .playlist-hero {
    grid-template-columns: 1fr;
  }
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--s2);
}
.week-day {
  min-height: 120px;
  padding: var(--s2);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
}
.week-day.has-items {
  background: var(--brand-weak);
}
.week-day.is-today {
  outline: 2px solid var(--brand);
}
.week-day-name {
  font-weight: 600;
  margin-bottom: var(--s2);
}
.week-day a {
  display: block;
  color: var(--text);
  margin-top: var(--s1);
}
@media (max-width: 700px) {
  .week-grid {
    grid-template-columns: 1fr;
  }
  .week-day {
    min-height: 0;
  }
}

.pricing-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  max-width: 880px;
  margin: 0 auto;
}
.price-card {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s6);
}
.price-card.is-popular {
  box-shadow:
    0 0 0 2px var(--brand),
    var(--shadow-md);
}
.price {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.price small {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-muted);
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.check-list li {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
}
.check-list .icon {
  color: var(--brand);
  margin-top: 2px;
}

.kpis {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}
.kpi {
  padding: var(--s4) var(--s5);
}
.kpi-value {
  font-size: var(--text-4xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.chart {
  width: 100%;
  height: auto;
  color: var(--brand);
}
.chart .grid-line {
  stroke: var(--border);
}
.chart .axis-label {
  fill: var(--text-muted);
  font-size: 11px;
}
.funnel-bar {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--brand);
}

.prose {
  max-width: 72ch;
}
.prose h2 {
  margin-top: var(--s6);
  margin-bottom: var(--s3);
  font-size: var(--text-xl);
}
.prose p,
.prose ul {
  margin: 0 0 var(--s3);
}
.prose li + li {
  margin-top: var(--s1);
}

.danger-zone {
  border: 1px solid var(--danger-weak);
}

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

.h3 {
  font-size: var(--text-xl);
  font-weight: 600;
}

/* schedule */
.week-day a.week-video {
  display: -webkit-box;
  margin-top: var(--s2);
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}
.week-day a.week-video:hover {
  color: var(--brand-strong);
}
.week-video.is-watched {
  color: var(--text-muted);
}
.week-video .icon {
  display: inline;
  vertical-align: -2px;
  margin-right: 2px;
  color: var(--brand);
}
.week-day-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s1);
}
.schedule-calendar {
  flex: 0 1 260px;
}
.week-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s3);
}
.week-range {
  text-align: center;
}
@media (max-width: 640px) {
  .schedule-calendar {
    flex: 1 1 100%;
  }
  .week-nav-label {
    display: none;
  }
  .week-range {
    font-size: var(--text-sm);
  }
  #schedule-results .card-pad {
    padding: var(--s4) var(--s2);
  }
  #schedule-results .video-row {
    padding: var(--s2);
    gap: var(--s2);
  }
  #schedule-results .video-row .thumb {
    width: 72px;
  }
  #schedule-results .day-heading {
    margin-left: var(--s2);
  }
}

/* explore + playlist */
#explore-results.htmx-request {
  opacity: 0.6;
  transition: opacity 0.2s;
}
.video-index {
  min-width: 2ch;
  text-align: right;
}
@media (max-width: 900px) {
  /* Playlist page: the create form matters more than a long video list. */
  .split > .split-aside {
    order: -1;
  }
}
@media (max-width: 640px) {
  .video-index {
    display: none;
  }
  .video-row .thumb {
    width: 80px;
  }
}

/* settings + pricing */
.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}
.kpis-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kpi-flat {
  box-shadow: none;
  background: var(--surface-2);
}


/* Phones: less card chrome so titles get the width. */
@media (max-width: 480px) {
  .card-pad,
  .card-body {
    padding: var(--s4);
  }
  .video-row {
    padding: var(--s2) 0;
  }
  .video-row .thumb {
    width: 80px;
  }
}

.alert-body {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}


.code-block {
  margin: 0;
  padding: var(--s3);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* FAQ (native <details>, works without JS) */
.faq-section {
  display: grid;
  gap: var(--s5) var(--s7);
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
}
@media (max-width: 800px) {
  .faq-section {
    grid-template-columns: 1fr;
  }
}
.faq details + details {
  border-top: 1px solid var(--border);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 56px;
  padding: var(--s3) var(--s5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--brand-strong);
}
.faq summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}
.faq-chevron {
  display: inline-grid;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.faq details[open] .faq-chevron {
  transform: rotate(90deg);
}
.faq details p {
  padding: 0 var(--s5) var(--s4);
  max-width: 65ch;
}

/* Closing call-to-action band */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  flex-wrap: wrap;
  padding: var(--s6) var(--s6);
  border-radius: var(--radius-lg);
  background: var(--brand-weak);
}
.cta-band p {
  color: var(--text-muted);
  max-width: 52ch;
}
.cta-band-actions {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .cta-band {
    padding: var(--s5);
  }
  .cta-band-actions,
  .cta-band-actions .btn {
    width: 100%;
  }
}

/* Pricing: FAQ uses the same width as the price cards, stacked. */
.pricing-faq {
  max-width: 880px;
  margin: var(--s7) auto 0;
}
.pricing-faq .faq-section {
  grid-template-columns: 1fr;
}

/* ======================================================================
   YouTube-style shell (2026-10-12): top bar with search, left sidebar
   (full >=1280px, icon rail 792-1279px, drawer below), phone tab bar.
   Neutral greys like YouTube; brand stays green and the logo stays ours.
   ====================================================================== */

.card {
  box-shadow: none;
  border: 1px solid var(--border);
}

.btn {
  border-radius: var(--radius-btn);
  font-weight: 500;
}
.btn-secondary,
.btn-tonal {
  background: var(--surface-2);
  border-color: transparent;
  color: var(--text);
}
.btn-secondary:hover:not(:disabled),
.btn-tonal:hover:not(:disabled) {
  background: var(--border);
}
.btn-signin {
  border: 1px solid var(--border);
  color: var(--brand-strong);
  background: transparent;
}
.btn-signin:hover {
  background: var(--brand-weak);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: 0 var(--s4);
  background: var(--bg);
}
.topbar-start,
.topbar-end {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}
.topbar-start .brand {
  margin-right: 0;
  font-size: var(--text-lg);
}
.topbar-search {
  flex: 0 1 640px;
  display: flex;
  min-width: 0;
}
.topbar-search-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 var(--s4);
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 40px 0 0 40px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.topbar-search-input:focus {
  outline: none;
  border-color: var(--brand);
}
.topbar-search-btn {
  width: 64px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 0 40px 40px 0;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.search-mobile {
  display: none;
}
.account-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  text-decoration: none;
}
.avatar {
  width: 32px;
  height: 32px;
}

.shell {
  display: flex;
  align-items: flex-start;
}
.shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h));
}
.site-main {
  flex: 1;
  padding: var(--s5) var(--s5) var(--s8);
}
.site-main > .container {
  padding: 0;
}

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 0 var(--s3) var(--s4);
  background: var(--bg);
  scrollbar-width: thin;
}
.side-section {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
}
.side-heading {
  font-size: var(--text-md);
  font-weight: 600;
  padding: var(--s2) var(--s3);
}
.side-link {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 40px;
  padding: 0 var(--s3);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
}
.side-link:hover {
  background: var(--surface-2);
}
.side-link[aria-current='page'] {
  background: var(--surface-2);
  font-weight: 600;
}
.side-link[aria-current='page'] .icon {
  color: var(--brand);
}
.side-signin {
  padding: var(--s2) var(--s3);
  font-size: var(--text-sm);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  align-items: flex-start;
}
.side-footer {
  padding: var(--s4) var(--s3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.8;
}
.side-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: var(--s2);
}
.sidebar-scrim {
  display: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s5);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.tabbar {
  display: none;
}

/* Collapsed (icon rail): medium screens, or toggled on large ones. */
@media (min-width: 1280px) {
  body.sidebar-mini .sidebar {
    width: var(--sidebar-mini-w);
    padding: 0 var(--s1);
  }
}
@media (min-width: 792px) and (max-width: 1279px) {
  .sidebar {
    width: var(--sidebar-mini-w);
    padding: 0 var(--s1);
  }
}
@media (min-width: 792px) and (max-width: 1279px) {
  body:not(.sidebar-open) .sidebar .side-full,
  body:not(.sidebar-open) .sidebar .side-primary {
    border: 0;
  }
  body:not(.sidebar-open) .sidebar .side-full {
    display: none;
  }
  body:not(.sidebar-open) .sidebar .side-link {
    flex-direction: column;
    justify-content: center;
    gap: var(--s1);
    min-height: 72px;
    padding: 0;
    font-size: 10px;
  }
}
@media (min-width: 1280px) {
  body.sidebar-mini .sidebar .side-full {
    display: none;
  }
  body.sidebar-mini .sidebar .side-primary {
    border: 0;
  }
  body.sidebar-mini .sidebar .side-link {
    flex-direction: column;
    justify-content: center;
    gap: var(--s1);
    min-height: 72px;
    padding: 0;
    font-size: 10px;
  }
}

/* Drawer: hamburger on medium screens opens the full sidebar over content. */
@media (max-width: 1279px) {
  body.sidebar-open .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    z-index: 45;
    width: var(--sidebar-w);
    padding: 0 var(--s3) var(--s4);
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open .sidebar-scrim {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 44;
    background: var(--backdrop);
  }
}

/* Phones: no rail, drawer only, bottom tab bar, search behind an icon. */
@media (max-width: 791px) {
  .sidebar {
    display: none;
  }
  body.sidebar-open .sidebar {
    display: block;
  }
  .topbar {
    padding: 0 var(--s2) 0 var(--s1);
    gap: var(--s2);
  }
  .topbar-search {
    display: none;
  }
  .search-mobile {
    display: inline-grid;
  }
  .create-btn span {
    display: none;
  }
  .create-btn {
    width: 36px;
    padding: 0;
  }
  .site-main {
    padding: var(--s4) var(--s4) calc(var(--tabbar-h) + var(--s7));
  }
  .site-footer {
    padding-bottom: calc(var(--tabbar-h) + var(--s5));
  }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: var(--s1) var(--s2) calc(var(--s1) + env(safe-area-inset-bottom));
    background: var(--bg);
    border-top: 1px solid var(--border);
  }
  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--text-xs);
  }
  .tab[aria-current='page'] {
    color: var(--text);
    font-weight: 600;
  }
  .tab[aria-current='page'] .icon {
    color: var(--brand);
  }
}
@media (max-width: 380px) {
  .brand-name {
    display: none;
  }
}

/* Chips row (YouTube category chips): scrolls sideways on small screens. */
.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--s3);
  overflow-x: auto;
  padding-right: var(--s7);
  /* Fade the last chip out at the edge, like YouTube's chip bar. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  padding: var(--s1) 0 var(--s3);
  margin-bottom: var(--s4);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--s3);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover {
  background: var(--border);
}
.card > .chips:last-child {
  margin-bottom: 0;
}
.chip[aria-current='page'] {
  background: var(--text);
  color: var(--bg);
}

/* Explore: the top bar's search carries a Filters button; the filters open
   in a dialog (a bottom sheet on phones) and show as removable chips above
   the results. On phones the top bar keeps the search field on Explore, in
   place of the brand and the account buttons. */
.topbar-filters {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 40px;
  margin-left: var(--s3);
  padding: 0 var(--s4);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-filters:hover {
  background: var(--border);
}
.filter-count {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.filter-count[hidden] {
  display: none;
}
.filters-grid {
  grid-template-columns: 1fr;
  margin-top: var(--s4);
}
/* Without JS the Filters link targets the dialog: show it inline, clear
   of the sticky top bar. */
.filters-dialog:target:not([open]) {
  scroll-margin-top: calc(var(--topbar-h) + var(--s3));
  display: block;
  position: static;
  width: 100%;
  margin: 0;
  border: 1px solid var(--border);
  box-shadow: none;
}
.active-filters {
  flex-wrap: wrap;
  gap: var(--s2);
  overflow: visible;
  padding: 0;
  margin: 0 0 var(--s4);
  -webkit-mask-image: none;
  mask-image: none;
}
.chip-removable {
  gap: var(--s1);
  padding-right: var(--s2);
}
.chip-removable .icon {
  opacity: 0.7;
}
.chip-removable:hover .icon {
  opacity: 1;
}
@media (max-width: 791px) {
  .topbar-page-search .brand,
  .topbar-page-search .topbar-end {
    display: none;
  }
  .topbar-page-search .topbar-search {
    display: flex;
    flex: 1 1 auto;
  }
  .topbar-page-search .topbar-search-input {
    padding: 0 var(--s3);
  }
  .topbar-page-search .topbar-search-btn {
    width: 48px;
  }
  .topbar-filters {
    justify-content: center;
    width: 40px;
    margin-left: var(--s2);
    padding: 0;
  }
  .topbar-filters-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .filter-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 18px;
  }
}
@media (max-width: 640px) {
  /* One sideways-scrolling row, like the other chip bars. */
  .active-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: var(--s1) var(--s7) var(--s1) 0;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }
  .filters-dialog[open] {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* Feed cards (YouTube video-card anatomy): bare thumbnail, round icon,
   two-line title, muted meta with dot separators. */
.feed-grid {
  display: grid;
  gap: var(--s6) var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
.feed-card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-width: 0;
}
.feed-thumb {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}
.feed-thumb .thumb {
  border-radius: 0;
  transition: transform 0.2s;
}
.feed-card:hover .feed-thumb .thumb {
  transform: scale(1.02);
}
.thumb-badge {
  position: absolute;
  right: var(--s2);
  bottom: var(--s2);
  padding: 1px var(--s1);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 500;
}
.thumb-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
}
.thumb-progress > span {
  display: block;
  height: 100%;
  background: var(--brand);
}
.feed-body {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
}
.feed-avatar {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-weak);
  color: var(--brand-strong);
}
.feed-text {
  flex: 1;
  min-width: 0;
}
.feed-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  text-decoration: none;
}
.feed-meta {
  margin-top: 2px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}
.feed-meta > span + span::before {
  content: '•';
  margin: 0 var(--s1);
}
.feed-actions {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s2);
  align-items: center;
}
.feed-title-wrap {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

.section-head {
  align-items: flex-end;
  margin-bottom: var(--s3);
}
/* A "See all" link: its text lines up with the heading once it wraps. */
.section-head > .btn-ghost {
  margin-left: calc(-1 * var(--s3));
}
.filter-row {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
.select-sm {
  width: auto;
  min-height: 36px;
  padding: 0 var(--s6) 0 var(--s3);
  border-radius: var(--radius-btn);
  background-color: var(--surface-2);
  border-color: transparent;
  font-size: var(--text-sm);
}

/* Habit tiles (/habits) */
.habit-tile {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s4);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.habit-tile:hover {
  background: var(--border);
}
.habit-tile .feed-avatar {
  width: 40px;
  height: 40px;
}
.habit-tile strong {
  display: block;
  font-weight: 600;
}
.habit-tile span.muted {
  font-size: var(--text-sm);
}

/* Compact hero (logged-out home): content follows right after. */
.hero-compact {
  padding: var(--s3) 0 var(--s5);
  grid-template-columns: 1.3fr 0.7fr;
}
.hero-compact .hero-media img {
  aspect-ratio: 4 / 3;
  object-position: 50% 30%;
}
@media (max-width: 800px) {
  .hero-compact {
    grid-template-columns: 1fr;
  }
  .hero-compact .hero-media {
    display: none;
  }
}

/* ---- Polish pass (designer review 2026-10-12) ---- */
@media (min-width: 801px) {
  .faq-intro {
    position: sticky;
    top: calc(var(--topbar-h) + var(--s5));
    align-self: start;
  }
}
.cta-band .btn-secondary {
  background: var(--surface);
}
.watch-toggle .icon {
  color: var(--text-muted);
}
.watch-toggle:hover .icon,
.is-watched .watch-toggle .icon {
  color: var(--brand);
}
.watch-toggle:focus-visible {
  outline: 2px solid var(--focus);
}
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s5);
  padding: var(--s5) var(--s4);
}
.auth-page .auth-card {
  margin: 0;
  width: 100%;
}
.auth-brand {
  margin: 0;
}
.day-heading-overdue {
  color: var(--warning);
}
.week-rest {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-top: var(--s2);
}
.danger-zone {
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
}
.sms-phone {
  transition: opacity 0.15s;
}
.card:has(input[name='smsReminders']:not(:checked)) .sms-phone {
  opacity: 0.5;
}
@media (max-width: 640px) {
  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
  }
  .filter-row .select-sm {
    flex-shrink: 0;
  }
}
