/* ==========================================================================
   JORIE DAILY — design-system.css · Phase 33.2 · Design & UI consistency
   --------------------------------------------------------------------------
   Loaded LAST on every page. Presentation only:
     • no rule here shows, hides, enables or disables anything that a script
       or an earlier stylesheet controls (no `display:none`, no `pointer-events`
       changes on interactive controls, no visibility rules);
     • no animation, keyframe, transition timing or celebration/festive rule
       is added, removed or redefined (birthday, confetti, holiday, Calendar
       month-change and reveal animations are untouched);
     • every colour comes from the four brand colours and the tokens derived
       from them (burgundy #4B1923 · pink #EBC8CD · white · beige #F0E6E1).
   Reference for density: the Calendar page (compact header, 36–44px controls).

   Contents
   01. Tokens — one control-height scale
   02. Buttons — primary / secondary / subtle / destructive, states
   03. Header navigation — one label style for every tab
   04. Page heroes — Calendar's compact rhythm on every page
   05. Forms — inputs, placeholders, checkboxes, dates (cross-browser)
   06. Cards & empty states
   07. Status, error and notification colours
   08. Login — “Remember me for 2 weeks”
   09. Today — welcome panels, Our Dates items, category colours
   10. Blog — Today's Question
   11. Our Dates
   12. Plan a Trip
   13. Wishlist
   14. Footer
   15. Small screens & touch
   ========================================================================== */

/* ---------- 01. TOKENS ---------------------------------------------------- */
:root {
  /* Three button heights instead of five (36/44/52/60 + 30). */
  --ds-btn-sm: 38px;
  --ds-btn-md: 44px;
  --ds-btn-lg: 52px;
  --ds-input-h: 44px;
  --ds-check: 18px;
  /* Text sizes used by controls */
  --ds-fs-btn: 0.9375rem;   /* 15px */
  /* Error / attention text: brand burgundy (light) · beige (dark), never red */
  --ds-attn: var(--ink);
  --ds-attn-bg: rgb(var(--pink-rgb) / 0.45);
}
:root[data-theme="dark"] { --ds-attn-bg: rgb(var(--pink-rgb) / 0.14); }

/* ---------- 02. BUTTONS --------------------------------------------------- */
/* Primary   .btn--primary  — burgundy (light) / pink (dark), one per area
   Secondary .btn--outline  — hairline border, transparent
   Subtle    .plan-btn      — small pill for in-card tools
   Destructive               — dashed hairline at rest, burgundy fill on hover */
.btn {
  --btn-h: var(--ds-btn-md);
  gap: 8px;
  padding: 0 22px;
  font-size: var(--ds-fs-btn);
}
.btn--lg { --btn-h: var(--ds-btn-lg); padding: 0 28px; font-size: var(--fs-base); }
.btn--sm { --btn-h: var(--ds-btn-sm); padding: 0 16px; font-size: var(--fs-sm); }
.btn--icon { padding: 0; }
.btn .icon { width: 16px; height: 16px; }
.btn--lg .icon { width: 18px; height: 18px; }
.btn--sm .icon { width: 15px; height: 15px; }
.btn--icon .icon { width: 18px; height: 18px; }
/* The selected-day panel keeps its existing 44px small feature button. */
.details .btn--feature.btn--sm { --btn-h: var(--ds-btn-md); }

/* Subtle (in-card) buttons: one text size, one icon size, real disabled look */
.plan-btn { gap: 6px; letter-spacing: 0.01em; }
.plan-btn .icon { width: 14px; height: 14px; }
.plan-btn:hover:not(:disabled) { background-color: color-mix(in srgb, var(--ink) 5%, transparent); }
.plan-btn:disabled:not(.jd-pending),
.plan-btn[aria-disabled="true"]:not(.jd-pending),
.wish-tool:disabled,
.od-filter:disabled,
.pill:disabled { opacity: 0.45; }

/* Destructive tools share one treatment (previously: red text on Wishlist,
   red text + red wash on Our Dates history, dashed burgundy elsewhere). */
.wish-tool--danger,
.od-delete-btn { border-style: dashed; border-color: color-mix(in srgb, var(--ink) 45%, transparent); color: var(--ink) !important; }
.wish-tool--danger:hover:not(:disabled),
.od-delete-btn:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  border-style: solid;
  color: var(--bg) !important;
}

/* Workout check-in choices: 54px → 48px, same pill language. */
.choice { min-height: 48px; padding: 0 20px 0 12px; gap: 10px; }

/* ---------- 03. HEADER NAVIGATION -------------------------------------- */
/* “Wellness” is a <button>; `font: inherit` (Phase 32.3) made it 16px/400
   while every other tab is 14px/600. Match the link tabs exactly. */
.nav__group[data-nav-extra="wellness"] > .nav__link {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: inherit;
}
.nav__group[data-nav-extra="wellness"] > .nav__link .nav__label { font: inherit; letter-spacing: inherit; }

/* Dropdown panels (Calendar / Wellness / Essentials) and the profile menu:
   identical item rhythm. */
.nav-cal__item { font-size: var(--fs-sm); }

/* ---------- 04. PAGE HEROES ---------------------------------------------- */
/* Calendar's header rhythm (20px above the eyebrow, 12px eyebrow→title,
   26–32px to the content) on every editorial page. Title size unchanged. */
.page-hero,
.page .blog-hero {
  padding-top: clamp(6px, 1.6vw, 20px);
  padding-bottom: clamp(20px, 2.4vw, 32px);
}
.page-hero__eyebrow { margin-bottom: 12px; }
.page-hero__lede { margin-top: clamp(12px, 1.4vw, 16px); }
.od-hero { padding-top: clamp(6px, 1.6vw, 20px); }
/* A heart that follows eyebrow text sits next to the word, not one flex gap away. */
.page-hero__eyebrow > span[aria-hidden="true"]:last-child { margin-left: -5px; }

/* Section headings inside pages: one weight (Our Dates used 800, Plan a Trip 600). */
.od-section__title,
.tp-h2 { font-weight: 700; }

/* ---------- 05. FORMS ---------------------------------------------------- */
.input { min-height: var(--ds-input-h); padding: 9px 14px; }
.input--area { min-height: 88px; padding-block: 12px; }
.input--num { min-height: var(--ds-input-h); }
.field { gap: 7px; }
.field__label { line-height: 1.3; }
.field__hint { line-height: 1.45; }

/* Placeholders: same tone in every browser (Firefox dims them by default). */
.input::placeholder,
.textarea::placeholder,
textarea::placeholder,
input::placeholder { color: var(--ink-3); opacity: 1; }

/* Native checkboxes / radios / range follow the brand in both themes. */
input[type="checkbox"],
input[type="radio"],
input[type="range"],
progress { accent-color: var(--ink); }

/* Date / time pickers: the calendar glyph was burgundy-on-burgundy in dark
   mode for inputs that are not `.input` (Plan a Trip, appointments). */
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.7; }

/* Remove the grey tap flash Chrome/Brave on Android paint over pills. */
.btn, .plan-btn, .pill, .choice, .nav__link, .nav-cal__toggle, .wish-tool, .od-filter, .tp-step, .blog-tab, .cal-tab,
.jd-month-menu__toggle, .menu-toggle, .profile__btn { -webkit-tap-highlight-color: transparent; }

/* ---------- 06. CARDS & EMPTY STATES ------------------------------------- */
/* One inner padding for top-level cards on Today (welcome panels were 42px). */
.scotty-hello { padding: var(--pad-card); }

/* Empty states: one layout, one title size, one icon size. Previously five
   different paddings (42/48/64/72px) and title sizes (22–34px). */
.empty-state,
.wish-empty,
.tp-empty:not(.tp-empty--small),
.mc-empty,
.od-empty,
.ds-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: clamp(28px, 4vw, 44px) var(--pad-card);
  text-align: center;
}
.empty-state p:first-child,
.wish-empty h2,
.tp-empty:not(.tp-empty--small) > h2,
.mc-empty__title,
.od-empty__title,
.ds-empty__title {
  margin: 0;
  max-width: 28ch;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}
.empty-state p + p,
.wish-empty p,
.tp-empty:not(.tp-empty--small) > p,
.mc-empty__text,
.od-empty__text,
.ds-empty__text {
  margin: 0;
  max-width: 46ch;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-2);
}
.wish-empty__symbol,
.mc-empty__mark,
.od-empty__mark { font-size: 1.75rem; line-height: 1; color: var(--ink-2); }
.tp-empty__icon .icon { width: 26px; height: 26px; }
.wish-empty .btn, .tp-empty .btn, .mc-empty .btn, .od-empty .btn, .empty-state .btn { margin-top: 8px; }

/* Dialog shells: Wishlist used a larger radius than every other dialog. */
.wish-dialog { border-radius: var(--jd-radius-card); }

/* ---------- 07. STATUS, ERROR & NOTIFICATION COLOURS --------------------- */
/* Error copy was four different reds (#ad3c48, #b7444c, #9f4553, #8f3a49)
   and two off-brand pinks in dark mode. All use the brand ink now, marked
   with weight and a soft brand tint, like the existing Plan a Trip errors. */
.wish-form-error,
.ch-status.is-error,
.save-confirm__error,
.account-error { color: var(--ds-attn) !important; font-weight: 600; }
.wish-form-error:not(:empty) {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--ds-attn-bg);
}
.cy-note__status.is-error,
.cy-card__status.is-error { color: var(--ds-attn); }

/* ---------- 08. LOGIN — “Remember me for 2 weeks” ------------------------ */
.gate__btn { --btn-h: 48px; }
.gate__remember {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: -2px 0 2px;
  padding: 2px 4px 2px 0;
  border-radius: var(--radius-xs);
  font: 500 var(--fs-sm)/1.3 var(--font-body);
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.gate__remember:hover { color: var(--ink); }
.gate__remember input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--ds-check);
  height: var(--ds-check);
  margin: 0;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color var(--jd-t2, 260ms) ease, border-color var(--jd-t2, 260ms) ease, box-shadow var(--jd-t2, 260ms) ease;
}
.gate__remember input::after {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--btn-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.3 4.8 8.8 9.8 3.4' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.3 4.8 8.8 9.8 3.4' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}
.gate__remember:hover input:not(:checked) { border-color: var(--ink-3); }
.gate__remember input:checked { background: var(--btn-bg); border-color: var(--btn-bg); }
.gate__remember input:checked::after { opacity: 1; transform: none; }
.gate__remember input:checked + span { color: var(--ink); }
.gate__remember input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--focus-ring); }
.gate__remember:focus-within { color: var(--ink); }
@media (pointer: coarse) {
  .gate__remember { min-height: 44px; }
  .gate__remember input { --ds-check: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate__remember input, .gate__remember input::after { transition: none; }
}

/* ---------- 09. TODAY ------------------------------------------------------ */
/* Welcome panels: when the personal note is shown, it sits beside the
   greeting on wide screens instead of leaving the right half empty. */
@media (min-width: 900px) {
  .scotty-hello:has(> .cy-note:not([hidden])),
  .scotty-hello:has(> .cy-love:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.05fr);
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: clamp(24px, 3.4vw, 48px);
    align-items: start;
  }
  .scotty-hello:has(> .cy-note:not([hidden])) > :not(.cy-note),
  .scotty-hello:has(> .cy-love:not([hidden])) > :not(.cy-love) { grid-column: 1; }
  .scotty-hello > .cy-note:not([hidden]),
  .scotty-hello > .cy-love:not([hidden]) {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    max-width: none;
    margin-top: 0;
  }
}
.scotty-hello .eyebrow { margin: 0; }
.scotty-hello h2 { margin: 0.45rem 0 0.4rem; }
.scotty-hello > p:not(.eyebrow) { margin: 0; }
.scotty-hello > p:not(.eyebrow) + p { margin-top: 4px; }
.cy-note, .cy-love { margin-top: var(--space-4); }
:root[data-theme="dark"] .cy-note,
:root[data-theme="dark"] .cy-love { background: rgb(var(--pink-rgb) / 0.06); border-color: var(--line); }
:root[data-theme="dark"] .cy-note--wellness { background: linear-gradient(135deg, rgb(var(--pink-rgb) / 0.08), rgb(var(--pink-rgb) / 0.03)); }
:root[data-theme="dark"] .cy-note__title,
:root[data-theme="dark"] .cy-love__title,
:root[data-theme="dark"] .cy-love__lead,
:root[data-theme="dark"] .cy-note__saved { color: var(--ink); }

/* “Something special is coming”: the sparkle and icon tile used two
   off-brand mauves. */
.joy-upcoming__sparkle { color: rgb(var(--burgundy-rgb) / 0.5); }
:root[data-theme="dark"] .joy-upcoming__sparkle { color: rgb(var(--pink-rgb) / 0.6); }

/* Our Dates items on Today used a light mauve box (also in dark mode).
   Same treatment the Calendar already uses. */
.od-inline { border-top-color: var(--line); }
.od-inline__item { background: var(--surface-sunk); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius-sm); }
.od-inline__heart { color: var(--ink-2); }
.od-inline__meta { color: var(--ink-2); }
.od-inline__item a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.od-inline__tag { background: var(--accent); color: var(--on-accent); }

/* Appointment category tiles: lavender, yellow, mint and green tints
   replaced by brand pink/beige mixes (icons still tell the categories apart). */
.plan--vet .plan__icon,
.plan--nails .plan__icon { background: var(--pink); }
.plan--facial .plan__icon { background: color-mix(in srgb, var(--pink) 55%, var(--white)); }
.plan--hair .plan__icon { background: color-mix(in srgb, var(--beige) 70%, var(--pink)); }
.plan--medical .plan__icon { background: var(--beige); box-shadow: inset 0 0 0 1px rgb(var(--burgundy-rgb) / 0.12); }
.plan--care .plan__icon { background: color-mix(in srgb, var(--pink) 35%, var(--beige)); }

/* Learning & creative activities: lavender/orange accents → brand mixes. */
.act--design       { --act-a: color-mix(in srgb, var(--pink) 60%, var(--white)); --act-c: var(--pink); --act-tile: color-mix(in srgb, var(--pink) 18%, var(--white)); }
.act--illustration { --act-a: color-mix(in srgb, var(--pink) 75%, var(--white)); --act-c: rgb(var(--burgundy-rgb) / 0.35); --act-tile: color-mix(in srgb, var(--pink) 12%, var(--white)); }
.act--german       { --act-a: var(--beige); --act-tile: color-mix(in srgb, var(--beige) 55%, var(--white)); }
:root[data-theme="dark"] .act--german       { --act-tile: rgb(var(--beige-rgb) / 0.10); --act-a: rgb(var(--beige-rgb) / 0.9); }
:root[data-theme="dark"] .act--design       { --act-tile: rgb(var(--pink-rgb) / 0.10); --act-a: rgb(var(--pink-rgb) / 0.9); }
:root[data-theme="dark"] .act--illustration { --act-tile: rgb(var(--pink-rgb) / 0.08); --act-a: rgb(var(--pink-rgb) / 0.8); }

/* Birthday list hairline used an off-palette mauve fallback. */
#jd-birthday-area #jd-birthday-list li { border-bottom-color: var(--line); }

/* ---------- 10. BLOG — TODAY'S QUESTION ---------------------------------- */
/* Title in dark mode used an off-brand pink (#f3d6dc); use the theme ink. */
:root[data-theme="dark"] .dq-card__title,
:root[data-theme="dark"] .scotty-hello h2 { color: var(--ink); }
/* The watermark heart was cut off by the card's top edge; it now sits fully
   inside the corner, smaller and quieter. */
.dq-card--featured::after {
  top: clamp(14px, 2vw, 24px);
  right: clamp(18px, 2.4vw, 32px);
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  color: rgb(var(--burgundy-rgb) / 0.045);
}
:root[data-theme="dark"] .dq-card--featured::after { color: rgb(var(--pink-rgb) / 0.05); }
/* The answer area was a white box with a hairline inside a white card
   (barely visible). A soft beige zone groups it without a second frame. */
.dq-card--featured .dq-card__body {
  background: color-mix(in srgb, var(--surface-sunk) 55%, var(--surface));
  border-color: transparent;
  box-shadow: none;
}
:root[data-theme="dark"] .dq-card--featured .dq-card__body { background: rgb(var(--burgundy-rgb) / 0.45); border-color: var(--line); }
.dq-editor { gap: 8px; }
.dq-editor__label { margin: 0; font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
.dq-editor__hint { margin: 0; line-height: 1.55; }
/* 260px empty textarea → 170px; it still grows with the text (blog.js). */
.dq-editor__input { min-height: clamp(150px, 16vw, 180px); }
.dq-question { font-weight: 500; }
.blog-tab { min-height: 40px; }
.blog-tabs { box-shadow: none; }

/* ---------- 11. OUR DATES ---------------------------------------------------- */
/* Status chip (“Planned”, “Completed ♡”) was white-on-white, so the label
   looked like stray indented text. */
.od-tag { min-height: 24px; padding: 3px 10px; background: color-mix(in srgb, var(--surface-sunk) 85%, var(--pink)); color: var(--ink); }
:root[data-theme="dark"] .od-tag { background: rgb(var(--pink-rgb) / 0.14); }
.od-card__tags { margin-top: 10px; }
/* “Open date details →” was an underlined link inside a bordered pill. */
.od-card__actions .plan-btn { text-decoration: none; min-height: 36px; }
/* Scotty's note about My Challenges: the flex paragraph split the sentence
   into separate columns around the link on phones. */
.od-challenge-link:not(:has(> span)) { display: block; line-height: 1.9; }
.od-challenge-link:not(:has(> span)) > .plan-btn { display: inline-flex; vertical-align: middle; min-height: 30px; margin-inline: 2px; text-decoration: none; }
.od-elsewhere { font-size: var(--fs-sm); color: var(--ink-2); }
.od-own-idea { border-color: var(--line-2); border-radius: var(--radius-sm); }
.od-own-idea:hover, .od-own-idea:focus-visible { border-color: var(--ink); }
.od-custom-cat { border-color: var(--line-2); }
.od-history-bar { border-bottom-color: var(--line); }

/* ---------- 12. PLAN A TRIP ------------------------------------------------- */
.tp-question-heading { gap: 10px; }
.tp-question-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
}
.tp-question-icon svg { width: 15px; height: 15px; }
/* The empty-range hint read as bold body copy; it is helper text. */
.tp-summary { font-size: var(--fs-sm); font-weight: 500; line-height: 1.55; }
.tp-step { min-height: 40px; }
.tp-step__n { flex: none; }

/* ---------- 13. WISHLIST ------------------------------------------------------ */
/* Category art tiles: teal-grey and lavender replaced by brand tints. */
.wish-art--clothing { background: color-mix(in srgb, var(--pink) 45%, var(--beige)); }
.wish-art--house    { background: var(--beige); }
.wish-art--pet      { background: color-mix(in srgb, var(--beige) 75%, var(--pink)); }
.wish-art--makeup   { background: color-mix(in srgb, var(--pink) 70%, var(--white)); }
.wish-art--skincare { background: color-mix(in srgb, var(--beige) 55%, var(--white)); }
.wish-art--other    { background: color-mix(in srgb, var(--pink) 28%, var(--beige)); }
/* The deadline line sat 70px below the lede; it belongs to the hero. */
.wish-hero + .wish-status { margin-top: 0; }

/* ---------- 14. FOOTER -------------------------------------------------------- */
/* Account buttons were centred under a left-aligned tagline. On wide
   screens they share the tagline's row, aligned right. */
@media (min-width: 900px) {
  .site-footer__meta { align-items: center; }
  .site-footer__meta .sync-controls { flex-basis: auto; justify-content: flex-end; margin: 0 0 0 auto; }
}

/* ---------- 15. SMALL SCREENS & TOUCH --------------------------------------- */
@media (pointer: coarse) {
  .btn--sm { --btn-h: 44px; }
  .input { min-height: 46px; }
  .tp-step, .blog-tab { min-height: 44px; }
}
@media (max-width: 560px) {
  .btn { padding: 0 18px; }
  .choice { padding: 0 16px 0 10px; }
  .scotty-hello h2 { font-size: clamp(1.7rem, 7vw, 2.1rem); }
  .od-challenge-link:not(:has(> span)) { line-height: 1.8; }
}

/* Phase 44.6 · point of view: the same sentence written for Marjorie ("your") and,
   when it is about her, for Scotty ("Marjorie's"). Only one is ever displayed or read. */
:root[data-viewer] [data-voice="admin"],
:root:not([data-viewer]) [data-voice="viewer"] { display: none !important; }
