/* =========================================================
   DAILY SIGNAL V1 — BASE DESIGN SYSTEM
   ========================================================= */

:root {
  --ds-bg: #050812;
  --ds-bg-2: #07111f;
  --ds-surface: rgba(12, 23, 39, 0.78);
  --ds-surface-strong: rgba(14, 30, 52, 0.92);
  --ds-border: rgba(170, 205, 255, 0.14);
  --ds-border-gold: rgba(226, 190, 117, 0.28);

  --ds-text: #f4efe4;
  --ds-muted: #a9b4c7;
  --ds-soft: #6f7c91;

  --ds-gold: #d9b66f;
  --ds-gold-soft: rgba(217, 182, 111, 0.16);
  --ds-blue: #77c8ff;
  --ds-blue-soft: rgba(119, 200, 255, 0.15);

  --ds-green: #61d394;
  --ds-purple: #a78bfa;
  --ds-cyan: #67e8f9;
  --ds-amber: #f6c76f;
  --ds-pink: #f0abfc;
  --ds-indigo: #818cf8;

  --ds-radius-lg: 28px;
  --ds-radius-md: 20px;
  --ds-radius-sm: 14px;

  --ds-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --ds-glow-blue: 0 0 42px rgba(119, 200, 255, 0.13);
  --ds-glow-gold: 0 0 42px rgba(217, 182, 111, 0.12);

  --ds-max-width: 1320px;
  --ds-page-pad: clamp(18px, 3vw, 42px);
}

/* RESET */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

/* APP BACKGROUND */

.ds-app {
  position: relative;
  min-height: 100vh;
  padding: 24px var(--ds-page-pad) 28px;
  overflow: hidden;
  isolation: isolate;
}

.ds-bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(119, 200, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(119, 200, 255, 0.12), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(217, 182, 111, 0.10), transparent 28%),
    linear-gradient(135deg, #040711 0%, #07111f 45%, #050812 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

.ds-bg-orb {
  position: fixed;
  z-index: -2;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.34;
  pointer-events: none;
}

.ds-bg-orb--blue {
  left: -160px;
  top: 120px;
  background: rgba(80, 169, 255, 0.22);
}

.ds-bg-orb--gold {
  right: -180px;
  bottom: -90px;
  background: rgba(217, 182, 111, 0.18);
}

/* HEADER */

.ds-header {
  position: relative;
  z-index: 5;
  width: min(100%, var(--ds-max-width));
  margin: 0 auto 28px;
  padding: 14px 16px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: rgba(6, 13, 25, 0.64);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ds-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ds-text);
  text-decoration: none;
}

.ds-brand__mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ds-border-gold);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(217, 182, 111, 0.82) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(217, 182, 111, 0.22), rgba(119, 200, 255, 0.12));
  box-shadow: var(--ds-glow-gold);
}

.ds-brand__text {
  display: grid;
  gap: 1px;
}

.ds-brand__text strong {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.ds-brand__text small {
  color: var(--ds-muted);
  font-size: 0.72rem;
}

.ds-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* BUTTONS */

.ds-button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 42px;
  color: var(--ds-text);
  background: transparent;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ds-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ds-button--primary {
  background: linear-gradient(135deg, rgba(217, 182, 111, 0.95), rgba(245, 216, 154, 0.86));
  color: #111827;
  box-shadow: var(--ds-glow-gold);
}

.ds-button--ghost {
  border-color: var(--ds-border);
  background: rgba(255, 255, 255, 0.035);
}

.ds-button--ghost:hover:not(:disabled) {
  border-color: rgba(119, 200, 255, 0.42);
  background: rgba(119, 200, 255, 0.08);
}

.ds-status-pill,
.ds-version {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--ds-border-gold);
  border-radius: 999px;
  background: var(--ds-gold-soft);
  color: #f5dca9;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

/* MAIN LAYOUT */

.ds-main {
  width: min(100%, var(--ds-max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: start;
}

.ds-workspace {
  display: grid;
  gap: 22px;
}

.ds-panel {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--ds-surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--ds-shadow);
}

.ds-panel--hero {
  position: sticky;
  top: 24px;
  padding: clamp(24px, 3vw, 38px);
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ds-kicker {
  color: var(--ds-gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ds-title {
  max-width: 620px;
  margin: 18px 0 14px;
  font-size: clamp(2.5rem, 5vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.ds-subtitle {
  max-width: 560px;
  margin: 0 0 28px;
  color: var(--ds-muted);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.7;
}

/* CLOCK */

.ds-clock-card {
  position: relative;
  margin-top: 6px;
  padding: 24px;
  border: 1px solid rgba(119, 200, 255, 0.16);
  border-radius: var(--ds-radius-lg);
  background:
    radial-gradient(circle at 20% 20%, rgba(119, 200, 255, 0.15), transparent 30%),
    rgba(2, 8, 18, 0.52);
  box-shadow: var(--ds-glow-blue);
}

.ds-clock-label {
  margin-bottom: 10px;
  color: var(--ds-soft);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ds-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  color: var(--ds-text);
  text-shadow: 0 0 34px rgba(119, 200, 255, 0.14);
}

.ds-date {
  margin-top: 12px;
  color: var(--ds-muted);
  font-size: 0.96rem;
}

/* NEXT SIGNAL */

.ds-next-card {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--ds-border-gold);
  border-radius: var(--ds-radius-lg);
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.12), rgba(119, 200, 255, 0.05)),
    rgba(2, 8, 18, 0.44);
}

.ds-card-heading,
.ds-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ds-card-heading {
  color: var(--ds-muted);
  font-size: 0.84rem;
}

.ds-mini-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--ds-gold);
  box-shadow: 0 0 18px rgba(217, 182, 111, 0.7);
}

.ds-next-content h2 {
  margin: 12px 0 6px;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.ds-next-content p {
  margin: 0;
  color: var(--ds-muted);
  line-height: 1.55;
}

.ds-countdown {
  margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--ds-blue);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.ds-category-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 14px;
  padding: 7px 11px;
  border: 1px solid var(--chip-border, rgba(119, 200, 255, 0.22));
  border-radius: 999px;
  background: var(--chip-bg, rgba(119, 200, 255, 0.12));
  color: var(--chip-color, var(--ds-blue));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* LOCAL NOTE */

.ds-local-note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(119, 200, 255, 0.13);
  border-radius: var(--ds-radius-md);
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 5px;
}

.ds-local-note strong {
  color: var(--ds-text);
  font-size: 0.9rem;
}

.ds-local-note span {
  color: var(--ds-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* FORM */

.ds-form-card,
.ds-planner-card {
  padding: clamp(20px, 2.2vw, 28px);
}

.ds-section-head h2 {
  margin: 7px 0 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.055em;
}

.ds-form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.ds-form-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 14px;
}

.ds-field {
  display: grid;
  gap: 8px;
}

.ds-field label {
  color: var(--ds-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-field input,
.ds-field select,
.ds-field textarea {
  width: 100%;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-sm);
  background: rgba(4, 10, 20, 0.72);
  color: var(--ds-text);
  outline: none;
  padding: 13px 14px;
}

.ds-field textarea {
  min-height: 88px;
  resize: vertical;
}

.ds-day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ds-day-picker button {
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ds-text);
  padding: 9px 12px;
}

.ds-form-note {
  margin: -4px 0 0;
  color: var(--ds-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* WEEKLY PLANNER */

.ds-week-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ds-day-column {
  min-height: 170px;
  padding: 15px;
  border: 1px solid rgba(119, 200, 255, 0.12);
  border-radius: var(--ds-radius-md);
  background: rgba(2, 8, 18, 0.36);
}

.ds-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ds-day-head strong {
  letter-spacing: -0.025em;
}

.ds-day-count {
  color: var(--ds-soft);
  font-size: 0.74rem;
}

.ds-signal-list {
  display: grid;
  gap: 10px;
}

.ds-signal-card {
  position: relative;
  overflow: hidden;
  padding: 13px 13px 13px 15px;
  border: 1px solid var(--card-border, rgba(119, 200, 255, 0.16));
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--card-bg, rgba(119, 200, 255, 0.11)), rgba(255, 255, 255, 0.025));
}

.ds-signal-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--card-color, var(--ds-blue));
}

.ds-signal-time {
  color: var(--card-color, var(--ds-blue));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  font-weight: 700;
}

.ds-signal-name {
  margin-top: 5px;
  color: var(--ds-text);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.ds-signal-note {
  margin-top: 3px;
  color: var(--ds-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ds-empty-day {
  color: var(--ds-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* FOOTER */

.ds-footer {
  width: min(100%, var(--ds-max-width));
  margin: 24px auto 0;
  padding: 18px 4px 0;
  color: var(--ds-soft);
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

/* ALARM MODAL */

.ds-alarm-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 24px;
  background: rgba(3, 8, 16, 0.74);
  backdrop-filter: blur(16px);
  display: none;
  place-items: center;
}

.ds-alarm-modal.is-visible {
  display: grid;
}

.ds-alarm-box {
  width: min(100%, 520px);
  padding: 30px;
  border: 1px solid var(--ds-border-gold);
  border-radius: var(--ds-radius-lg);
  background:
    radial-gradient(circle at 20% 10%, rgba(217, 182, 111, 0.18), transparent 34%),
    var(--ds-surface-strong);
  box-shadow: var(--ds-shadow), var(--ds-glow-gold);
}

.ds-alarm-box h2 {
  margin: 12px 0 8px;
  font-size: 2.3rem;
  letter-spacing: -0.06em;
}

.ds-alarm-box p {
  margin: 0;
  color: var(--ds-muted);
  line-height: 1.6;
}

.ds-alarm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* CATEGORY THEMES */

[data-category="focus"] {
  --card-color: var(--ds-cyan);
  --card-bg: rgba(103, 232, 249, 0.10);
  --card-border: rgba(103, 232, 249, 0.22);
  --chip-color: var(--ds-cyan);
  --chip-bg: rgba(103, 232, 249, 0.10);
  --chip-border: rgba(103, 232, 249, 0.22);
}

[data-category="wake"] {
  --card-color: var(--ds-gold);
  --card-bg: rgba(217, 182, 111, 0.11);
  --card-border: rgba(217, 182, 111, 0.24);
  --chip-color: var(--ds-gold);
  --chip-bg: rgba(217, 182, 111, 0.12);
  --chip-border: rgba(217, 182, 111, 0.28);
}

[data-category="workout"] {
  --card-color: var(--ds-green);
  --card-bg: rgba(97, 211, 148, 0.10);
  --card-border: rgba(97, 211, 148, 0.22);
  --chip-color: var(--ds-green);
  --chip-bg: rgba(97, 211, 148, 0.10);
  --chip-border: rgba(97, 211, 148, 0.22);
}

[data-category="break"] {
  --card-color: var(--ds-amber);
  --card-bg: rgba(246, 199, 111, 0.10);
  --card-border: rgba(246, 199, 111, 0.22);
  --chip-color: var(--ds-amber);
  --chip-bg: rgba(246, 199, 111, 0.10);
  --chip-border: rgba(246, 199, 111, 0.22);
}

[data-category="call"] {
  --card-color: var(--ds-blue);
  --card-bg: rgba(119, 200, 255, 0.10);
  --card-border: rgba(119, 200, 255, 0.22);
  --chip-color: var(--ds-blue);
  --chip-bg: rgba(119, 200, 255, 0.10);
  --chip-border: rgba(119, 200, 255, 0.22);
}

[data-category="sleep"] {
  --card-color: var(--ds-indigo);
  --card-bg: rgba(129, 140, 248, 0.10);
  --card-border: rgba(129, 140, 248, 0.22);
  --chip-color: var(--ds-indigo);
  --chip-bg: rgba(129, 140, 248, 0.10);
  --chip-border: rgba(129, 140, 248, 0.22);
}

[data-category="review"] {
  --card-color: var(--ds-purple);
  --card-bg: rgba(167, 139, 250, 0.10);
  --card-border: rgba(167, 139, 250, 0.22);
  --chip-color: var(--ds-purple);
  --chip-bg: rgba(167, 139, 250, 0.10);
  --chip-border: rgba(167, 139, 250, 0.22);
}

/* RESPONSIVE */

@media (max-width: 1040px) {
  .ds-main {
    grid-template-columns: 1fr;
  }

  .ds-panel--hero {
    position: relative;
    top: auto;
    min-height: auto;
  }

  .ds-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ds-app {
    padding-top: 14px;
  }

  .ds-header {
    border-radius: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-header__actions {
    width: 100%;
    justify-content: space-between;
  }

  .ds-title {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }

  .ds-clock {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
  }

  .ds-form-row,
  .ds-week-grid {
    grid-template-columns: 1fr;
  }

  .ds-footer {
    flex-direction: column;
  }

  .ds-alarm-actions {
    flex-direction: column;
  }

  .ds-alarm-actions .ds-button {
    width: 100%;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 1A — Hero title containment
   Keeps the large premium title inside the left panel.
   ========================================================= */

.ds-panel--hero {
  overflow: hidden;
}

.ds-title {
  max-width: 100%;
  font-size: clamp(2.7rem, 4.15vw, 4.85rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  word-break: normal;
}

@media (min-width: 1041px) and (max-width: 1280px) {
  .ds-title {
    font-size: clamp(2.6rem, 3.85vw, 4.25rem);
  }
}

@media (max-width: 680px) {
  .ds-title {
    font-size: clamp(2.35rem, 13vw, 3.45rem);
    letter-spacing: -0.065em;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 2 — Active form, local actions, planner controls
   ========================================================= */

.ds-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ds-form-actions .ds-button--primary {
  flex: 1 1 180px;
}

.ds-form-actions .ds-button--ghost {
  flex: 0 0 auto;
}

.ds-day-picker button {
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.ds-day-picker button:hover {
  transform: translateY(-1px);
  border-color: rgba(119, 200, 255, 0.42);
}

.ds-day-picker button.is-selected {
  border-color: rgba(217, 182, 111, 0.54);
  background: rgba(217, 182, 111, 0.18);
  color: #f8deb0;
  box-shadow: 0 0 22px rgba(217, 182, 111, 0.10);
}

.ds-form-note.is-success {
  color: var(--ds-green);
}

.ds-form-note.is-error {
  color: var(--ds-amber);
}

.ds-signal-card {
  display: grid;
  gap: 2px;
}

.ds-signal-card.is-disabled {
  opacity: 0.48;
}

.ds-signal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ds-signal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.ds-signal-action {
  border: 1px solid rgba(170, 205, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ds-muted);
  padding: 6px 9px;
  font-size: 0.72rem;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.ds-signal-action:hover {
  border-color: rgba(119, 200, 255, 0.42);
  color: var(--ds-text);
  background: rgba(119, 200, 255, 0.08);
}

.ds-signal-action--danger:hover {
  border-color: rgba(240, 171, 252, 0.38);
  color: var(--ds-pink);
  background: rgba(240, 171, 252, 0.08);
}

.ds-signal-status {
  color: var(--ds-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

[data-category="health"] {
  --card-color: var(--ds-pink);
  --card-bg: rgba(240, 171, 252, 0.10);
  --card-border: rgba(240, 171, 252, 0.22);
  --chip-color: var(--ds-pink);
  --chip-bg: rgba(240, 171, 252, 0.10);
  --chip-border: rgba(240, 171, 252, 0.22);
}

[data-category="study"] {
  --card-color: var(--ds-purple);
  --card-bg: rgba(167, 139, 250, 0.10);
  --card-border: rgba(167, 139, 250, 0.22);
  --chip-color: var(--ds-purple);
  --chip-bg: rgba(167, 139, 250, 0.10);
  --chip-border: rgba(167, 139, 250, 0.22);
}

[data-category="custom"] {
  --card-color: var(--ds-blue);
  --card-bg: rgba(119, 200, 255, 0.08);
  --card-border: rgba(119, 200, 255, 0.18);
  --chip-color: var(--ds-blue);
  --chip-bg: rgba(119, 200, 255, 0.08);
  --chip-border: rgba(119, 200, 255, 0.18);
}

@media (max-width: 680px) {
  .ds-form-actions {
    flex-direction: column;
  }

  .ds-form-actions .ds-button {
    width: 100%;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 3 — Alarm modal and sound states
   ========================================================= */

.ds-alarm-modal.is-visible .ds-alarm-box {
  animation: dsAlarmEnter 260ms ease both;
}

@keyframes dsAlarmEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ds-alarm-meta {
  margin-top: 12px !important;
  color: var(--ds-gold) !important;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-alarm-sound-status {
  margin-top: 12px !important;
  padding: 10px 12px;
  border: 1px solid rgba(119, 200, 255, 0.14);
  border-radius: 14px;
  background: rgba(119, 200, 255, 0.06);
  color: var(--ds-muted) !important;
  font-size: 0.84rem;
}

.ds-alarm-sound-status.is-warning {
  border-color: rgba(246, 199, 111, 0.26);
  background: rgba(246, 199, 111, 0.08);
  color: var(--ds-amber) !important;
}

.ds-signal-card[data-snooze="true"] {
  border-style: dashed;
}

.ds-signal-card[data-snooze="true"] .ds-signal-status {
  color: var(--ds-gold);
}

/* =========================================================
   DAILY SIGNAL PATCH 4 — Sound and snooze metadata
   ========================================================= */

.ds-signal-submeta {
  margin-top: 4px;
  color: var(--ds-soft);
  font-size: 0.73rem;
  line-height: 1.35;
}

/* =========================================================
   DAILY SIGNAL PATCH 5 — Edit mode
   ========================================================= */

.ds-edit-cancel {
  display: none;
}

.ds-form.is-editing .ds-edit-cancel {
  display: inline-flex;
}

.ds-form.is-editing {
  position: relative;
}

.ds-form.is-editing::before {
  content: "Editing existing signal";
  position: absolute;
  top: -48px;
  right: 0;
  padding: 7px 11px;
  border: 1px solid rgba(217, 182, 111, 0.34);
  border-radius: 999px;
  background: rgba(217, 182, 111, 0.12);
  color: var(--ds-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-signal-action--edit:hover {
  border-color: rgba(217, 182, 111, 0.42);
  color: var(--ds-gold);
  background: rgba(217, 182, 111, 0.08);
}

@media (max-width: 680px) {
  .ds-form.is-editing::before {
    position: static;
    width: fit-content;
    margin-bottom: -4px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 6 — Today Progress
   ========================================================= */

.ds-today-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(119, 200, 255, 0.14);
  border-radius: var(--ds-radius-lg);
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.08), rgba(217, 182, 111, 0.035)),
    rgba(2, 8, 18, 0.34);
}

.ds-mini-action {
  border: 1px solid rgba(170, 205, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ds-muted);
  padding: 6px 10px;
  font-size: 0.72rem;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.ds-mini-action:hover {
  border-color: rgba(217, 182, 111, 0.38);
  color: var(--ds-gold);
  background: rgba(217, 182, 111, 0.08);
}

.ds-today-content {
  margin-top: 14px;
}

.ds-today-content p {
  margin: 0;
  color: var(--ds-muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.ds-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ds-progress-number {
  color: var(--ds-text);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.ds-progress-label {
  color: var(--ds-muted);
  font-size: 0.82rem;
}

.ds-progress-meter {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.ds-progress-meter span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ds-gold), var(--ds-blue));
  box-shadow: 0 0 20px rgba(119, 200, 255, 0.18);
  transition: width 240ms ease;
}

.ds-done-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.ds-done-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(170, 205, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
}

.ds-done-item strong {
  color: var(--ds-text);
  font-size: 0.84rem;
}

.ds-done-item span {
  color: var(--ds-soft);
  font-size: 0.76rem;
  white-space: nowrap;
}

/* =========================================================
   DAILY SIGNAL PATCH 7 — Local data tools
   ========================================================= */

.ds-data-tools {
  margin-top: 2px;
  padding: 14px;
  border: 1px solid rgba(170, 205, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  display: grid;
  gap: 10px;
}

.ds-data-tools__label {
  color: var(--ds-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ds-data-tools__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ds-data-import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 680px) {
  .ds-data-tools__actions {
    flex-direction: column;
  }

  .ds-data-tools__actions .ds-signal-action,
  .ds-data-import-label {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 8 — Planner polish and today highlight
   ========================================================= */

.ds-day-column {
  position: relative;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ds-day-column.is-today {
  border-color: rgba(217, 182, 111, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(217, 182, 111, 0.10), transparent 34%),
    rgba(2, 8, 18, 0.42);
  box-shadow: 0 0 34px rgba(217, 182, 111, 0.07);
}

.ds-day-column.is-today::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(217, 182, 111, 0.05), transparent 38%);
}

.ds-day-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ds-today-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(217, 182, 111, 0.34);
  border-radius: 999px;
  background: rgba(217, 182, 111, 0.11);
  color: var(--ds-gold);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-empty-day {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border: 1px dashed rgba(170, 205, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.ds-planner-empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed rgba(217, 182, 111, 0.24);
  border-radius: var(--ds-radius-md);
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 182, 111, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.026);
  color: var(--ds-muted);
  line-height: 1.55;
}

.ds-planner-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ds-text);
}

/* =========================================================
   DAILY SIGNAL PATCH 9 — Reliability notice, audio state, focus polish
   ========================================================= */

.ds-header__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ds-status-pill--audio {
  border-color: rgba(170, 205, 255, 0.16);
  background: rgba(119, 200, 255, 0.07);
  color: var(--ds-muted);
}

.ds-status-pill--audio[data-status="ready"] {
  border-color: rgba(97, 211, 148, 0.28);
  background: rgba(97, 211, 148, 0.10);
  color: var(--ds-green);
}

.ds-status-pill--audio[data-status="blocked"] {
  border-color: rgba(246, 199, 111, 0.30);
  background: rgba(246, 199, 111, 0.10);
  color: var(--ds-amber);
}

.ds-status-pill--audio[data-status="unavailable"] {
  border-color: rgba(240, 171, 252, 0.26);
  background: rgba(240, 171, 252, 0.09);
  color: var(--ds-pink);
}

.ds-local-note--reliability {
  border-color: rgba(217, 182, 111, 0.18);
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.065), rgba(119, 200, 255, 0.035)),
    rgba(255, 255, 255, 0.03);
}

.ds-reliability-list {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--ds-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.ds-reliability-list li + li {
  margin-top: 3px;
}

.ds-button:focus-visible,
.ds-signal-action:focus-visible,
.ds-mini-action:focus-visible,
.ds-day-picker button:focus-visible,
.ds-field input:focus-visible,
.ds-field select:focus-visible,
.ds-field textarea:focus-visible {
  outline: 2px solid rgba(217, 182, 111, 0.72);
  outline-offset: 3px;
  border-color: rgba(217, 182, 111, 0.48);
}

.ds-field input:focus,
.ds-field select:focus,
.ds-field textarea:focus {
  border-color: rgba(119, 200, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(119, 200, 255, 0.055);
}

.ds-button,
.ds-signal-action,
.ds-mini-action,
.ds-day-picker button {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 680px) {
  .ds-header__actions {
    justify-content: flex-start;
  }

  .ds-status-pill,
  .ds-status-pill--audio {
    flex: 1 1 auto;
    justify-content: center;
  }

  #testSoundButton {
    width: 100%;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 9E — Modal click safety
   Ensures alarm buttons are always clickable above the overlay.
   ========================================================= */

.ds-alarm-modal.is-visible {
  pointer-events: auto;
}

.ds-alarm-box {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.ds-alarm-actions,
.ds-alarm-actions .ds-button {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

/* =========================================================
   DAILY SIGNAL PATCH 10 — Final responsive polish
   Mobile, tablet, modal, planner and touch usability.
   ========================================================= */

/* ---------- General stability ---------- */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.ds-app {
  width: 100%;
}

.ds-main,
.ds-header,
.ds-footer {
  max-width: var(--ds-max-width);
}

/* ---------- Desktop refinement ---------- */

@media (min-width: 1041px) {
  .ds-main {
    align-items: start;
  }

  .ds-panel--hero {
    max-height: none;
  }

  .ds-workspace {
    min-width: 0;
  }

  .ds-planner-card,
  .ds-form-card {
    min-width: 0;
  }
}

/* ---------- Tablet polish ---------- */

@media (max-width: 1040px) {
  .ds-app {
    padding-inline: clamp(16px, 4vw, 32px);
  }

  .ds-header {
    margin-bottom: 20px;
  }

  .ds-panel--hero {
    padding: clamp(24px, 5vw, 34px);
  }

  .ds-title {
    max-width: 760px;
  }

  .ds-subtitle {
    max-width: 680px;
  }

  .ds-clock-card {
    max-width: 680px;
  }

  .ds-next-card,
  .ds-today-card,
  .ds-local-note {
    max-width: 680px;
  }

  .ds-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Mobile full layout ---------- */

@media (max-width: 680px) {
  :root {
    --ds-page-pad: 14px;
    --ds-radius-lg: 22px;
    --ds-radius-md: 18px;
    --ds-radius-sm: 13px;
  }

  .ds-app {
    padding: 12px var(--ds-page-pad) 22px;
  }

  .ds-bg-grid {
    background-size: 38px 38px, 38px 38px, auto, auto, auto;
  }

  .ds-bg-orb {
    width: 300px;
    height: 300px;
    opacity: 0.24;
  }

  /* Header */
  .ds-header {
    padding: 13px;
    gap: 14px;
    border-radius: 22px;
  }

  .ds-brand {
    width: 100%;
  }

  .ds-brand__mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .ds-brand__text strong {
    font-size: 0.95rem;
  }

  .ds-brand__text small {
    font-size: 0.7rem;
  }

  .ds-header__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }

  .ds-header__actions .ds-status-pill {
    width: 100%;
    min-height: 38px;
    justify-content: center;
    text-align: center;
    padding-inline: 9px;
    font-size: 0.68rem;
  }

  #testSoundButton {
    grid-column: 1 / -1;
    width: 100%;
  }

  /* Hero */
  .ds-panel--hero {
    padding: 22px 18px;
  }

  .ds-kicker {
    font-size: 0.67rem;
    letter-spacing: 0.13em;
  }

  .ds-title {
    margin-top: 14px;
    font-size: clamp(2.15rem, 12vw, 3.15rem);
    line-height: 0.97;
    letter-spacing: -0.06em;
  }

  .ds-subtitle {
    margin-bottom: 20px;
    font-size: 0.94rem;
    line-height: 1.62;
  }

  /* Clock */
  .ds-clock-card {
    padding: 18px;
    border-radius: 21px;
  }

  .ds-clock-label {
    font-size: 0.68rem;
  }

  .ds-clock {
    font-size: clamp(2.75rem, 15vw, 4rem);
    letter-spacing: -0.075em;
  }

  .ds-date {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  /* Cards */
  .ds-next-card,
  .ds-today-card,
  .ds-local-note {
    padding: 17px;
    border-radius: 21px;
  }

  .ds-card-heading,
  .ds-section-head {
    gap: 12px;
  }

  .ds-next-content h2 {
    font-size: 1.38rem;
  }

  .ds-countdown {
    font-size: 1.18rem;
  }

  .ds-reliability-list {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  /* Workspace cards */
  .ds-form-card,
  .ds-planner-card {
    padding: 18px;
  }

  .ds-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-section-head .ds-version {
    width: fit-content;
  }

  .ds-section-head h2 {
    font-size: 1.55rem;
  }

  /* Form */
  .ds-form {
    gap: 15px;
  }

  .ds-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .ds-field input,
  .ds-field select,
  .ds-field textarea {
    min-height: 46px;
    padding: 12px 13px;
    font-size: 0.95rem;
  }

  .ds-field textarea {
    min-height: 92px;
  }

  .ds-day-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .ds-day-picker button {
    min-height: 42px;
    padding: 9px 6px;
    text-align: center;
  }

  .ds-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ds-form-actions .ds-button {
    width: 100%;
    min-height: 46px;
  }

  .ds-data-tools {
    padding: 13px;
  }

  .ds-data-tools__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ds-data-tools__actions .ds-signal-action,
  .ds-data-import-label {
    width: 100%;
    min-height: 40px;
  }

  /* Planner */
  .ds-week-grid {
    margin-top: 18px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ds-day-column {
    min-height: auto;
    padding: 14px;
  }

  .ds-day-head {
    align-items: flex-start;
  }

  .ds-day-title {
    flex-wrap: wrap;
  }

  .ds-day-count {
    white-space: nowrap;
    padding-top: 2px;
  }

  .ds-signal-card {
    padding: 13px 12px 13px 14px;
  }

  .ds-signal-meta {
    align-items: flex-start;
  }

  .ds-signal-name {
    font-size: 0.96rem;
    line-height: 1.3;
  }

  .ds-signal-note {
    font-size: 0.8rem;
  }

  .ds-signal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .ds-signal-action {
    min-height: 38px;
    justify-content: center;
    text-align: center;
  }

  .ds-empty-day {
    min-height: 48px;
  }

  /* Today progress */
  .ds-progress-row {
    align-items: flex-start;
  }

  .ds-progress-number {
    font-size: 1.55rem;
  }

  .ds-done-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .ds-done-item span {
    white-space: normal;
  }

  /* Modal */
  .ds-alarm-modal {
    padding: 14px;
    align-items: center;
  }

  .ds-alarm-box {
    width: 100%;
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    padding: 23px 18px;
    border-radius: 23px;
  }

  .ds-alarm-box h2 {
    font-size: clamp(1.8rem, 10vw, 2.35rem);
    line-height: 1;
  }

  .ds-alarm-box p {
    font-size: 0.92rem;
  }

  .ds-alarm-meta {
    font-size: 0.76rem;
    line-height: 1.45;
  }

  .ds-alarm-sound-status {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .ds-alarm-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ds-alarm-actions .ds-button {
    width: 100%;
    min-height: 46px;
  }

  /* Footer */
  .ds-footer {
    padding-top: 14px;
    font-size: 0.78rem;
    line-height: 1.45;
  }
}

/* ---------- Very small phones ---------- */

@media (max-width: 390px) {
  .ds-app {
    padding-inline: 10px;
  }

  .ds-panel--hero,
  .ds-form-card,
  .ds-planner-card {
    padding-inline: 15px;
  }

  .ds-title {
    font-size: clamp(2rem, 13vw, 2.75rem);
  }

  .ds-clock {
    font-size: clamp(2.45rem, 15vw, 3.35rem);
  }

  .ds-day-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ds-status-pill,
  .ds-button,
  .ds-signal-action,
  .ds-mini-action {
    font-size: 0.72rem;
  }
}

/* ---------- Landscape mobile / low height ---------- */

@media (max-height: 720px) and (min-width: 681px) {
  .ds-panel--hero {
    position: relative;
    top: auto;
    min-height: auto;
    justify-content: flex-start;
  }

  .ds-title {
    font-size: clamp(2.6rem, 4vw, 4rem);
  }

  .ds-clock {
    font-size: clamp(3rem, 5.5vw, 4.8rem);
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13A — Product-style header
   Premium SaaS-style navigation while preserving app controls.
   ========================================================= */

.ds-product-header {
  min-height: 76px;
  padding: 13px 16px;
  border-color: rgba(170, 205, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 16, 29, 0.88), rgba(5, 10, 20, 0.72)),
    rgba(6, 13, 25, 0.76);
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.28),
    inset 0 -1px 0 rgba(217, 182, 111, 0.055);
}

.ds-product-brand {
  min-width: 220px;
}

.ds-product-brand__mark {
  position: relative;
  border-color: rgba(217, 182, 111, 0.42);
  background:
    radial-gradient(circle, rgba(217, 182, 111, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 32% 25%, rgba(119, 200, 255, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(217, 182, 111, 0.24), rgba(119, 200, 255, 0.10));
}

.ds-product-brand__mark::before,
.ds-product-brand__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 19px;
  height: 1px;
  border-radius: 999px;
  background: rgba(217, 182, 111, 0.72);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(217, 182, 111, 0.32);
}

.ds-product-brand__mark::before {
  transform: translate(-50%, -50%) rotate(90deg);
  width: 14px;
}

.ds-product-brand__text strong {
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}

.ds-product-brand__text small {
  color: rgba(244, 239, 228, 0.62);
  font-size: 0.7rem;
}

.ds-product-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  flex: 1 1 auto;
}

.ds-product-nav a {
  position: relative;
  color: rgba(244, 239, 228, 0.68);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 180ms ease;
}

.ds-product-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--ds-gold), transparent);
  transition: transform 180ms ease;
}

.ds-product-nav a:hover {
  color: var(--ds-text);
}

.ds-product-nav a:hover::after {
  transform: scaleX(1);
}

.ds-product-actions {
  min-width: 320px;
  justify-content: flex-end;
}

.ds-product-actions .ds-status-pill {
  min-height: 36px;
  padding-inline: 13px;
}

.ds-product-actions #testSoundButton {
  min-height: 40px;
  padding-inline: 18px;
}

/* Desktop / medium header behavior */
@media (max-width: 1180px) {
  .ds-product-header {
    display: grid;
    grid-template-columns: 1fr auto;
    border-radius: 28px;
  }

  .ds-product-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding: 4px 4px 0;
  }

  .ds-product-actions {
    min-width: 0;
  }
}

/* Mobile product header */
@media (max-width: 680px) {
  .ds-product-header {
    display: flex;
    min-height: auto;
    padding: 13px;
    border-radius: 22px;
  }

  .ds-product-brand {
    min-width: 0;
  }

  .ds-product-nav {
    width: 100%;
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 2px 0 0;
  }

  .ds-product-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(170, 205, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.026);
    font-size: 0.7rem;
  }

  .ds-product-nav a::after {
    display: none;
  }

  .ds-product-actions {
    order: 3;
    width: 100%;
    min-width: 0;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13B — Premium hero typography
   Editorial SaaS-style hero with gold/blue highlights.
   ========================================================= */

.ds-hero-title {
  display: grid;
  gap: 0.02em;
  max-width: 690px;
  margin-top: 20px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 5.7vw, 6.9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.ds-hero-title span {
  display: block;
}

.ds-hero-title em {
  font-style: italic;
  font-weight: 700;
}

.ds-highlight-gold {
  color: var(--ds-gold);
  text-shadow: 0 0 34px rgba(217, 182, 111, 0.16);
}

.ds-highlight-blue {
  color: #6caeff;
  text-shadow: 0 0 34px rgba(108, 174, 255, 0.16);
}

.ds-hero-subtitle {
  max-width: 620px;
  margin-bottom: 22px;
  color: rgba(244, 239, 228, 0.72);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.65;
}

.ds-hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}

.ds-hero-trust-row span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px 7px 27px;
  border: 1px solid rgba(217, 182, 111, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.026);
  color: rgba(244, 239, 228, 0.66);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ds-hero-trust-row span::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ds-gold);
  box-shadow: 0 0 14px rgba(217, 182, 111, 0.48);
  transform: translateY(-50%);
}

/* Better rhythm between new hero and clock */
.ds-panel--hero .ds-clock-card {
  margin-top: 0;
}

/* Tablet */
@media (max-width: 1040px) {
  .ds-hero-title {
    max-width: 760px;
    font-size: clamp(3.2rem, 8vw, 5.6rem);
  }

  .ds-hero-subtitle {
    max-width: 700px;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .ds-hero-title {
    gap: 0.04em;
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: clamp(2.8rem, 14vw, 4.15rem);
    line-height: 0.94;
    letter-spacing: -0.065em;
  }

  .ds-hero-subtitle {
    margin-bottom: 18px;
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .ds-hero-trust-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 20px;
  }

  .ds-hero-trust-row span {
    width: 100%;
    min-height: 36px;
  }
}

/* Very small phones */
@media (max-width: 390px) {
  .ds-hero-title {
    font-size: clamp(2.55rem, 13.5vw, 3.55rem);
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13B.1 — Hero title containment fix
   Keeps premium typography inside the hero card.
   ========================================================= */

.ds-hero-title {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  font-size: clamp(2.8rem, 4vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: -0.058em;
}

.ds-hero-title span {
  max-width: 100%;
}

.ds-panel--hero {
  overflow: hidden;
}

@media (min-width: 1041px) and (max-width: 1380px) {
  .ds-hero-title {
    font-size: clamp(2.9rem, 4.05vw, 4.7rem);
    letter-spacing: -0.052em;
  }
}

@media (max-width: 1040px) {
  .ds-hero-title {
    font-size: clamp(3rem, 7.4vw, 5.1rem);
    letter-spacing: -0.055em;
  }
}

@media (max-width: 680px) {
  .ds-hero-title {
    font-size: clamp(2.45rem, 11.5vw, 3.65rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13B.2 — Stronger hero title reduction
   More controlled premium title scale for current two-column layout.
   ========================================================= */

.ds-hero-title {
  font-size: clamp(2.55rem, 3.45vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
  max-width: 100%;
}

@media (min-width: 1041px) and (max-width: 1380px) {
  .ds-hero-title {
    font-size: clamp(2.45rem, 3.25vw, 3.95rem);
    line-height: 1.01;
    letter-spacing: -0.04em;
  }
}

@media (max-width: 1040px) {
  .ds-hero-title {
    font-size: clamp(2.75rem, 6.8vw, 4.55rem);
    line-height: 0.98;
  }
}

@media (max-width: 680px) {
  .ds-hero-title {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
    line-height: 1;
    letter-spacing: -0.04em;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13C — Hero + functional dashboard layout
   Moves operational widgets into a SaaS-style dashboard panel.
   ========================================================= */

/* Main top composition */
@media (min-width: 1041px) {
  .ds-main {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: start;
  }

  .ds-panel--hero {
    min-height: calc(100vh - 132px);
    justify-content: center;
  }
}

/* Hero becomes cleaner and more editorial */
.ds-panel--hero {
  background:
    radial-gradient(circle at 12% 10%, rgba(217, 182, 111, 0.08), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(119, 200, 255, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--ds-surface);
}

.ds-panel--hero .ds-local-note {
  margin-top: 4px;
}

/* Dashboard card */
.ds-dashboard-card {
  padding: clamp(20px, 2.2vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 78% 0%, rgba(119, 200, 255, 0.12), transparent 34%),
    radial-gradient(circle at 10% 16%, rgba(217, 182, 111, 0.08), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(12, 23, 39, 0.82);
  overflow: hidden;
}

.ds-dashboard-head {
  margin-bottom: 20px;
}

.ds-dashboard-head h2 {
  margin-top: 7px;
}

/* Clock becomes dashboard-like */
.ds-dashboard-clock .ds-clock-card {
  margin: 0;
  padding: 22px;
  border-color: rgba(119, 200, 255, 0.18);
  background:
    radial-gradient(circle at 82% 18%, rgba(119, 200, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(5, 11, 22, 0.88), rgba(8, 20, 36, 0.72));
}

.ds-dashboard-clock .ds-clock {
  font-size: clamp(3.4rem, 5vw, 5.25rem);
}

.ds-dashboard-clock .ds-date {
  color: rgba(244, 239, 228, 0.62);
}

/* Dashboard lower cards */
.ds-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 14px;
  margin-top: 14px;
}

.ds-dashboard-card .ds-next-card,
.ds-dashboard-card .ds-today-card {
  margin-top: 0;
  min-height: 100%;
  box-shadow: none;
}

.ds-dashboard-card .ds-next-card {
  border-color: rgba(217, 182, 111, 0.24);
}

.ds-dashboard-card .ds-today-card {
  border-color: rgba(119, 200, 255, 0.16);
}

.ds-dashboard-card .ds-next-content h2 {
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
}

.ds-dashboard-card .ds-countdown {
  font-size: clamp(1.1rem, 1.45vw, 1.35rem);
}

.ds-dashboard-card .ds-progress-number {
  font-size: clamp(1.45rem, 1.8vw, 1.8rem);
}

/* Form now feels like a command panel below dashboard */
.ds-form-card {
  background:
    radial-gradient(circle at 88% 0%, rgba(217, 182, 111, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    var(--ds-surface);
}

/* Tablet */
@media (max-width: 1040px) {
  .ds-dashboard-card {
    order: -1;
  }

  .ds-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-dashboard-clock .ds-clock {
    font-size: clamp(3.2rem, 8vw, 5rem);
  }
}

/* Mobile */
@media (max-width: 680px) {
  .ds-dashboard-card {
    padding: 18px;
    border-radius: 22px;
  }

  .ds-dashboard-head {
    margin-bottom: 16px;
  }

  .ds-dashboard-clock .ds-clock-card {
    padding: 18px;
  }

  .ds-dashboard-clock .ds-clock {
    font-size: clamp(2.65rem, 14vw, 3.85rem);
  }

  .ds-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ds-dashboard-card .ds-next-card,
  .ds-dashboard-card .ds-today-card {
    padding: 17px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13C — Hero + functional dashboard layout
   Turns the top area into an editorial hero + live dashboard.
   ========================================================= */

/* ---------- Main top composition ---------- */

@media (min-width: 1041px) {
  .ds-main {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: start;
  }

  .ds-panel--hero {
    min-height: calc(100vh - 132px);
    justify-content: center;
  }
}

/* ---------- Cleaner editorial hero ---------- */

.ds-panel--hero {
  background:
    radial-gradient(circle at 12% 10%, rgba(217, 182, 111, 0.08), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(119, 200, 255, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--ds-surface);
}

.ds-panel--hero .ds-local-note {
  margin-top: 4px;
}

/* ---------- Live dashboard card ---------- */

.ds-dashboard-card {
  padding: clamp(20px, 2.2vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 78% 0%, rgba(119, 200, 255, 0.12), transparent 34%),
    radial-gradient(circle at 10% 16%, rgba(217, 182, 111, 0.08), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(12, 23, 39, 0.82);
  overflow: hidden;
}

.ds-dashboard-head {
  margin-bottom: 20px;
}

.ds-dashboard-head h2 {
  margin-top: 7px;
}

/* ---------- Dashboard clock ---------- */

.ds-dashboard-clock .ds-clock-card {
  margin: 0;
  padding: 22px;
  border-color: rgba(119, 200, 255, 0.18);
  background:
    radial-gradient(circle at 82% 18%, rgba(119, 200, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(5, 11, 22, 0.88), rgba(8, 20, 36, 0.72));
}

.ds-dashboard-clock .ds-clock {
  font-size: clamp(3.4rem, 5vw, 5.25rem);
}

.ds-dashboard-clock .ds-date {
  color: rgba(244, 239, 228, 0.62);
}

/* ---------- Dashboard lower cards ---------- */

.ds-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 14px;
  margin-top: 14px;
}

.ds-dashboard-card .ds-next-card,
.ds-dashboard-card .ds-today-card {
  margin-top: 0;
  min-height: 100%;
  box-shadow: none;
}

.ds-dashboard-card .ds-next-card {
  border-color: rgba(217, 182, 111, 0.24);
}

.ds-dashboard-card .ds-today-card {
  border-color: rgba(119, 200, 255, 0.16);
}

.ds-dashboard-card .ds-next-content h2 {
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
}

.ds-dashboard-card .ds-countdown {
  font-size: clamp(1.1rem, 1.45vw, 1.35rem);
}

.ds-dashboard-card .ds-progress-number {
  font-size: clamp(1.45rem, 1.8vw, 1.8rem);
}

/* ---------- Form as command panel ---------- */

.ds-form-card {
  background:
    radial-gradient(circle at 88% 0%, rgba(217, 182, 111, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    var(--ds-surface);
}

/* ---------- Tablet behavior ---------- */

@media (max-width: 1040px) {
  .ds-dashboard-card {
    order: -1;
  }

  .ds-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-dashboard-clock .ds-clock {
    font-size: clamp(3.2rem, 8vw, 5rem);
  }
}

/* ---------- Mobile behavior ---------- */

@media (max-width: 680px) {
  .ds-dashboard-card {
    padding: 18px;
    border-radius: 22px;
  }

  .ds-dashboard-head {
    margin-bottom: 16px;
  }

  .ds-dashboard-clock .ds-clock-card {
    padding: 18px;
  }

  .ds-dashboard-clock .ds-clock {
    font-size: clamp(2.65rem, 14vw, 3.85rem);
  }

  .ds-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ds-dashboard-card .ds-next-card,
  .ds-dashboard-card .ds-today-card {
    padding: 17px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13C.1 — Premium analog clock
   Analog clock beside digital time inside live dashboard.
   ========================================================= */

.ds-clock-card--split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 220px;
  align-items: center;
  gap: 20px;
}

.ds-clock-card__digital {
  min-width: 0;
}

.ds-analog-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-analog-clock {
  --clock-size: 178px;
  position: relative;
  width: var(--clock-size);
  height: var(--clock-size);
  border-radius: 50%;
  border: 1px solid rgba(119, 200, 255, 0.14);
  background:
    radial-gradient(circle at 50% 50%, rgba(10, 22, 40, 0.88) 0%, rgba(6, 14, 26, 0.96) 62%, rgba(4, 10, 19, 1) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 0 34px rgba(119, 200, 255, 0.08),
    0 0 40px rgba(0, 0, 0, 0.18);
}

.ds-analog-clock__ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(119, 200, 255, 0.18);
  box-shadow: inset 0 0 24px rgba(119, 200, 255, 0.06);
}

.ds-analog-clock::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px solid rgba(119, 200, 255, 0.08);
}

.ds-analog-clock::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(217, 182, 111, 0.08);
}

.ds-analog-clock__marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 14px;
  border-radius: 999px;
  background: rgba(119, 200, 255, 0.72);
  box-shadow: 0 0 12px rgba(119, 200, 255, 0.16);
  transform-origin: center calc(50% + 67px);
}

.ds-analog-clock__marker--12 {
  transform: translate(-50%, -50%) rotate(0deg) translateY(-67px);
}

.ds-analog-clock__marker--3 {
  transform: translate(-50%, -50%) rotate(90deg) translateY(-67px);
}

.ds-analog-clock__marker--6 {
  transform: translate(-50%, -50%) rotate(180deg) translateY(-67px);
}

.ds-analog-clock__marker--9 {
  transform: translate(-50%, -50%) rotate(270deg) translateY(-67px);
}

.ds-analog-clock__hand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: bottom center;
  border-radius: 999px;
  will-change: transform;
}

.ds-analog-clock__hand--hour {
  width: 4px;
  height: 44px;
  background: linear-gradient(180deg, rgba(244, 239, 228, 0.96), rgba(217, 182, 111, 0.85));
  box-shadow: 0 0 10px rgba(217, 182, 111, 0.2);
  margin-left: -2px;
  margin-top: -44px;
}

.ds-analog-clock__hand--minute {
  width: 3px;
  height: 60px;
  background: linear-gradient(180deg, rgba(168, 223, 255, 0.98), rgba(108, 174, 255, 0.82));
  box-shadow: 0 0 12px rgba(108, 174, 255, 0.24);
  margin-left: -1.5px;
  margin-top: -60px;
}

.ds-analog-clock__hand--second {
  width: 2px;
  height: 68px;
  background: linear-gradient(180deg, rgba(217, 182, 111, 1), rgba(255, 214, 128, 0.88));
  box-shadow: 0 0 14px rgba(217, 182, 111, 0.28);
  margin-left: -1px;
  margin-top: -68px;
}

.ds-analog-clock__center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 239, 228, 1) 0 30%, rgba(217, 182, 111, 1) 31% 100%);
  box-shadow:
    0 0 0 4px rgba(7, 16, 30, 0.9),
    0 0 16px rgba(217, 182, 111, 0.26);
  transform: translate(-50%, -50%);
}

/* Responsive */
@media (max-width: 1180px) {
  .ds-clock-card--split {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 16px;
  }

  .ds-analog-clock {
    --clock-size: 154px;
  }
}

@media (max-width: 820px) {
  .ds-clock-card--split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ds-analog-wrap {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .ds-analog-wrap {
    justify-content: center;
  }

  .ds-analog-clock {
    --clock-size: 146px;
  }
}

@media (max-width: 420px) {
  .ds-analog-clock {
    --clock-size: 132px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13C.2 — Analog clock marker alignment
   Fixes 3 / 6 / 9 marker positioning.
   ========================================================= */

.ds-analog-clock__marker {
  position: absolute;
  border-radius: 999px;
  background: rgba(119, 200, 255, 0.78);
  box-shadow: 0 0 12px rgba(119, 200, 255, 0.16);
}

/* Vertical markers */
.ds-analog-clock__marker--12,
.ds-analog-clock__marker--6 {
  width: 2px;
  height: 14px;
  left: 50%;
  transform: translateX(-50%);
}

/* Horizontal markers */
.ds-analog-clock__marker--3,
.ds-analog-clock__marker--9 {
  width: 14px;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.ds-analog-clock__marker--12 {
  top: 14px;
}

.ds-analog-clock__marker--3 {
  right: 14px;
}

.ds-analog-clock__marker--6 {
  bottom: 14px;
}

.ds-analog-clock__marker--9 {
  left: 14px;
}

/* =========================================================
   DAILY SIGNAL PATCH 13C.3 — Definitive analog marker fix
   Fully resets marker positioning for 12 / 3 / 6 / 9.
   ========================================================= */

.ds-analog-clock__marker {
  position: absolute;
  border-radius: 999px;
  background: rgba(119, 200, 255, 0.82);
  box-shadow: 0 0 12px rgba(119, 200, 255, 0.16);
  transform-origin: center center;
}

/* Reset and place vertical markers */
.ds-analog-clock__marker--12,
.ds-analog-clock__marker--6 {
  width: 2px;
  height: 14px;
  left: 50%;
  right: auto;
  top: auto;
  bottom: auto;
  transform: translateX(-50%) !important;
}

/* Reset and place horizontal markers */
.ds-analog-clock__marker--3,
.ds-analog-clock__marker--9 {
  width: 14px;
  height: 2px;
  top: 50%;
  bottom: auto;
  left: auto;
  right: auto;
  transform: translateY(-50%) !important;
}

.ds-analog-clock__marker--12 {
  top: 14px;
}

.ds-analog-clock__marker--3 {
  right: 14px;
}

.ds-analog-clock__marker--6 {
  bottom: 14px;
}

.ds-analog-clock__marker--9 {
  left: 14px;
}

/* =========================================================
   DAILY SIGNAL PATCH 13D — Premium planner board
   Makes the weekly planner feel closer to a SaaS calendar board.
   CSS-only, no JS changes.
   ========================================================= */

/* ---------- Planner shell ---------- */

.ds-planner-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 14% 0%, rgba(217, 182, 111, 0.08), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(119, 200, 255, 0.10), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 22, 38, 0.84);
}

.ds-planner-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
  opacity: 0.55;
}

.ds-planner-card > * {
  position: relative;
  z-index: 1;
}

/* ---------- Planner heading ---------- */

.ds-planner-card .ds-section-head {
  padding: 0 0 18px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.12);
}

.ds-planner-card .ds-section-head h2 {
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
}

.ds-planner-card .ds-version {
  border-color: rgba(119, 200, 255, 0.18);
  background: rgba(119, 200, 255, 0.08);
  color: rgba(168, 223, 255, 0.88);
}

/* ---------- Planner grid ---------- */

.ds-planner-card .ds-week-grid {
  margin-top: 18px;
  gap: 12px;
}

@media (min-width: 1181px) {
  .ds-planner-card .ds-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Day columns as calendar panels ---------- */

.ds-planner-card .ds-day-column {
  position: relative;
  min-height: 156px;
  padding: 14px;
  border-color: rgba(170, 205, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 50px rgba(0, 0, 0, 0.12);
}

.ds-planner-card .ds-day-column::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 48px;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 182, 111, 0.22), transparent);
  pointer-events: none;
}

.ds-planner-card .ds-day-column.is-today {
  border-color: rgba(217, 182, 111, 0.38);
  background:
    radial-gradient(circle at 16% 0%, rgba(217, 182, 111, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    rgba(5, 13, 24, 0.58);
  box-shadow:
    0 0 36px rgba(217, 182, 111, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

/* ---------- Day heading ---------- */

.ds-planner-card .ds-day-head {
  margin-bottom: 16px;
}

.ds-planner-card .ds-day-title {
  color: var(--ds-text);
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.ds-planner-card .ds-day-count {
  color: rgba(169, 180, 199, 0.68);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.ds-planner-card .ds-today-pill {
  min-height: 20px;
  padding: 3px 7px;
  font-size: 0.58rem;
}

/* ---------- Signal cards more calendar-like ---------- */

.ds-planner-card .ds-signal-list {
  gap: 8px;
}

.ds-planner-card .ds-signal-card {
  padding: 10px 10px 10px 13px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, var(--card-bg, rgba(119, 200, 255, 0.10)), rgba(255, 255, 255, 0.018));
  box-shadow: none;
}

.ds-planner-card .ds-signal-card::before {
  top: 10px;
  bottom: 10px;
  width: 3px;
}

.ds-planner-card .ds-signal-meta {
  margin-bottom: 1px;
}

.ds-planner-card .ds-signal-time {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.ds-planner-card .ds-signal-status {
  font-size: 0.62rem;
  opacity: 0.72;
}

.ds-planner-card .ds-signal-name {
  margin-top: 3px;
  font-size: 0.9rem;
  line-height: 1.25;
}

.ds-planner-card .ds-signal-note {
  margin-top: 2px;
  font-size: 0.76rem;
  line-height: 1.35;
}

.ds-planner-card .ds-signal-submeta {
  margin-top: 4px;
  font-size: 0.68rem;
  opacity: 0.84;
}

/* ---------- Planner actions compact ---------- */

.ds-planner-card .ds-signal-actions {
  gap: 6px;
  margin-top: 9px;
}

.ds-planner-card .ds-signal-action {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.66rem;
  background: rgba(255, 255, 255, 0.026);
}

/* ---------- Empty states ---------- */

.ds-planner-card .ds-empty-day {
  min-height: 54px;
  border-color: rgba(170, 205, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.035), rgba(217, 182, 111, 0.02));
  color: rgba(169, 180, 199, 0.68);
}

/* ---------- Desktop density tweak ---------- */

@media (min-width: 1181px) {
  .ds-planner-card .ds-day-column:nth-child(7) {
    grid-column: span 2;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 1040px) {
  .ds-planner-card .ds-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-planner-card .ds-day-column:nth-child(7) {
    grid-column: span 2;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 680px) {
  .ds-planner-card .ds-section-head {
    padding-bottom: 15px;
  }

  .ds-planner-card .ds-week-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .ds-planner-card .ds-day-column,
  .ds-planner-card .ds-day-column:nth-child(7) {
    grid-column: auto;
  }

  .ds-planner-card .ds-day-column {
    padding: 13px;
  }

  .ds-planner-card .ds-signal-card {
    padding: 11px 11px 11px 14px;
  }

  .ds-planner-card .ds-signal-actions {
    grid-template-columns: 1fr;
  }

  .ds-planner-card .ds-signal-action {
    min-height: 36px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13E — Smart Features cards
   Adds premium SaaS-style feature cards below the planner.
   ========================================================= */

.ds-features-card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.2vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 14% 0%, rgba(119, 200, 255, 0.10), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(217, 182, 111, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 22, 38, 0.84);
}

.ds-features-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
  opacity: 0.42;
}

.ds-features-card > * {
  position: relative;
  z-index: 1;
}

.ds-features-head {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.12);
}

.ds-features-head h2 {
  margin-top: 7px;
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
}

.ds-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ds-feature-item {
  position: relative;
  min-height: 172px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(170, 205, 255, 0.13);
  border-radius: 20px;
  background:
    radial-gradient(circle at 16% 0%, var(--feature-glow, rgba(119, 200, 255, 0.10)), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.044), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 46px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ds-feature-item:hover {
  transform: translateY(-2px);
  border-color: var(--feature-border, rgba(119, 200, 255, 0.24));
  background:
    radial-gradient(circle at 16% 0%, var(--feature-glow-strong, rgba(119, 200, 255, 0.14)), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(5, 13, 24, 0.6);
}

.ds-feature-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  border: 1px solid var(--feature-border, rgba(119, 200, 255, 0.18));
  border-radius: 14px;
  background: var(--feature-bg, rgba(119, 200, 255, 0.09));
  color: var(--feature-color, var(--ds-blue));
  box-shadow: 0 0 24px var(--feature-shadow, rgba(119, 200, 255, 0.10));
}

.ds-feature-icon span {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.ds-feature-item h3 {
  margin: 0 0 8px;
  color: var(--ds-text);
  font-size: 1.02rem;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.ds-feature-item p {
  margin: 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Feature color accents */
.ds-feature-item--blue {
  --feature-color: var(--ds-blue);
  --feature-bg: rgba(119, 200, 255, 0.10);
  --feature-border: rgba(119, 200, 255, 0.25);
  --feature-glow: rgba(119, 200, 255, 0.10);
  --feature-glow-strong: rgba(119, 200, 255, 0.16);
  --feature-shadow: rgba(119, 200, 255, 0.12);
}

.ds-feature-item--gold {
  --feature-color: var(--ds-gold);
  --feature-bg: rgba(217, 182, 111, 0.11);
  --feature-border: rgba(217, 182, 111, 0.28);
  --feature-glow: rgba(217, 182, 111, 0.10);
  --feature-glow-strong: rgba(217, 182, 111, 0.15);
  --feature-shadow: rgba(217, 182, 111, 0.12);
}

.ds-feature-item--purple {
  --feature-color: var(--ds-purple);
  --feature-bg: rgba(167, 139, 250, 0.11);
  --feature-border: rgba(167, 139, 250, 0.26);
  --feature-glow: rgba(167, 139, 250, 0.10);
  --feature-glow-strong: rgba(167, 139, 250, 0.15);
  --feature-shadow: rgba(167, 139, 250, 0.12);
}

.ds-feature-item--cyan {
  --feature-color: var(--ds-cyan);
  --feature-bg: rgba(103, 232, 249, 0.10);
  --feature-border: rgba(103, 232, 249, 0.24);
  --feature-glow: rgba(103, 232, 249, 0.09);
  --feature-glow-strong: rgba(103, 232, 249, 0.14);
  --feature-shadow: rgba(103, 232, 249, 0.10);
}

.ds-feature-item--green {
  --feature-color: var(--ds-green);
  --feature-bg: rgba(97, 211, 148, 0.10);
  --feature-border: rgba(97, 211, 148, 0.24);
  --feature-glow: rgba(97, 211, 148, 0.09);
  --feature-glow-strong: rgba(97, 211, 148, 0.14);
  --feature-shadow: rgba(97, 211, 148, 0.10);
}

.ds-feature-item--calendar {
  --feature-color: var(--ds-amber);
  --feature-bg: rgba(246, 199, 111, 0.10);
  --feature-border: rgba(246, 199, 111, 0.24);
  --feature-glow: rgba(246, 199, 111, 0.09);
  --feature-glow-strong: rgba(246, 199, 111, 0.14);
  --feature-shadow: rgba(246, 199, 111, 0.10);
}

/* Tablet */
@media (max-width: 1040px) {
  .ds-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 680px) {
  .ds-features-card {
    padding: 18px;
    border-radius: 22px;
  }

  .ds-features-head {
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .ds-feature-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .ds-feature-item {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
  }

  .ds-feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 13px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13F — Premium closing CTA and footer
   SaaS-style closing section with local-first messaging.
   ========================================================= */

.ds-closing-cta {
  position: relative;
  width: min(100%, var(--ds-max-width));
  margin: 24px auto 0;
  overflow: hidden;
  border: 1px solid rgba(170, 205, 255, 0.16);
  border-radius: var(--ds-radius-lg);
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 182, 111, 0.12), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(119, 200, 255, 0.10), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(8, 18, 32, 0.82);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ds-closing-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.032) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
  opacity: 0.5;
}

.ds-closing-cta__line {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  height: 1px;
  pointer-events: none;
  opacity: 0.8;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(217, 182, 111, 0.26) 20%,
    rgba(119, 200, 255, 0.18) 50%,
    rgba(217, 182, 111, 0.26) 80%,
    transparent 100%
  );
}

.ds-closing-cta__content {
  position: relative;
  z-index: 1;
  min-height: 178px;
  padding: clamp(24px, 3vw, 38px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.ds-closing-cta h2 {
  margin: 8px 0 8px;
  color: var(--ds-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.3vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.ds-closing-cta p {
  max-width: 610px;
  margin: 0;
  color: rgba(169, 180, 199, 0.84);
  font-size: 0.98rem;
  line-height: 1.6;
}

.ds-closing-cta__button {
  min-width: 176px;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

/* Footer */
.ds-premium-footer {
  width: min(100%, var(--ds-max-width));
  margin: 18px auto 0;
  padding: 18px 4px 0;
  border-top: 1px solid rgba(170, 205, 255, 0.10);
  color: var(--ds-soft);
  font-size: 0.84rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: 22px;
}

.ds-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ds-text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ds-footer-brand__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.ds-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ds-footer-nav a {
  color: rgba(169, 180, 199, 0.76);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.ds-footer-nav a:hover {
  color: var(--ds-gold);
}

.ds-premium-footer p {
  margin: 0;
  color: rgba(169, 180, 199, 0.68);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: right;
}

/* Tablet */
@media (max-width: 1040px) {
  .ds-closing-cta__content {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ds-closing-cta__button {
    width: fit-content;
  }

  .ds-premium-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ds-footer-brand,
  .ds-footer-nav {
    justify-content: center;
  }

  .ds-premium-footer p {
    text-align: center;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .ds-closing-cta {
    border-radius: 22px;
    margin-top: 18px;
  }

  .ds-closing-cta__content {
    padding: 22px 18px 46px;
    gap: 18px;
  }

  .ds-closing-cta h2 {
    font-size: clamp(2rem, 10vw, 2.75rem);
    line-height: 1;
  }

  .ds-closing-cta p {
    font-size: 0.9rem;
  }

  .ds-closing-cta__button {
    width: 100%;
    min-height: 46px;
  }

  .ds-closing-cta__line {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .ds-premium-footer {
    gap: 14px;
    padding-top: 16px;
  }

  .ds-footer-nav {
    gap: 10px 14px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13F.1 — Analog-style back to top
   Circular premium back-to-top control inspired by the clock.
   ========================================================= */

.ds-back-to-top {
  position: fixed;
  right: clamp(18px, 2.2vw, 34px);
  bottom: clamp(18px, 2.2vw, 34px);
  z-index: 40;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(119, 200, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(10, 22, 40, 0.92) 0%, rgba(6, 14, 26, 0.96) 62%, rgba(4, 10, 19, 1) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 0 24px rgba(119, 200, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(217, 182, 111, 0.08);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.ds-back-to-top:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 182, 111, 0.36);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 28px rgba(119, 200, 255, 0.10),
    0 22px 52px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(217, 182, 111, 0.16);
}

.ds-back-to-top:focus-visible {
  outline: 2px solid rgba(217, 182, 111, 0.76);
  outline-offset: 4px;
}

.ds-back-to-top__ring {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(119, 200, 255, 0.22);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(119, 200, 255, 0.06);
}

.ds-back-to-top::before,
.ds-back-to-top::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(119, 200, 255, 0.72);
  box-shadow: 0 0 10px rgba(119, 200, 255, 0.18);
}

.ds-back-to-top::before {
  top: 7px;
  left: 50%;
  width: 2px;
  height: 8px;
  transform: translateX(-50%);
}

.ds-back-to-top::after {
  right: 7px;
  top: 50%;
  width: 8px;
  height: 2px;
  transform: translateY(-50%);
}

.ds-back-to-top__needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217, 182, 111, 1), rgba(255, 224, 160, 0.88));
  box-shadow: 0 0 14px rgba(217, 182, 111, 0.28);
  transform: translate(-50%, -86%) rotate(0deg);
  transform-origin: bottom center;
}

.ds-back-to-top__needle::before,
.ds-back-to-top__needle::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: inherit;
  transform-origin: bottom center;
}

.ds-back-to-top__needle::before {
  left: -5px;
  transform: rotate(38deg);
}

.ds-back-to-top__needle::after {
  right: -5px;
  transform: rotate(-38deg);
}

.ds-back-to-top__center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 239, 228, 1) 0 30%, rgba(217, 182, 111, 1) 31% 100%);
  box-shadow:
    0 0 0 4px rgba(7, 16, 30, 0.9),
    0 0 14px rgba(217, 182, 111, 0.24);
  transform: translate(-50%, -50%);
}

/* Mobile */
@media (max-width: 680px) {
  .ds-back-to-top {
    width: 50px;
    height: 50px;
    right: 14px;
    bottom: 14px;
  }

  .ds-back-to-top__needle {
    height: 21px;
  }

  .ds-back-to-top__ring {
    inset: 7px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13F.2 — Back to top clock refinement
   Static clock-style icon set to 1:00.
   ========================================================= */

/* Base button */
.ds-back-to-top {
  position: fixed;
  right: clamp(18px, 2.2vw, 34px);
  bottom: clamp(18px, 2.2vw, 34px);
  z-index: 40;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(119, 200, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(10, 22, 40, 0.92) 0%, rgba(6, 14, 26, 0.96) 62%, rgba(4, 10, 19, 1) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 0 24px rgba(119, 200, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(217, 182, 111, 0.08);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.ds-back-to-top:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 182, 111, 0.36);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 28px rgba(119, 200, 255, 0.10),
    0 22px 52px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(217, 182, 111, 0.16);
}

.ds-back-to-top:focus-visible {
  outline: 2px solid rgba(217, 182, 111, 0.76);
  outline-offset: 4px;
}

/* Remove old fake markers */
.ds-back-to-top::before,
.ds-back-to-top::after {
  content: none;
}

/* Ring + 4 markers */
.ds-back-to-top__ring {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(119, 200, 255, 0.22);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(119, 200, 255, 0.06);
}

.ds-back-to-top__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(rgba(119, 200, 255, 0.82), rgba(119, 200, 255, 0.82)) top center / 2px 8px no-repeat,
    linear-gradient(rgba(119, 200, 255, 0.82), rgba(119, 200, 255, 0.82)) bottom center / 2px 8px no-repeat,
    linear-gradient(rgba(119, 200, 255, 0.82), rgba(119, 200, 255, 0.82)) left center / 8px 2px no-repeat,
    linear-gradient(rgba(119, 200, 255, 0.82), rgba(119, 200, 255, 0.82)) right center / 8px 2px no-repeat;
  filter: drop-shadow(0 0 6px rgba(119, 200, 255, 0.16));
}

/* Minute hand = yellow, straight up */
.ds-back-to-top__needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217, 182, 111, 1), rgba(255, 224, 160, 0.9));
  box-shadow: 0 0 12px rgba(217, 182, 111, 0.28);
  transform: translate(-50%, -100%) rotate(0deg);
  transform-origin: bottom center;
}

/* Hour hand = blue, shorter, angled to 1:00 */
.ds-back-to-top__needle::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(168, 223, 255, 0.98), rgba(108, 174, 255, 0.84));
  box-shadow: 0 0 12px rgba(108, 174, 255, 0.24);
  transform: translateX(-50%) rotate(30deg);
  transform-origin: bottom center;
}

/* Remove old arrow head / top dot */
.ds-back-to-top__needle::after {
  content: none;
}

/* Center hub */
.ds-back-to-top__center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 239, 228, 1) 0 30%, rgba(217, 182, 111, 1) 31% 100%);
  box-shadow:
    0 0 0 4px rgba(7, 16, 30, 0.9),
    0 0 14px rgba(217, 182, 111, 0.24);
  transform: translate(-50%, -50%);
}

/* Mobile */
@media (max-width: 680px) {
  .ds-back-to-top {
    width: 50px;
    height: 50px;
    right: 14px;
    bottom: 14px;
  }

  .ds-back-to-top__ring {
    inset: 7px;
  }

  .ds-back-to-top__needle {
    height: 16px;
  }

  .ds-back-to-top__needle::before {
    height: 11px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13F.3 — Independent clock hands
   Yellow minute hand and blue hour hand are anchored separately.
   Visual time: 1:00.
   ========================================================= */

/* Yellow minute hand: straight up, independent */
.ds-back-to-top__needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217, 182, 111, 1), rgba(255, 224, 160, 0.9));
  box-shadow: 0 0 12px rgba(217, 182, 111, 0.28);
  transform: translate(-50%, -100%) rotate(0deg);
  transform-origin: bottom center;
  z-index: 3;
}

/* Remove old blue hand attached to yellow hand */
.ds-back-to-top__needle::before,
.ds-back-to-top__needle::after {
  content: none !important;
}

/* Blue hour hand: separate, anchored to clock center via the ring */
.ds-back-to-top__ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(168, 223, 255, 0.98), rgba(108, 174, 255, 0.84));
  box-shadow: 0 0 12px rgba(108, 174, 255, 0.24);
  transform: translate(-50%, -100%) rotate(30deg);
  transform-origin: bottom center;
  z-index: 2;
}

/* Center hub stays above both hands */
.ds-back-to-top__center {
  z-index: 4;
}

/* Mobile proportions */
@media (max-width: 680px) {
  .ds-back-to-top__needle {
    height: 21px;
  }

  .ds-back-to-top__ring::after {
    height: 12px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 13F.4 — Longer blue hour hand
   Extends the independent blue hand while keeping it anchored.
   ========================================================= */

.ds-back-to-top__ring::after {
  height: 21px;
}

@media (max-width: 680px) {
  .ds-back-to-top__ring::after {
    height: 15px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 14 — Product layout restructure
   Left: hero + features. Right: dashboard + form.
   Planner becomes full-width to reduce vertical length.
   ========================================================= */

.ds-main--product {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(18px, 2vw, 28px);
}

.ds-left-stack,
.ds-right-stack {
  display: grid;
  gap: clamp(18px, 2vw, 24px);
  min-width: 0;
}

.ds-main--product .ds-panel--hero {
  min-height: auto;
  justify-content: flex-start;
}

@media (min-width: 1041px) {
  .ds-main--product .ds-panel--hero {
    position: sticky;
    top: 108px;
  }

  .ds-left-stack {
    align-self: start;
  }
}

/* Features become compact in the left column */
.ds-left-stack .ds-features-card {
  padding: clamp(18px, 1.8vw, 24px);
}

.ds-left-stack .ds-features-head {
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.ds-left-stack .ds-features-head h2 {
  font-size: clamp(1.35rem, 1.7vw, 1.85rem);
}

.ds-left-stack .ds-feature-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.ds-left-stack .ds-feature-item {
  min-height: auto;
  padding: 14px;
  border-radius: 17px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
}

.ds-left-stack .ds-feature-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 0;
  grid-row: span 2;
}

.ds-left-stack .ds-feature-item h3 {
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.ds-left-stack .ds-feature-item p {
  font-size: 0.78rem;
  line-height: 1.42;
}

/* Right stack keeps operational panels */
.ds-right-stack .ds-dashboard-card,
.ds-right-stack .ds-form-card {
  width: 100%;
}

/* Full-width planner */
.ds-planner-card--full {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.ds-planner-card--full .ds-section-head {
  align-items: center;
}

/* Override previous planner density: use more horizontal space */
@media (min-width: 1181px) {
  .ds-planner-card--full .ds-week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ds-planner-card--full .ds-day-column:nth-child(7) {
    grid-column: auto;
  }
}

@media (min-width: 1041px) and (max-width: 1180px) {
  .ds-planner-card--full .ds-week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ds-planner-card--full .ds-day-column:nth-child(7) {
    grid-column: span 3;
  }
}

/* Tablet */
@media (max-width: 1040px) {
  .ds-main--product {
    grid-template-columns: 1fr;
  }

  .ds-main--product .ds-panel--hero {
    position: relative;
    top: auto;
  }

  .ds-left-stack,
  .ds-right-stack {
    gap: 18px;
  }

  .ds-left-stack .ds-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-left-stack .ds-feature-item {
    display: block;
  }

  .ds-left-stack .ds-feature-icon {
    margin-bottom: 13px;
  }

  .ds-planner-card--full .ds-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-planner-card--full .ds-day-column:nth-child(7) {
    grid-column: span 2;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .ds-main--product {
    gap: 16px;
  }

  .ds-left-stack,
  .ds-right-stack {
    gap: 16px;
  }

  .ds-left-stack .ds-feature-grid,
  .ds-planner-card--full .ds-week-grid {
    grid-template-columns: 1fr;
  }

  .ds-left-stack .ds-feature-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
  }

  .ds-left-stack .ds-feature-icon {
    margin-bottom: 0;
    grid-row: span 2;
  }

  .ds-planner-card--full .ds-day-column,
  .ds-planner-card--full .ds-day-column:nth-child(7) {
    grid-column: auto;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 15 — Visual density polish
   Refines spacing, card density and page rhythm after product layout.
   ========================================================= */

/* ---------- Global rhythm ---------- */

.ds-app {
  padding-top: clamp(14px, 1.7vw, 24px);
}

.ds-main--product {
  gap: clamp(16px, 1.7vw, 24px);
}

.ds-left-stack,
.ds-right-stack {
  gap: clamp(16px, 1.6vw, 22px);
}

/* ---------- Header slightly leaner ---------- */

.ds-product-header {
  min-height: 68px;
  padding-block: 10px;
}

.ds-product-brand__mark {
  width: 38px;
  height: 38px;
}

.ds-product-actions .ds-status-pill {
  min-height: 34px;
}

.ds-product-actions #testSoundButton {
  min-height: 38px;
}

/* ---------- Hero density ---------- */

.ds-main--product .ds-panel--hero {
  padding: clamp(26px, 2.7vw, 40px);
}

.ds-main--product .ds-hero-title {
  margin-top: 16px;
  margin-bottom: 14px;
}

.ds-main--product .ds-hero-subtitle {
  margin-bottom: 18px;
}

.ds-main--product .ds-hero-trust-row {
  margin-bottom: 18px;
}

.ds-main--product .ds-local-note {
  padding: 17px 18px;
}

.ds-main--product .ds-reliability-list {
  margin-top: 7px;
}

/* ---------- Features compact polish ---------- */

.ds-left-stack .ds-features-card {
  padding: clamp(16px, 1.6vw, 22px);
}

.ds-left-stack .ds-feature-grid {
  gap: 9px;
}

.ds-left-stack .ds-feature-item {
  padding: 13px;
  min-height: 0;
}

.ds-left-stack .ds-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 13px;
}

.ds-left-stack .ds-feature-item h3 {
  font-size: 0.92rem;
}

.ds-left-stack .ds-feature-item p {
  font-size: 0.76rem;
  line-height: 1.38;
}

/* ---------- Dashboard density ---------- */

.ds-dashboard-card {
  padding: clamp(18px, 1.9vw, 25px);
}

.ds-dashboard-head {
  margin-bottom: 16px;
}

.ds-dashboard-clock .ds-clock-card {
  padding: 18px 20px;
}

.ds-dashboard-clock .ds-clock {
  font-size: clamp(3.1rem, 4.4vw, 4.75rem);
}

.ds-clock-card--split {
  grid-template-columns: minmax(0, 1.12fr) 188px;
  gap: 16px;
}

.ds-analog-clock {
  --clock-size: 152px;
}

.ds-dashboard-grid {
  gap: 12px;
  margin-top: 12px;
}

.ds-dashboard-card .ds-next-card,
.ds-dashboard-card .ds-today-card {
  padding: 17px;
}

.ds-dashboard-card .ds-next-content h2 {
  font-size: clamp(1.25rem, 1.55vw, 1.55rem);
}

.ds-dashboard-card .ds-next-content p,
.ds-dashboard-card .ds-today-content p {
  font-size: 0.84rem;
}

.ds-dashboard-card .ds-countdown {
  margin-top: 10px;
}

/* ---------- Form density ---------- */

.ds-form-card {
  padding: clamp(20px, 2vw, 27px);
}

.ds-form {
  gap: 15px;
}

.ds-field label {
  margin-bottom: 7px;
}

.ds-field input,
.ds-field select,
.ds-field textarea {
  min-height: 46px;
}

.ds-field textarea {
  min-height: 86px;
}

.ds-form-actions {
  margin-top: 0;
}

.ds-form-note {
  margin-top: -2px;
}

.ds-data-tools {
  padding: 12px;
}

/* ---------- Full-width planner density ---------- */

.ds-planner-card--full {
  padding: clamp(20px, 2.1vw, 28px);
}

.ds-planner-card--full .ds-section-head {
  padding-bottom: 15px;
}

.ds-planner-card--full .ds-week-grid {
  margin-top: 16px;
  gap: 11px;
}

.ds-planner-card--full .ds-day-column {
  min-height: 138px;
  padding: 13px;
}

.ds-planner-card--full .ds-day-head {
  margin-bottom: 13px;
}

.ds-planner-card--full .ds-day-column::before {
  top: 44px;
}

.ds-planner-card--full .ds-signal-list {
  gap: 7px;
}

.ds-planner-card--full .ds-signal-card {
  padding: 9px 9px 9px 12px;
}

.ds-planner-card--full .ds-signal-name {
  font-size: 0.86rem;
}

.ds-planner-card--full .ds-signal-note {
  font-size: 0.73rem;
}

.ds-planner-card--full .ds-signal-submeta {
  font-size: 0.66rem;
}

.ds-planner-card--full .ds-signal-actions {
  margin-top: 7px;
}

/* ---------- Closing CTA / footer density ---------- */

.ds-closing-cta {
  margin-top: 20px;
}

.ds-closing-cta__content {
  min-height: 150px;
  padding: clamp(22px, 2.5vw, 32px);
}

.ds-closing-cta h2 {
  font-size: clamp(1.9rem, 2.9vw, 3.05rem);
}

.ds-premium-footer {
  margin-top: 14px;
}

/* ---------- Desktop fine tuning ---------- */

@media (min-width: 1181px) {
  .ds-main--product {
    grid-template-columns: minmax(390px, 0.78fr) minmax(0, 1.22fr);
  }

  .ds-left-stack .ds-panel--hero {
    max-width: 100%;
  }

  .ds-left-stack .ds-features-card {
    max-width: 100%;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 1040px) {
  .ds-product-header {
    min-height: auto;
  }

  .ds-clock-card--split {
    grid-template-columns: minmax(0, 1fr) 170px;
  }

  .ds-analog-clock {
    --clock-size: 144px;
  }

  .ds-dashboard-clock .ds-clock {
    font-size: clamp(3rem, 7vw, 4.6rem);
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 680px) {
  .ds-app {
    padding-top: 12px;
  }

  .ds-main--product .ds-panel--hero,
  .ds-dashboard-card,
  .ds-form-card,
  .ds-planner-card--full,
  .ds-features-card {
    padding: 17px;
  }

  .ds-clock-card--split {
    grid-template-columns: 1fr;
  }

  .ds-dashboard-clock .ds-clock {
    font-size: clamp(2.45rem, 12.5vw, 3.55rem);
  }

  .ds-analog-clock {
    --clock-size: 132px;
  }

  .ds-analog-wrap {
    margin-top: -2px;
  }

  .ds-dashboard-grid {
    gap: 10px;
  }

  .ds-left-stack .ds-feature-item {
    padding: 13px;
  }

  .ds-planner-card--full .ds-day-column {
    min-height: auto;
  }

  .ds-closing-cta__content {
    min-height: auto;
    padding: 20px 17px 42px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 17 — Micro-interactions polish
   Premium hover/focus transitions without heavy animations.
   ========================================================= */

/* ---------- Global interaction tuning ---------- */

.ds-panel,
.ds-feature-item,
.ds-day-column,
.ds-signal-card,
.ds-clock-card,
.ds-next-card,
.ds-today-card,
.ds-local-note,
.ds-data-tools {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

/* ---------- Premium buttons ---------- */

.ds-button {
  position: relative;
  overflow: hidden;
}

.ds-button::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: opacity 180ms ease, transform 420ms ease;
}

.ds-button:hover::before {
  opacity: 0.65;
  transform: translateX(120%);
}

.ds-button--primary:hover:not(:disabled) {
  box-shadow:
    0 0 32px rgba(217, 182, 111, 0.22),
    0 14px 32px rgba(0, 0, 0, 0.24);
}

.ds-button--ghost:hover:not(:disabled) {
  box-shadow:
    0 0 24px rgba(119, 200, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

/* ---------- Header nav ---------- */

.ds-product-nav a {
  isolation: isolate;
}

.ds-product-nav a:hover {
  transform: translateY(-1px);
}

.ds-product-nav a:focus-visible,
.ds-footer-nav a:focus-visible {
  outline: 2px solid rgba(217, 182, 111, 0.66);
  outline-offset: 5px;
  border-radius: 999px;
}

/* ---------- Dashboard cards ---------- */

.ds-dashboard-card:hover {
  border-color: rgba(119, 200, 255, 0.24);
  box-shadow:
    var(--ds-shadow),
    0 0 42px rgba(119, 200, 255, 0.055);
}

.ds-dashboard-card .ds-clock-card:hover {
  border-color: rgba(119, 200, 255, 0.28);
  box-shadow:
    var(--ds-glow-blue),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ds-dashboard-card .ds-next-card:hover {
  border-color: rgba(217, 182, 111, 0.34);
  transform: translateY(-1px);
}

.ds-dashboard-card .ds-today-card:hover {
  border-color: rgba(119, 200, 255, 0.24);
  transform: translateY(-1px);
}

/* ---------- Analog clock subtle life ---------- */

.ds-analog-clock {
  transition:
    transform 220ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.ds-clock-card:hover .ds-analog-clock {
  transform: scale(1.015);
  border-color: rgba(217, 182, 111, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 0 34px rgba(119, 200, 255, 0.10),
    0 0 42px rgba(217, 182, 111, 0.08);
}

/* ---------- Feature cards ---------- */

.ds-feature-item:hover .ds-feature-icon {
  transform: translateY(-1px) scale(1.03);
}

.ds-feature-icon {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

/* ---------- Planner interactions ---------- */

.ds-planner-card--full .ds-day-column:hover {
  transform: translateY(-1px);
  border-color: rgba(119, 200, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 48px rgba(0, 0, 0, 0.16);
}

.ds-planner-card--full .ds-day-column.is-today:hover {
  border-color: rgba(217, 182, 111, 0.46);
  box-shadow:
    0 0 38px rgba(217, 182, 111, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ds-planner-card--full .ds-signal-card:hover {
  transform: translateY(-1px);
  border-color: var(--card-border, rgba(119, 200, 255, 0.26));
  background:
    linear-gradient(135deg, var(--card-bg, rgba(119, 200, 255, 0.13)), rgba(255, 255, 255, 0.028));
}

.ds-planner-card--full .ds-signal-action:hover {
  transform: translateY(-1px);
}

/* ---------- Form controls ---------- */

.ds-field input,
.ds-field select,
.ds-field textarea {
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.ds-field input:hover,
.ds-field select:hover,
.ds-field textarea:hover {
  border-color: rgba(119, 200, 255, 0.24);
  background: rgba(4, 10, 20, 0.82);
}

.ds-day-picker button:hover {
  box-shadow:
    0 0 20px rgba(119, 200, 255, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ds-day-picker button.is-selected:hover {
  box-shadow:
    0 0 24px rgba(217, 182, 111, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

/* ---------- Closing CTA ---------- */

.ds-closing-cta:hover {
  border-color: rgba(217, 182, 111, 0.22);
  box-shadow:
    0 30px 86px rgba(0, 0, 0, 0.3),
    0 0 42px rgba(217, 182, 111, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ---------- Back to top ---------- */

.ds-back-to-top:hover .ds-back-to-top__ring {
  border-color: rgba(217, 182, 111, 0.28);
}

.ds-back-to-top:hover .ds-back-to-top__needle {
  box-shadow: 0 0 18px rgba(217, 182, 111, 0.34);
}

/* ---------- Active/click feedback ---------- */

.ds-button:active:not(:disabled),
.ds-signal-action:active,
.ds-mini-action:active,
.ds-day-picker button:active,
.ds-back-to-top:active {
  transform: translateY(0) scale(0.985);
}

/* ---------- Reduced motion accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .ds-button::before {
    display: none;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 17B — Hero title containment after layout polish
   Keeps the editorial hero title inside the left card.
   ========================================================= */

.ds-main--product .ds-hero-title {
  font-size: clamp(2.25rem, 3vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
  max-width: 100%;
}

.ds-main--product .ds-hero-title span {
  max-width: 100%;
}

.ds-main--product .ds-hero-subtitle {
  font-size: clamp(0.92rem, 1vw, 1.02rem);
  line-height: 1.55;
  max-width: 100%;
}

@media (min-width: 1041px) and (max-width: 1380px) {
  .ds-main--product .ds-hero-title {
    font-size: clamp(2.15rem, 2.75vw, 3.35rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
  }
}

@media (max-width: 1040px) {
  .ds-main--product .ds-hero-title {
    font-size: clamp(2.65rem, 6.4vw, 4.15rem);
    line-height: 0.98;
  }
}

@media (max-width: 680px) {
  .ds-main--product .ds-hero-title {
    font-size: clamp(2.25rem, 10.5vw, 3.25rem);
    line-height: 1;
    letter-spacing: -0.04em;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 17C.2 — Left column visual lift
   Moves the left column upward without changing card heights.
   ========================================================= */

@media (min-width: 1041px) {
  .ds-left-stack {
    top: auto !important;
    margin-top: 0 !important;
    transform: translateY(-12px) !important;
  }

  .ds-left-stack .ds-panel--hero {
    min-height: auto !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 17D — Left stack card spacing
   Adjustable gap between hero and smart features.
   ========================================================= */

:root {
  --ds-left-stack-gap: 35px;
}

@media (min-width: 1041px) {
  .ds-left-stack {
    gap: var(--ds-left-stack-gap) !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 17E — Create form icon polish
   Gold time icon + better select arrow spacing.
   ========================================================= */

:root {
  --ds-form-icon-gold-filter: invert(78%) sepia(34%) saturate(594%) hue-rotate(358deg) brightness(92%) contrast(88%);
  --ds-select-arrow-offset: 20px;
}

/* Time input clock icon — Chrome / Edge / Safari */
.ds-form-card input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  filter: var(--ds-form-icon-gold-filter);
  cursor: pointer;
  margin-right: 8px;
}

/* Time input hover */
.ds-form-card input[type="time"]:hover::-webkit-calendar-picker-indicator {
  filter: var(--ds-form-icon-gold-filter) drop-shadow(0 0 6px rgba(217, 182, 111, 0.28));
}

/* Custom select arrows with more internal spacing */
.ds-form-card select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(244, 239, 228, 0.88) 50%),
    linear-gradient(135deg, rgba(244, 239, 228, 0.88) 50%, transparent 50%);
  background-position:
    calc(100% - var(--ds-select-arrow-offset) - 4px) 50%,
    calc(100% - var(--ds-select-arrow-offset)) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

/* Select arrow hover — soft gold */
.ds-form-card select:hover,
.ds-form-card select:focus {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(217, 182, 111, 0.95) 50%),
    linear-gradient(135deg, rgba(217, 182, 111, 0.95) 50%, transparent 50%);
}

/* Firefox fallback */
.ds-form-card select::-ms-expand {
  display: none;
}

/* =========================================================
   DAILY SIGNAL PATCH 17E.1 — Clean select arrow fix
   Removes broken gradient arrow and replaces it with a clean SVG chevron.
   ========================================================= */

:root {
  --ds-select-arrow-offset-clean: 22px;
}

/* Reset previous broken select arrow */
.ds-form-card select {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 52px !important;

  background-color: rgba(4, 10, 20, 0.78) !important;

  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%23d9b66f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;

  background-repeat: no-repeat !important;
  background-size: 14px 14px !important;
  background-position: calc(100% - var(--ds-select-arrow-offset-clean)) 50% !important;
}

/* Keep hover/focus clean: no fake animated/gradient arrow */
.ds-form-card select:hover,
.ds-form-card select:focus {
  background-color: rgba(4, 10, 20, 0.84) !important;

  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%23d9b66f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;

  background-repeat: no-repeat !important;
  background-size: 14px 14px !important;
  background-position: calc(100% - var(--ds-select-arrow-offset-clean)) 50% !important;
}

/* Prevent native/legacy dropdown artifact where possible */
.ds-form-card select::-ms-expand {
  display: none;
}

/* =========================================================
   DAILY SIGNAL PATCH 18 — Final brand polish
   Favicon-aligned brand mark, footer refinement and subtle identity details.
   ========================================================= */

/* ---------- Brand mark refinement ---------- */

.ds-product-brand__mark,
.ds-footer-brand__mark {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 182, 111, 0.48);
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 182, 111, 0.18), transparent 18%),
    radial-gradient(circle at 34% 24%, rgba(119, 200, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(9, 22, 40, 0.95), rgba(3, 9, 18, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 0 20px rgba(119, 200, 255, 0.06),
    0 0 24px rgba(217, 182, 111, 0.10);
}

.ds-product-brand__mark::before,
.ds-footer-brand__mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 14px;
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(217, 182, 111, 0.95) 5% 11%, transparent 11% 19%),
    linear-gradient(90deg, transparent 0 28%, rgba(217, 182, 111, 0.95) 28% 34%, transparent 34% 100%);
  clip-path: polygon(
    0% 52%,
    18% 52%,
    25% 20%,
    36% 86%,
    50% 0%,
    63% 52%,
    100% 52%,
    100% 64%,
    58% 64%,
    51% 32%,
    39% 100%,
    27% 42%,
    22% 64%,
    0% 64%
  );
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 7px rgba(217, 182, 111, 0.34));
}

.ds-product-brand__mark::after,
.ds-footer-brand__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(244, 239, 228, 0.94);
  box-shadow:
    0 0 0 3px rgba(7, 16, 30, 0.86),
    0 0 14px rgba(217, 182, 111, 0.28);
  transform: translate(-50%, -50%);
}

/* Remove old cross-like mark behavior */
.ds-product-brand__mark > *,
.ds-footer-brand__mark > * {
  display: none;
}

/* ---------- Brand text polish ---------- */

.ds-product-brand__text strong,
.ds-footer-brand span {
  text-shadow: 0 0 18px rgba(217, 182, 111, 0.08);
}

.ds-product-brand__text small {
  color: rgba(244, 239, 228, 0.64);
}

/* ---------- Header identity line ---------- */

.ds-product-header {
  position: relative;
}

.ds-product-header::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217, 182, 111, 0.18),
    rgba(119, 200, 255, 0.12),
    transparent
  );
}

/* ---------- Footer polish ---------- */

.ds-premium-footer {
  padding-bottom: 18px;
}

.ds-footer-brand {
  color: rgba(244, 239, 228, 0.92);
}

.ds-footer-brand:hover {
  color: var(--ds-gold);
}

.ds-footer-brand:hover .ds-footer-brand__mark {
  border-color: rgba(217, 182, 111, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 20px rgba(119, 200, 255, 0.08),
    0 0 28px rgba(217, 182, 111, 0.16);
}

/* ---------- Mobile brand size ---------- */

@media (max-width: 680px) {
  .ds-product-brand__mark {
    width: 36px;
    height: 36px;
  }

  .ds-product-brand__mark::before {
    width: 22px;
    height: 13px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 18B — Real logo image in header and footer
   Uses the PNG logo mark instead of the CSS-generated symbol.
   ========================================================= */

.ds-product-brand__mark,
.ds-footer-brand__mark {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 182, 111, 0.08), transparent 55%),
    linear-gradient(135deg, rgba(9, 22, 40, 0.92), rgba(3, 9, 18, 0.98));
}

/* Remove previous CSS-generated logo details */
.ds-product-brand__mark::before,
.ds-product-brand__mark::after,
.ds-footer-brand__mark::before,
.ds-footer-brand__mark::after {
  content: none !important;
  display: none !important;
}

.ds-product-brand__mark img,
.ds-footer-brand__mark img {
  display: block;
  width: 275%;
  height: 275%;
  object-fit: contain;
  border-radius: 50%;
  filter:
    drop-shadow(0 0 10px rgba(119, 200, 255, 0.10))
    drop-shadow(0 0 12px rgba(217, 182, 111, 0.14));
}

.ds-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* =========================================================
   DAILY SIGNAL PATCH 19 — Final navigation and anchor polish
   Better internal navigation spacing under the product header.
   ========================================================= */

html {
  scroll-behavior: smooth;
}

/* Prevent anchor targets from landing too close to the top/header */
#features,
#signalForm,
#weeklyPlanner,
#localModeNote,
#todayProgressCard,
#top {
  scroll-margin-top: 110px;
}

/* Slightly more refined target behavior on mobile */
@media (max-width: 680px) {
  #features,
  #signalForm,
  #weeklyPlanner,
  #localModeNote,
  #todayProgressCard,
  #top {
    scroll-margin-top: 92px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 20 — Routine Templates Lite
   Premium template import section for v1.2.
   ========================================================= */

.ds-template-card--full {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.1vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 182, 111, 0.10), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(119, 200, 255, 0.11), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 22, 38, 0.84);
}

.ds-template-card--full::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
  opacity: 0.48;
}

.ds-template-card--full > * {
  position: relative;
  z-index: 1;
}

.ds-template-head {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.12);
}

.ds-template-head h2 {
  margin-top: 7px;
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
}

.ds-template-head p {
  max-width: 660px;
  margin: 8px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ds-template-card .ds-version {
  border-color: rgba(217, 182, 111, 0.22);
  background: rgba(217, 182, 111, 0.10);
  color: rgba(245, 220, 169, 0.92);
}

.ds-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ds-template-item {
  position: relative;
  min-height: 230px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--template-border, rgba(170, 205, 255, 0.14));
  border-radius: 21px;
  background:
    radial-gradient(circle at 14% 0%, var(--template-glow, rgba(119, 200, 255, 0.10)), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.046), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 46px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.ds-template-item:hover {
  transform: translateY(-2px);
  border-color: var(--template-border-hover, rgba(119, 200, 255, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 22px 54px rgba(0, 0, 0, 0.18),
    0 0 34px var(--template-shadow, rgba(119, 200, 255, 0.06));
}

.ds-template-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.ds-template-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--template-border-hover, rgba(119, 200, 255, 0.24));
  border-radius: 15px;
  background: var(--template-icon-bg, rgba(119, 200, 255, 0.09));
  color: var(--template-color, var(--ds-blue));
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 0 24px var(--template-shadow, rgba(119, 200, 255, 0.10));
}

.ds-template-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(170, 205, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  color: rgba(169, 180, 199, 0.76);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-template-item h3 {
  margin: 0 0 8px;
  color: var(--ds-text);
  font-size: 1.08rem;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.ds-template-item p {
  margin: 0 0 18px;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.86rem;
  line-height: 1.52;
}

.ds-template-button {
  width: 100%;
  margin-top: auto;
  justify-content: center;
  color: rgba(244, 239, 228, 0.88);
}

.ds-template-button:hover {
  border-color: var(--template-border-hover, rgba(217, 182, 111, 0.34)) !important;
  color: var(--template-color, var(--ds-gold)) !important;
  background: var(--template-button-bg, rgba(217, 182, 111, 0.08)) !important;
}

.ds-template-item--focus {
  --template-color: var(--ds-cyan);
  --template-glow: rgba(103, 232, 249, 0.10);
  --template-border-hover: rgba(103, 232, 249, 0.27);
  --template-icon-bg: rgba(103, 232, 249, 0.10);
  --template-shadow: rgba(103, 232, 249, 0.10);
}

.ds-template-item--freelancer {
  --template-color: var(--ds-gold);
  --template-glow: rgba(217, 182, 111, 0.11);
  --template-border-hover: rgba(217, 182, 111, 0.30);
  --template-icon-bg: rgba(217, 182, 111, 0.11);
  --template-shadow: rgba(217, 182, 111, 0.12);
  --template-button-bg: rgba(217, 182, 111, 0.08);
}

.ds-template-item--student {
  --template-color: var(--ds-purple);
  --template-glow: rgba(167, 139, 250, 0.10);
  --template-border-hover: rgba(167, 139, 250, 0.27);
  --template-icon-bg: rgba(167, 139, 250, 0.11);
  --template-shadow: rgba(167, 139, 250, 0.10);
}

.ds-template-item--workout {
  --template-color: var(--ds-green);
  --template-glow: rgba(97, 211, 148, 0.10);
  --template-border-hover: rgba(97, 211, 148, 0.27);
  --template-icon-bg: rgba(97, 211, 148, 0.10);
  --template-shadow: rgba(97, 211, 148, 0.10);
}

.ds-template-item--sleep {
  --template-color: var(--ds-indigo);
  --template-glow: rgba(129, 140, 248, 0.10);
  --template-border-hover: rgba(129, 140, 248, 0.27);
  --template-icon-bg: rgba(129, 140, 248, 0.10);
  --template-shadow: rgba(129, 140, 248, 0.10);
}

.ds-template-item--trading {
  --template-color: var(--ds-amber);
  --template-glow: rgba(246, 199, 111, 0.10);
  --template-border-hover: rgba(246, 199, 111, 0.27);
  --template-icon-bg: rgba(246, 199, 111, 0.10);
  --template-shadow: rgba(246, 199, 111, 0.10);
}

#routineTemplates {
  scroll-margin-top: 110px;
}

@media (max-width: 1040px) {
  .ds-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ds-template-card--full {
    padding: 17px;
    border-radius: 22px;
  }

  .ds-template-head {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .ds-template-head p {
    font-size: 0.86rem;
  }

  .ds-template-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .ds-template-item {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
  }

  .ds-template-item__top {
    margin-bottom: 14px;
  }

  .ds-template-icon {
    width: 40px;
    height: 40px;
  }

  #routineTemplates {
    scroll-margin-top: 92px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 21 — Templates navigation polish
   Adds official Templates navigation behavior for v1.2.
   ========================================================= */

#routineTemplates {
  scroll-margin-top: 110px;
}

.ds-product-nav a[href="#routineTemplates"],
.ds-footer-nav a[href="#routineTemplates"] {
  color: rgba(245, 220, 169, 0.88);
}

.ds-product-nav a[href="#routineTemplates"]:hover,
.ds-footer-nav a[href="#routineTemplates"]:hover {
  color: var(--ds-gold);
}

@media (max-width: 680px) {
  #routineTemplates {
    scroll-margin-top: 92px;
  }

  .ds-product-nav a[href="#routineTemplates"] {
    border-color: rgba(217, 182, 111, 0.20);
    background: rgba(217, 182, 111, 0.055);
  }

  .ds-product-nav a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 22 — Template Signal Badge
   Shows a premium micro badge on signals imported from templates.
   ========================================================= */

.ds-signal-status-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ds-template-signal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(217, 182, 111, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.12), rgba(119, 200, 255, 0.035));
  color: rgba(245, 220, 169, 0.92);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(217, 182, 111, 0.06);
}

.ds-signal-card[data-template-signal="true"] {
  border-color: color-mix(in srgb, var(--card-border, rgba(119, 200, 255, 0.18)) 72%, rgba(217, 182, 111, 0.34));
}

.ds-signal-card[data-template-signal="true"]::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(217, 182, 111, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(217, 182, 111, 0.12), transparent 64%);
  opacity: 0.72;
}

.ds-planner-card--full .ds-template-signal-badge {
  min-height: 20px;
  padding: 4px 6px;
  font-size: 0.55rem;
}

@media (max-width: 680px) {
  .ds-signal-status-wrap {
    justify-content: flex-start;
  }

  .ds-template-signal-badge {
    min-height: 21px;
    font-size: 0.54rem;
  }

  .ds-signal-card[data-template-signal="true"]::after {
    width: 18px;
    height: 18px;
    right: 9px;
    bottom: 9px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 23 — Clear Template Signals
   Adds a controlled local-data action for removing template signals only.
   ========================================================= */

.ds-signal-action--template-clear {
  border-color: rgba(217, 182, 111, 0.22);
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.08), rgba(119, 200, 255, 0.035));
  color: rgba(245, 220, 169, 0.86);
}

.ds-signal-action--template-clear:hover {
  border-color: rgba(217, 182, 111, 0.42);
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.13), rgba(119, 200, 255, 0.05));
  color: var(--ds-gold);
  box-shadow: 0 0 22px rgba(217, 182, 111, 0.08);
}

.ds-data-tools__actions #clearTemplateSignalsButton {
  order: 3;
}

.ds-data-tools__actions #clearAllButton {
  order: 4;
}

@media (max-width: 680px) {
  .ds-signal-action--template-clear {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 24 — Today Timeline Lite
   Adds a chronological day-flow panel for v1.3A.
   ========================================================= */

.ds-timeline-card--full {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.1vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 14% 0%, rgba(119, 200, 255, 0.11), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(217, 182, 111, 0.09), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 22, 38, 0.84);
}

.ds-timeline-card--full::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
  opacity: 0.48;
}

.ds-timeline-card--full > * {
  position: relative;
  z-index: 1;
}

.ds-timeline-head {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.12);
}

.ds-timeline-head h2 {
  margin-top: 7px;
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
}

.ds-timeline-head p {
  max-width: 660px;
  margin: 8px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ds-timeline-card .ds-version {
  border-color: rgba(119, 200, 255, 0.22);
  background: rgba(119, 200, 255, 0.08);
  color: rgba(168, 223, 255, 0.9);
}

.ds-timeline-empty {
  padding: 20px;
  border: 1px dashed rgba(217, 182, 111, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 182, 111, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.026);
  color: rgba(169, 180, 199, 0.82);
  line-height: 1.55;
}

.ds-timeline-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ds-text);
}

.ds-timeline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.ds-timeline-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(170, 205, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ds-timeline-list {
  position: relative;
  display: grid;
  gap: 11px;
}

.ds-timeline-list::before {
  content: "";
  position: absolute;
  left: 95px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(217, 182, 111, 0.20),
    rgba(119, 200, 255, 0.20),
    rgba(217, 182, 111, 0.14)
  );
  pointer-events: none;
}

.ds-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.ds-timeline-time {
  padding-top: 14px;
  color: var(--card-color, var(--ds-blue));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-align: right;
}

.ds-timeline-node {
  position: relative;
  z-index: 2;
  width: 13px;
  height: 13px;
  margin: 17px auto 0;
  border: 2px solid rgba(6, 14, 26, 0.96);
  border-radius: 999px;
  background: var(--card-color, var(--ds-blue));
  box-shadow: 0 0 18px rgba(119, 200, 255, 0.18);
}

.ds-timeline-body {
  padding: 14px 15px;
  border: 1px solid var(--card-border, rgba(119, 200, 255, 0.16));
  border-radius: 17px;
  background:
    linear-gradient(135deg, var(--card-bg, rgba(119, 200, 255, 0.10)), rgba(255, 255, 255, 0.02)),
    rgba(3, 10, 20, 0.44);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.ds-timeline-item:hover .ds-timeline-body {
  transform: translateY(-1px);
  border-color: var(--card-border, rgba(119, 200, 255, 0.26));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.ds-timeline-body__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ds-timeline-body h3 {
  margin: 0;
  color: var(--ds-text);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.ds-timeline-body p {
  margin: 7px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.84rem;
  line-height: 1.45;
}

.ds-timeline-meta {
  margin-top: 8px;
  color: rgba(111, 124, 145, 0.95);
  font-size: 0.72rem;
  line-height: 1.35;
}

.ds-timeline-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.ds-timeline-status,
.ds-timeline-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ds-timeline-status {
  border: 1px solid rgba(170, 205, 255, 0.13);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(169, 180, 199, 0.82);
}

.ds-timeline-mini-badge--template {
  border: 1px solid rgba(217, 182, 111, 0.28);
  background: rgba(217, 182, 111, 0.10);
  color: rgba(245, 220, 169, 0.92);
}

.ds-timeline-mini-badge--snooze {
  border: 1px solid rgba(246, 199, 111, 0.28);
  background: rgba(246, 199, 111, 0.09);
  color: var(--ds-amber);
}

.ds-timeline-item[data-status="completed"] {
  opacity: 0.72;
}

.ds-timeline-item[data-status="completed"] .ds-timeline-node {
  background: var(--ds-green);
  box-shadow: 0 0 18px rgba(97, 211, 148, 0.18);
}

.ds-timeline-item[data-status="completed"] .ds-timeline-status {
  border-color: rgba(97, 211, 148, 0.28);
  background: rgba(97, 211, 148, 0.10);
  color: var(--ds-green);
}

.ds-timeline-item[data-status="due"] .ds-timeline-node {
  background: var(--ds-gold);
  box-shadow: 0 0 24px rgba(217, 182, 111, 0.26);
}

.ds-timeline-item[data-status="due"] .ds-timeline-status {
  border-color: rgba(217, 182, 111, 0.34);
  background: rgba(217, 182, 111, 0.11);
  color: var(--ds-gold);
}

.ds-timeline-item[data-status="passed"] .ds-timeline-status {
  border-color: rgba(246, 199, 111, 0.20);
  background: rgba(246, 199, 111, 0.07);
  color: rgba(246, 199, 111, 0.82);
}

.ds-timeline-item[data-status="snooze"] .ds-timeline-body {
  border-style: dashed;
}

#todayTimeline {
  scroll-margin-top: 110px;
}

.ds-product-nav a[href="#todayTimeline"],
.ds-footer-nav a[href="#todayTimeline"] {
  color: rgba(168, 223, 255, 0.9);
}

.ds-product-nav a[href="#todayTimeline"]:hover,
.ds-footer-nav a[href="#todayTimeline"]:hover {
  color: var(--ds-blue);
}

@media (max-width: 680px) {
  .ds-timeline-card--full {
    padding: 17px;
    border-radius: 22px;
  }

  .ds-timeline-head {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .ds-timeline-head p {
    font-size: 0.86rem;
  }

  .ds-timeline-summary {
    margin-bottom: 15px;
  }

  .ds-timeline-summary span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .ds-timeline-list::before {
    left: 15px;
  }

  .ds-timeline-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }

  .ds-timeline-time {
    grid-column: 2;
    padding-top: 0;
    text-align: left;
  }

  .ds-timeline-node {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 5px;
  }

  .ds-timeline-body {
    grid-column: 2;
    padding: 13px;
  }

  .ds-timeline-body__top {
    flex-direction: column;
    gap: 8px;
  }

  .ds-timeline-badges {
    justify-content: flex-start;
  }

  #todayTimeline {
    scroll-margin-top: 92px;
  }

  .ds-product-nav a[href="#todayTimeline"] {
    border-color: rgba(119, 200, 255, 0.20);
    background: rgba(119, 200, 255, 0.055);
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 25 — Transparent Alarm Overlay
   Shows only the alarm card, keeping the dashboard visible behind it.
   ========================================================= */

.ds-alarm-modal.is-visible {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.ds-alarm-box {
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.54),
    0 0 58px rgba(217, 182, 111, 0.18),
    0 0 38px rgba(119, 200, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
}

.ds-alarm-modal.is-visible .ds-alarm-box {
  animation: dsAlarmCardOnlyEnter 260ms ease both;
}

@keyframes dsAlarmCardOnlyEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 680px) {
  .ds-alarm-modal.is-visible {
    background: rgba(3, 8, 16, 0.10) !important;
  }

  .ds-alarm-box {
    box-shadow:
      0 26px 70px rgba(0, 0, 0, 0.56),
      0 0 46px rgba(217, 182, 111, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 26 — Timeline Mark Done Action
   Adds manual completion directly from Today Timeline.
   ========================================================= */

.ds-timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.ds-timeline-footer .ds-timeline-meta {
  margin-top: 0;
  min-width: 0;
}

.ds-timeline-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(97, 211, 148, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(97, 211, 148, 0.10), rgba(119, 200, 255, 0.035));
  color: rgba(151, 236, 185, 0.92);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.ds-timeline-action:hover {
  transform: translateY(-1px);
  border-color: rgba(97, 211, 148, 0.42);
  background:
    linear-gradient(135deg, rgba(97, 211, 148, 0.15), rgba(119, 200, 255, 0.055));
  color: var(--ds-green);
  box-shadow: 0 0 22px rgba(97, 211, 148, 0.08);
}

.ds-timeline-action:focus-visible {
  outline: 2px solid rgba(97, 211, 148, 0.62);
  outline-offset: 3px;
}

.ds-timeline-item[data-status="completed"] .ds-timeline-footer {
  opacity: 0.84;
}

@media (max-width: 680px) {
  .ds-timeline-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .ds-timeline-action {
    width: 100%;
    min-height: 38px;
    justify-content: center;
    text-align: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 27 — Skip Today Timeline Action
   Adds a daily skip state without disabling recurring signals.
   ========================================================= */

.ds-timeline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.ds-timeline-action--skip {
  border-color: rgba(246, 199, 111, 0.24);
  background:
    linear-gradient(135deg, rgba(246, 199, 111, 0.10), rgba(217, 182, 111, 0.035));
  color: rgba(246, 199, 111, 0.92);
}

.ds-timeline-action--skip:hover {
  border-color: rgba(246, 199, 111, 0.42);
  background:
    linear-gradient(135deg, rgba(246, 199, 111, 0.15), rgba(217, 182, 111, 0.055));
  color: var(--ds-amber);
  box-shadow: 0 0 22px rgba(246, 199, 111, 0.08);
}

.ds-timeline-action--skip:focus-visible {
  outline: 2px solid rgba(246, 199, 111, 0.62);
  outline-offset: 3px;
}

.ds-timeline-item[data-status="skipped"] {
  opacity: 0.68;
}

.ds-timeline-item[data-status="skipped"] .ds-timeline-node {
  background: var(--ds-amber);
  box-shadow: 0 0 18px rgba(246, 199, 111, 0.16);
}

.ds-timeline-item[data-status="skipped"] .ds-timeline-body {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(246, 199, 111, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.38);
}

.ds-timeline-item[data-status="skipped"] .ds-timeline-status {
  border-color: rgba(246, 199, 111, 0.28);
  background: rgba(246, 199, 111, 0.09);
  color: var(--ds-amber);
}

.ds-timeline-item[data-status="skipped"] .ds-timeline-body h3 {
  color: rgba(244, 239, 228, 0.76);
}

.ds-timeline-item[data-status="skipped"] .ds-timeline-meta,
.ds-timeline-item[data-status="skipped"] .ds-timeline-body p {
  color: rgba(169, 180, 199, 0.60);
}

@media (max-width: 680px) {
  .ds-timeline-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ds-timeline-actions .ds-timeline-action {
    width: 100%;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 28 — Skip-aware Today Progress
   Aligns dashboard progress with Completed / Skipped / Remaining states.
   ========================================================= */

.ds-progress-row--rich {
  margin-bottom: 11px;
}

.ds-progress-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.ds-progress-mini-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(170, 205, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  color: rgba(169, 180, 199, 0.78);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ds-progress-mini-stats span:nth-child(2) {
  border-color: rgba(119, 200, 255, 0.16);
  background: rgba(119, 200, 255, 0.055);
  color: rgba(168, 223, 255, 0.86);
}

.ds-progress-mini-stats span:nth-child(3) {
  border-color: rgba(246, 199, 111, 0.20);
  background: rgba(246, 199, 111, 0.07);
  color: rgba(246, 199, 111, 0.86);
}

.ds-skipped-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.ds-skipped-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px dashed rgba(246, 199, 111, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(246, 199, 111, 0.055), rgba(255, 255, 255, 0.022));
}

.ds-skipped-item strong {
  color: rgba(244, 239, 228, 0.76);
  font-size: 0.84rem;
}

.ds-skipped-item span {
  color: rgba(246, 199, 111, 0.78);
  font-size: 0.74rem;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .ds-progress-mini-stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ds-progress-mini-stats span {
    justify-content: center;
    text-align: center;
  }

  .ds-skipped-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .ds-skipped-item span {
    white-space: normal;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 29 — Efficiency Score Lite
   Adds routine execution score, 7-day average and local history.
   ========================================================= */

.ds-efficiency-card--full {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.1vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(97, 211, 148, 0.10), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(217, 182, 111, 0.09), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 22, 38, 0.84);
}

.ds-efficiency-card--full::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
  opacity: 0.46;
}

.ds-efficiency-card--full > * {
  position: relative;
  z-index: 1;
}

.ds-efficiency-head {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.12);
}

.ds-efficiency-head h2 {
  margin-top: 7px;
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
}

.ds-efficiency-head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ds-efficiency-card .ds-version {
  border-color: rgba(97, 211, 148, 0.22);
  background: rgba(97, 211, 148, 0.08);
  color: rgba(151, 236, 185, 0.9);
}

.ds-efficiency-empty,
.ds-efficiency-history-empty {
  padding: 18px;
  border: 1px dashed rgba(217, 182, 111, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.026);
  color: rgba(169, 180, 199, 0.82);
  line-height: 1.55;
}

.ds-efficiency-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 12px;
}

.ds-efficiency-score-card,
.ds-efficiency-mini-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(170, 205, 255, 0.14);
  border-radius: 21px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.046), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 46px rgba(0, 0, 0, 0.12);
}

.ds-efficiency-score-card {
  min-height: 210px;
  padding: 22px;
  border-color: rgba(97, 211, 148, 0.20);
  background:
    radial-gradient(circle at 88% 18%, rgba(97, 211, 148, 0.12), transparent 34%),
    conic-gradient(
      from 210deg at 85% 26%,
      rgba(97, 211, 148, 0.28) 0 var(--score-percent),
      rgba(119, 200, 255, 0.06) var(--score-percent) 100%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.50);
}

.ds-efficiency-score-card[data-score-tone="strong"] {
  border-color: rgba(97, 211, 148, 0.28);
}

.ds-efficiency-score-card[data-score-tone="steady"] {
  border-color: rgba(217, 182, 111, 0.26);
}

.ds-efficiency-score-card[data-score-tone="low"] {
  border-color: rgba(246, 199, 111, 0.28);
}

.ds-efficiency-mini-card {
  min-height: 210px;
  padding: 20px;
}

.ds-efficiency-label {
  display: inline-flex;
  color: var(--ds-gold);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ds-efficiency-score {
  margin-top: 18px;
  color: var(--ds-text);
  font-size: clamp(3rem, 5vw, 5.4rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.075em;
  text-shadow: 0 0 34px rgba(97, 211, 148, 0.12);
}

.ds-efficiency-score-card p,
.ds-efficiency-mini-card p {
  max-width: 460px;
  margin: 16px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.86rem;
  line-height: 1.5;
}

.ds-efficiency-mini-card strong {
  display: block;
  margin-top: 20px;
  color: var(--ds-text);
  font-size: clamp(2.15rem, 3vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.ds-efficiency-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ds-efficiency-breakdown span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(170, 205, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ds-efficiency-breakdown span:nth-child(1) {
  border-color: rgba(97, 211, 148, 0.22);
  background: rgba(97, 211, 148, 0.08);
  color: rgba(151, 236, 185, 0.9);
}

.ds-efficiency-breakdown span:nth-child(2),
.ds-efficiency-breakdown span:nth-child(3) {
  border-color: rgba(246, 199, 111, 0.22);
  background: rgba(246, 199, 111, 0.07);
  color: rgba(246, 199, 111, 0.88);
}

.ds-efficiency-breakdown span:nth-child(4) {
  border-color: rgba(119, 200, 255, 0.18);
  background: rgba(119, 200, 255, 0.06);
  color: rgba(168, 223, 255, 0.88);
}

.ds-efficiency-history {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(170, 205, 255, 0.12);
  border-radius: 19px;
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.045), rgba(217, 182, 111, 0.025)),
    rgba(255, 255, 255, 0.024);
}

.ds-efficiency-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ds-efficiency-history-head span {
  color: var(--ds-text);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.ds-efficiency-history-head small {
  color: rgba(169, 180, 199, 0.72);
  font-size: 0.72rem;
}

.ds-efficiency-history-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  min-height: 126px;
}

.ds-efficiency-history-item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-height: 126px;
}

.ds-efficiency-history-item span {
  align-self: end;
  min-height: 12px;
  height: var(--history-score);
  border-radius: 999px 999px 6px 6px;
  background:
    linear-gradient(180deg, rgba(97, 211, 148, 0.82), rgba(119, 200, 255, 0.38));
  box-shadow: 0 0 18px rgba(97, 211, 148, 0.08);
}

.ds-efficiency-history-item small {
  color: rgba(169, 180, 199, 0.72);
  font-size: 0.66rem;
  text-align: center;
}

#efficiencyReview {
  scroll-margin-top: 110px;
}

.ds-product-nav a[href="#efficiencyReview"],
.ds-footer-nav a[href="#efficiencyReview"] {
  color: rgba(151, 236, 185, 0.9);
}

.ds-product-nav a[href="#efficiencyReview"]:hover,
.ds-footer-nav a[href="#efficiencyReview"]:hover {
  color: var(--ds-green);
}

@media (max-width: 1040px) {
  .ds-efficiency-grid {
    grid-template-columns: 1fr;
  }

  .ds-efficiency-score-card,
  .ds-efficiency-mini-card {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .ds-efficiency-card--full {
    padding: 17px;
    border-radius: 22px;
  }

  .ds-efficiency-head {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .ds-efficiency-head p {
    font-size: 0.86rem;
  }

  .ds-efficiency-score-card,
  .ds-efficiency-mini-card {
    padding: 17px;
    border-radius: 18px;
  }

  .ds-efficiency-score {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .ds-efficiency-breakdown {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ds-efficiency-breakdown span {
    justify-content: center;
    text-align: center;
  }

  .ds-efficiency-history-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .ds-efficiency-history-bars {
    gap: 7px;
    min-height: 110px;
  }

  .ds-efficiency-history-item {
    min-height: 110px;
  }

  #efficiencyReview {
    scroll-margin-top: 92px;
  }

  .ds-product-nav a[href="#efficiencyReview"] {
    border-color: rgba(97, 211, 148, 0.20);
    background: rgba(97, 211, 148, 0.055);
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 30 — Efficiency card clean background
   Removes the conic wedge from Today Efficiency card.
   ========================================================= */

.ds-efficiency-score-card {
  background:
    radial-gradient(circle at 82% 18%, rgba(97, 211, 148, 0.16), transparent 34%),
    radial-gradient(circle at 18% 0%, rgba(217, 182, 111, 0.08), transparent 36%),
    linear-gradient(135deg, rgba(97, 211, 148, 0.14), rgba(119, 200, 255, 0.045)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.50) !important;
}

.ds-efficiency-score-card::after {
  content: "";
  position: absolute;
  right: -56px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(97, 211, 148, 0.12), transparent 64%);
  opacity: 0.72;
}

/* =========================================================
   DAILY SIGNAL PATCH 31 — Undo Skip Today
   Restores skipped signals directly from Today Timeline.
   ========================================================= */

.ds-timeline-action--undo-skip {
  border-color: rgba(119, 200, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.10), rgba(217, 182, 111, 0.035));
  color: rgba(168, 223, 255, 0.92);
}

.ds-timeline-action--undo-skip:hover {
  border-color: rgba(119, 200, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.15), rgba(217, 182, 111, 0.055));
  color: var(--ds-blue);
  box-shadow: 0 0 22px rgba(119, 200, 255, 0.08);
}

.ds-timeline-action--undo-skip:focus-visible {
  outline: 2px solid rgba(119, 200, 255, 0.62);
  outline-offset: 3px;
}

.ds-timeline-item[data-status="skipped"] .ds-timeline-action--undo-skip {
  opacity: 1;
}

/* =========================================================
   DAILY SIGNAL PATCH 32 — Weekly Review Lite
   Adds a compact strategic weekly routine summary.
   ========================================================= */

.ds-weekly-review-card--full {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.1vw, 28px);
  border-color: rgba(170, 205, 255, 0.18);
  background:
    radial-gradient(circle at 14% 0%, rgba(217, 182, 111, 0.10), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(119, 200, 255, 0.10), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 22, 38, 0.84);
}

.ds-weekly-review-card--full::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(119, 200, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 200, 255, 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
  opacity: 0.46;
}

.ds-weekly-review-card--full > * {
  position: relative;
  z-index: 1;
}

.ds-weekly-review-head {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.12);
}

.ds-weekly-review-head h2 {
  margin-top: 7px;
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
}

.ds-weekly-review-head p {
  max-width: 700px;
  margin: 8px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ds-weekly-review-card .ds-version {
  border-color: rgba(217, 182, 111, 0.22);
  background: rgba(217, 182, 111, 0.09);
  color: rgba(245, 220, 169, 0.9);
}

.ds-weekly-review-empty {
  padding: 18px;
  border: 1px dashed rgba(217, 182, 111, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 182, 111, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.026);
  color: rgba(169, 180, 199, 0.82);
  line-height: 1.55;
}

.ds-weekly-review-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ds-text);
}

.ds-weekly-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 0.85fr));
  gap: 12px;
}

.ds-weekly-review-main,
.ds-weekly-review-mini {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(170, 205, 255, 0.14);
  border-radius: 21px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.046), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 46px rgba(0, 0, 0, 0.12);
}

.ds-weekly-review-main {
  min-height: 190px;
  padding: 22px;
  border-color: rgba(217, 182, 111, 0.22);
  background:
    radial-gradient(circle at 82% 18%, rgba(217, 182, 111, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(217, 182, 111, 0.13), rgba(119, 200, 255, 0.045)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(3, 10, 20, 0.50);
}

.ds-weekly-review-mini {
  min-height: 190px;
  padding: 20px;
}

.ds-weekly-review-label {
  display: inline-flex;
  color: var(--ds-gold);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ds-weekly-review-main strong,
.ds-weekly-review-mini strong {
  display: block;
  margin-top: 18px;
  color: var(--ds-text);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.ds-weekly-review-main strong {
  font-size: clamp(3rem, 5vw, 5rem);
}

.ds-weekly-review-mini strong {
  font-size: clamp(2.15rem, 3vw, 3rem);
}

.ds-weekly-review-main p,
.ds-weekly-review-mini p {
  margin: 14px 0 0;
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.84rem;
  line-height: 1.5;
}

.ds-weekly-review-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ds-weekly-review-breakdown span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(170, 205, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(169, 180, 199, 0.82);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ds-weekly-review-breakdown span:nth-child(1) {
  border-color: rgba(217, 182, 111, 0.22);
  background: rgba(217, 182, 111, 0.08);
  color: rgba(245, 220, 169, 0.9);
}

.ds-weekly-review-breakdown span:nth-child(2) {
  border-color: rgba(119, 200, 255, 0.18);
  background: rgba(119, 200, 255, 0.06);
  color: rgba(168, 223, 255, 0.88);
}

.ds-weekly-review-breakdown span:nth-child(5) {
  border-color: rgba(97, 211, 148, 0.20);
  background: rgba(97, 211, 148, 0.07);
  color: rgba(151, 236, 185, 0.88);
}

#weeklyReview {
  scroll-margin-top: 110px;
}

@media (max-width: 1040px) {
  .ds-weekly-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-weekly-review-main,
  .ds-weekly-review-mini {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .ds-weekly-review-card--full {
    padding: 17px;
    border-radius: 22px;
  }

  .ds-weekly-review-head {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .ds-weekly-review-head p {
    font-size: 0.86rem;
  }

  .ds-weekly-review-grid {
    grid-template-columns: 1fr;
  }

  .ds-weekly-review-main,
  .ds-weekly-review-mini {
    padding: 17px;
    border-radius: 18px;
  }

  .ds-weekly-review-main strong {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .ds-weekly-review-breakdown {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ds-weekly-review-breakdown span {
    justify-content: center;
    text-align: center;
  }

  #weeklyReview {
    scroll-margin-top: 92px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 33 — Undo Completed
   Restores completed signals directly from Today Timeline.
   ========================================================= */

.ds-timeline-action--undo-done {
  border-color: rgba(97, 211, 148, 0.24);
  background:
    linear-gradient(135deg, rgba(97, 211, 148, 0.10), rgba(119, 200, 255, 0.035));
  color: rgba(151, 236, 185, 0.92);
}

.ds-timeline-action--undo-done:hover {
  border-color: rgba(97, 211, 148, 0.42);
  background:
    linear-gradient(135deg, rgba(97, 211, 148, 0.15), rgba(119, 200, 255, 0.055));
  color: var(--ds-green);
  box-shadow: 0 0 22px rgba(97, 211, 148, 0.08);
}

.ds-timeline-action--undo-done:focus-visible {
  outline: 2px solid rgba(97, 211, 148, 0.62);
  outline-offset: 3px;
}

.ds-timeline-item[data-status="completed"] .ds-timeline-action--undo-done {
  opacity: 1;
}

/* =========================================================
   DAILY SIGNAL PATCH 34 — Inline Sound Try Button
   Adds a small TRY control inside the Sound Type field.
   ========================================================= */

.ds-field--sound {
  min-width: 0;
}

.ds-sound-select-wrap {
  position: relative;
  width: 100%;
}

.ds-sound-select-wrap select {
  padding-right: 104px !important;
}

.ds-sound-try-button {
  position: absolute;
  top: 50%;
  right: 44px;
  z-index: 2;
  min-width: 46px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(217, 182, 111, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.12), rgba(119, 200, 255, 0.035));
  color: rgba(245, 220, 169, 0.94);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-50%);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.ds-sound-try-button:hover:not(:disabled) {
  border-color: rgba(217, 182, 111, 0.46);
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.18), rgba(119, 200, 255, 0.055));
  color: var(--ds-gold);
  box-shadow: 0 0 18px rgba(217, 182, 111, 0.10);
  transform: translateY(-50%) scale(1.03);
}

.ds-sound-try-button:active:not(:disabled) {
  transform: translateY(-50%) scale(0.97);
}

.ds-sound-try-button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.ds-sound-try-button:focus-visible {
  outline: 2px solid rgba(217, 182, 111, 0.66);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .ds-sound-select-wrap select {
    padding-right: 98px !important;
  }

  .ds-sound-try-button {
    right: 42px;
    min-width: 44px;
    min-height: 26px;
    font-size: 0.6rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 35D — SVG Analog Signal Thread
   Real SVG stroke animation from 9 o'clock to 3 o'clock.
   ========================================================= */

/* Safety reset: no pseudo-element signal effects on the clock ring */
.ds-analog-clock__ring::before,
.ds-analog-clock__ring::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

/* The SVG lives inside the analog clock, behind hands and center */
.ds-analog-signal-thread {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 74%;
  height: 56%;
  pointer-events: none;
  overflow: visible;
  transform: translate(-50%, -50%);
}

/* Very faint underlying path, almost invisible */
.ds-analog-signal-thread__ghost {
  fill: none;
  stroke: rgba(217, 182, 111, 0.13);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Soft moving glow, wider but transparent */
.ds-analog-signal-thread__glow {
  fill: none;
  stroke: rgba(217, 182, 111, 0.34);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10 90;
  stroke-dashoffset: 100;
  filter: blur(1.2px);
  opacity: 0;
  animation: dsAnalogSvgSignalRun 3.4s linear infinite;
}

/* Main thin gold moving thread */
.ds-analog-signal-thread__line {
  fill: none;
  stroke: rgba(236, 205, 139, 0.96);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 9 91;
  stroke-dashoffset: 100;
  filter:
    drop-shadow(0 0 2px rgba(217, 182, 111, 0.55))
    drop-shadow(0 0 6px rgba(217, 182, 111, 0.22));
  opacity: 0;
  animation: dsAnalogSvgSignalRun 3.4s linear infinite;
}

@keyframes dsAnalogSvgSignalRun {
  0% {
    stroke-dashoffset: 100;
    opacity: 0;
  }

  7% {
    opacity: 0.9;
  }

  82% {
    opacity: 0.95;
  }

  94% {
    opacity: 0.26;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

/* Keep markers, hands and hub above the moving signal */
.ds-analog-clock__marker {
  z-index: 4;
}

.ds-analog-clock__hand {
  z-index: 6;
}

.ds-analog-clock__center {
  z-index: 7;
}

/* Slightly softer on hover so it remains premium */
.ds-clock-card:hover .ds-analog-signal-thread__line {
  stroke: rgba(245, 216, 154, 1);
  filter:
    drop-shadow(0 0 2px rgba(217, 182, 111, 0.62))
    drop-shadow(0 0 8px rgba(217, 182, 111, 0.26));
}

/* Mobile proportions */
@media (max-width: 680px) {
  .ds-analog-signal-thread {
    width: 72%;
    height: 54%;
  }

  .ds-analog-signal-thread__ghost {
    stroke-width: 1;
  }

  .ds-analog-signal-thread__line {
    stroke-width: 1.25;
  }

  .ds-analog-signal-thread__glow {
    stroke-width: 2.8;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .ds-analog-signal-thread__glow,
  .ds-analog-signal-thread__line {
    animation: none !important;
    stroke-dashoffset: 48;
    opacity: 0.32;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 36 — Analog Clock Cardinal Numbers
   Replaces the 12 / 3 / 6 / 9 tick marks with numbers.
   ========================================================= */

/* Hide the current large cardinal tick marks */
.ds-analog-clock__marker--12,
.ds-analog-clock__marker--3,
.ds-analog-clock__marker--6,
.ds-analog-clock__marker--9 {
  width: auto !important;
  height: auto !important;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Base style for the clock numbers */
.ds-analog-clock__marker--12::after,
.ds-analog-clock__marker--3::after,
.ds-analog-clock__marker--6::after,
.ds-analog-clock__marker--9::after {
  position: absolute;
  display: block;
  color: rgba(168, 223, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 8px rgba(119, 200, 255, 0.12),
    0 0 16px rgba(119, 200, 255, 0.06);
  font-variant-numeric: tabular-nums;
}

/* 12 */
.ds-analog-clock__marker--12::after {
  content: "12";
  left: 50%;
  top: -5px;
  transform: translateX(-50%);
}

/* 3 */
.ds-analog-clock__marker--3::after {
  content: "3";
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
}

/* 6 */
.ds-analog-clock__marker--6::after {
  content: "6";
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
}

/* 9 */
.ds-analog-clock__marker--9::after {
  content: "9";
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
}

/* Slightly refine the visual hierarchy so the numbers sit well with the signal line */
.ds-analog-clock__marker {
  z-index: 4;
}

/* Mobile tuning */
@media (max-width: 680px) {
  .ds-analog-clock__marker--12::after,
  .ds-analog-clock__marker--3::after,
  .ds-analog-clock__marker--6::after,
  .ds-analog-clock__marker--9::after {
    font-size: 0.8rem;
  }

  .ds-analog-clock__marker--3::after {
    right: 7px;
  }

  .ds-analog-clock__marker--9::after {
    left: 7px;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 37 — Today Timeline Filters
   Adds compact filter chips to the Today Timeline section.
   ========================================================= */

.ds-timeline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.ds-timeline-filter__button {
  appearance: none;
  border: 1px solid rgba(119, 200, 255, 0.20);
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.018)
    );
  color: rgba(229, 241, 255, 0.70);
  padding: 0.42rem 0.72rem;
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.ds-timeline-filter__button:hover {
  color: rgba(245, 250, 255, 0.92);
  border-color: rgba(119, 200, 255, 0.36);
  transform: translateY(-1px);
}

.ds-timeline-filter__button.is-active {
  color: rgba(255, 236, 188, 0.96);
  border-color: rgba(217, 182, 111, 0.58);
  background:
    linear-gradient(
      135deg,
      rgba(217, 182, 111, 0.18),
      rgba(119, 200, 255, 0.07)
    );
  box-shadow:
    0 0 0 1px rgba(217, 182, 111, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.18),
    0 0 22px rgba(217, 182, 111, 0.08);
}

@media (max-width: 520px) {
  .ds-timeline-filter {
    gap: 0.38rem;
  }

  .ds-timeline-filter__button {
    padding: 0.38rem 0.62rem;
    font-size: 0.62rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 38 — Template Card Import State
   Visually marks already imported routine templates.
   ========================================================= */

[data-template-id].is-imported {
  cursor: default !important;
  color: rgba(255, 236, 188, 0.92) !important;
  border-color: rgba(217, 182, 111, 0.48) !important;
  background:
    linear-gradient(
      135deg,
      rgba(217, 182, 111, 0.18),
      rgba(119, 200, 255, 0.06)
    ) !important;
  box-shadow:
    0 0 0 1px rgba(217, 182, 111, 0.08),
    0 0 20px rgba(217, 182, 111, 0.08) !important;
  opacity: 0.86;
}

[data-template-id].is-imported:hover {
  transform: none !important;
}

.is-template-imported {
  position: relative;
  border-color: rgba(217, 182, 111, 0.26) !important;
  background:
    linear-gradient(
      145deg,
      rgba(217, 182, 111, 0.065),
      rgba(255, 255, 255, 0.018)
    ),
    var(--ds-surface, transparent) !important;
}

.is-template-imported::after {
  content: "IN PLANNER";
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  padding: 0.26rem 0.48rem;
  border: 1px solid rgba(217, 182, 111, 0.36);
  border-radius: 999px;
  background: rgba(7, 13, 25, 0.72);
  color: rgba(255, 236, 188, 0.88);
  font-family: var(--ds-font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 0 14px rgba(217, 182, 111, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

@media (max-width: 520px) {
  .is-template-imported::after {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.52rem;
    padding: 0.22rem 0.42rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 38B — Template Import State Fix
   Supports hardened template imported states.
   ========================================================= */

[data-template-imported="true"],
[data-template-id].is-imported,
[data-template].is-imported,
[data-routine-template].is-imported,
[data-routine-template-id].is-imported {
  cursor: default !important;
  color: rgba(255, 236, 188, 0.94) !important;
  border-color: rgba(217, 182, 111, 0.55) !important;
  background:
    linear-gradient(
      135deg,
      rgba(217, 182, 111, 0.20),
      rgba(119, 200, 255, 0.06)
    ) !important;
  opacity: 0.88;
}

.is-template-imported,
[data-template-imported="true"].ds-template-card,
[data-template-imported="true"].ds-routine-template,
[data-template-imported="true"].ds-routine-card {
  position: relative;
  border-color: rgba(217, 182, 111, 0.30) !important;
}

.is-template-imported::after {
  content: "IN PLANNER";
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 5;
  padding: 0.26rem 0.48rem;
  border: 1px solid rgba(217, 182, 111, 0.38);
  border-radius: 999px;
  background: rgba(7, 13, 25, 0.76);
  color: rgba(255, 236, 188, 0.90);
  font-family: var(--ds-font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 0 14px rgba(217, 182, 111, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

/* =========================================================
   DAILY SIGNAL PATCH 39 — Timeline Filter Counts
   Adds compact numeric counters to Today Timeline filters.
   ========================================================= */

.ds-timeline-filter__button {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.ds-timeline-filter__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: rgba(119, 200, 255, 0.10);
  color: rgba(229, 241, 255, 0.70);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(119, 200, 255, 0.12);
}

.ds-timeline-filter__button.is-active .ds-timeline-filter__count {
  background: rgba(217, 182, 111, 0.18);
  color: rgba(255, 236, 188, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(217, 182, 111, 0.28),
    0 0 14px rgba(217, 182, 111, 0.08);
}

@media (max-width: 520px) {
  .ds-timeline-filter__button {
    gap: 0.34rem;
  }

  .ds-timeline-filter__count {
    min-width: 1rem;
    height: 1rem;
    font-size: 0.52rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 41B — Closing CTA Button Center Fix
   Centers the "Create a Signal" label inside the closing CTA button.
   ========================================================= */

.ds-closing-cta__button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.ds-closing-cta__button::before {
  border-radius: inherit;
}

/* =========================================================
   DAILY SIGNAL PATCH 42 — Offline Status UI
   Adds a refined online/offline local-first status pill.
   ========================================================= */

.ds-offline-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  width: fit-content;
  margin-top: 0.65rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(119, 200, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.018)
    );
  color: rgba(229, 241, 255, 0.72);
  font-family: var(--ds-font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 12px 24px rgba(0, 0, 0, 0.16);
}

.ds-offline-status__dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: rgba(119, 200, 255, 0.78);
  box-shadow:
    0 0 0 3px rgba(119, 200, 255, 0.08),
    0 0 14px rgba(119, 200, 255, 0.22);
}

.ds-offline-status.is-online {
  border-color: rgba(119, 200, 255, 0.28);
  color: rgba(185, 231, 255, 0.84);
}

.ds-offline-status.is-online .ds-offline-status__dot {
  background: rgba(119, 200, 255, 0.9);
  box-shadow:
    0 0 0 3px rgba(119, 200, 255, 0.10),
    0 0 16px rgba(119, 200, 255, 0.28);
}

.ds-offline-status.is-offline {
  border-color: rgba(217, 182, 111, 0.46);
  color: rgba(255, 236, 188, 0.9);
  background:
    linear-gradient(
      135deg,
      rgba(217, 182, 111, 0.14),
      rgba(255, 255, 255, 0.018)
    );
}

.ds-offline-status.is-offline .ds-offline-status__dot {
  background: rgba(217, 182, 111, 0.95);
  box-shadow:
    0 0 0 3px rgba(217, 182, 111, 0.12),
    0 0 18px rgba(217, 182, 111, 0.32);
}

@media (max-width: 680px) {
  .ds-offline-status {
    margin-top: 0.8rem;
    font-size: 0.6rem;
    padding: 0.38rem 0.58rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 43 — Install Prompt UI
   Adds a refined install card for supported PWA browsers.
   ========================================================= */

.ds-install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 620px);
  margin-top: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(217, 182, 111, 0.28);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top left, rgba(217, 182, 111, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 42px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(217, 182, 111, 0.06);
}

.ds-install-card.is-hidden {
  display: none !important;
}

.ds-install-card__content {
  min-width: 0;
}

.ds-install-card__eyebrow {
  display: block;
  margin-bottom: 0.3rem;
  color: rgba(217, 182, 111, 0.9);
  font-family: var(--ds-font-mono);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ds-install-card strong {
  display: block;
  color: rgba(245, 250, 255, 0.95);
  font-size: 0.98rem;
  line-height: 1.2;
}

.ds-install-card p {
  max-width: 34rem;
  margin: 0.34rem 0 0;
  color: rgba(229, 241, 255, 0.68);
  font-size: 0.82rem;
  line-height: 1.5;
}

.ds-install-card__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.ds-install-card__button,
.ds-install-card__dismiss {
  appearance: none;
  border-radius: 999px;
  font-family: var(--ds-font-mono);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.ds-install-card__button {
  min-height: 2.35rem;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(217, 182, 111, 0.56);
  color: rgba(255, 236, 188, 0.96);
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.24), rgba(119, 200, 255, 0.07));
  box-shadow:
    0 0 0 1px rgba(217, 182, 111, 0.08),
    0 0 22px rgba(217, 182, 111, 0.10);
}

.ds-install-card__button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 236, 188, 0.72);
  box-shadow:
    0 0 0 1px rgba(217, 182, 111, 0.12),
    0 0 28px rgba(217, 182, 111, 0.14);
}

.ds-install-card__dismiss {
  min-height: 2.35rem;
  padding: 0.58rem 0.75rem;
  border: 1px solid rgba(119, 200, 255, 0.18);
  color: rgba(229, 241, 255, 0.62);
  background: rgba(255, 255, 255, 0.025);
}

.ds-install-card__dismiss:hover {
  color: rgba(245, 250, 255, 0.86);
  border-color: rgba(119, 200, 255, 0.32);
}

@media (max-width: 680px) {
  .ds-install-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.92rem;
  }

  .ds-install-card__actions {
    width: 100%;
  }

  .ds-install-card__button,
  .ds-install-card__dismiss {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .ds-install-card__actions {
    flex-direction: column;
  }

  .ds-install-card__button,
  .ds-install-card__dismiss {
    width: 100%;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 43B — Persistent Install Guidance Card
   Keeps install guidance visible even before native prompt.
   ========================================================= */

.ds-install-card[data-install-state="guidance"] {
  border-color: rgba(119, 200, 255, 0.24);
  background:
    radial-gradient(circle at top left, rgba(119, 200, 255, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
}

.ds-install-card[data-install-state="guidance"] .ds-install-card__eyebrow {
  color: rgba(119, 200, 255, 0.9);
}

.ds-install-card[data-install-state="guidance"] .ds-install-card__button {
  border-color: rgba(119, 200, 255, 0.34);
  color: rgba(203, 236, 255, 0.94);
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.16), rgba(217, 182, 111, 0.06));
}

.ds-install-card[data-install-state="ready"] {
  border-color: rgba(217, 182, 111, 0.42);
}

.ds-install-card[data-install-state="installed"] {
  opacity: 0.82;
}

.ds-install-card__button:disabled,
.ds-install-card__dismiss:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 44 — Install Card Center Alignment
   Centers the PWA install guidance card inside the footer.
   ========================================================= */

.ds-premium-footer .ds-install-card {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  margin: 1rem auto 0;
  width: min(100%, 620px);
}

@media (max-width: 680px) {
  .ds-premium-footer .ds-install-card {
    width: 100%;
    margin-top: 1rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 44B — Install Card Vertical Position
   Raises the install guidance card inside the footer.
   ========================================================= */

.ds-premium-footer .ds-install-card {
  --ds-install-card-lift: -4rem;

  transform: translateY(var(--ds-install-card-lift));
  margin-bottom: var(--ds-install-card-lift);
}

@media (max-width: 680px) {
  .ds-premium-footer .ds-install-card {
    --ds-install-card-lift: -2rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 44C — Install Card Clickable Lift Fix
   Raises the install card with real layout spacing and restores button clicks.
   ========================================================= */

.ds-premium-footer .ds-install-card {
  --ds-install-card-lift: 2.6rem;

  position: relative;
  z-index: 20;
  transform: none !important;
  margin-top: calc(1rem - var(--ds-install-card-lift)) !important;
  margin-bottom: 0 !important;
  pointer-events: auto;
}

.ds-premium-footer .ds-install-card__actions,
.ds-premium-footer .ds-install-card__button,
.ds-premium-footer .ds-install-card__dismiss {
  position: relative;
  z-index: 21;
  pointer-events: auto;
}

@media (max-width: 680px) {
  .ds-premium-footer .ds-install-card {
    --ds-install-card-lift: 1.6rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 45 — Install Card Desktop Alignment + Lift
   Desktop left-align, mobile centered, safe vertical lift.
   ========================================================= */

.ds-premium-footer .ds-install-card {
  position: relative;
  z-index: 20;
  margin-top: -3.2rem !important; /* alza la tessera */
  margin-bottom: 0 !important;
  pointer-events: auto;
}

.ds-premium-footer .ds-install-card__content {
  text-align: left;
  align-items: flex-start;
}

.ds-premium-footer .ds-install-card__content strong,
.ds-premium-footer .ds-install-card__content p,
.ds-premium-footer .ds-install-card__content .ds-install-card__eyebrow {
  text-align: left;
}

.ds-premium-footer .ds-install-card__actions,
.ds-premium-footer .ds-install-card__button,
.ds-premium-footer .ds-install-card__dismiss {
  position: relative;
  z-index: 21;
  pointer-events: auto;
}

@media (max-width: 680px) {
  .ds-premium-footer .ds-install-card {
    margin-top: -1.2rem !important;
  }

  .ds-premium-footer .ds-install-card__content {
    text-align: center;
    align-items: center;
  }

  .ds-premium-footer .ds-install-card__content strong,
  .ds-premium-footer .ds-install-card__content p,
  .ds-premium-footer .ds-install-card__content .ds-install-card__eyebrow {
    text-align: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 46 — How It Works Tutorial Section
   Adds a premium quick guide for first-time users.
   ========================================================= */

.ds-how-card--full {
  grid-column: 1 / -1;
}

.ds-how-card {
  position: relative;
  overflow: hidden;
}

.ds-how-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 182, 111, 0.13), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(119, 200, 255, 0.12), transparent 30%);
  opacity: 0.95;
}

.ds-how-card > * {
  position: relative;
  z-index: 1;
}

.ds-how-head p {
  max-width: 48rem;
  margin-top: 0.45rem;
  color: rgba(229, 241, 255, 0.68);
  line-height: 1.65;
}

.ds-how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.45rem;
}

.ds-how-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: flex-start;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid rgba(119, 200, 255, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.032),
    0 16px 34px rgba(0, 0, 0, 0.16);
}

.ds-how-step--wide {
  grid-column: 1 / -1;
}

.ds-how-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(217, 182, 111, 0.42);
  border-radius: 999px;
  color: rgba(255, 236, 188, 0.96);
  background:
    radial-gradient(circle, rgba(217, 182, 111, 0.18), rgba(217, 182, 111, 0.05));
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow:
    0 0 0 4px rgba(217, 182, 111, 0.045),
    0 0 18px rgba(217, 182, 111, 0.12);
}

.ds-how-step h3 {
  margin: 0;
  color: rgba(245, 250, 255, 0.96);
  font-size: 1rem;
  line-height: 1.25;
}

.ds-how-step p {
  margin: 0.38rem 0 0;
  color: rgba(229, 241, 255, 0.67);
  font-size: 0.88rem;
  line-height: 1.62;
}

.ds-how-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (max-width: 760px) {
  .ds-how-grid {
    grid-template-columns: 1fr;
  }

  .ds-how-step--wide {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .ds-how-card {
    text-align: center;
  }

  .ds-how-step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ds-how-actions {
    justify-content: center;
  }

  .ds-how-actions .ds-button {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 46B — How It Works Full Width Fix
   Forces the tutorial section to align with Templates, Today Timeline and following panels.
   ========================================================= */

.ds-main--product > .ds-how-card,
.ds-main--product > .ds-how-card--full,
#howItWorks {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
}

#howItWorks .ds-how-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.9rem !important;
  margin-top: 1.45rem !important;
}

#howItWorks .ds-how-step {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  gap: 0.9rem !important;
  align-items: flex-start !important;
  padding: 1rem !important;
  border: 1px solid rgba(119, 200, 255, 0.16) !important;
  border-radius: 1rem !important;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.018)
    ) !important;
}

#howItWorks .ds-how-step--wide {
  grid-column: 1 / -1 !important;
}

#howItWorks .ds-how-step__number {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.35rem !important;
  height: 2.35rem !important;
  border: 1px solid rgba(217, 182, 111, 0.42) !important;
  border-radius: 999px !important;
  color: rgba(255, 236, 188, 0.96) !important;
  background:
    radial-gradient(
      circle,
      rgba(217, 182, 111, 0.18),
      rgba(217, 182, 111, 0.05)
    ) !important;
  font-family: var(--ds-font-mono) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
}

#howItWorks .ds-how-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin-top: 1.25rem !important;
}

@media (max-width: 760px) {
  #howItWorks .ds-how-grid {
    grid-template-columns: 1fr !important;
  }

  #howItWorks .ds-how-step--wide {
    grid-column: auto !important;
  }
}

@media (max-width: 520px) {
  #howItWorks {
    text-align: center;
  }

  #howItWorks .ds-how-step {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    text-align: center !important;
  }

  #howItWorks .ds-how-actions {
    justify-content: center !important;
  }

  #howItWorks .ds-how-actions .ds-button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 46C — How It Works Spacing + CTA Polish
   Adds inner margins and removes underline from tutorial buttons.
   ========================================================= */

#howItWorks {
  --ds-how-inner-x: 1.65rem;
  --ds-how-inner-y: 1.55rem;

  padding: var(--ds-how-inner-y) var(--ds-how-inner-x) !important;
}

#howItWorks .ds-section-head {
  padding-right: 3.2rem;
}

#howItWorks .ds-section-head h2,
#howItWorks .ds-section-head p,
#howItWorks .ds-kicker {
  margin-left: 0 !important;
}

#howItWorks .ds-how-grid {
  margin-top: 1.65rem !important;
}

#howItWorks .ds-how-actions {
  margin-top: 1.35rem !important;
}

#howItWorks .ds-how-actions .ds-button {
  text-decoration: none !important;
  font-weight: 900 !important;
}

#howItWorks .ds-how-actions .ds-button:visited,
#howItWorks .ds-how-actions .ds-button:hover,
#howItWorks .ds-how-actions .ds-button:focus {
  text-decoration: none !important;
}

@media (max-width: 760px) {
  #howItWorks {
    --ds-how-inner-x: 1.15rem;
    --ds-how-inner-y: 1.25rem;
  }

  #howItWorks .ds-section-head {
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  #howItWorks {
    --ds-how-inner-x: 1rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 47 — Signal Setup Help Modal
   Adds a premium help trigger and guided setup popup.
   ========================================================= */

.ds-form-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ds-help-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(119, 200, 255, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(119, 200, 255, 0.12), rgba(255, 255, 255, 0.025));
  color: rgba(203, 236, 255, 0.9);
  font-family: var(--ds-font-mono);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 18px rgba(119, 200, 255, 0.06);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.ds-help-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(119, 200, 255, 0.42);
  color: rgba(229, 246, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 0 22px rgba(119, 200, 255, 0.12);
}

.ds-help-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.ds-help-modal.is-open {
  display: flex;
}

.ds-help-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(119, 200, 255, 0.12), transparent 36%),
    rgba(2, 7, 14, 0.74);
  backdrop-filter: blur(14px);
}

.ds-help-modal__box {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 1.35rem;
  border: 1px solid rgba(217, 182, 111, 0.32);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(217, 182, 111, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(119, 200, 255, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(17, 31, 48, 0.98), rgba(8, 16, 28, 0.98));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.52),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ds-help-modal__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ds-help-modal__top h2 {
  margin: 0.32rem 0 0;
  color: rgba(245, 250, 255, 0.98);
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  line-height: 1.05;
}

.ds-help-modal__top p {
  max-width: 42rem;
  margin: 0.7rem 0 0;
  color: rgba(229, 241, 255, 0.7);
  line-height: 1.6;
}

.ds-help-modal__close {
  appearance: none;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(119, 200, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(229, 241, 255, 0.8);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.ds-help-modal__steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.ds-help-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.95rem;
  border: 1px solid rgba(119, 200, 255, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
}

.ds-help-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(217, 182, 111, 0.42);
  border-radius: 999px;
  color: rgba(255, 236, 188, 0.96);
  background: rgba(217, 182, 111, 0.08);
  font-family: var(--ds-font-mono);
  font-size: 0.66rem;
  font-weight: 900;
}

.ds-help-step h3 {
  margin: 0;
  color: rgba(245, 250, 255, 0.95);
  font-size: 0.98rem;
}

.ds-help-step p {
  margin: 0.35rem 0 0;
  color: rgba(229, 241, 255, 0.66);
  font-size: 0.84rem;
  line-height: 1.55;
}

.ds-help-modal__note {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(217, 182, 111, 0.22);
  border-radius: 0.95rem;
  color: rgba(229, 241, 255, 0.72);
  background: rgba(217, 182, 111, 0.055);
  font-size: 0.86rem;
  line-height: 1.55;
}

.ds-help-modal__note strong {
  color: rgba(255, 236, 188, 0.95);
}

.ds-help-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.ds-help-modal__actions .ds-button {
  text-decoration: none !important;
  font-weight: 900 !important;
}

@media (max-width: 720px) {
  .ds-help-modal__steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .ds-form-head-actions {
    justify-content: flex-start;
  }

  .ds-help-modal {
    padding: 0.85rem;
  }

  .ds-help-modal__box {
    padding: 1rem;
  }

  .ds-help-modal__top {
    gap: 0.7rem;
  }

  .ds-help-step {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .ds-help-modal__actions .ds-button {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 47B — Transparent Help Modal Backdrop
   Keeps the help popup visible while showing the page behind it.
   ========================================================= */

.ds-help-modal__backdrop {
  background: transparent !important;
  backdrop-filter: none !important;
}

.ds-help-modal.is-open {
  background: transparent !important;
}

.ds-help-modal__box {
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(119, 200, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 47D — Help Modal Close X Hard Center Fix
   Replaces the native × glyph alignment with a perfectly centered pseudo-element.
   ========================================================= */

.ds-help-modal__close {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 1 !important;
}

.ds-help-modal__close::before {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(229, 241, 255, 0.82);
  font-family: Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.ds-help-modal__close:hover::before {
  color: rgba(245, 250, 255, 0.96);
}

/* =========================================================
   DAILY SIGNAL PATCH 47E — Help Modal Close X Adjustable
   Adjustable size and vertical alignment for the modal close X.
   ========================================================= */

.ds-help-modal__close {
  --ds-help-close-x-size: 1.55rem;
  --ds-help-close-x-y: 1px;
}

.ds-help-modal__close::before {
  font-size: var(--ds-help-close-x-size) !important;
  transform: translateY(var(--ds-help-close-x-y)) !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 48 — Public Feedback CTA
   Adds a refined feedback card before the footer for public testers.
   ========================================================= */

.ds-feedback-cta {
  width: min(100% - 2rem, 1380px);
  margin: 0 auto 1.35rem;
  padding: 0;
}

.ds-feedback-cta__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.25rem 1.45rem;
  border: 1px solid rgba(119, 200, 255, 0.18);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at top left, rgba(119, 200, 255, 0.11), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.032),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.ds-feedback-cta h2 {
  margin: 0.25rem 0 0;
  color: rgba(245, 250, 255, 0.96);
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
}

.ds-feedback-cta p {
  max-width: 42rem;
  margin: 0.45rem 0 0;
  color: rgba(229, 241, 255, 0.66);
  line-height: 1.55;
}

.ds-feedback-cta__button {
  flex: 0 0 auto;
  text-decoration: none !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.ds-feedback-cta__button:hover,
.ds-feedback-cta__button:focus,
.ds-feedback-cta__button:visited {
  text-decoration: none !important;
}

@media (max-width: 760px) {
  .ds-feedback-cta {
    width: min(100% - 1.2rem, 1380px);
    margin-bottom: 1rem;
  }

  .ds-feedback-cta__content {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.05rem;
  }

  .ds-feedback-cta__button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .ds-feedback-cta__content {
    text-align: center;
    align-items: center;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 48B — Feedback CTA Width + Spacing
   Aligns the feedback card and adds breathing room after the closing CTA.
   ========================================================= */

.ds-feedback-cta {
  width: min(100% - 2rem, 1320px) !important;
  margin: 1.35rem auto 1.45rem !important;
}

@media (max-width: 760px) {
  .ds-feedback-cta {
    width: min(100% - 1.2rem, 1320px) !important;
    margin: 1rem auto 1.15rem !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 49 — Unified Hero + Closing CTA Typography
   Aligns the main hero and Local-first CTA title with the app title system.
   ========================================================= */

.ds-hero-title,
.ds-hero-title span,
.ds-hero-title em,
.ds-closing-cta h2 {
  font-family:
    var(--ds-font-sans, var(--ds-font-body, Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif)) !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: -0.055em !important;
}

.ds-hero-title {
  line-height: 0.94 !important;
}

.ds-hero-title em {
  font-style: normal !important;
  font-weight: 900 !important;
}

.ds-closing-cta h2 {
  line-height: 1.02 !important;
  letter-spacing: -0.045em !important;
}

/* Mantiene i colori gold/blue già presenti, ma senza look italic/serif */
.ds-hero-title .ds-highlight-gold,
.ds-hero-title .ds-highlight-blue {
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

@media (max-width: 680px) {
  .ds-hero-title {
    line-height: 0.98 !important;
    letter-spacing: -0.045em !important;
  }

  .ds-closing-cta h2 {
    line-height: 1.04 !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 50 — Closing + Feedback Heading Match
   Aligns the final CTA and Public Test card headings.
   ========================================================= */

.ds-closing-cta h2,
.ds-feedback-cta h2 {
  font-family:
    var(--ds-font-sans, var(--ds-font-body, Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif)) !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: -0.045em !important;
  line-height: 1.02 !important;
  font-size: clamp(2.15rem, 4.2vw, 3.2rem) !important;
}

.ds-feedback-cta h2 {
  max-width: 44rem;
}

@media (max-width: 760px) {
  .ds-closing-cta h2,
  .ds-feedback-cta h2 {
    font-size: clamp(1.85rem, 8vw, 2.65rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.04em !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 51 — Settings Button + Modal Shell
   Adds premium header settings trigger and modal structure.
   ========================================================= */

.ds-settings-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  min-height: 42px !important;
  padding: 0.65rem 0.95rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(222, 184, 113, 0.32) !important;
  background:
    radial-gradient(circle at 25% 0%, rgba(222, 184, 113, 0.18), transparent 36%),
    rgba(7, 16, 32, 0.78) !important;
  color: rgba(252, 246, 231, 0.92) !important;
  font: 800 0.74rem/1 var(--ds-font-body, Inter, Manrope, system-ui, sans-serif) !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 32px rgba(0, 0, 0, 0.2) !important;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease !important;
}

.ds-settings-trigger:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(222, 184, 113, 0.58) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(222, 184, 113, 0.1) !important;
}

.ds-settings-trigger__icon {
  display: grid !important;
  place-items: center !important;
  width: 1.35rem !important;
  height: 1.35rem !important;
  border-radius: 999px !important;
  color: #f3c978 !important;
  background: rgba(222, 184, 113, 0.12) !important;
  border: 1px solid rgba(222, 184, 113, 0.22) !important;
  line-height: 1 !important;
}

.ds-settings-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(1rem, 3vw, 2rem) !important;
  background: transparent !important;
}

.ds-settings-modal.is-open {
  display: flex !important;
}

.ds-settings-modal__backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

.ds-settings-modal__box {
  position: relative !important;
  z-index: 1 !important;
  width: min(780px, calc(100vw - 2rem)) !important;
  max-height: min(760px, calc(100vh - 2rem)) !important;
  overflow: auto !important;
  border-radius: 30px !important;
  border: 1px solid rgba(222, 184, 113, 0.28) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(83, 176, 255, 0.16), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(222, 184, 113, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(7, 15, 31, 0.98), rgba(4, 9, 19, 0.98)) !important;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  padding: clamp(1.35rem, 3vw, 2.25rem) !important;
  color: rgba(252, 246, 231, 0.94) !important;
}

.ds-settings-modal__box::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  border-radius: inherit !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) !important;
  background-size: 44px 44px !important;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%) !important;
}

.ds-settings-modal__close {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 3 !important;
  display: grid !important;
  place-items: center !important;
  width: 2.35rem !important;
  height: 2.35rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(222, 184, 113, 0.25) !important;
  background: rgba(3, 8, 18, 0.64) !important;
  color: rgba(252, 246, 231, 0.92) !important;
  font-size: 1.45rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.ds-settings-modal__head {
  position: relative !important;
  z-index: 2 !important;
  max-width: 42rem !important;
  padding-right: 2.75rem !important;
  margin-bottom: 1.35rem !important;
}

.ds-settings-modal__head h2 {
  margin: 0.35rem 0 0.65rem !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.05em !important;
  color: rgba(252, 246, 231, 0.98) !important;
}

.ds-settings-modal__head p {
  margin: 0 !important;
  color: rgba(215, 229, 245, 0.72) !important;
  line-height: 1.65 !important;
}

.ds-settings-modal__grid {
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.9rem !important;
}

.ds-settings-card {
  min-height: 170px !important;
  padding: 1.05rem !important;
  border-radius: 22px !important;
  border: 1px solid rgba(129, 164, 214, 0.18) !important;
  background:
    linear-gradient(145deg, rgba(13, 28, 52, 0.78), rgba(8, 15, 30, 0.74)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.ds-settings-card--primary {
  border-color: rgba(222, 184, 113, 0.28) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(222, 184, 113, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(15, 29, 53, 0.88), rgba(8, 15, 30, 0.8)) !important;
}

.ds-settings-card__label {
  display: block !important;
  margin-bottom: 0.45rem !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
  color: rgba(222, 184, 113, 0.86) !important;
}

.ds-settings-card h3 {
  margin: 0 0 0.45rem !important;
  font-size: 1.08rem !important;
  color: rgba(252, 246, 231, 0.96) !important;
}

.ds-settings-card p {
  margin: 0 !important;
  color: rgba(215, 229, 245, 0.68) !important;
  line-height: 1.55 !important;
  font-size: 0.93rem !important;
}

.ds-settings-card__summary {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.45rem !important;
  margin-top: 1rem !important;
}

.ds-settings-card__summary span,
.ds-settings-status-pill {
  display: inline-flex !important;
  width: fit-content !important;
  border-radius: 999px !important;
  padding: 0.42rem 0.62rem !important;
  border: 1px solid rgba(129, 164, 214, 0.2) !important;
  background: rgba(129, 164, 214, 0.08) !important;
  color: rgba(215, 229, 245, 0.78) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
}

.ds-settings-status-pill {
  margin-top: 1rem !important;
}

.ds-settings-modal__footer {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  margin-top: 1.15rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid rgba(129, 164, 214, 0.14) !important;
  color: rgba(215, 229, 245, 0.68) !important;
  font-size: 0.86rem !important;
}

.ds-settings-modal__footer strong {
  color: rgba(252, 246, 231, 0.92) !important;
}

@media (max-width: 860px) {
  .ds-settings-trigger {
    padding: 0.62rem !important;
  }

  .ds-settings-trigger__label {
    display: none !important;
  }

  .ds-settings-modal__grid {
    grid-template-columns: 1fr !important;
  }

  .ds-settings-card {
    min-height: auto !important;
  }
}

@media (max-width: 560px) {
  .ds-settings-modal {
    padding: 0.85rem !important;
    align-items: flex-start !important;
  }

  .ds-settings-modal__box {
    width: calc(100vw - 1.2rem) !important;
    max-height: calc(100vh - 1.2rem) !important;
    border-radius: 24px !important;
    padding: 1.15rem !important;
  }

  .ds-settings-modal__head {
    padding-right: 2.4rem !important;
  }

  .ds-settings-modal__footer {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .ds-settings-modal__footer .ds-button {
    width: 100% !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 51C — Settings Icon Only Header Position
   Moves Settings before Local Mode and keeps only a larger gear icon.
   ========================================================= */

.ds-product-actions #settingsButton.ds-settings-trigger {
  --ds-settings-button-size: 42px;
  --ds-settings-gear-size: 1.35rem;

  order: -10 !important;
  width: var(--ds-settings-button-size) !important;
  min-width: var(--ds-settings-button-size) !important;
  height: var(--ds-settings-button-size) !important;
  min-height: var(--ds-settings-button-size) !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
}

.ds-product-actions #settingsButton .ds-settings-trigger__label {
  display: none !important;
}

.ds-product-actions #settingsButton .ds-settings-trigger__icon {
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  font-size: var(--ds-settings-gear-size) !important;
  line-height: 1 !important;
  background: rgba(222, 184, 113, 0.12) !important;
  border: 1px solid rgba(222, 184, 113, 0.28) !important;
  color: #f3c978 !important;
}

.ds-product-actions #settingsButton:hover .ds-settings-trigger__icon {
  background: rgba(222, 184, 113, 0.18) !important;
  border-color: rgba(222, 184, 113, 0.5) !important;
  box-shadow: 0 0 18px rgba(222, 184, 113, 0.14) !important;
}

@media (max-width: 680px) {
  .ds-product-actions #settingsButton.ds-settings-trigger {
    --ds-settings-button-size: 40px;
    --ds-settings-gear-size: 1.3rem;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 51D — Remove Inner Gear Pill Border
   Keeps only the outer circular Settings button border.
   ========================================================= */

.ds-product-actions #settingsButton .ds-settings-trigger__icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ds-product-actions #settingsButton:hover .ds-settings-trigger__icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 51E — Settings Modal Close X Centering
   Centers the close icon inside the Settings modal button.
   ========================================================= */

.ds-settings-modal__close {
  color: transparent !important;
  font-size: 0 !important;
  line-height: 1 !important;
}

.ds-settings-modal__close::before {
  content: "×" !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  color: rgba(252, 246, 231, 0.94) !important;
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  transform: translateY(-1px) !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 52 — Settings Category Manager UI
   Adds editable category rows inside the Settings modal.
   ========================================================= */

.ds-settings-card--categories {
  grid-column: 1 / -1 !important;
}

.ds-settings-card__headrow {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  margin-bottom: 1rem !important;
}

.ds-settings-card__headrow > div:first-child {
  max-width: 31rem !important;
}

.ds-category-manager {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.8rem !important;
  margin-top: 1rem !important;
}

.ds-category-editor {
  border-radius: 20px !important;
  border: 1px solid rgba(129, 164, 214, 0.18) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(83, 176, 255, 0.09), transparent 34%),
    rgba(4, 10, 22, 0.56) !important;
  padding: 0.9rem !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.ds-category-editor__top {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.7rem !important;
  margin-bottom: 0.85rem !important;
}

.ds-category-color-dot {
  display: inline-block !important;
  width: 0.85rem !important;
  height: 0.85rem !important;
  border-radius: 999px !important;
  background: #7fb7ff !important;
  box-shadow: 0 0 14px rgba(127, 183, 255, 0.28) !important;
}

.ds-category-color-dot[data-category-color="gold"] {
  background: #e0bd72 !important;
  box-shadow: 0 0 14px rgba(224, 189, 114, 0.28) !important;
}

.ds-category-color-dot[data-category-color="green"] {
  background: #62d58a !important;
  box-shadow: 0 0 14px rgba(98, 213, 138, 0.25) !important;
}

.ds-category-color-dot[data-category-color="cyan"] {
  background: #45d6ff !important;
  box-shadow: 0 0 14px rgba(69, 214, 255, 0.25) !important;
}

.ds-category-color-dot[data-category-color="purple"],
.ds-category-color-dot[data-category-color="violet"] {
  background: #a98cff !important;
  box-shadow: 0 0 14px rgba(169, 140, 255, 0.25) !important;
}

.ds-category-color-dot[data-category-color="red"] {
  background: #ff7a7a !important;
  box-shadow: 0 0 14px rgba(255, 122, 122, 0.22) !important;
}

.ds-category-color-dot[data-category-color="neutral"] {
  background: #9fb0c5 !important;
  box-shadow: 0 0 14px rgba(159, 176, 197, 0.18) !important;
}

.ds-category-editor__meta {
  min-width: 0 !important;
}

.ds-category-editor__meta span,
.ds-category-editor__footer {
  color: rgba(215, 229, 245, 0.54) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.ds-category-editor__meta strong {
  display: block !important;
  margin-top: 0.18rem !important;
  color: rgba(252, 246, 231, 0.95) !important;
  font-size: 0.98rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ds-category-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
  color: rgba(215, 229, 245, 0.72) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
}

.ds-category-toggle input {
  width: 1rem !important;
  height: 1rem !important;
  accent-color: #e0bd72 !important;
}

.ds-category-editor__fields {
  display: grid !important;
  grid-template-columns: 1fr 0.75fr 1fr !important;
  gap: 0.65rem !important;
}

.ds-category-editor__fields label {
  display: grid !important;
  gap: 0.32rem !important;
}

.ds-category-editor__fields label span {
  color: rgba(222, 184, 113, 0.8) !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.ds-category-editor__fields input,
.ds-category-editor__fields select {
  width: 100% !important;
  min-height: 38px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(129, 164, 214, 0.18) !important;
  background: rgba(3, 9, 20, 0.68) !important;
  color: rgba(252, 246, 231, 0.92) !important;
  padding: 0.55rem 0.65rem !important;
  font: 700 0.82rem/1.2 var(--ds-font-body, Inter, Manrope, system-ui, sans-serif) !important;
  outline: none !important;
}

.ds-category-editor__fields input:focus,
.ds-category-editor__fields select:focus {
  border-color: rgba(222, 184, 113, 0.52) !important;
  box-shadow: 0 0 0 3px rgba(222, 184, 113, 0.1) !important;
}

.ds-category-editor__footer {
  display: flex !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  margin-top: 0.75rem !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}

.ds-category-manager__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
  margin-top: 1rem !important;
}

.ds-settings-mini-button {
  min-height: 38px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(222, 184, 113, 0.34) !important;
  background: rgba(222, 184, 113, 0.14) !important;
  color: rgba(252, 246, 231, 0.95) !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
}

.ds-settings-mini-button--ghost {
  border-color: rgba(129, 164, 214, 0.22) !important;
  background: rgba(129, 164, 214, 0.08) !important;
  color: rgba(215, 229, 245, 0.78) !important;
}

@media (max-width: 920px) {
  .ds-category-manager {
    grid-template-columns: 1fr !important;
  }

  .ds-category-editor__fields {
    grid-template-columns: 1fr !important;
  }

  .ds-settings-card__headrow {
    flex-direction: column !important;
  }
}

@media (max-width: 560px) {
  .ds-category-editor__top {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  .ds-category-toggle {
    grid-column: 1 / -1 !important;
    width: fit-content !important;
  }

  .ds-category-editor__footer {
    flex-direction: column !important;
    gap: 0.35rem !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 52B — Category Sound Select Compact Font
   Reduces Default Sound select typography without changing field size.
   ========================================================= */

.ds-category-editor__fields select[data-category-field="defaultSound"] {
  --ds-category-sound-font-size: 0.58rem;

  font-size: var(--ds-category-sound-font-size) !important;
  letter-spacing: -0.02em !important;
  padding-left: 0.5rem !important;
  padding-right: 1.65rem !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 53 — Applied Category Colors
   Uses saved category colors on Signal Cards, Timeline and Next Signal.
   ========================================================= */

.ds-signal-card[data-category-color],
.ds-timeline-item[data-category-color],
#nextSignalContent[data-category-color] {
  --ds-category-accent: #7fb7ff;
  --ds-category-accent-rgb: 127, 183, 255;
}

.ds-signal-card[data-category-color="blue"],
.ds-timeline-item[data-category-color="blue"],
#nextSignalContent[data-category-color="blue"] {
  --ds-category-accent: #7fb7ff;
  --ds-category-accent-rgb: 127, 183, 255;
}

.ds-signal-card[data-category-color="gold"],
.ds-timeline-item[data-category-color="gold"],
#nextSignalContent[data-category-color="gold"] {
  --ds-category-accent: #e0bd72;
  --ds-category-accent-rgb: 224, 189, 114;
}

.ds-signal-card[data-category-color="green"],
.ds-timeline-item[data-category-color="green"],
#nextSignalContent[data-category-color="green"] {
  --ds-category-accent: #62d58a;
  --ds-category-accent-rgb: 98, 213, 138;
}

.ds-signal-card[data-category-color="cyan"],
.ds-timeline-item[data-category-color="cyan"],
#nextSignalContent[data-category-color="cyan"] {
  --ds-category-accent: #45d6ff;
  --ds-category-accent-rgb: 69, 214, 255;
}

.ds-signal-card[data-category-color="purple"],
.ds-timeline-item[data-category-color="purple"],
#nextSignalContent[data-category-color="purple"],
.ds-signal-card[data-category-color="violet"],
.ds-timeline-item[data-category-color="violet"],
#nextSignalContent[data-category-color="violet"] {
  --ds-category-accent: #a98cff;
  --ds-category-accent-rgb: 169, 140, 255;
}

.ds-signal-card[data-category-color="red"],
.ds-timeline-item[data-category-color="red"],
#nextSignalContent[data-category-color="red"] {
  --ds-category-accent: #ff7a7a;
  --ds-category-accent-rgb: 255, 122, 122;
}

.ds-signal-card[data-category-color="neutral"],
.ds-timeline-item[data-category-color="neutral"],
#nextSignalContent[data-category-color="neutral"] {
  --ds-category-accent: #9fb0c5;
  --ds-category-accent-rgb: 159, 176, 197;
}

.ds-signal-card[data-category-color] {
  border-color: rgba(var(--ds-category-accent-rgb), 0.28) !important;
  box-shadow:
    inset 3px 0 0 rgba(var(--ds-category-accent-rgb), 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 34px rgba(0, 0, 0, 0.16) !important;
}

.ds-signal-card[data-category-color] .ds-signal-time {
  color: var(--ds-category-accent) !important;
}

.ds-signal-card[data-category-color] .ds-signal-status {
  border-color: rgba(var(--ds-category-accent-rgb), 0.24) !important;
  background: rgba(var(--ds-category-accent-rgb), 0.08) !important;
}

.ds-timeline-item[data-category-color] .ds-timeline-node {
  background: var(--ds-category-accent) !important;
  box-shadow:
    0 0 0 4px rgba(var(--ds-category-accent-rgb), 0.12),
    0 0 22px rgba(var(--ds-category-accent-rgb), 0.28) !important;
}

.ds-timeline-item[data-category-color] .ds-timeline-body {
  border-color: rgba(var(--ds-category-accent-rgb), 0.24) !important;
  box-shadow:
    inset 3px 0 0 rgba(var(--ds-category-accent-rgb), 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.ds-timeline-item[data-category-color] .ds-timeline-time {
  color: var(--ds-category-accent) !important;
}

.ds-timeline-item[data-category-color] .ds-timeline-status {
  border-color: rgba(var(--ds-category-accent-rgb), 0.24) !important;
  background: rgba(var(--ds-category-accent-rgb), 0.08) !important;
}

#nextSignalContent[data-category-color] {
  border-color: rgba(var(--ds-category-accent-rgb), 0.28) !important;
  box-shadow:
    inset 3px 0 0 rgba(var(--ds-category-accent-rgb), 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

#nextSignalContent[data-category-color] .ds-category-chip {
  border-color: rgba(var(--ds-category-accent-rgb), 0.28) !important;
  background: rgba(var(--ds-category-accent-rgb), 0.1) !important;
  color: rgba(252, 246, 231, 0.94) !important;
  box-shadow: 0 0 18px rgba(var(--ds-category-accent-rgb), 0.1) !important;
}

#nextSignalContent[data-category-color] .ds-countdown {
  color: var(--ds-category-accent) !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 53B — Next Signal Spacing + Planner Color Override
   Adds inner spacing to Next Signal and forces weekly cards
   to use only the saved custom category color.
   ========================================================= */

/* 1. Next Signal inner spacing */
#nextSignalContent[data-category-color] {
  --ds-next-signal-inner-left: 1.45rem;
  --ds-next-signal-inner-right: 1.15rem;
  --ds-next-signal-inner-y: 1.2rem;

  padding:
    var(--ds-next-signal-inner-y)
    var(--ds-next-signal-inner-right)
    var(--ds-next-signal-inner-y)
    var(--ds-next-signal-inner-left) !important;
}

/* 2. Weekly Planner: remove old category color conflict */
.ds-day-column .ds-signal-card[data-category-color] {
  border-color: rgba(var(--ds-category-accent-rgb), 0.34) !important;
  border-left-color: rgba(var(--ds-category-accent-rgb), 0.9) !important;

  box-shadow:
    inset 3px 0 0 rgba(var(--ds-category-accent-rgb), 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 34px rgba(0, 0, 0, 0.16) !important;
}

/* 3. Neutralize older data-category-specific planner accents */
.ds-day-column .ds-signal-card[data-category][data-category-color] {
  outline-color: rgba(var(--ds-category-accent-rgb), 0.22) !important;
}

.ds-day-column .ds-signal-card[data-category][data-category-color]::before,
.ds-day-column .ds-signal-card[data-category][data-category-color]::after {
  border-color: rgba(var(--ds-category-accent-rgb), 0.34) !important;
  background-color: var(--ds-category-accent) !important;
}

/* 4. Keep time + status aligned with saved category color */
.ds-day-column .ds-signal-card[data-category-color] .ds-signal-time {
  color: var(--ds-category-accent) !important;
}

.ds-day-column .ds-signal-card[data-category-color] .ds-signal-status {
  border-color: rgba(var(--ds-category-accent-rgb), 0.24) !important;
  background: rgba(var(--ds-category-accent-rgb), 0.08) !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 54 — Settings Local Data Actions
   Adds export, import, restore and clear actions inside Settings.
   ========================================================= */

.ds-settings-card--local-data {
  position: relative !important;
  overflow: hidden !important;
}

.ds-settings-card--local-data::after {
  content: "" !important;
  position: absolute !important;
  right: -24px !important;
  bottom: -24px !important;
  width: 120px !important;
  height: 120px !important;
  border-radius: 999px !important;
  background: radial-gradient(circle, rgba(222, 184, 113, 0.13), transparent 68%) !important;
  pointer-events: none !important;
}

.ds-settings-data-actions {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.55rem !important;
  margin-top: 1rem !important;
}

.ds-settings-data-actions .ds-settings-mini-button {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
  white-space: nowrap !important;
}

.ds-settings-mini-button--danger {
  border-color: rgba(255, 122, 122, 0.34) !important;
  background: rgba(255, 122, 122, 0.11) !important;
  color: rgba(255, 214, 214, 0.96) !important;
}

.ds-settings-mini-button--danger:hover {
  border-color: rgba(255, 122, 122, 0.56) !important;
  background: rgba(255, 122, 122, 0.16) !important;
}

.ds-settings-data-note {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  margin-top: 0.85rem !important;
  color: rgba(215, 229, 245, 0.54) !important;
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
}

@media (max-width: 560px) {
  .ds-settings-data-actions {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 54B — Desktop Category Summary One Line
   Keeps category summary pills on one row inside Settings.
   Desktop only.
   ========================================================= */

@media (min-width: 921px) {
  .ds-settings-card--categories .ds-settings-card__summary {
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.55rem !important;
    min-width: max-content !important;
  }

  .ds-settings-card--categories .ds-settings-card__summary span {
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 55 — Mobile Header Settings Alignment
   Mobile only: moves Settings gear beside the logo and aligns
   Audio status with Local Mode.
   ========================================================= */

@media (max-width: 680px) {
  .ds-product-header {
    --ds-mobile-settings-top: 1.08rem;
    --ds-mobile-settings-right: 1rem;
    --ds-mobile-settings-size: 42px;
    --ds-mobile-settings-gear-size: 1.35rem;

    position: relative !important;
  }

  .ds-product-actions #settingsButton.ds-settings-trigger {
    position: absolute !important;
    top: var(--ds-mobile-settings-top) !important;
    right: var(--ds-mobile-settings-right) !important;
    z-index: 5 !important;

    width: var(--ds-mobile-settings-size) !important;
    min-width: var(--ds-mobile-settings-size) !important;
    height: var(--ds-mobile-settings-size) !important;
    min-height: var(--ds-mobile-settings-size) !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ds-product-actions #settingsButton .ds-settings-trigger__icon {
    font-size: var(--ds-mobile-settings-gear-size) !important;
  }

  .ds-product-actions #settingsButton .ds-settings-trigger__label {
    display: none !important;
  }

  .ds-product-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  .ds-product-actions .ds-status-pill {
    width: 100% !important;
    min-height: 34px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .ds-product-actions #testSoundButton {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 42px !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 55B — Mobile Settings Gear Vertical Lift
   Mobile only: stronger vertical control for the Settings gear.
   ========================================================= */

@media (max-width: 680px) {
  .ds-product-header {
    position: relative !important;
  }

  .ds-product-actions {
    position: static !important;
  }

  .ds-product-actions #settingsButton.ds-settings-trigger {
    --ds-mobile-settings-top-fixed: 0.72rem;
    --ds-mobile-settings-lift: -4px;

    top: var(--ds-mobile-settings-top-fixed) !important;
    right: 1rem !important;
    transform: translateY(var(--ds-mobile-settings-lift)) !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 56 — Mobile Footer Spacing
   Solo mobile: separa status pill e install card
   + aumenta l'ariosità del footer
   ========================================================= */

@media (max-width: 680px) {
  :root {
    --ds-mobile-footer-gap: 20px;
    --ds-mobile-footer-air-y: 18px;
  }

  /* Footer più arioso */
  .ds-footer,
  .ds-site-footer,
  footer {
    padding-top: var(--ds-mobile-footer-air-y) !important;
    padding-bottom: calc(var(--ds-mobile-footer-air-y) + 6px) !important;
  }

  /* Più respiro tra i blocchi del footer */
  .ds-footer__inner,
  .ds-footer__content,
  .ds-footer__meta,
  .ds-footer__bottom,
  .ds-footer__status-area {
    row-gap: var(--ds-mobile-footer-air-y) !important;
  }

  /* Badge online/local data */
  .ds-status-pill,
  .ds-local-status,
  .ds-online-status,
  .ds-footer .ds-status-pill,
  .ds-footer .ds-local-status,
  .ds-footer .ds-online-status {
    margin-bottom: var(--ds-mobile-footer-gap) !important;
  }

  /* Tessera install */
  #installPromptCard,
  .ds-install-card,
  .ds-install-prompt-card,
  .ds-install-prompt {
    margin-top: 0 !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 57 — Mobile Public Test Width Match
   Mobile only: aligns Public Test card width with the
   Local-first CTA card without affecting desktop.
   ========================================================= */

@media (max-width: 680px) {
  .ds-feedback-cta {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 58 — Notification Permission Layer
   Adds notification status and permission UI inside Settings.
   ========================================================= */

.ds-settings-card--notifications {
  position: relative !important;
  overflow: hidden !important;
}

.ds-settings-card--notifications::after {
  content: "" !important;
  position: absolute !important;
  right: -28px !important;
  top: -28px !important;
  width: 118px !important;
  height: 118px !important;
  border-radius: 999px !important;
  background: radial-gradient(circle, rgba(83, 176, 255, 0.13), transparent 68%) !important;
  pointer-events: none !important;
}

.ds-notification-settings {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  gap: 0.75rem !important;
  margin-top: 1rem !important;
}

.ds-notification-settings__status {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0.7rem !important;
  padding: 0.78rem !important;
  border-radius: 16px !important;
  border: 1px solid rgba(129, 164, 214, 0.18) !important;
  background: rgba(3, 9, 20, 0.5) !important;
}

.ds-notification-settings__status strong {
  display: block !important;
  color: rgba(252, 246, 231, 0.94) !important;
  font-size: 0.86rem !important;
  letter-spacing: -0.01em !important;
}

.ds-notification-settings__status small {
  display: block !important;
  margin-top: 0.2rem !important;
  color: rgba(215, 229, 245, 0.58) !important;
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
}

.ds-notification-dot {
  width: 0.78rem !important;
  height: 0.78rem !important;
  border-radius: 999px !important;
  background: #9fb0c5 !important;
  box-shadow: 0 0 14px rgba(159, 176, 197, 0.18) !important;
}

.ds-notification-settings[data-notification-state="granted"] .ds-notification-dot {
  background: #62d58a !important;
  box-shadow: 0 0 16px rgba(98, 213, 138, 0.28) !important;
}

.ds-notification-settings[data-notification-state="default"] .ds-notification-dot {
  background: #e0bd72 !important;
  box-shadow: 0 0 16px rgba(224, 189, 114, 0.24) !important;
}

.ds-notification-settings[data-notification-state="denied"] .ds-notification-dot {
  background: #ff7a7a !important;
  box-shadow: 0 0 16px rgba(255, 122, 122, 0.24) !important;
}

.ds-notification-settings[data-notification-state="unsupported"] .ds-notification-dot {
  background: #9fb0c5 !important;
}

.ds-notification-settings #settingsNotificationButton {
  width: 100% !important;
  justify-content: center !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 59 — Test Notification Button
   Adds a clean two-button layout for notification permission
   and test notification inside Settings.
   ========================================================= */

.ds-notification-settings__actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.65rem !important;
  position: relative !important;
  z-index: 1 !important;
}

.ds-notification-settings__actions .ds-settings-mini-button {
  width: 100% !important;
  justify-content: center !important;
  min-height: 38px !important;
}

.ds-notification-settings__actions .ds-settings-mini-button:disabled {
  opacity: 0.54 !important;
  cursor: not-allowed !important;
}

@media (max-width: 680px) {
  .ds-notification-settings__actions {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 60 — Paused Notification State
   Adds visual state for locally paused browser alerts.
   ========================================================= */

.ds-notification-settings[data-notification-state="paused"] .ds-notification-dot {
  background: #a78bfa !important;
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.28) !important;
}

.ds-notification-settings[data-notification-state="paused"] .ds-notification-settings__status {
  border-color: rgba(167, 139, 250, 0.26) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(167, 139, 250, 0.11), transparent 46%),
    rgba(3, 9, 20, 0.5) !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 61 — Header Volume Control
   Replaces Local Mode with an internal Daily Signal volume UI.
   ========================================================= */

.ds-volume-control {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  z-index: 20 !important;
}

.ds-volume-button {
  min-height: 36px !important;
  padding: 7px 13px !important;
  border: 1px solid rgba(217, 182, 111, 0.34) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.16), rgba(255, 255, 255, 0.03)) !important;
  color: #f5dca9 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  box-shadow: 0 0 22px rgba(217, 182, 111, 0.08) !important;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease !important;
}

.ds-volume-button:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(217, 182, 111, 0.52) !important;
  background:
    linear-gradient(135deg, rgba(217, 182, 111, 0.22), rgba(119, 200, 255, 0.05)) !important;
  box-shadow: 0 0 28px rgba(217, 182, 111, 0.13) !important;
}

.ds-volume-button__icon {
  font-size: 1rem !important;
  line-height: 1 !important;
}

.ds-volume-button__value {
  min-width: 2.25rem !important;
  text-align: left !important;
}

.ds-volume-popover {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  width: 230px !important;
  padding: 0.9rem !important;
  border: 1px solid rgba(170, 205, 255, 0.18) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(217, 182, 111, 0.12), transparent 44%),
    linear-gradient(145deg, rgba(11, 24, 42, 0.98), rgba(5, 12, 24, 0.98)) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  display: none !important;
  gap: 0.75rem !important;
}

.ds-volume-control.is-open .ds-volume-popover {
  display: grid !important;
}

.ds-volume-popover__head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
}

.ds-volume-popover__head span {
  color: rgba(244, 239, 228, 0.74) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.ds-volume-popover__head strong {
  color: var(--ds-gold) !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
}

.ds-volume-slider {
  width: 100% !important;
  accent-color: var(--ds-gold) !important;
  cursor: pointer !important;
}

.ds-volume-popover__scale {
  display: flex !important;
  justify-content: space-between !important;
  color: rgba(169, 180, 199, 0.58) !important;
  font-size: 0.66rem !important;
  font-weight: 700 !important;
}

/* Mobile */
@media (max-width: 680px) {
  .ds-product-actions .ds-volume-control {
    width: 100% !important;
  }

  .ds-product-actions .ds-volume-button {
    width: 100% !important;
    min-height: 34px !important;
  }

  .ds-volume-popover {
    left: 0 !important;
    right: auto !important;
    width: min(230px, calc(100vw - 42px)) !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 62 — Music Library UI Polish
   Improves sound select clarity and Settings audio summary.
   ========================================================= */

.ds-sound-library-note {
  display: block !important;
  margin-top: 0.55rem !important;
  color: rgba(169, 180, 199, 0.68) !important;
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
}

.ds-settings-card--audio-library {
  position: relative !important;
  overflow: hidden !important;
}

.ds-settings-card--audio-library::after {
  content: "" !important;
  position: absolute !important;
  right: -34px !important;
  top: -34px !important;
  width: 128px !important;
  height: 128px !important;
  border-radius: 999px !important;
  background: radial-gradient(circle, rgba(217, 182, 111, 0.14), transparent 68%) !important;
  pointer-events: none !important;
}

.ds-audio-library-summary {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.45rem !important;
  margin: 1rem 0 0.75rem !important;
}

.ds-audio-library-summary span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 0.42rem 0.62rem !important;
  border: 1px solid rgba(217, 182, 111, 0.24) !important;
  border-radius: 999px !important;
  background: rgba(217, 182, 111, 0.09) !important;
  color: rgba(245, 220, 169, 0.92) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.ds-settings-card--audio-library .ds-settings-status-pill {
  margin-top: 0.85rem !important;
}

@media (max-width: 680px) {
  .ds-audio-library-summary {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .ds-audio-library-summary span {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 63 — Music Library Settings Panel
   Adds a previewable MP3 library inside Settings > Audio.
   ========================================================= */

.ds-music-library-panel {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  gap: 0.55rem !important;
  margin: 1rem 0 0.85rem !important;
  max-height: 290px !important;
  overflow-y: auto !important;
  padding-right: 0.25rem !important;
}

.ds-music-library-panel::-webkit-scrollbar {
  width: 7px !important;
}

.ds-music-library-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.035) !important;
  border-radius: 999px !important;
}

.ds-music-library-panel::-webkit-scrollbar-thumb {
  background: rgba(217, 182, 111, 0.34) !important;
  border-radius: 999px !important;
}

.ds-music-library-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.7rem !important;
  padding: 0.68rem !important;
  border: 1px solid rgba(170, 205, 255, 0.14) !important;
  border-radius: 15px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
    rgba(3, 9, 20, 0.42) !important;
}

.ds-music-library-item strong {
  display: block !important;
  color: rgba(252, 246, 231, 0.94) !important;
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
}

.ds-music-library-item small {
  display: block !important;
  margin-top: 0.16rem !important;
  color: rgba(169, 180, 199, 0.58) !important;
  font-size: 0.66rem !important;
  line-height: 1.25 !important;
}

.ds-music-library-item .ds-settings-mini-button {
  min-height: 32px !important;
  padding-inline: 0.72rem !important;
  white-space: nowrap !important;
}

.ds-music-library-item .ds-settings-mini-button:disabled {
  opacity: 0.62 !important;
  cursor: wait !important;
}

@media (max-width: 680px) {
  .ds-music-library-panel {
    max-height: 340px !important;
  }

  .ds-music-library-item {
    grid-template-columns: 1fr !important;
  }

  .ds-music-library-item .ds-settings-mini-button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 64 — Desktop Side Navigation Rail
   Fixed desktop-only quick navigation with icon rail and
   hover labels.
   ========================================================= */

.ds-side-rail {
  display: none !important;
}

@media (min-width: 1500px) {
  .ds-side-rail {
    --ds-side-rail-left: max(18px, calc((100vw - var(--ds-max-width)) / 2 - 86px));
    --ds-side-rail-size: 48px;
    --ds-side-rail-gap: 0.55rem;

    position: fixed !important;
    left: var(--ds-side-rail-left) !important;
    top: 50% !important;
    z-index: 34 !important;
    transform: translateY(-50%) !important;

    display: grid !important;
    gap: var(--ds-side-rail-gap) !important;
    padding: 0.55rem !important;

    border: 1px solid rgba(170, 205, 255, 0.14) !important;
    border-radius: 999px !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(217, 182, 111, 0.10), transparent 42%),
      linear-gradient(180deg, rgba(8, 18, 32, 0.9), rgba(4, 10, 20, 0.86)) !important;
    backdrop-filter: blur(18px) !important;
    box-shadow:
      0 24px 68px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  }

  .ds-side-rail__link {
    position: relative !important;
    width: var(--ds-side-rail-size) !important;
    height: var(--ds-side-rail-size) !important;

    display: grid !important;
    place-items: center !important;

    border: 1px solid rgba(170, 205, 255, 0.13) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.032) !important;
    color: var(--ds-text) !important;
    text-decoration: none !important;

    transition:
      transform 180ms ease,
      border-color 180ms ease,
      background 180ms ease,
      box-shadow 180ms ease !important;
  }

  .ds-side-rail__link:hover,
  .ds-side-rail__link:focus-visible {
    transform: translateX(3px) !important;
    border-color: rgba(217, 182, 111, 0.46) !important;
    background:
      linear-gradient(135deg, rgba(217, 182, 111, 0.15), rgba(119, 200, 255, 0.06)) !important;
    box-shadow:
      0 0 26px rgba(217, 182, 111, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  }

  .ds-side-rail__icon {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 1.08rem !important;
    line-height: 1 !important;
    filter: saturate(0.92) brightness(1.02) !important;
  }

  .ds-side-rail__label {
    position: absolute !important;
    left: calc(100% + 0.65rem) !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(-4px) !important;

    min-height: 32px !important;
    padding: 0.42rem 0.72rem !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 1px solid rgba(217, 182, 111, 0.28) !important;
    border-radius: 999px !important;
    background:
      linear-gradient(135deg, rgba(10, 22, 38, 0.98), rgba(5, 12, 24, 0.96)) !important;
    color: rgba(245, 220, 169, 0.96) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28) !important;

    font-size: 0.72rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;

    opacity: 0 !important;
    pointer-events: none !important;

    transition:
      opacity 160ms ease,
      transform 160ms ease !important;
  }

  .ds-side-rail__link:hover .ds-side-rail__label,
  .ds-side-rail__link:focus-visible .ds-side-rail__label {
    opacity: 1 !important;
    transform: translateY(-50%) translateX(0) !important;
  }

  .ds-side-rail__link:focus-visible {
    outline: 2px solid rgba(217, 182, 111, 0.68) !important;
    outline-offset: 3px !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 64B — Anchor Scroll Offset
   Keeps anchor targets below the sticky/top navigation area.
   ========================================================= */

#top,
#liveDashboard,
#signalForm,
#routineTemplates,
#todayTimeline,
#efficiencyReview,
#weeklyPlanner {
  scroll-margin-top: 110px !important;
}

/* =========================================================
   DAILY SIGNAL PATCH 64C — Side Rail Position Refinement
   Moves the desktop side rail slightly higher and further left.
   Desktop wide only.
   ========================================================= */

@media (min-width: 1500px) {
  .ds-side-rail {
    --ds-side-rail-x-shift: -56px;
    --ds-side-rail-y-position: 33%;

    left: calc(var(--ds-side-rail-left) + var(--ds-side-rail-x-shift)) !important;
    top: var(--ds-side-rail-y-position) !important;
  }
}

/* =========================================================
   DAILY SIGNAL PATCH 65 — Delete Custom Category
   Adds delete action for custom categories only.
   ========================================================= */

.ds-category-editor__footer {
  gap: 0.55rem !important;
  flex-wrap: wrap !important;
}

.ds-category-delete-button {
  margin-left: auto !important;
  min-height: 28px !important;
  padding: 0.35rem 0.62rem !important;

  border: 1px solid rgba(255, 122, 122, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(255, 122, 122, 0.08) !important;
  color: rgba(255, 174, 174, 0.94) !important;

  font-size: 0.64rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.075em !important;
  text-transform: uppercase !important;

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease !important;
}

.ds-category-delete-button:hover,
.ds-category-delete-button:focus-visible {
  transform: translateY(-1px) !important;
  border-color: rgba(255, 122, 122, 0.48) !important;
  background: rgba(255, 122, 122, 0.14) !important;
  color: #ffd1d1 !important;
}

@media (max-width: 680px) {
  .ds-category-delete-button {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: center !important;
  }
}