/* Hallmark · shape: app screen · redesign: polish · posture: restrained */
:is(.ox,.sc,.pw,.mc,.en-flow,.cx,.lx) {
  --role-radius: 12px;
  --role-edge: color-mix(in srgb,var(--muted) 68%,var(--surface));
  --role-wash: color-mix(in srgb,var(--selected) 48%,var(--surface));
  --role-rule: color-mix(in srgb,var(--brand) 35%,var(--line));
  color:var(--ink);
  font-family:var(--body,system-ui,sans-serif);
  font-variant-numeric:tabular-nums;
}
.ox {
  --ox-ink:var(--ink); --ox-muted:var(--muted); --ox-line:var(--line);
  --ox-paper:var(--surface); --ox-field:var(--paper); --ox-soft:var(--selected); --ox-accent:var(--brand);
}
.sc {
  --sc-ink:var(--ink); --sc-muted:var(--muted); --sc-line:var(--line);
  --sc-edge:var(--role-edge); --sc-button:var(--ink); --sc-surface:var(--surface);
  --sc-focus:var(--focus); --sc-accent:var(--brand); --sc-wash:var(--selected);
  background:var(--surface); border-radius:var(--role-radius); padding:clamp(16px,2.1vw,32px);
}
.pw,.pw[data-pw-person] {
  --pw-ink:var(--ink); --pw-muted:var(--muted); --pw-line:var(--line);
  --pw-soft:var(--paper); --pw-accent:var(--brand); --pw-accent-soft:var(--selected); --pw-white:var(--surface);
}
.mc {
  --mc-ink:var(--ink); --mc-soft:var(--muted); --mc-line:var(--line); --mc-faint:var(--paper);
  --mc-paper:var(--surface); --mc-wash:var(--role-wash); --mc-mint:var(--selected); --mc-focus:var(--focus);
}
.en-flow {
  --en-ink:var(--ink); --en-muted:var(--muted); --en-line:var(--line);
  --en-soft:var(--selected); --en-green:var(--brand); --en-white:var(--surface);
}
.cx {
  --context-surface:var(--surface); --context-ink:var(--ink); --context-muted:var(--muted);
  --context-line:var(--line); --context-accent:var(--brand); --context-border:var(--role-edge);
  --context-link:var(--ink); --context-button:var(--ink);
}
.lx {
  --lx-ink:var(--ink); --lx-muted:var(--muted); --lx-rule:var(--line); --lx-grid:var(--line);
  --lx-paper:var(--surface); --lx-wash:var(--role-wash); --lx-pale:var(--paper);
  --lx-teal:var(--brand); --lx-focus:var(--focus);
}

/* Read a result as a letter, then open the source record. */
.sc>header,.pw .pw-head,.mc .mc-top,.lx .lx-head,.ox .ox-head {
  border:0; border-bottom:1px solid var(--line); padding-bottom:16px; margin-bottom:16px;
}
:is(.sc,.pw,.mc,.lx,.ox,.cx,.en-flow) h2 {text-wrap:balance;letter-spacing:-.04em}
.sc .sc-letter {
  background:var(--selected); border:0; border-radius:var(--role-radius);
  padding:clamp(16px,2.6vw,36px); align-items:center;
}
.sc .sc-letter h3 {font-size:clamp(1.3rem,2.4vw,2rem);line-height:1.12;max-width:26ch}
.sc-letter aside {border-inline-start:2px solid var(--role-rule);padding:4px 0 4px 20px}
.sc-self b {font-weight:620;font-size:clamp(2.6rem,6vw,4.5rem);letter-spacing:-.065em}
.sc .sc-review {border:0;gap:clamp(12px,2vw,28px);align-items:start}
.sc .sc-review>div {padding:0}
.sc .sc-review aside {
  border:0; border-radius:var(--role-radius); background:var(--selected);
  padding:clamp(16px,2vw,24px); margin:0;
}
.sc .sc-review aside h3 {margin-top:0}
.sc .sc-review blockquote {font:570 clamp(1.16rem,2vw,1.55rem)/1.28 var(--body,system-ui,sans-serif);letter-spacing:-.035em}
.sc .sc-proof {border-top:1px solid var(--line)}
.sc .sc-field input,.sc .sc-field select,.sc .sc-field textarea {border-radius:8px;min-height:44px}
.sc .sc-action,.pw button,.en-flow button,.en-flow .en-link,.cx button,.cx .cx-link,.ox .ox-action,.ox .ot-primary,.ox .ot-secondary {
  border-radius:8px; min-height:44px; padding:8px 16px; font-size:.92rem; font-weight:620;
}
.sc .sc-action.primary,.pw button.pw-primary,.en-flow button[type=submit],.en-flow .en-link,
.cx .cx-actions>:first-child,.cx form button,.ox .ox-action,.ox .ot-primary {
  background:var(--ink); border-color:var(--ink); color:var(--surface);
}
.sc .sc-action:not(.primary),.cx .cx-actions>:not(:first-child),.ox .ot-secondary {
  background:var(--surface); border-color:var(--role-edge); color:var(--ink);
}
.sc .sc-action.primary:hover,.pw .pw-primary:hover,.cx .cx-actions>:first-child:hover,.ox .ot-primary:hover,.ox .ox-action:hover {
  background:color-mix(in srgb,var(--ink) 82%,var(--brand));
}
.sc .sc-pick:has(input:checked),.sc .sc-confirm:has(input:checked),.en-choice:has(input:checked) {background:var(--role-wash);border-radius:8px}
.sc .sc-pick,.sc .sc-confirm {padding:8px 12px;min-height:44px}
.sc .sc-receipt,.pw .pw-message,.en-flow .en-receipt {border:0;border-left:3px solid var(--brand);border-radius:0 8px 8px 0}
.pw .pw-head {background:var(--role-wash);padding:20px 24px;margin:0}
.pw .pw-kv {border-radius:var(--role-radius);padding:16px}
.cx {border:1px solid var(--line);border-radius:var(--role-radius);border-top:4px solid var(--brand)}
.en-flow select,.cx input,.cx select {border-radius:8px;min-height:44px}
.en-flow .en-path {gap:8px}
.en-flow .en-path li {padding-top:8px}
.lx,.en-flow {border-radius:var(--role-radius)}
.lx .lx-total,.mc .mc-inspect {border-radius:8px;background:var(--role-wash)}
.mc .mc-sheet,.mc .mc-case {border-radius:var(--role-radius);overflow:clip}
.mc .mc-charthead {background:var(--role-wash)}
.mc .mc-cell[aria-pressed=true],.mc .mc-source[aria-pressed=true] {
  background:var(--selected);box-shadow:inset 0 -3px var(--brand);
}

/* Keep navigation quieter than the selected record and its actions. */
.ox .ot-layout {border-radius:var(--role-radius);background:var(--surface)}
.ox .ot-directory {background:var(--role-wash);border-color:var(--line)}
.ox .ot-directory header {padding-bottom:12px;border-bottom:1px solid var(--role-rule)}
.ox .ot-row {color:var(--ink);border-radius:6px}
.ox .ot-row:hover {background:var(--role-wash);box-shadow:inset 0 0 0 1px var(--role-rule)}
.ox .ot-tree li[aria-selected=true]>.ot-row {background:var(--selected);color:var(--ink);box-shadow:inset 4px 0 var(--brand)}
.ox .ot-tree li:focus-visible>.ot-row {outline:3px solid var(--focus);outline-offset:-3px}
.ox .ot-tree ul[role=group],.ox .ot-icon,.ox .ot-icon:before {border-color:var(--role-edge)}
.ox .ot-icon-leaf {background:var(--muted)}
.ox .ot-card .ot-facts {background:var(--role-wash);border:0;border-radius:8px;padding:12px 16px}
.ox .ot-card .ot-facts dd {font-size:1.8rem;letter-spacing:-.045em}
.ox .ot-form {margin-top:20px;padding-top:8px}
.ox .ot-card details {border-top:1px solid var(--line);padding-top:12px;margin-top:16px}
.ox [aria-pressed=true].ox-select {color:var(--ink)}
.ox .ox-sheet {border-color:var(--brand)}
.ox .ox-sheet,.ox .ox-filter {border-radius:4px}
:is(.ox,.sc,.pw,.mc,.en-flow,.cx,.lx) :is(button,input,textarea,select,summary,a):focus-visible {
  outline:3px solid var(--focus);outline-offset:2px;
}
:is(.sc,.pw,.mc,.en-flow,.cx,.ox) :is(button,a):active {transform:translateY(1px)}
@container(max-width:440px){
  .sc-letter aside {padding:0;border:0}
  .sc .sc-letter {gap:12px}
}
