/* v190 you screens, built on css/minimal.css (see docs/design-system-v190.md). Scoped to this area only. */

/* ---------- You: one calm settings hub ---------- */
.you-hub { --you-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93ad' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); }
.you-hub > .m-card:first-child { margin-top: 4px; }

/* the You header carries the photo (or the initial); tapping it opens Edit profile */
.you-top { justify-content: flex-start; align-items: center; gap: 14px; }
.you-ava {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%;
  background: var(--m-surface-2); color: var(--tx); font: inherit; font-size: 22px; font-weight: 700; overflow: hidden; cursor: pointer;
}
.you-ava:active { transform: scale(.96); }
/* Edit profile: the photo row */
.ep-photo { display: flex; align-items: center; gap: 10px; margin: 2px 0 18px; }
.ep-photo-pic { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--m-surface-2); color: var(--tx); font-size: 24px; font-weight: 700; overflow: hidden; }
.ep-photo .m-btn { min-height: 40px; padding: 0 14px; }

/* profile hero, flattened: goal, dates, one orange line of progress, three numbers */
.you-hub .you-hero { padding: 18px 18px 16px; }
.you-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.you-hero-cap { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3); }
.you-hub .you-hero-edit {
  min-height: 36px; margin: -6px -10px -6px 0; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
  color: var(--blue-2, var(--accent)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.you-hub .you-hero-edit:active { background: var(--m-surface-2); }
.you-hub .you-hero h2 { margin: 8px 0 0; font-family: var(--font-display, inherit); font-size: 26px; font-weight: 400; line-height: 1.15; letter-spacing: -.01em; color: var(--tx); overflow-wrap: anywhere; }
.you-hero-dates { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--tx-2); }
.you-hero-dates b { font-weight: 500; color: var(--tx); }
.you-hero-why { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; font-style: italic; color: var(--tx-2); }
.you-hero-track { height: 3px; margin: 16px 0 0; border-radius: 999px; background: color-mix(in srgb, var(--tx) 9%, transparent); overflow: hidden; }
.you-hero-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left center; }
[data-skin="ember"] .you-hero-track i { background: linear-gradient(90deg, #ff6a1a, #ff9a5a); }
.screen.anim .you-hero-track i { animation: youFill .9s cubic-bezier(.22, 1, .36, 1) .1s backwards; }
@keyframes youFill { from { transform: scaleX(0); } }
.you-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0; }
.you-hero-stats > div { display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.you-hero-stats > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.you-hero-stats dd { margin: 0; font-family: var(--font-display, inherit); font-size: 28px; font-weight: 400; line-height: 1; letter-spacing: -.02em; color: var(--tx); font-variant-numeric: tabular-nums; }
.you-hero-stats dd small { margin-left: 2px; font-family: inherit; font-size: 13px; color: var(--tx-3); }
.you-hero-stats dt { font-size: 12px; color: var(--tx-3); }

/* lists: a hairline between any two children, rows that can wrap their helper line */
.you-hub .you-list > * + * { border-top: 1px solid var(--line); }
.you-hub .you-set { cursor: pointer; }
.you-hub .you-set .m-row-txt small, .you-hub .you-block .m-row-txt small, .you-hub .you-danger .m-row-txt small { white-space: normal; overflow: visible; line-height: 1.4; }
.you-hub .you-static, .you-hub .you-tr { cursor: default; }
.you-hub .you-static:active, .you-hub .you-tr:active { background: transparent; }

/* a block inside a list: heading line, then its control (chips, form) */
.you-block { padding: 12px 14px 14px; }
.you-block-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.you-block-head .m-row-ico { margin-top: 1px; }
.you-hub .you-block .m-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.you-hub .you-block .m-chip { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 38px; padding: 0 6px; white-space: nowrap; }
@media (max-width: 359px) { .you-hub .you-block .m-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* value controls read as quiet text on the right, not as boxed fields */
#app .you-hub .you-sel {
  flex: none; width: auto; max-width: 48%; min-width: 0; min-height: 40px; margin: 0 -6px 0 0; padding: 0 22px 0 8px;
  border: 0; border-radius: 10px; background: transparent var(--you-chev) no-repeat right 4px center / 14px;
  color: var(--tx-2); font: inherit; font-size: 15px; text-align: right; text-align-last: right; -webkit-appearance: none; appearance: none; box-shadow: none;
}
#app .you-hub .you-sel[type="time"] { padding-right: 6px; background-image: none; }
#app .you-hub .you-sel.is-empty { min-width: 88px; color: var(--tx-3); }
#app .you-hub .you-sel::-webkit-calendar-picker-indicator { opacity: .5; }
/* iOS draws no picker icon, so a time field gets the same chevron as a select */
@supports (-webkit-touch-callout: none) { #app .you-hub .you-sel[type="time"] { padding-right: 22px; background-image: var(--you-chev); } }
#app .you-hub .you-sel::-webkit-date-and-time-value { text-align: right; }
#app .you-hub .you-sel:focus-visible { outline: 2px solid var(--blue-2, var(--accent)); outline-offset: 0; }
:root:not([data-theme="light"]) .you-hub .you-sel, :root:not([data-theme="light"]) .you-hub .you-tr-area { color-scheme: dark; }

/* switches: blue when on, like every other selection */
.you-hub .you-switch {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 46px; height: 28px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 999px; background: color-mix(in srgb, var(--tx) 16%, transparent); cursor: pointer; transition: background-color .2s;
}
.you-hub .you-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s cubic-bezier(.22, 1, .36, 1);
}
.you-hub .you-switch:checked { background: var(--blue-grad, var(--accent)); }
.you-hub .you-switch:checked::after { transform: translateX(18px); }
.you-hub .you-switch:disabled { opacity: .45; cursor: default; }
.you-hub .you-switch:focus-visible { outline: 2px solid var(--blue-2, var(--accent)); outline-offset: 2px; }
[data-motion="reduced"] .you-hub .you-switch, [data-motion="reduced"] .you-hub .you-switch::after { transition: none; }

/* theme chips carry a small swatch of the look */
.you-swatch { flex: none; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-ac) 50%); box-shadow: 0 0 0 1px var(--line-2); }
.you-themes .m-chip[aria-pressed="true"] .you-swatch { box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }

/* Today trackers: name, its area as a small select, reorder, switch */
.you-hub .you-tr { gap: 6px; min-height: 58px; padding: 7px 10px 7px 14px; }
.you-hub .you-tr .m-row-txt { gap: 0; }
.you-hub .you-tr label { align-self: flex-start; cursor: pointer; }
.you-hub .you-tr.is-off b { color: var(--tx-3); }
#app .you-hub .you-tr-area {
  align-self: flex-start; width: auto; min-width: 0; min-height: 24px; margin: 0; padding: 0 18px 0 0;
  border: 0; border-radius: 6px; background: transparent var(--you-chev) no-repeat right 0 center / 12px;
  color: var(--tx-3); font: inherit; font-size: 12.5px; -webkit-appearance: none; appearance: none; box-shadow: none;
}
.you-tr-move { flex: none; display: flex; }
.you-hub .you-tr-move:empty { width: 68px; }   /* Sleep, Water and Mood keep their places on Today: no arrows, same column */
.you-hub .you-tr-move button { width: 34px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--tx-3); cursor: pointer; }
.you-hub .you-tr-move button:active { background: var(--m-surface-2); }
.you-hub .you-tr-move button:disabled { opacity: .25; cursor: default; }
.you-tr-move svg { width: 18px; height: 18px; }
.you-tr .you-switch { margin-left: 4px; }
.you-hint { margin: 8px 8px 0; font-size: 12px; line-height: 1.5; color: var(--tx-3); }

/* account: a quiet sign-out, a destructive row that is clear but not loud */
.you-hub .you-mini {
  flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--tx); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.you-hub .you-mini:active { background: var(--m-surface-2); }
.you-hub .you-danger b, .you-hub .you-danger .m-row-ico { color: color-mix(in srgb, var(--red, #ff6b6b) 82%, var(--tx)); }
.you-hub .you-danger.armed { background: color-mix(in srgb, var(--red, #ff6b6b) 12%, transparent); }
.you-hub .you-danger.armed b { color: var(--red, #ff6b6b); font-weight: 600; }
.you-hub .you-danger:disabled { opacity: .6; cursor: default; }
.you-status { margin: 10px 8px 0; font-size: 13px; line-height: 1.5; color: var(--tx-2); }

/* signed-out form (authPanel markup), restyled with the input row primitives */
.you-hub .you-signin .auth-panel { gap: 10px; padding: 0; }
.you-hub .you-signin .auth-panel label { font-size: 12px; font-weight: 600; color: var(--tx-3); }
#app .you-hub .you-signin .auth-panel input {
  min-height: 44px; padding: 0 16px; border-radius: 999px !important; border: 1px solid var(--line-2) !important;
  background: var(--m-surface) !important; color: var(--tx) !important; font-size: 16px; box-shadow: none;
}
.you-hub .you-signin .auth-panel .btn {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--blue-grad, var(--accent)); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: none;
}
.you-hub .you-signin .auth-panel .mini-act { align-self: flex-start; min-height: 36px; padding: 0 14px; font-size: 13px; }
.you-hub .you-signin #authStatus { font-size: 13px; color: var(--tx-2); }
.you-hub .you-signin #authStatus:empty { display: none; }

/* premium: one understated card */
.you-hub .m-list + .m-card { margin-top: 12px; }
.you-hub .you-premium { padding: 16px; }
.you-premium-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.you-premium-head b { font-family: var(--font-display, inherit); font-size: 20px; font-weight: 400; letter-spacing: -.01em; color: var(--tx); }
.you-premium-val { flex: none; font-size: 15px; font-weight: 500; color: var(--tx); font-variant-numeric: tabular-nums; }
.you-premium-val em { margin-left: 1px; font-size: 12px; font-style: normal; color: var(--tx-3); }
.you-premium p { margin: 6px 0 14px; font-size: 13.5px; line-height: 1.45; color: var(--tx-2); }

/* launch updates: a row that opens (emailCaptureCard inside, flattened) */
.you-hub .profile-updates { margin-top: 12px; }
.you-hub .profile-updates > summary { justify-content: flex-start; padding: 10px 14px; }
.you-hub .profile-updates[open] > summary::after { content: '›'; }
.you-hub .profile-updates .subscribe-card { margin: 0; padding: 0 14px 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.you-hub .profile-updates .sub-copy { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--tx-3); }
.you-hub .profile-updates .sub-label { font-size: 12px; color: var(--tx-3); }
#app .you-hub .profile-updates .sub-input { height: 44px; min-height: 44px; padding: 0 16px; border-radius: 999px !important; border: 1px solid var(--line-2) !important; background: var(--m-surface) !important; }
.you-hub .profile-updates .sub-consent input { accent-color: var(--m-action, var(--accent)); }
.you-hub .profile-updates .sub-consent a { color: var(--blue-2, var(--accent)); }
.you-hub .profile-updates .sub-btn { min-height: 44px; border-radius: 999px; background: var(--blue-grad, var(--accent)); color: #fff; font-size: 14px; font-weight: 600; box-shadow: none; }
.you-hub .profile-updates .subscribe-card.done .sub-check { flex-basis: 32px; height: 32px; background: var(--m-surface-2); color: var(--blue-2, var(--accent)); }
.you-hub .profile-updates .sub-check svg { width: 15px; height: 15px; }

/* Apple Health, full card: same flat surface, the read list as one quiet line */
.you-hub .you-health .ah-card { gap: 12px; margin: 0; padding: 16px; border-radius: var(--m-radius); border: 1px solid var(--line); background: var(--m-surface); box-shadow: none; }
.you-health .ah-logo { width: 36px; height: 36px; border-radius: 11px; }
.you-health .ah-logo svg { width: 20px; height: 20px; }
.you-health .ah-reads { gap: 2px 0; }
.you-health .ah-reads span { padding: 0; border: 0; border-radius: 0; background: none; font-size: 12.5px; line-height: 1.5; color: var(--tx-3); }
.you-health .ah-reads span:not(:last-child)::after { content: '·'; margin: 0 7px; opacity: .7; }
.you-hub .you-health .ah-btn { width: auto; align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: none; }
.you-hub .you-health .ah-actions { align-self: stretch; }
.you-health .ah-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--tx-3); }

/* footer */
.you-hub .m-note + .m-note { margin-top: 8px; }

/* Adaptive notifications: what is coming up (v191) */
.you-coming { margin-top: 12px; padding: 10px 12px; border-radius: var(--m-radius-sm); background: var(--m-surface); border: 1px solid var(--line); }
.you-coming small { display: block; margin-bottom: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3); }
.you-coming-row { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 13px; }
.you-coming-row span { flex: none; min-width: 118px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.you-coming-row b { font-weight: 500; color: var(--tx); }

/* Device matrix 2026-10-19, touch targets: the up/down buttons are 34x40. Each grows 6px on its outer side to 40x40, so the pair never overlaps itself. */
.you-hub .you-tr-move button { position: relative; }
.you-hub .you-tr-move button::after { content: ''; position: absolute; top: 0; bottom: 0; }
.you-hub .you-tr-move button:first-child::after { left: -6px; right: 0; }
.you-hub .you-tr-move button:last-child::after { left: 0; right: -6px; }
.you-hub .you-tr-move button:only-child::after { left: -3px; right: -3px; }

/* Device matrix 2026-10-19, touch targets: the Today-area select is 24px tall, the tracker switches 28px and the Privacy / Terms links 17px. The select grows to 40px with -8px margins (its text stays where it was); the links get an invisible halo. */
#app .you-hub .you-tr-area { min-height: 40px; margin-block: -8px; }
.you-hub .legal-links a { position: relative; }
.you-hub .legal-links a::after { content: ''; position: absolute; inset: -14px -10px; }
.you-hub .you-tr .you-switch::before { content: ''; position: absolute; inset: -8px -4px; border-radius: 999px; }

/* ---------- v283 (his ask): You as an iOS Settings page ----------
   The photo, name and arc at the top; grouped rows with a coloured tile, the name, the current value and a
   chevron; each row opens its own page with a back button and a large title. */
.you-id { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 6px 0 18px; text-align: center; }
.you-id-ava {
  display: grid; place-items: center; width: 92px; height: 92px; margin: 0 0 8px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%;
  background: var(--m-surface-2); color: var(--tx); font: inherit; font-size: 36px; font-weight: 600; overflow: hidden; cursor: pointer;
}
.you-id-ava img { display: block; width: 100%; height: 100%; object-fit: cover; }
.you-id-ava:active { transform: scale(.97); }
.you-id h1 { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--tx); overflow-wrap: anywhere; }
.you-id p { margin: 0; max-width: 32ch; font-size: 14px; line-height: 1.4; color: var(--tx-2); }
.you-id-edit { min-height: 36px; margin: 6px 0 0; padding: 0 16px; border: 0; border-radius: 999px; background: var(--m-surface-2); color: var(--blue-2, var(--accent)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.you-id-edit:active { background: color-mix(in srgb, var(--tx) 12%, transparent); }

.ys-group { margin: 18px 0 0; border-radius: var(--m-radius); border: 1px solid var(--line); background: var(--m-surface); overflow: hidden; }
.ys-row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; margin: 0; padding: 0 14px;
  border: 0; background: none; color: var(--tx); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ys-row + .ys-row::before { content: ''; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--line); }   /* the separator starts after the tile, as on iOS */
.ys-row:active { background: var(--m-surface-2); }
.ys-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ys-tile { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ys); color: #fff; }
.ys-tile svg { width: 18px; height: 18px; }
.ys-label { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ys-val { flex: none; max-width: 40%; font-size: 15px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ys-go { flex: none; font-size: 22px; line-height: 1; color: var(--tx-3); }
.you-root > .m-note { margin-top: 22px; }

/* a page: the back button over a large title; it slides in from the right once, and You slides back */
.you-sub-top { flex-direction: column; align-items: flex-start; gap: 2px; }
.you-back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: 0 0 0 -8px; padding: 0 10px 0 6px; border: 0; border-radius: 999px;
  background: none; color: var(--blue-2, var(--accent)); font: inherit; font-size: 17px; font-weight: 500; cursor: pointer;
}
.you-back span { font-size: 30px; line-height: 1; margin-top: -3px; }
.you-back:active { background: var(--m-surface-2); }
.you-sub-top h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.you-page > .m-cap:first-child { display: none; }   /* the large title already names the page */
.you-page > .m-list:first-child, .you-page > .m-card:first-child, .you-page > .you-health:first-child, .you-page > .m-cap:first-child + .m-list { margin-top: 10px; }
.you-page.enter { animation: youPush .32s cubic-bezier(.22, 1, .36, 1) both; }
.you-root.back { animation: youPop .32s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes youPush { from { opacity: 0; transform: translateX(28px); } }
@keyframes youPop { from { opacity: 0; transform: translateX(-20px); } }
@media (prefers-reduced-motion: reduce) { .you-page.enter, .you-root.back { animation: none; } }
[data-motion="reduced"] .you-page.enter, [data-motion="reduced"] .you-root.back { animation: none; }

/* the app's one-time question about anonymous usage (v284) */
.uc-sheet h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.uc-sheet p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--tx-2); }
.uc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; }
.uc-actions .m-btn { width: 100%; }
.uc-more { display: inline-block; margin: 14px 0 2px; font-size: 13px; color: var(--tx-3); }
