/* ==========================================================================
   WanderKitchen — "Culinary Comfort" design system
   Tokens mirror .claude/DESIGN.md (Modern Organicism, 8px baseline).
   Component classes mirror the code.html mockup.
   ========================================================================== */

:root {
  /* Surfaces */
  --wk-bg:                       #fcf9f2;
  --wk-surface:                  #fcf9f2;
  --wk-surface-dim:              #dcdad3;
  --wk-surface-container-lowest: #ffffff;
  --wk-surface-container-low:    #f6f3ec;
  --wk-surface-container:        #f0eee7;
  --wk-surface-container-high:   #ebe8e1;
  --wk-surface-container-highest:#e5e2db;
  --wk-on-surface:               #1c1c18;
  --wk-on-surface-variant:       #424842;
  --wk-outline:                  #727971;
  --wk-outline-variant:          #c2c8bf;

  /* Brand */
  --wk-primary:                  #44664a;
  --wk-on-primary:               #ffffff;
  --wk-primary-container:        #c6ecc8;
  --wk-on-primary-container:     #13341c;
  --wk-primary-fixed:            #c6ecc8;
  --wk-primary-fixed-dim:        #aad0ad;
  --wk-on-primary-fixed-variant: #2d4e33;

  --wk-secondary:                #94492c;
  --wk-on-secondary:             #ffffff;
  --wk-secondary-container:      #ffdbcf;
  --wk-on-secondary-container:   #773318;

  --wk-tertiary:                 #765a05;
  --wk-on-tertiary:              #ffffff;
  --wk-tertiary-container:       #ffdf96;
  --wk-tertiary-fixed:           #ffdf96;
  --wk-on-tertiary-container:    #3b2c00;

  --wk-error:                    #ba1a1a;
  --wk-error-container:          #ffdad6;
  --wk-on-error-container:       #93000a;

  /* Spacing (8 baseline) */
  --wk-xs:   4px;
  --wk-base: 8px;
  --wk-sm:   12px;
  --wk-md:   16px;
  --wk-lg:   24px;
  --wk-xl:   32px;
  --wk-container-margin: 20px;
  --wk-gutter: 12px;

  /* Radius */
  --wk-r-sm:  0.25rem;
  --wk-r:     0.5rem;
  --wk-r-md:  0.75rem;
  --wk-r-lg:  1rem;
  --wk-r-xl:  1.5rem;

  /* Elevation (sage-tinted soft shadows) */
  --wk-elev-1: 0 1px 2px rgba(68,102,74,.06), 0 4px 12px rgba(68,102,74,.05);
  --wk-elev-2: 0 1px 2px rgba(68,102,74,.08), 0 10px 24px rgba(68,102,74,.08);
  --wk-elev-cta: 0 1px 2px rgba(148,73,44,.10), 0 12px 28px rgba(148,73,44,.18);
  --wk-elev-bottom: 0 -4px 16px rgba(68,102,74,.08);

  --wk-max: 1280px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { background: var(--wk-bg); margin: 0; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--wk-on-surface);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .wk-display {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  color: var(--wk-on-surface);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--wk-primary); text-underline-offset: 3px; }
a:hover { color: var(--wk-on-primary-container); }

.wk-eyebrow {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wk-on-surface-variant);
  font-weight: 600;
}

/* Material Symbols defaults */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ==========================================================================
   App bar (sticky top)
   ========================================================================== */

.wk-app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--wk-bg);
}
.wk-app-bar-inner {
  max-width: var(--wk-max);
  margin: 0 auto;
  padding: 12px var(--wk-container-margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wk-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.wk-brand:active { transform: scale(.96); }
.wk-brand:hover { opacity: .85; }
.wk-brand img { width: 36px; height: 36px; flex-shrink: 0; }
.wk-brand-name {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 24px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--wk-primary);
}
@media (max-width: 575.98px) {
  .wk-brand-name { font-size: 18px; line-height: 22px; }
  .wk-brand img { width: 30px; height: 30px; }
}

.wk-app-bar-right {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.wk-app-bar-links {
  display: none;
  gap: 28px;
  margin-right: 8px;
  align-items: center;
}
@media (min-width: 768px) {
  .wk-app-bar-links { display: inline-flex; }
}
.wk-app-bar-link {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  font-weight: 600;
  color: var(--wk-on-surface-variant);
  text-decoration: none;
  transition: opacity .15s ease;
}
.wk-app-bar-link:hover { opacity: .8; color: var(--wk-on-surface-variant); }
.wk-app-bar-link.active { color: var(--wk-primary); font-weight: 700; }
.wk-app-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--wk-r);
  background: var(--wk-primary);
  color: var(--wk-on-primary);
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--wk-elev-1);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.wk-app-bar-cta:hover {
  color: var(--wk-on-primary);
  box-shadow: var(--wk-elev-2);
  transform: translateY(-1px);
}
.wk-app-bar-cta:active { transform: scale(.97); }
.wk-app-bar-cta .material-symbols-outlined { font-size: 20px; }
@media (max-width: 575.98px) {
  .wk-app-bar-cta { padding: 0 12px; }
}

/* ==========================================================================
   Main / sections
   ========================================================================== */

.wk-main {
  max-width: var(--wk-max);
  margin: 0 auto;
  padding: var(--wk-lg) var(--wk-container-margin) var(--wk-lg);
  display: grid;
  gap: 18px; /* slightly tighter than --wk-lg (24px) */
}
.page-home .wk-main { padding-top: 18px; }
/* Match the dashboard's heading size on the plans + shopping pages */
.page-plans .h2,
.page-shopping .h2 { font-size: 19px; line-height: 26px; }
@media (max-width: 575.98px) {
  .wk-main { padding-bottom: 100px; } /* clear FAB + bottom nav */
}

/* ==========================================================================
   Bento — top weather + AI action
   ========================================================================== */

.wk-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wk-md);
}
@media (min-width: 768px) {
  .wk-bento { grid-template-columns: 2fr 1fr; }
}

.wk-weather-card {
  position: relative;
  background: var(--wk-surface-container-low);
  border: 1px solid var(--wk-surface-container-highest);
  border-radius: var(--wk-r-lg);
  padding: 14px; /* slightly tighter than --wk-md (16px) */
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--wk-md);
  box-shadow: var(--wk-elev-1);
  overflow: hidden;
  text-align: left;
}
.wk-weather-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 200px;
  height: 200px;
  background: color-mix(in srgb, var(--wk-primary-container) 35%, transparent);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}
.wk-weather-orb {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wk-primary-container);
  color: var(--wk-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 -8px 18px rgba(19,52,28,.10);
}
.wk-weather-orb .material-symbols-outlined { font-size: 30px; }
.wk-weather-body { position: relative; z-index: 1; flex-grow: 1; display: grid; gap: 2px; }
.wk-weather-body .wk-eyebrow { color: var(--wk-on-surface-variant); }
.wk-weather-body h2 {
  font-size: 19px;
  line-height: 26px;
  color: var(--wk-primary);
  font-weight: 600;
}
.wk-weather-body p {
  color: var(--wk-on-surface-variant);
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}

.wk-action-card {
  background: var(--wk-secondary-container);
  border: 1px solid color-mix(in srgb, var(--wk-secondary) 14%, transparent);
  border-radius: var(--wk-r-lg);
  padding: var(--wk-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--wk-md);
  text-align: center;
  box-shadow: var(--wk-elev-1);
  text-decoration: none;
  color: var(--wk-on-secondary-container);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wk-action-card:hover {
  transform: scale(1.02);
  box-shadow: var(--wk-elev-2);
  color: var(--wk-on-secondary-container);
}
.wk-action-card .wk-action-icon { font-size: 32px; font-variation-settings: 'FILL' 1; }
.wk-action-card .wk-action-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wk-secondary);
  color: var(--wk-on-secondary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: var(--wk-elev-cta);
  text-decoration: none;
  transition: transform .15s ease;
}
.wk-action-card .wk-action-cta:hover { color: var(--wk-on-secondary); }
.wk-action-card .wk-action-cta:active { transform: scale(.97); }
.wk-action-card .wk-action-sub {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--wk-on-secondary-fixed-variant, #763217);
  opacity: .85;
  margin: 0;
}

/* ==========================================================================
   Section title row
   ========================================================================== */

.wk-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--wk-md);
}
.wk-section-title h3 {
  font-size: 24px;
  line-height: 32px;
  color: var(--wk-on-surface);
  font-weight: 600;
}
.wk-section-title .meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--wk-outline);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Day list — high-density meal rows
   ========================================================================== */

.wk-day-list {
  display: grid;
  gap: 10px;
}

.wk-day-row {
  background: var(--wk-surface-container-lowest);
  border: 1px solid var(--wk-outline-variant);
  border-radius: var(--wk-r-lg);
  box-shadow: var(--wk-elev-1);
  transition: box-shadow .2s ease, transform .15s ease;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.wk-day-row:hover { box-shadow: var(--wk-elev-2); transform: translateY(-1px); }
.wk-day-row.is-today { border-color: var(--wk-primary-fixed-dim); }

.wk-day-row-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
}
.wk-day-row-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  padding: 0 10px 5px;
}
/* expand toggle sits at the far right of the meta line */
.wk-expand-btn {
  margin-left: auto;
  flex-shrink: 0;
}
/* less radius on the weather + time pills in the mobile meta line */
@media (max-width: 991px) {
  .wk-day-row-meta .wk-chip.weather,
  .wk-day-row-meta .wk-chip.muted {
    border-radius: var(--wk-r);
  }
}
@media (min-width: 992px) {
  .wk-day-row-head {
    grid-template-columns: auto 1fr;
    padding-right: 10px;
  }
  .wk-day-row-meta {
    padding: 0;
    margin-left: auto;
    grid-column: auto;
  }
  .wk-day-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
  }
  .wk-day-row-head { padding: 0; }
  .wk-day-row-meta { padding: 0; }
}

.wk-date-badge {
  width: 48px;
  height: 56px;
  border-radius: var(--wk-r);
  background: var(--wk-surface-container-highest);
  color: var(--wk-on-surface-variant);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  line-height: 1;
}
.wk-date-badge .mon {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.wk-date-badge .day {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}
.wk-date-badge.is-today {
  background: var(--wk-primary-fixed);
  color: var(--wk-on-primary-fixed-variant);
}
.wk-date-badge.is-past {
  background: var(--wk-surface-container);
  color: var(--wk-outline);
}

.wk-day-row-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wk-day-row-day {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wk-primary);
  font-weight: 600;
}
.wk-day-row.is-past .wk-day-row-day { color: var(--wk-outline); }
.wk-day-row-name {
  font-size: 16px;
  line-height: 24px;
  color: var(--wk-on-surface);
  font-weight: 600;
  /* one line on desktop, allow wrap on mobile */
  overflow-wrap: break-word;
}
@media (min-width: 992px) {
  .wk-day-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* leftover toggle */
.wk-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wk-toggle-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--wk-on-surface-variant);
}
.wk-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
.wk-toggle input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.wk-toggle .wk-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--wk-surface-container-highest);
  border-radius: 999px;
  transition: background-color .2s ease;
}
.wk-toggle .wk-toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .2s ease;
}
.wk-toggle input:checked + .wk-toggle-slider { background: var(--wk-primary); }
.wk-toggle input:checked + .wk-toggle-slider::after { transform: translateX(16px); }

/* dietary chip */
.wk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.wk-chip.ochre {
  background: color-mix(in srgb, var(--wk-tertiary-fixed) 50%, transparent);
  color: var(--wk-tertiary);
}
.wk-chip.sage {
  background: color-mix(in srgb, var(--wk-primary) 12%, transparent);
  color: var(--wk-on-primary-container);
}
.wk-chip.clay {
  background: color-mix(in srgb, var(--wk-secondary) 12%, transparent);
  color: var(--wk-on-secondary-container);
}
.wk-chip.muted {
  background: transparent;
  color: var(--wk-on-surface-variant);
  border: 1px dashed var(--wk-outline-variant);
}
.wk-chip .material-symbols-outlined { font-size: 14px; line-height: 1; }
.wk-chip.weather { color: var(--wk-secondary); background: color-mix(in srgb, var(--wk-secondary) 8%, transparent); }
.wk-chip.weather .material-symbols-outlined { font-size: 16px; }

/* regenerate + delete actions, now inside the expanded panel */
.wk-panel-actions {
  display: flex;
  gap: var(--wk-xs);
  justify-content: flex-end;
}
/* icon buttons */
.wk-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--wk-outline);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .04s ease;
}
.wk-icon-btn:hover {
  background: var(--wk-surface-container-high);
  color: var(--wk-on-surface);
}
.wk-icon-btn:active { transform: scale(.92); }
.wk-icon-btn .material-symbols-outlined { font-size: 22px; }

/* expanded details panel inside a day row */
.wk-day-row-panel {
  border-top: 1px solid var(--wk-outline-variant);
  padding: 10px;
  background: var(--wk-surface-container-low);
  display: grid;
  gap: 10px;
}
.wk-day-row-panel h5 {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--wk-on-surface);
}
.wk-day-row-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--wk-on-surface-variant);
  font-size: 15px;
  line-height: 24px;
}
.wk-day-row-panel ul li { margin-bottom: 2px; }
.wk-day-row-panel .recipe-body {
  font-size: 15px;
  line-height: 22px;
  color: var(--wk-on-surface-variant);
  background: var(--wk-surface-container-lowest);
  border: 1px solid var(--wk-outline-variant);
  border-radius: var(--wk-r-md);
  padding: 10px 4px;
}
.wk-day-row-panel ol.recipe-body {
  margin: 0;
  padding: 10px 14px 10px 32px;
}
.wk-day-row-panel ol.recipe-body li { margin-bottom: 6px; padding-left: 2px; }
.wk-day-row-panel ol.recipe-body li:last-child { margin-bottom: 0; }
.wk-day-row-panel ol.recipe-body li::marker { color: var(--wk-primary); font-weight: 600; }
.wk-day-row-panel .wk-edit-form { display: grid; gap: 10px; }
.wk-day-row-panel .wk-regen-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wk-day-row-panel .wk-regen-form input { flex: 1 1 auto; }

/* ==========================================================================
   Secondary section (Shopping + Seasonal)
   ========================================================================== */

.wk-secondary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px; /* slightly tighter than --wk-lg (24px) */
  padding-bottom: var(--wk-xl);
}
@media (min-width: 768px) {
  .wk-secondary-grid { grid-template-columns: 1fr 1fr; }
}

.wk-progress-card,
.wk-insight-card {
  background: var(--wk-surface-container-low);
  border: 1px solid var(--wk-outline-variant);
  border-radius: var(--wk-r-lg);
  padding: 20px; /* slightly tighter than --wk-lg (24px) */
}
.wk-insight-card { background: var(--wk-surface-container-high); }

.wk-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--wk-md);
}
.wk-progress-head h3 {
  font-size: 20px;
  line-height: 28px;
  color: var(--wk-primary);
}
.wk-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.wk-progress-row .count { color: var(--wk-primary); font-variant-numeric: tabular-nums; }
.wk-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--wk-surface-container-highest);
  border-radius: 999px;
  overflow: hidden;
}
.wk-progress-bar > div {
  height: 100%;
  background: var(--wk-primary);
  border-radius: 999px;
  transition: width .4s ease;
}
.wk-progress-tip {
  margin-top: 12px;
  font-size: 12px;
  line-height: 18px;
  color: var(--wk-on-surface-variant);
}

.wk-insight-card h3 {
  font-size: 20px;
  line-height: 28px;
  color: var(--wk-on-surface);
  margin-bottom: 8px;
}
.wk-insight-card p {
  font-size: 16px;
  line-height: 24px;
  color: var(--wk-on-surface-variant);
}

/* ==========================================================================
   Bottom nav (mobile only)
   ========================================================================== */

.wk-bottom-bar { display: none; }
@media (max-width: 767.98px) {
  .wk-bottom-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    padding: 8px 16px max(16px, env(safe-area-inset-bottom));
    background: var(--wk-surface-container-lowest);
    border-radius: var(--wk-r-lg) var(--wk-r-lg) 0 0;
    box-shadow: var(--wk-elev-bottom);
    z-index: 50;
  }
  .wk-bottom-bar a {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    color: var(--wk-on-surface-variant);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
  }
  .wk-bottom-bar a:active { transform: scale(.92); }
  .wk-bottom-bar a .material-symbols-outlined { font-size: 22px; }
  .wk-bottom-bar a:hover { color: var(--wk-primary); }
  .wk-bottom-bar a.active {
    background: var(--wk-secondary-container);
    color: var(--wk-on-secondary-container);
  }
  .wk-bottom-bar a.active .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
}

/* ==========================================================================
   FAB
   ========================================================================== */

.wk-fab {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 56px;
  height: 56px;
  border-radius: var(--wk-r-lg);
  background: var(--wk-secondary);
  color: var(--wk-on-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  box-shadow: var(--wk-elev-cta);
  text-decoration: none;
  z-index: 40;
  transition: transform .15s ease, box-shadow .2s ease;
}
.wk-fab:hover { color: var(--wk-on-secondary); transform: translateY(-1px); }
.wk-fab:active { transform: scale(.95); }
.wk-fab .material-symbols-outlined { font-size: 28px; }
@media (min-width: 768px) {
  .wk-fab { right: 32px; bottom: 32px; }
}

/* ==========================================================================
   Existing pages we kept (Settings, Auth, Shopping list, Plans index)
   ========================================================================== */

.btn {
  border-radius: var(--wk-r);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  padding: 10px 18px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .04s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 22px; font-size: 16px; line-height: 22px; }
.btn-sm { padding: 7px 12px; font-size: 13px; line-height: 18px; }

.btn-wk-primary, .btn-wk-clay {
  background: var(--wk-secondary);
  border-color: var(--wk-secondary);
  color: var(--wk-on-secondary);
  box-shadow: var(--wk-elev-cta);
}
.btn-wk-primary:hover, .btn-wk-clay:hover { background: var(--wk-on-secondary-container); border-color: var(--wk-on-secondary-container); color: var(--wk-on-secondary); }

.btn-wk-ghost {
  background: transparent;
  border: 1px solid var(--wk-outline-variant);
  color: var(--wk-primary);
}
.btn-wk-ghost:hover { background: var(--wk-primary-container); border-color: var(--wk-primary); color: var(--wk-on-primary-container); }

.wk-surface {
  background: var(--wk-surface-container-lowest);
  border: 1px solid var(--wk-outline-variant);
  border-radius: var(--wk-r-lg);
  box-shadow: var(--wk-elev-1);
}

.wk-alert {
  border-radius: var(--wk-r-md);
  padding: 14px 16px;
  border: 1px solid var(--wk-outline-variant);
  background: var(--wk-surface-container-lowest);
  font-size: 14px;
  line-height: 20px;
}
.wk-alert.success { background: var(--wk-primary-container); border-color: var(--wk-primary-fixed-dim); color: var(--wk-on-primary-container); }
.wk-alert.error   { background: var(--wk-error-container); border-color: var(--wk-error); color: var(--wk-on-error-container); }

/* Auth screens */
.wk-auth-wrap {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.wk-auth-card {
  max-width: 420px;
  width: 100%;
  background: var(--wk-surface-container-lowest);
  border: 1px solid var(--wk-outline-variant);
  border-radius: var(--wk-r-lg);
  padding: 32px 24px;
  box-shadow: var(--wk-elev-2);
  text-align: center;
}
.wk-auth-card img { width: 56px; height: 56px; }
.wk-auth-card h1 {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  margin: 12px 0 4px;
}
.wk-auth-card p.tagline {
  color: var(--wk-on-surface-variant);
  font-style: italic;
  margin-bottom: 20px;
}

/* Forms (settings) */
.form-label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  color: var(--wk-on-surface);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  display: block;
}
.form-text { color: var(--wk-on-surface-variant); font-size: 12px; line-height: 16px; }
.form-control, .form-select {
  width: 100%;
  border-radius: var(--wk-r);
  border: 1px solid var(--wk-outline-variant);
  background: var(--wk-surface-container-low);
  padding: 10px 14px;
  color: var(--wk-on-surface);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 24px;
}
.form-control-sm, .form-select-sm { padding: 7px 10px; font-size: 14px; }
.form-control:focus, .form-select:focus {
  border-color: var(--wk-secondary);
  background: var(--wk-surface-container-lowest);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wk-secondary) 25%, transparent);
  outline: 0;
}
textarea.form-control { font-family: "Plus Jakarta Sans", sans-serif; }
.form-check-input:checked { background-color: var(--wk-primary); border-color: var(--wk-primary); }

/* Range slider (variety control) — terracotta accent to match the brand */
.wk-range { accent-color: var(--wk-secondary); }
.wk-range:focus { outline: none; }

/* Shopping list (carry over previous style) */
.wk-shop-section h4 {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--wk-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
/* first section heading sits tight to the top of the card */
.wk-shop-section:first-child h4 { margin-top: 2px; }
.wk-shop-section h4::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--wk-tertiary);
  border-radius: 50%;
}
.wk-shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  min-height: 48px;
  border-bottom: 1px solid var(--wk-outline-variant);
  cursor: pointer;
}
.wk-shop-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.75px solid var(--wk-outline);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.wk-shop-item input[type="checkbox"]::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2px solid var(--wk-on-primary);
  border-bottom: 2px solid var(--wk-on-primary);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.wk-shop-item input[type="checkbox"]:checked { background: var(--wk-primary); border-color: var(--wk-primary); }
.wk-shop-item input[type="checkbox"]:checked::after { opacity: 1; }
.wk-shop-item .name { flex: 1; font-weight: 500; font-size: 15px; color: var(--wk-on-surface); }
.wk-shop-item .qty { font-size: 13px; color: var(--wk-on-surface-variant); font-variant-numeric: tabular-nums; }
.wk-shop-item.is-checked .name, .wk-shop-item.is-checked .qty { text-decoration: line-through; color: var(--wk-outline); }
/* ticked items fade then collapse out of the list; the toggle reveals them */
.wk-shop-item { transition: opacity .25s ease; }
.wk-shop-item.is-collapsed { display: none; }
.wk-shop-list.show-checked .wk-shop-item.is-collapsed { display: flex; }
.wk-shop-list.show-checked .wk-shop-item.is-checked { opacity: .5; }
.wk-drag-handle {
  flex-shrink: 0;
  color: var(--wk-outline-variant);
  cursor: grab;
  font-size: 20px;
  touch-action: none; /* let Sortable own the drag gesture on touch */
}
.wk-drag-handle:active { cursor: grabbing; color: var(--wk-outline); }
.wk-shop-item--ghost { opacity: .4; }
.wk-shop-item--chosen { background: var(--wk-surface-container-high); border-radius: var(--wk-r); }

/* remove (×) button on a shop row */
.wk-shop-del {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--wk-outline-variant);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  transition: color .15s ease, background-color .15s ease;
}
.wk-shop-del:hover { color: var(--wk-secondary); background: var(--wk-surface-container-high); }

/* inline "add item" form */
.wk-shop-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--wk-outline-variant);
}
.wk-shop-add input[name="name"] { flex: 1 1 140px; min-width: 0; }
.wk-shop-add .wk-shop-add-qty { flex: 0 0 72px; }
.wk-shop-add .wk-shop-add-cat { flex: 0 1 160px; }

/* pending "next week" rows reuse .wk-shop-item but aren't tappable */
.wk-next-week-list .wk-shop-item { cursor: default; }
.wk-next-week-list .wk-shop-item .name { font-weight: 500; }

/* details (legacy) */
details.wk-details > summary {
  cursor: pointer;
  list-style: none;
  color: var(--wk-primary);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
details.wk-details > summary::-webkit-details-marker { display: none; }
details.wk-details > summary::before { content: "›"; font-size: 18px; transition: transform .15s ease; }
details.wk-details[open] > summary::before { transform: rotate(90deg); }

/* Weather strip — per-day forecast tiles under a plan.
   Mobile-first: a swipeable horizontal strip. At >=768px all seven days fit,
   so it becomes an even grid with no scrolling. */
.wk-weather-strip {
  display: flex;
  gap: var(--wk-base);
  margin-top: var(--wk-sm);
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.wk-weather-tile {
  flex: 0 0 auto;
  min-width: 84px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 10px;
  border-radius: var(--wk-md);
  background: color-mix(in srgb, var(--wk-secondary) 6%, var(--wk-surface));
  border: 1px solid color-mix(in srgb, var(--wk-secondary) 14%, transparent);
}
@media (min-width: 768px) {
  .wk-weather-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    overflow-x: visible;
  }
  .wk-weather-tile { min-width: 0; }
}
.wk-weather-tile .wk-wt-day  { font-weight: 600; font-size: 13px; color: var(--wk-on-surface); white-space: nowrap; }
.wk-weather-tile .wk-wt-date { font-size: 11px; color: var(--wk-on-surface-variant); white-space: nowrap; }
.wk-weather-tile .wk-wt-icon { color: var(--wk-secondary); margin: 4px 0 2px; }
.wk-weather-tile .wk-wt-temp { font-size: 14px; color: var(--wk-on-surface); white-space: nowrap; }
.wk-weather-tile .wk-wt-temp .wk-wt-min { color: var(--wk-on-surface-variant); margin-left: 4px; }
.wk-weather-tile .wk-wt-sum  {
  font-size: 11px;
  line-height: 1.25;
  color: var(--wk-on-surface-variant);
  text-align: center;
  margin-top: 2px;
}
/* compass legacy accent (kept for some headers) */
.wk-compass {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1.5px solid var(--wk-secondary);
  border-radius: 50%;
  position: relative;
  vertical-align: -1px;
  margin-right: 6px;
}
.wk-compass::after {
  content: "";
  position: absolute;
  top: 1px; left: 50%;
  width: 1.5px; height: 5px;
  background: var(--wk-secondary);
  transform: translateX(-50%);
}

/* utility */
.wk-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--wk-outline-variant);
  border-top-color: var(--wk-on-secondary);
  border-radius: 50%;
  animation: wk-spin .8s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes wk-spin { to { transform: rotate(360deg); } }
.is-loading { pointer-events: none; opacity: .7; }

.wk-section { padding: 0; }
