/* Memely 1.1 — smoked glass, warm neutrals and a quiet cream accent. */
:root {
  color-scheme: dark;
  --ink: #f6f5ee;
  --muted: #c2c2bb;
  --green: #f4f5d8;
  --lime: #eff0d0;
  --paper: #343531;
  --line: #ffffff24;
  --white: #ffffff0d;
  --danger: #ffb9af;
  --cream-ink: #33362c;
  --glass: #555650a8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding: 58px 54px 42px 100px;
  color: var(--ink);
  background: #393b36;
  font: 14px/1.6 "Segoe UI", Arial, sans-serif;
  isolation: isolate;
}

/* An atmospheric, code-native backdrop: no external images or tracking requests. */
body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: -35px;
  background:
    linear-gradient(180deg, #18191635, #10131135),
    radial-gradient(ellipse at 12% 72%, #aa715c99 0, transparent 32%),
    radial-gradient(ellipse at 88% 30%, #bcc0b1a6 0, transparent 33%),
    linear-gradient(90deg, #38312c 0 12%, #8c7a6a 13% 19%, #323935 20% 23%, transparent 24% 68%, #202a2999 69% 72%, #939c91 73% 76%, #28302c 77% 80%, #aab0a1 81% 100%),
    linear-gradient(180deg, #77786b 0 19%, #3e4540 20% 23%, #8a8b7d 24% 61%, #242a25 62% 67%, #646c60 68% 100%);
  filter: blur(22px);
  transform: scale(1.04);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 20%, transparent 20%, #15191661 100%);
  pointer-events: none;
}

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; }
button { transition: background .18s ease, border-color .18s ease, transform .18s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); }
:is(button, a, input, select):focus-visible { outline: 2px solid #f4f5d8; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; overflow-wrap: anywhere; }
h1 { font-size: clamp(32px, 3.1vw, 46px); font-weight: 500; letter-spacing: -1.8px; margin-bottom: 14px; }
h2 { font-size: 24px; font-weight: 500; letter-spacing: -.7px; margin-bottom: 18px; }
h3 { font-weight: 500; }
.muted { color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 500; letter-spacing: 1.7px; color: #dfdfd0; margin-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 6px; font-size: 27px; font-weight: 600; letter-spacing: -1.5px; }
.brand span { color: var(--lime); font-size: 25px; font-weight: 400; }
.brand-caption { display: block; font-size: 9px; letter-spacing: 2.4px; color: var(--muted); margin-top: 1px; }
.primary, .secondary {
  min-height: 43px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.primary { background: var(--lime); color: var(--cream-ink); }
.primary:hover:not(:disabled) { background: #fffde9; }
.secondary { background: #ffffff0a; color: var(--ink); border-color: var(--line); }
.secondary:hover:not(:disabled) { background: #ffffff19; }
.full { width: 100%; margin-top: 24px; }
.text-button { border: 0; background: none; color: var(--lime); padding: 10px 0; font-size: 12px; font-weight: 500; }
.danger-button { color: var(--danger); border: 1px solid #ffb9af30; border-radius: 99px; background: none; padding: 7px 12px; font-size: 11px; }
.field-help, .auth-note { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 12px; }
.optional { color: var(--muted); font-size: 10px; font-weight: 400; }
label { display: block; font-size: 12px; font-weight: 500; margin: 19px 0 8px; }
input, select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #ffffff38;
  border-radius: 12px;
  background: #1c211d33;
  color: var(--ink);
}
input::placeholder { color: #b5b8ae; }
input:focus, select:focus { border-color: var(--lime); }
select option { background: #3b4039; color: var(--ink); }

.status { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100% - 28px); padding: 12px 22px; border-radius: 15px; background: var(--lime); color: var(--cream-ink); box-shadow: 0 8px 35px #0003; font-size: 12px; }
.status.error { background: #653c36; color: #fff1e9; border: 1px solid #efbaab; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 40; background: var(--lime); color: var(--cream-ink); padding: 10px 18px; border-radius: 10px; }
.skip-link:not(:focus), .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { display: grid; min-height: calc(100vh - 100px); place-content: center; text-align: center; }
.loading p { margin-top: 18px; color: var(--muted); }

/* Shared glass frame. A solid tinted surface remains usable without blur support. */
.app-content, .welcome {
  background: linear-gradient(125deg, #66655ca6, #343b358f);
  border: 1px solid #ffffff55;
  border-radius: 31px;
  box-shadow: 0 30px 85px #0004, inset 0 1px 0 #ffffff17;
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
}
.app-shell { max-width: 1320px; margin: 0 auto; position: relative; }
.app-content { min-width: 0; overflow: hidden; }

/* Compact floating rail; the primary navigation lives in the top bar. */
.sidebar { position: absolute; left: -72px; top: 180px; width: 48px; padding: 9px 5px; border: 1px solid #ffffff3d; border-radius: 99px; background: #b5b8a52e; box-shadow: 0 10px 30px #0002; backdrop-filter: blur(18px); }
.rail-nav { display: grid; gap: 7px; }
.rail-nav button { display: grid; place-items: center; width: 36px; height: 38px; border: 1px solid transparent; background: transparent; color: #f6f7ec; border-radius: 50%; font-size: 20px; }
.rail-nav button[aria-current=page] { background: #f8f8de26; border-color: #ffffff59; }
.rail-nav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.topbar { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 31px; }
.header-identity { flex: 0 0 auto; }
.top-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #ffffff24; background: #ffffff17; border-radius: 99px; }
.top-tabs button { border: 0; background: none; border-radius: 99px; padding: 10px 19px; min-height: 38px; white-space: nowrap; color: var(--ink); font-size: 11px; }
.top-tabs button[aria-current=page] { background: var(--lime); color: var(--cream-ink); }
.sidebar-bottom { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; flex-shrink: 0; background: var(--lime); border-radius: 50%; color: var(--cream-ink); font-size: 15px; }
.sidebar-bottom strong { display: block; font-size: 11px; font-weight: 500; max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-bottom small { display: block; font-size: 9px; color: var(--muted); }
#logout { display: grid; place-items: center; border: 1px solid #ffffff55; border-radius: 50%; width: 32px; height: 32px; background: #ffffff12; color: var(--ink); font-size: 19px; margin-left: 3px; }
main { padding: 14px 31px 29px; min-height: 620px; }
main:focus { outline: none; }
.workspace-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 0 24px; color: #d0d2c6; font-size: 10px; }
.today { text-transform: capitalize; }
.live-dot { display: inline-block; background: var(--lime); width: 5px; height: 5px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading .muted { font-size: 12px; margin: 0; max-width: 520px; }
.pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #ffffff3a; padding: 6px 12px; border-radius: 99px; white-space: nowrap; font-size: 10px; color: #eaeadd; }
.subtle { background: #ffffff0d; font-size: 9px; letter-spacing: .5px; }

/* Overview: open metrics, a large weekly panel and a cream action card. */
.overview-top { display: grid; grid-template-columns: .95fr 2fr; gap: 28px; align-items: center; margin-bottom: 29px; }
.overview-top .page-heading { margin-bottom: 0; }
.overview-top h1 { margin-bottom: 9px; }
.overview-top .eyebrow { font-size: 9px; letter-spacing: 1.5px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metrics article { min-width: 0; border-left: 1px solid #ffffff29; padding: 9px 12px 6px 18px; position: relative; }
.metrics p { font-size: 10px; color: #dedfd3; margin-bottom: 12px; }
.metrics strong { display: block; font-size: clamp(27px, 2.6vw, 39px); font-weight: 400; letter-spacing: -1.5px; line-height: 1.1; }
.metrics small { display: block; font-size: 9px; color: #c0c3b5; margin-top: 10px; line-height: 1.5; }
.metric-icon { position: absolute; right: 8px; top: -1px; font-size: 12px; color: #c9cbb9; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); gap: 18px; grid-template-areas: "week next" "week latest"; align-items: stretch; }
.card { min-width: 0; padding: 25px; border: 1px solid #ffffff2b; border-radius: 23px; background: #ffffff0e; box-shadow: inset 0 1px 0 #ffffff07; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.card-heading h2 { margin: 0; font-size: 21px; }
.weekly-card { grid-area: week; background: linear-gradient(135deg, #ffffff25, #c7c9b810); padding: 25px; }
.weekly-card .card-heading { align-items: flex-start; }
.weekly-card h2 { font-size: 27px; max-width: 230px; letter-spacing: -.9px; }
.weekly-card .eyebrow { font-size: 9px; margin-bottom: 10px; }
.round-mark { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #ffffff45; border-radius: 50%; background: #ffffff10; font-size: 23px; }
.week-focus { display: flex; align-items: center; gap: 28px; padding: 5px 0 26px; }
.completion-ring { position: relative; width: 144px; height: 144px; flex-shrink: 0; }
.completion-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track, .ring-fill { fill: none; stroke-width: 8; }
.ring-track { stroke: #ffffff20; }
.ring-fill { stroke: var(--lime); stroke-linecap: round; }
.ring-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-value strong { font-size: 31px; font-weight: 400; line-height: 1.3; letter-spacing: -1px; }
.ring-value span { color: #e2e3d6; font-size: 10px; }
.week-focus h3 { font-size: 20px; letter-spacing: -.5px; margin-bottom: 9px; }
.week-focus p { color: #dedfd4; font-size: 12px; max-width: 220px; margin-bottom: 0; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; border-radius: 17px; padding: 13px 10px; background: #242a2533; border: 1px solid #ffffff15; }
.mini-day { display: flex; flex-direction: column; text-align: center; gap: 10px; padding: 10px 2px; border-radius: 12px; }
.mini-day.has-completion { background: var(--lime); color: var(--cream-ink); }
.mini-day > span { font-size: 10px; }
.mini-day > strong { font-size: 21px; font-weight: 400; line-height: 1.2; }
.mini-day > small { font-size: 9px; opacity: .85; }
.week-caption { color: #d9dbce; font-size: 10px; margin: 17px 0 0; }
.weekly-card > .text-button { margin-top: 8px; }
.next-step { grid-area: next; position: relative; overflow: hidden; background: linear-gradient(125deg, #f7f7df, #e5e8ca); color: var(--cream-ink); border-color: #ffffe6a6; padding: 23px; min-height: 216px; }
.next-step .eyebrow { color: #65694f; font-size: 9px; }
.next-step h2 { max-width: 250px; font-size: 26px; margin-bottom: 10px; }
.next-step > p:not(.eyebrow) { color: #60664f; font-size: 12px; max-width: 250px; position: relative; z-index: 1; }
.next-step .primary { background: #424b37; color: #fafbe8; border: 1px solid #424b37; margin-top: 4px; position: relative; z-index: 1; font-size: 11px; min-height: 37px; padding: 8px 14px; }
.next-step .primary:hover { background: #2b3324; }
.next-step .primary:focus-visible { outline-color: #424b37; }
.decorative { position: absolute; font-size: 112px; right: -15px; bottom: -25px; color: #b9c29b66; line-height: 1; }
.latest-card { grid-area: latest; padding: 22px 23px; background: #252c2340; }
.latest-card .card-heading { margin-bottom: 14px; }
.latest-card .card-heading h2 { font-size: 18px; }
.latest-card .pill { font-size: 8px; padding: 4px 8px; }
.summary-empty { font-size: 12px; color: var(--muted); padding: 20px 0; }
.latest-name { font-size: 24px; font-weight: 400; letter-spacing: -.7px; margin: 4px 0; overflow-wrap: anywhere; }
.latest-dates { color: var(--muted); font-size: 10px; margin-bottom: 12px; }
.progress-track { height: 4px; border-radius: 99px; overflow: hidden; background: #ffffff18; margin: 12px 0 8px; }
.progress-track progress { width: 100%; height: 4px; display: block; border: none; accent-color: var(--lime); }
.progress-track progress::-webkit-progress-bar { background: #ffffff18; }
.progress-track progress::-webkit-progress-value { background: var(--lime); }
.progress-track progress::-moz-progress-bar { background: var(--lime); }
.latest-card .field-help { margin-bottom: 3px; font-size: 10px; }
.latest-card .text-button { padding-bottom: 0; font-size: 10px; }
.info-strip { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 16px; border: 1px solid #ffffff1c; border-radius: 13px; color: #d7d9cc; font-size: 10px; }
.info-strip > span { font-size: 16px; }
.info-strip p { margin: 0; }

/* Profile and measurement workspaces. */
.form-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-grid label { margin-top: 0; }
.form-grid > div { margin-bottom: 24px; }
.quiet-card { background: #e8e9d11c; }
.quiet-card h2 { font-size: 28px; max-width: 280px; }
.quiet-card p { color: #d5d7c9; font-size: 12px; }
.large-symbol { display: block; color: var(--lime); font-size: 55px; line-height: 1.3; margin-bottom: 18px; }
.inline-form { display: flex; align-items: flex-end; gap: 18px; }
.inline-form > div { flex: 1; min-width: 0; }
.inline-form label { margin-top: 0; }
.inline-form button { flex-shrink: 0; min-height: 46px; }
.history-card { margin-top: 22px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { background: #ffffff0a; font-size: 10px; color: #ced2c0; font-weight: 500; letter-spacing: .5px; padding: 12px; }
td { padding: 16px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
td:last-child { text-align: right; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); margin-top: 20px; }
.pagination .secondary { padding: 7px 13px; font-size: 10px; min-height: 32px; }

/* Weekly plan and persistent meal tracking. */
.plan-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; margin-top: 22px; align-items: start; }
.plan-history { padding: 20px; }
.plan-history h2 { font-size: 21px; }
.plan-choice { display: block; width: 100%; border: 1px solid transparent; border-radius: 13px; color: var(--ink); background: transparent; padding: 13px; text-align: left; margin: 7px 0; }
.plan-choice strong { display: block; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.plan-choice small { display: block; font-size: 10px; margin-top: 5px; color: inherit; opacity: .8; }
.plan-choice[aria-pressed=true] { background: var(--lime); color: var(--cream-ink); border-color: var(--lime); }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.detail-heading h2 { font-size: 24px; margin: 0; }
.days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.day { border: 1px solid #ffffff29; background: #ffffff0d; border-radius: 20px; padding: 22px; }
.day-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 13px; margin-bottom: 16px; }
.day-heading h3 { font-size: 22px; letter-spacing: -.7px; margin: 0; }
.day-heading small { font-size: 9px; color: var(--muted); }
.meal { display: flex; align-items: flex-start; gap: 10px; margin: 17px 0; }
.meal input { flex-shrink: 0; width: 17px; height: 17px; min-height: 17px; margin: 3px 0; accent-color: #dfe5b9; }
.meal-label { cursor: pointer; font-weight: 400; margin: 0; }
.meal-label span { display: block; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: #dbdfc7; margin-bottom: 5px; }
.meal-label strong { display: block; font-size: 12px; line-height: 1.6; font-weight: 400; }
.meal input:checked + label strong { text-decoration: line-through; color: #bdc5ae; }
.empty-state { grid-column: 1 / -1; padding: 60px 20px; border: 1px dashed #ffffff40; border-radius: 22px; text-align: center; color: var(--muted); }
.empty-state > span { color: var(--lime); font-size: 45px; }
.empty-state h2 { color: var(--ink); font-size: 26px; margin: 15px 0; }
.empty-state p { font-size: 12px; }
.disclaimer { color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 25px; font-size: 10px; }
footer { display: flex; justify-content: space-between; gap: 16px; margin: 0 31px; padding: 17px 0; border-top: 1px solid var(--line); color: #d4d7c9; font-size: 10px; }
footer span { font-size: 8px; letter-spacing: 1.5px; }

/* Authentication uses the same visual system rather than a separate theme. */
.welcome { display: grid; grid-template-columns: 1.12fr 1fr; max-width: 1120px; min-height: 720px; margin: 0 auto; overflow: hidden; }
.welcome-story { padding: 40px 46px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.welcome-story > div { padding-top: 38px; }
.welcome-story h1 { font-size: clamp(44px, 4.8vw, 66px); line-height: 1.08; font-weight: 400; letter-spacing: -2.8px; }
.welcome-story h1 em { color: var(--lime); font-style: normal; }
.lead { max-width: 370px; color: #e2e2d6; font-size: 15px; line-height: 1.8; }
.welcome-story > .muted { margin: 14px 0 0; font-size: 10px; }
.illustration { position: relative; height: 205px; display: grid; place-items: center; }
.ring { position: absolute; width: 185px; height: 185px; border: 1px solid #ffffff32; border-radius: 50%; }
.ring-two { width: 135px; height: 135px; border-style: dashed; transform: rotate(30deg); }
.illustration-center { color: var(--lime); font-size: 117px; font-weight: 200; line-height: 1; }
.floating-note { position: absolute; right: 0; bottom: 25px; padding: 10px 18px; color: var(--cream-ink); background: var(--lime); border: 1px solid #ffffe1; border-radius: 13px; transform: rotate(-7deg); font-size: 14px; box-shadow: 0 6px 20px #0002; }
.auth-panel { display: grid; place-items: center; background: #20282124; padding: 44px 36px; }
.auth-card { width: 100%; max-width: 345px; }
.auth-card h2 { font-size: 32px; font-weight: 400; margin-bottom: 12px; }
.auth-card > .muted { font-size: 12px; }
.auth-tabs { display: flex; gap: 4px; border: 1px solid #ffffff21; background: #ffffff12; border-radius: 99px; padding: 4px; margin: 26px 0 12px; }
.auth-tabs button { width: 50%; min-height: 38px; padding: 9px; background: none; border: 0; border-radius: 99px; color: var(--ink); font-size: 11px; }
.auth-tabs button[aria-pressed=true] { background: var(--lime); color: var(--cream-ink); }
.auth-note { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; font-size: 10px; }

@media (min-width: 1600px) {
  body { padding-top: 95px; }
  .app-shell { max-width: 1380px; }
  main { padding-bottom: 40px; }
  .weekly-card { padding: 30px; }
  .week-focus { gap: 40px; padding: 15px 0 35px; }
}
@media (max-width: 1160px) {
  body { padding: 35px 30px 30px 82px; }
  .topbar { gap: 16px; padding: 22px; }
  .top-tabs button { padding-inline: 13px; }
  .sidebar-bottom strong { max-width: 70px; }
  .sidebar-bottom small { display: none; }
  .brand-caption { display: none; }
  .brand { font-size: 24px; }
  main { padding: 10px 23px 25px; }
  .overview-top { grid-template-columns: 1fr; gap: 25px; }
  .overview-top h1 { font-size: 38px; }
  .metrics article:first-child { border-left: 0; padding-left: 0; }
  .metrics strong { font-size: 35px; }
  .metrics p { font-size: 11px; }
  .overview-grid { grid-template-columns: 1.35fr 1fr; gap: 15px; }
  .weekly-card { padding: 22px 18px; }
  .week-focus { gap: 15px; }
  .completion-ring { width: 112px; height: 112px; }
  .week-focus h3 { font-size: 18px; }
  .week-strip { gap: 2px; padding: 10px 5px; }
  .form-layout { grid-template-columns: 1.6fr 1fr; gap: 16px; }
  .card { padding: 22px; }
  .quiet-card h2 { font-size: 24px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form > div { flex: 1 1 160px; }
  .plan-layout { grid-template-columns: 175px minmax(0, 1fr); }
  .days { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { padding: 22px; }
  .sidebar { display: none; }
  .topbar { flex-wrap: wrap; padding: 22px 24px 18px; gap: 18px; }
  .top-tabs { order: 3; flex-basis: 100%; justify-content: space-between; }
  .top-tabs button { flex: 1; padding: 10px; }
  .header-identity { margin-right: auto; }
  .sidebar-bottom strong { max-width: 140px; }
  .overview-grid { grid-template-columns: 1.3fr 1fr; }
  .week-focus { flex-direction: column; align-items: flex-start; gap: 18px; }
  .completion-ring { width: 125px; height: 125px; align-self: center; }
  .week-focus h3 { font-size: 19px; }
  .week-focus p { max-width: none; }
  .weekly-card h2 { font-size: 25px; }
  .form-layout { grid-template-columns: 1fr; }
  .quiet-card { display: none; }
  .welcome { min-height: 680px; }
  .welcome-story { padding: 30px 28px; }
  .welcome-story h1 { font-size: 48px; }
  .welcome-story .eyebrow { font-size: 9px; }
  .auth-panel { padding: 32px 25px; }
}
@media (max-width: 600px) {
  body { padding: 12px; }
  .app-content, .welcome { border-radius: 23px; }
  .topbar { padding: 21px 18px 16px; gap: 18px 12px; }
  .brand { font-size: 27px; }
  .sidebar-bottom strong { max-width: 95px; font-size: 10px; }
  .avatar { width: 29px; height: 29px; font-size: 12px; }
  #logout { width: 29px; height: 29px; font-size: 17px; }
  .top-tabs { gap: 0; padding: 3px; }
  .top-tabs button { font-size: 10px; padding: 10px 7px; }
  main { padding: 8px 17px 22px; min-height: 540px; }
  .workspace-meta { font-size: 9px; padding-bottom: 21px; }
  .today { max-width: 145px; text-align: right; }
  h1 { font-size: 34px; letter-spacing: -1.4px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading > .pill { display: none; }
  .overview-top { gap: 23px; margin-bottom: 23px; }
  .overview-top h1 { font-size: 37px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .metrics article { padding: 4px 8px 4px 16px; }
  .metrics article:nth-child(3) { border-left: 0; padding-left: 0; }
  .metrics strong { font-size: 34px; }
  .metrics p { font-size: 10px; margin-bottom: 9px; }
  .metrics small { margin-top: 7px; font-size: 9px; }
  .metric-icon { right: 6px; top: 0; }
  .overview-grid { grid-template-columns: 1fr; grid-template-areas: "week" "next" "latest"; gap: 15px; }
  .card, .weekly-card { padding: 21px 18px; border-radius: 20px; }
  .weekly-card .card-heading { margin-bottom: 20px; }
  .week-focus { flex-direction: row; align-items: center; gap: 15px; padding-bottom: 23px; }
  .completion-ring { width: 112px; height: 112px; }
  .ring-value strong { font-size: 27px; }
  .week-focus h3 { font-size: 18px; }
  .week-focus p { font-size: 11px; }
  .week-strip { gap: 2px; padding: 9px 4px; }
  .mini-day { gap: 9px; padding: 8px 1px; }
  .mini-day > strong { font-size: 18px; }
  .mini-day > span, .mini-day > small { font-size: 9px; }
  .next-step { min-height: 206px; }
  .next-step h2 { font-size: 27px; }
  .info-strip { align-items: flex-start; padding: 13px; font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > div { margin-bottom: 21px; }
  .inline-form { gap: 18px; }
  .inline-form > div { flex-basis: 100%; }
  .inline-form > button { width: 100%; }
  .card-heading { flex-wrap: wrap; }
  th, td { padding-inline: 9px; }
  .plan-layout { grid-template-columns: 1fr; }
  .plan-history { padding: 18px; }
  #plan-list { display: flex; overflow-x: auto; gap: 8px; }
  .plan-choice { flex: 0 0 155px; margin-block: 2px; }
  .plan-history .pagination { margin-top: 12px; }
  .detail-heading h2 { font-size: 22px; }
  .days { grid-template-columns: 1fr; }
  .day { padding: 21px; }
  footer { margin-inline: 18px; padding-block: 15px; flex-wrap: wrap; gap: 5px; }
  footer span { font-size: 7px; }
  .welcome { grid-template-columns: 1fr; min-height: auto; }
  .welcome-story { padding: 25px 25px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .welcome-story > div { padding-top: 26px; }
  .welcome-story h1 { font-size: 45px; letter-spacing: -2px; margin-bottom: 17px; }
  .welcome-story .lead { font-size: 13px; margin-bottom: 0; }
  .welcome-story > .muted, .illustration { display: none; }
  .auth-panel { padding: 29px 25px; }
  .auth-card { max-width: none; }
  .auth-card h2 { font-size: 29px; }
  .auth-note { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button { transition: none; }
  button:hover:not(:disabled) { transform: none; }
}
