/* features/name-ui.css: the student's name (features/name-ui.js). Loaded on every width: the Name sheet inside #ist-sheet
   (bottom sheet on phones, small window on desktop), the one-time ask card on Home, the desktop Home greeting and the
   desktop Settings Name row (the same look as Suggest an exam: dg-system.css). Brand tokens, house curve, press feedback only. */
#ist-sheet .nm-sheet { margin-top: 4px; }
.nm-label { display: block; margin: 0 0 6px; font: 650 12.5px/1.3 Inter, sans-serif; color: var(--text-mid); }
.nm-input { width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface2, var(--surface)); color: var(--text); font: 500 16px/1.3 Inter, sans-serif; unicode-bidi: plaintext; }   /* 16px: iOS does not zoom */
.nm-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.nm-err { margin: 8px 0 0; min-height: 0; font: 500 12.5px/1.45 Inter, sans-serif; color: var(--miss, var(--red)); }
.nm-err:empty { display: none; }
.nm-btn { min-height: 46px; border-radius: 12px; padding: 12px 16px; font: 700 14px/1 Inter, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; transition: transform .15s var(--ios-ease, cubic-bezier(0.16, 1, 0.3, 1)); }
.nm-btn:active:not(:disabled) { transform: scale(0.985); }
.nm-btn:disabled { opacity: .5; cursor: default; }
.nm-save { border: none; background: var(--accent); color: var(--on-accent, oklch(0.18 0.020 275)); }
/* --on-accent lives in lift-ios.css (phones only): desktop light needs the light label, as .gn-go does */
html[data-theme="light"] .nm-save { color: var(--on-accent, oklch(0.99 0.008 85)); }
.nm-input { color-scheme: dark; } html[data-theme="light"] .nm-input { color-scheme: light; }   /* follows the app's theme, not the computer's */
#ist-sheet .nm-btn { width: 100%; margin-top: 14px; flex: 0 0 auto; }
#ist-sheet .nm-remove { margin-top: 6px; border: 0; background: transparent; color: var(--miss, var(--red)); font-weight: 650; }
/* the one-time card on Home (phone: under the greeting; desktop: under the top bar) */
.nm-ask { margin: 0 0 14px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); }
.nm-ask-q { margin: 0 0 10px; font: 600 17px/1.25 Fraunces, Georgia, serif; color: var(--text); }
.nm-ask-row { display: flex; gap: 8px; align-items: stretch; }
.nm-ask-row .nm-input { flex: 1 1 auto; min-width: 0; }
.nm-ask-row .nm-btn { flex: 0 0 auto; }
.nm-later { display: block; margin: 8px 0 0; min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--text-mid);
  font: 600 13px/1 Inter, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#page-setup .board > .nm-ask { max-width: 560px; }
/* desktop Home greeting under the exam name (top bar) */
#page-setup .cmd-greet { margin: 2px 0 0; font: 500 13.5px/1.35 Inter, sans-serif; color: var(--text-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* desktop Settings Name row */
html[data-theme] body #page-settings #settings-name-row[hidden] { display: none !important; }
@media (max-width: 899px) { html[data-theme] body #page-settings #settings-name-row { display: none !important; } }   /* the phone page has its own row */
#settings-name-row .ss-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color .16s cubic-bezier(0.16, 1, 0.3, 1), transform .15s cubic-bezier(0.16, 1, 0.3, 1); }
#settings-name-row .ss-row:active { transform: scale(.99); }
#settings-name-row .ss-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#settings-name-row .ss-i { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--accent-light); background: color-mix(in oklab, var(--accent) 11%, var(--surface2)); }
html[data-theme="light"] #settings-name-row .ss-i { color: oklch(0.42 0.150 52); }
#settings-name-row :is(.ss-i, .ss-g) svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#settings-name-row .ss-t { flex: 1 1 auto; min-width: 0; }
#settings-name-row .ss-t b { display: block; font: 650 13.5px/1.25 Inter, sans-serif; color: var(--text); }
#settings-name-row .ss-t span { display: block; font: 500 12px/1.35 Inter, sans-serif; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#settings-name-row .ss-g { color: var(--text-dim); display: grid; }
@media (hover: hover) and (pointer: fine) { #settings-name-row .ss-row:hover { background: color-mix(in oklab, var(--accent) 5%, var(--surface)); } }
@media (prefers-reduced-motion: reduce) { :is(.nm-btn, #settings-name-row .ss-row) { transition: none; } :is(.nm-btn, #settings-name-row .ss-row):active { transform: none; } }
#ios-settings [data-act="name"] .ist-rv { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
/* the sheet's and Home's own input rules set a mono face: the name is always read in the body face */
:is(#ist-sheet, #ios-home, #page-setup) .nm-input { font: 500 16px/1.3 Inter, -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: 0; text-transform: none; }
#ios-settings [data-act="name"] .ist-rv { margin-left: 12px; }
