/* Nudges in the Luminous depth look (system.md 6.6, 6.9, 6.11; drawings: look/mock/nudges.html, look/screens/states.html
   part 2): setup step 9, the sheets ng, ngp, ngd (neutral) and ngo (lit by its habit), the home cards. Owner: the nudges
   slice. Values only from the tokens of app.css. Calm needs no rule of its own here: app.css section 22 stops every
   transition, and nothing in this file animates. */

/* ---- Rows: an icon well, the title and its line, the control at the right (the whole row is the target) ---- */
.ngk{position:relative;display:flex;align-items:flex-start;gap:var(--s3);min-height:72px;padding:var(--s3) var(--s4);border-top:1px solid var(--hair)}
.ngkl>.ngk:first-child,.sl>h4+.ngk{border-top:0}
.ngk input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.ngk input:disabled{cursor:default}
.ngk:active:not(.qoff){background:var(--hair)}
.ngk-w{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:var(--r-s);background:var(--glass);box-shadow:var(--edge);color:var(--hl)}
.ngk-w .i{width:22px;height:22px}
.ngk .g{flex:1;min-width:0;padding-top:1px}
.ngk .g b{display:block;font-size:var(--fs-body);font-weight:560;line-height:1.3;color:var(--ink)}
.ngk .g small{display:block;margin-top:2px;font-size:var(--fs-cap);line-height:1.4;color:var(--ink-3)}
/* the switch drawn in the row (system 6.6): off a dim track, on --hx (violet in a neutral sheet, the hue in a habit's) */
.ngk-s{display:block;flex:none;margin-top:var(--s1)}
.ngk-s i{position:relative;display:block;width:46px;height:28px;border-radius:var(--r-pill);background:var(--hair);box-shadow:inset 0 0 0 1px var(--hair-2);
  transition:background-color var(--t1) var(--e-out),box-shadow var(--t1) var(--e-out)}
.ngk-s i::before{content:"";position:absolute;left:4px;top:4px;width:20px;height:20px;border-radius:50%;background:var(--ink-3);box-shadow:var(--lift);
  transition:transform var(--t1) var(--e-out),background-color var(--t1) var(--e-out)}
.ngk input:checked~.ngk-s i{background:var(--hx);box-shadow:inset 0 1px 0 var(--hair-2)}
.ngk input:checked~.ngk-s i::before{transform:translateX(18px);background:var(--ink)}
.ngk input:focus-visible~.ngk-s i{outline:2px solid var(--ring);outline-offset:3px}
/* the check box of step 9's three rows (role checkbox): a well, lit when ticked */
.ngk-c{display:grid;place-items:center;width:28px;height:28px;flex:none;margin-top:var(--s1);border-radius:var(--r-s);background:var(--well);box-shadow:inset 0 0 0 1.5px var(--hair-2);
  transition:background-color var(--t1) var(--e-out),box-shadow var(--t1) var(--e-out)}
.ngk-c .i{width:var(--s4);height:var(--s4);stroke-width:2;opacity:0;transition:opacity var(--t1) var(--e-out)}
.ngk input:checked~.ngk-c{background:var(--lit);color:var(--hk);box-shadow:none}
.ngk input:checked~.ngk-c .i{opacity:1}
.ngk input:focus-visible~.ngk-c{outline:2px solid var(--ring);outline-offset:3px}
/* a quote kind while Quotes is off: dimmed, read as off, no tap; the line under the three says why */
.ngk.qoff .g b{color:var(--ink-3)}
.ngk.qoff .ngk-w{background:none;color:var(--ink-3)}
.ngk.qoff .ngk-s{opacity:.42}
.ngqo{padding:0 var(--s4) var(--s4) calc(2 * var(--s4) + 40px - var(--s1));font-size:var(--fs-cap);line-height:1.45;color:var(--ink-2)}
/* Now and then: the group label with its count and a fading hairline */
.ngg-t{display:flex;align-items:center;gap:var(--s2);padding:var(--s4) var(--s4) var(--s1);border-top:1px solid var(--hair)}
.ngg-t::after{content:"";flex:1 1 var(--s4);height:1px;background:linear-gradient(90deg,var(--hair-2),transparent)}
.ngg-h{margin:0;font-size:var(--fs-cap);font-weight:600;line-height:1.35;color:var(--ink-2)}
.ngg-n{display:flex;align-items:center;gap:var(--s2);font-size:var(--fs-cap);font-weight:500;color:var(--ink-3);font-variant-numeric:tabular-nums;white-space:nowrap}
.ngg-n::before{content:"";width:3px;height:3px;border-radius:50%;background:currentColor}
.ngg-t+.ngg>.ngk:first-child{border-top:0}

/* ---- The timing (When, At a set time / At random) and the time fields ---- */
.ngseg{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,7.5em),1fr));gap:var(--s1);padding:var(--s1);border-radius:var(--r-l);background:var(--well);box-shadow:inset 0 0 0 1px var(--hair)}
.ngseg button{min-width:0;min-height:44px;padding:var(--s1) var(--s3);border-radius:var(--r-pill);font-size:var(--fs-cap);font-weight:560;line-height:1.3;color:var(--ink-2);
  transition:background-color var(--t1) var(--e-out),color var(--t1) var(--e-out)}
.ngseg [aria-pressed=true]{background:var(--lit);color:var(--hk);font-weight:600;box-shadow:inset 0 1px 0 var(--hair-2)}
.ngt{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8em),1fr));gap:var(--s2);margin-top:var(--s3)}
.ngt[hidden]{display:none}
.ngt label{display:block;min-width:0}
.ngt label>span{display:block;margin-bottom:var(--s2);font-size:var(--fs-cap);font-weight:500;color:var(--ink-2)}
.ngerr{margin-top:var(--s2);font-size:var(--fs-cap);color:var(--warn)}
/* in step 9 under the third row, in line with the words; in ng a card of its own */
.ngkl .ngn{padding:0 var(--s4) var(--s4) calc(2 * var(--s4) + 40px - var(--s1))}
.ngw .ngn{padding:0 var(--s4) var(--s4)}
.ngw .sl.ngn>h4{padding:var(--s4) 0 var(--s1)}
.ngw .ngn>h4+.ngseg{margin-top:var(--s2)}

/* ---- Setup step 9 (inside setup's frame) ---- */
.ngkl{margin-top:var(--s4);border-radius:var(--r-l);background:var(--glass);box-shadow:var(--edge),var(--lift);overflow:hidden}
.ngch{margin-top:calc(-1 * var(--s3));padding:0 var(--s4) var(--s2) calc(2 * var(--s4) + 40px - var(--s1))}
.ngcs>.ngk:first-child{border-top:1px solid var(--hair)}
/* the six of Now and then stand under its words, so they read as its parts, not as a fourth kind */
.ngcs{margin-left:calc(40px + var(--s3))}

/* ---- Sheet ng (neutral) ---- */
.ngw>.sl:first-child .sr{min-height:72px;padding:var(--s4)}
.ngw>.sl:first-child .sr>.i:first-child{width:40px;height:40px;padding:calc((40px - 22px) / 2);border-radius:var(--r-s);background:var(--glass);box-shadow:var(--edge);color:var(--hl)}
.ngw>.sl:first-child .sr .g b{font-size:var(--fs-lab);font-weight:600}
.ngw>.sl:first-child .sr .g small{color:var(--ink-2)}
.ngw>.sl:first-child:has(.tog[aria-checked=true]){background:radial-gradient(80% 140% at 0% 0%,color-mix(in oklab,var(--hx) 30%,transparent),transparent 70%),var(--glass)}
.ngw .sl{margin-top:var(--s6)}
.ngw .sl>h4{padding-left:var(--s4);padding-right:var(--s4)}
.ngw>.sl:first-child,.ngw .sl.ngn{margin-top:var(--s3)}
.ngw .sl.ngn[hidden]{display:none}
.ngin{padding:var(--s2) var(--s4) var(--s4)}
.ngin>.ngt{margin-top:0}
.ngw .ngin .hint{margin:var(--s3) 0 0}
.ngx{margin-top:var(--s3);padding:var(--s4) var(--s4);border-radius:var(--r-l);background:var(--glass);box-shadow:var(--edge)}
.ngx .row{align-items:center}
.ngx .row .btn{flex:0 1 auto}
.ngx .lnk{margin-top:var(--s1)}
/* the one-time lock-screen note above the Discreet switch; the line under the switch while nudges are off */
.ngw .sl>.ngln{margin:0;padding:var(--s3) var(--s4) 0;color:var(--ink-2)}
.ngw>.ngbr{margin:var(--s4) var(--s1) 0}
.ngpace{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s2) var(--s3);margin-top:var(--s3);padding:var(--s4) var(--s4);border-radius:var(--r-l);
  background:var(--glass);box-shadow:var(--edge);font-size:var(--fs-cap);color:var(--ink-2)}
.ngw>.btn.wide{margin-top:var(--s6)}
.ngoff{display:flex;margin:var(--s2) auto 0}
.ngpv{margin:var(--s6) var(--s1) 0;color:var(--ink-3)}

/* ---- A status line where nudges cannot be set (step 9 and ng): an info card ---- */
.pst{display:flex;gap:var(--s3);align-items:flex-start;margin-top:var(--s4);padding:var(--s4) var(--s4);border-radius:var(--r-m);background:var(--glass);box-shadow:var(--edge);
  font-size:var(--fs-cap);line-height:1.45;color:var(--ink-2)}
.pst .i{width:20px;height:20px;flex:none;margin-top:1px;color:var(--hl)}

/* ---- Home cards (states.html part 2): the shell's notice card (.bkp, .bkp-w in app.css), drawn by card() ---- */

/* ---- ngp and ngd: the system's sheet head (medallion, title, close) ---- */
/* the head's alignment and its wrapping title are app.css's (.sh-h, .sh-h .g h3) */
.perm .kick,.pc .kick{margin-bottom:var(--s1)}
.perm>p{margin-top:var(--s3);line-height:1.45}
.perm .hint{display:flex;gap:var(--s3);align-items:flex-start;margin:var(--s4) 0 0}
/* the consent sentence: the person's own words, set apart so it reads as what the button agrees to */
.perm .ngag{margin-top:var(--s4);padding:var(--s4);border-radius:var(--r-m);background:var(--glass);box-shadow:var(--edge);color:var(--ink);font-weight:500}

/* ---- ngo: the sheet a nudge opens, lit by its habit (neutral for a quote) ---- */
.pc .sh-h>.kick{margin-top:var(--s3)}
.pc .lbl{margin:var(--s5) 0 var(--s2);font-size:var(--fs-cap);font-weight:600;line-height:1.35;color:var(--ink-2)}
.pc .quote,.pc .qs{overflow-wrap:anywhere}
.pc .qs{font-size:var(--fs-lab);font-weight:500;line-height:1.45;color:var(--ink)}
.pc .inst{display:flex;justify-content:flex-start;margin:var(--s5) 0 0}
.pc .chipb{max-width:100%}
.pc .chipb>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pc .ngal{display:flex;justify-content:flex-start;margin-top:var(--s3);text-align:left}
.pc .hint{margin-top:var(--s3)}

/* Large text: the wells give way to the words (the row lies too narrow for them) */
.ngkl,.ngw .sl{container-type:inline-size}
@container (max-width:18em){
  .ngk-w{display:none}
  .ngqo,.ngch,.ngkl .ngn{padding-left:var(--s4)}
  .ngcs{margin-left:var(--s4)}
}
