/* Ja (v4) and the calm forms of the sheets it opens. docs/v4/design.md, mockups/finale/ja.html.
   The name on top, quiet rows under small labels, flat on the page grey: no cards, no icon circles, no chevrons.
   Only --f-* tokens. */

/* ====================================================================== the screen */
.app .f-screen.me { gap: 0; padding-top: calc(var(--f-s3) + env(safe-area-inset-top, 0px)); }
.me-head { display: flex; align-items: center; gap: var(--f-s4); padding: var(--f-s4) 0 var(--f-s1); min-width: 0; }
.me-av {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--f-surface-1);
  font: 500 26px/1 var(--f-font-display);
  color: var(--f-text);
}
.me-head__text { min-width: 0; }
.me-name { font-family: var(--f-font-display); font-size: var(--f-fs-display); font-weight: 600; letter-spacing: var(--f-track-display); line-height: 1.05; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { font-size: var(--f-fs-sub); color: var(--f-text-2); }

/* one row: label left, value right in the secondary colour (or a switch) */
.me-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--f-s4);
  min-height: 52px;
  padding: 6px 0;
  text-align: left;
  color: var(--f-text);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.me-row__main { min-width: 0; display: grid; }
.me-row__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-row small { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; color: var(--f-text-2); }
.me-row__val { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-weight: 400; color: var(--f-text-2); font-variant-numeric: tabular-nums; }
.me-row--quiet .me-row__title { color: var(--f-text-2); font-weight: 400; }
.me-row--danger .me-row__title { color: var(--f-worse); }
.me-row.pressable { transition: opacity var(--f-dur-2) var(--f-ease); }
.me-row.pressable.is-pressed, .me-row.pressable:active { transform: none; opacity: 0.6; }
.me-row[aria-expanded="true"] .me-row__title { color: var(--f-text); }
.me-row[role="switch"] { min-height: 64px; }
.me-row .sh-switch { margin-left: auto; }
.me-group > .f-label { padding-bottom: 6px; }

/* Dni, Cieľ, Vybavenie, Strava open under their row: chips inline, every tap saves */
.me .sh-inline { display: grid; gap: var(--f-s3); padding: 2px 0 var(--f-s4); }
.sh-inline .chip-row { display: flex; flex-wrap: wrap; gap: var(--f-s2); }
.sh-inline__field { display: grid; gap: 6px; font-size: var(--f-fs-caption); color: var(--f-text-2); }
.sh-inline__field input {
  min-height: 48px;
  padding: 0 var(--f-s4);
  border: 0;
  border-radius: var(--f-r-sm);
  background: var(--f-surface-1);
  color: var(--f-text);
  font: 400 16px var(--f-font);
}

/* ====================================================================== chips (Ja inline, every sheet's chip row) */
/* No tints: quiet grey, the picked one light (like the primary pill). */
:is(.me, .sheet) .chip-row .lib-cat {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--f-r-pill);
  background: var(--f-surface-1);
  color: var(--f-text-2);
  font-size: var(--f-fs-sub);
  font-weight: 500;
  transition: background-color var(--f-dur-2) var(--f-ease), color var(--f-dur-2) var(--f-ease);
}
:is(.me, .sheet) .chip-row .lib-cat.is-on { background: var(--f-text); color: #141414; }
:is(.me, .sheet) .chip-row .lib-cat::after { inset: -2px 0; }

/* ====================================================================== the sheets' calm forms */
/* Overrides app.css (.list, .field, .section-label, .group-note, .nutri-*) inside every popup sheet: no card
   around the fields, each field a row with its input on #212121, labels small and quiet, no uppercase tracking. */
.sheet .section-label { margin: 22px 0 10px; font-size: var(--f-fs-sub); font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--f-text-2); }
.sheet .group-note, .sheet .nutri-note { padding: 10px 0 0; margin: 0; font-size: 14px; color: var(--f-text-2); }
.sheet .nutri-why { font-size: 14px; color: var(--f-text-2); }
.sheet .nutri-why b { font-weight: 500; color: var(--f-text); }
.sheet .login-error { margin: 8px 0 0; color: var(--f-worse); }
.sheet .login-error:empty { min-height: 0; margin: 0; }

.sheet .list.form { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; display: grid; gap: var(--f-s2); }
.sheet .field { min-height: 52px; padding: 0; grid-template-columns: minmax(0, 1fr) 112px 44px; gap: var(--f-s3); }
.sheet .field + .field { border-top: 0; }
.sheet .field > span { font-size: 16px; color: var(--f-text); }
.sheet .field em { font-size: 14px; color: var(--f-text-2); }
.sheet .field.wide { grid-template-columns: 72px minmax(0, 1fr); }
.sheet .field input, .sheet .field select, .sheet #ac-fb {
  height: 48px;
  border: 0;
  border-radius: var(--f-r-sm);
  background: var(--f-surface-1);
  color: var(--f-text);
  font: 500 17px var(--f-font-num);
  font-variant-numeric: tabular-nums;
}
.sheet .field.wide input { font: 400 16px var(--f-font); padding: 0 var(--f-s4); }
.sheet .field input[type="date"] { font: 400 16px var(--f-font); }
.sheet #ac-fb { height: auto; padding: var(--f-s3) var(--f-s4); font: 400 16px/1.45 var(--f-font); }
.sheet .field input::placeholder, .sheet #ac-fb::placeholder { color: var(--f-text-3); }
.sheet .field input:focus-visible, .sheet .field select:focus-visible, .sheet #ac-fb:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--f-outline); }

/* rows inside a sheet (Účet, Pozvať): the same quiet rows, groups apart */
.me-sheet-group { padding: var(--f-s1) 0; }
.me-sheet-group + .me-sheet-group { margin-top: var(--f-s3); padding-top: var(--f-s3); border-top: 1px solid var(--f-sep); }
.me-invite { gap: var(--f-s2); }
.me-invite__acts { display: flex; align-items: center; gap: 4px; flex: none; }
.me-invite__acts .f-btn { min-height: 40px; padding: 0 14px; font-size: var(--f-fs-sub); }
.me-invite__drop { color: var(--f-worse); }
.me-code { font-size: 30px; font-weight: 500; letter-spacing: 0; overflow-wrap: anywhere; }

/* the plan's sources: links in the primary colour, underlined (no accent: the sheet has its one action) */
.sheet .pl-src { padding: 0; }
.sheet .pl-src a { color: var(--f-text); text-decoration: underline; text-decoration-color: var(--f-outline); text-underline-offset: 3px; }

@media (max-width: 360px) {
  .me-row { gap: var(--f-s3); font-size: 16px; }
  .sheet .field { grid-template-columns: minmax(0, 1fr) 96px 40px; gap: var(--f-s2); }
}

/* ====================================================================== start: landing, login, register, wizard */
/* Overrides app.css (.st-*, .wz-*): the same calm look as the app. Flat mark, display weights 600, fields on #212121
   without a stroke, the picked option / day light (like the primary pill), no accent on the back link. */
.st-mark { color: var(--f-accent); }
.st-brand { gap: 14px; font-family: var(--f-font-brand); font-size: 44px; font-weight: 400; letter-spacing: -0.01em; line-height: 1; }
.st-brand .st-mark { width: auto; height: 1.05em; aspect-ratio: 3284 / 2252; }
/* the slogan: a short brand line in the wordmark face (never a paragraph) */
.st-slogan { font-family: var(--f-font-brand); font-size: 22px; line-height: 1.15; color: var(--f-text); margin-top: var(--f-s3); }
.st-title { font-weight: 600; letter-spacing: var(--f-track-display); }
.start .st-back { color: var(--f-text-2); font-weight: 500; }
.st-field > span { font-size: var(--f-fs-sub); font-weight: 500; padding-left: 0; }
.st-field input { border: 0; font-weight: 400; }
.st-field input:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--f-outline); }
.st-hint { padding: 0; }
.st-art__tile { background: var(--f-bg); }
.st-consent input:checked + .st-consent__box { background: var(--f-text); border-color: var(--f-text); color: #141414; }
.st-consent__text a { color: var(--f-text); text-decoration-color: var(--f-outline); }
.wz-progress { height: 4px; }
.wz-progress i { background: var(--f-text); }
.wz-option__title { font-weight: 500; }
.start .wz-option.is-on { background: var(--f-text); color: #141414; }
.start .wz-option.is-on .wz-option__meta { color: #141414; opacity: 0.7; }
.st-tick:not(:empty) { background: var(--f-text); border-color: var(--f-text); color: #141414; }
.start .wz-option.is-on .st-tick { background: #141414; border-color: #141414; color: var(--f-text); }
.start .wz-day { font-weight: 500; }
.start .wz-day.is-on { background: var(--f-text); color: #141414; }
.wz-num__label { font-weight: 500; }
.wz-num input { font-weight: 500; background: var(--f-quiet); }

/* ====================================================================== the pregnancy week guide (Ja → Režim) */
/* Overrides app.css (.weeks, .note.stop): week numbers in the secondary colour, the current phase a quiet grey
   band with the light text (no accent tint), the stop box plain #212121 with the warning colour on its title. */
.sheet .weeks b { color: var(--f-text-2); font-weight: 500; }
.sheet .weeks .is-now { background: var(--f-quiet); color: var(--f-text); }
.sheet .weeks .is-now b { color: var(--f-text); }
.sheet .note.stop { background: var(--f-surface-1); }
.sheet .note.stop b { color: var(--f-worse); font-weight: 500; }
