/* Estilos copiados del prototipo "Braverman Diplomatura" (v3), sin cambios.
   Lo propio de la plataforma va en app.css. */

:root {
  color-scheme: light;
  --paper: #F5F5F1;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --sunken: #ECECE6;
  --line: #DCDCD4;
  --line-soft: #E9E9E2;
  --ink: #171717;
  --ink-2: #46484B;
  --ink-3: #6E7074;
  --ink-4: #A3A4A6;
  --mark: #949498;
  --acc: #596301;
  --acc-hover: #4A5200;
  --acc-tint: #EEF0DC;
  --acc-ink: #434A00;
  --on-acc: #FFFFFF;
  --ok: #2F7D4F;
  --ok-tint: #E2F1E7;
  --ok-ink: #1E5A37;
  --watch: #A15C07;
  --watch-tint: #FBEBD3;
  --watch-ink: #7A4400;
  --alert: #B42318;
  --alert-tint: #FCE4E1;
  --alert-ink: #8E1A11;
  --wa: #1F8F4E;
  --wa-bubble: #DCF3E3;
  --wa-ground: #EFEDE6;
  --film: #0E0F0E;
  --film-ink: #D8D9D2;
  --d1: #6B7A12;
  --d2: #3F72B5;
  --d3: #B2643A;
  --d4: #8C5A96;
  --bar: #596301;
  --bar-soft: #C9CFA0;
  --shadow: 0 1px 2px rgba(23,23,23,.05);
  --shadow-2: 0 24px 48px -18px rgba(23,23,23,.28);
  --font: "Barlow",-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --r: 6px;
  --r-sm: 4px;
  --rail: 240px;
  --t: .14s cubic-bezier(.2,0,0,1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --paper: #111210;
    --surface: #191A18;
    --raised: #1F201D;
    --sunken: #0B0C0B;
    --line: #2E302B;
    --line-soft: #242621;
    --ink: #EDEDE8;
    --ink-2: #BDBEB8;
    --ink-3: #8D8F89;
    --ink-4: #62645F;
    --mark: #A5A5A9;
    --acc: #B7C26A;
    --acc-hover: #C9D37F;
    --acc-tint: #262A12;
    --acc-ink: #D3DB96;
    --on-acc: #171A06;
    --ok: #5DBB82;
    --ok-tint: #10281A;
    --ok-ink: #9ADBB2;
    --watch: #E0A04A;
    --watch-tint: #2E1F08;
    --watch-ink: #F1C88E;
    --alert: #F07A6E;
    --alert-tint: #35120F;
    --alert-ink: #FFB5AC;
    --wa: #5DBB82;
    --wa-bubble: #173524;
    --wa-ground: #141512;
    --d1: #8A9A2E;
    --d2: #5F8ACB;
    --d3: #C27445;
    --d4: #A06CB5;
    --bar: #A3B04F;
    --bar-soft: #3A3F1C;
    --shadow: none;
    --shadow-2: 0 24px 48px -16px rgba(0,0,0,.7);
  }
}

:root[data-theme=dark] {
  color-scheme: dark;
  --paper: #111210;
  --surface: #191A18;
  --raised: #1F201D;
  --sunken: #0B0C0B;
  --line: #2E302B;
  --line-soft: #242621;
  --ink: #EDEDE8;
  --ink-2: #BDBEB8;
  --ink-3: #8D8F89;
  --ink-4: #62645F;
  --mark: #A5A5A9;
  --acc: #B7C26A;
  --acc-hover: #C9D37F;
  --acc-tint: #262A12;
  --acc-ink: #D3DB96;
  --on-acc: #171A06;
  --ok: #5DBB82;
  --ok-tint: #10281A;
  --ok-ink: #9ADBB2;
  --watch: #E0A04A;
  --watch-tint: #2E1F08;
  --watch-ink: #F1C88E;
  --alert: #F07A6E;
  --alert-tint: #35120F;
  --alert-ink: #FFB5AC;
  --wa: #5DBB82;
  --wa-bubble: #173524;
  --wa-ground: #141512;
  --d1: #8A9A2E;
  --d2: #5F8ACB;
  --d3: #C27445;
  --d4: #A06CB5;
  --bar: #A3B04F;
  --bar-soft: #3A3F1C;
  --shadow: none;
  --shadow-2: 0 24px 48px -16px rgba(0,0,0,.7);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion:reduce) {
  *, *:before, *:after {
    transition-duration: .01ms!important;
    animation-duration: .01ms!important;
  }
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.005em;
  text-wrap: balance;
}

p {
  margin: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .92em;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  font-size: .92em;
}

.lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: 12.5px;
}

.note {
  font-size: 12.5px;
  color: var(--ink-3);
}

.app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0,1fr);
  min-height: 100%;
}

.rail {
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.brand svg {
  width: 30px;
  height: auto;
  flex: none;
}

.brand b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2em;
}

.brand span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1px;
}

.nav {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  overflow-y: auto;
}

.nav .grp {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 16px 10px 6px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--t),color var(--t);
}

.nav button svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.nav button:hover {
  background: var(--sunken);
  color: var(--ink);
}

.nav button[aria-current=true] {
  background: var(--acc-tint);
  color: var(--acc-ink);
  font-weight: 600;
}

.nav .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  min-width: 20px;
  text-align: center;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--acc);
  color: var(--on-acc);
}

.nav .count.quiet {
  background: var(--sunken);
  color: var(--ink-3);
}

.nav .lock {
  margin-left: auto;
  width: 12px;
  height: 12px;
  stroke: var(--ink-4);
}

.rail-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-foot .by {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 9.5px;
  color: var(--ink-4);
}

main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: env(safe-area-inset-top,0px);
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 600;
}

.topbar .sub {
  font-size: 13px;
  color: var(--ink-3);
}

.topbar .spacer {
  flex: 1;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 7px 12px;
  min-width: 0;
  width: 240px;
  max-width: 100%;
}

.search svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.7;
  flex: none;
}

.search input {
  border: 0;
  background: none;
  outline: none;
  width: 100%;
  font-size: 13.5px;
}

.view {
  padding: 24px 32px 110px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.who-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  font-size: 13px;
}

.who-btn:hover {
  border-color: var(--ink-4);
}

.who-btn small {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.1;
}

.who-btn b {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.who-btn svg.chev {
  width: 12px;
  height: 12px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 2;
}

.menu {
  position: absolute;
  z-index: 30;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 6px;
}

.menu .mi {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
}

.menu .mi:hover {
  background: var(--sunken);
}

.menu .mi[aria-checked=true] {
  background: var(--acc-tint);
}

.menu .mi b {
  display: block;
  font-size: 14px;
}

.menu .mi span {
  font-size: 12.5px;
  color: var(--ink-3);
}

.menu .hd {
  padding: 8px 10px 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 13px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--t),border-color var(--t);
}

.btn:hover {
  background: var(--sunken);
}

.btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  flex: none;
}

.btn.pri {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
}

.btn.pri:hover {
  background: var(--acc-hover);
}

.btn.wa {
  background: var(--wa);
  border-color: var(--wa);
  color: #fff;
}

.btn.ghost {
  border-color: transparent;
  background: none;
  color: var(--ink-2);
}

.btn.ghost:hover {
  background: var(--sunken);
}

.btn.sm {
  padding: 4px 10px;
  font-size: 12.5px;
}

.btn[disabled] {
  opacity: .5;
  cursor: default;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--sunken);
  color: var(--ink-2);
}

.pill:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

.pill.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.pill.watch {
  background: var(--watch-tint);
  color: var(--watch-ink);
}

.pill.alert {
  background: var(--alert-tint);
  color: var(--alert-ink);
}

.pill.acc {
  background: var(--acc-tint);
  color: var(--acc-ink);
}

.pill.plain:before {
  display: none;
}

.by {
  font-size: 11.5px;
  color: var(--ink-3);
}

.by b {
  font-weight: 600;
  color: var(--ink-2);
}

.dr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dr:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--dc,var(--mark));
  flex: none;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel>header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.panel>header h3 {
  font-size: 15px;
}

.panel>header .spacer {
  flex: 1;
}

.panel .body {
  padding: 16px 18px;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 22px;
  align-items: start;
}

.grid2.even {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tbl-wrap {
  overflow-x: auto;
}

.tbl th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

.tbl th.r {
  text-align: right;
}

.tbl td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.tbl tr:last-child td {
  border-bottom: 0;
}

.tbl tr.click {
  cursor: pointer;
}

.tbl tr.click:hover td {
  background: var(--paper);
}

.tbl tfoot td {
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex: none;
  letter-spacing: .02em;
}

.av.lg {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.av.dc {
  background: var(--dc);
  color: #fff;
}

.sep {
  height: 1px;
  background: var(--line-soft);
}

.lockbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  font-size: 13.5px;
  color: var(--ink-2);
}

.lockbox svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.7;
  flex: none;
  margin-top: 1px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.kpis.five {
  grid-template-columns: repeat(5,minmax(0,1fr));
}

.kpi {
  background: var(--surface);
  padding: 16px 18px;
}

.kpi[data-go] {
  cursor: pointer;
  transition: background var(--t);
}

.kpi[data-go]:hover {
  background: var(--paper);
}

.kpi b {
  display: block;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi b small {
  font-size: 15px;
  color: var(--ink-3);
  font-weight: 500;
  margin-right: 2px;
}

.kpi p {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 4px;
}

.kpi .delta {
  font-size: 12.5px;
  font-weight: 600;
}

.delta.up {
  color: var(--ok-ink);
}

.delta.down {
  color: var(--alert-ink);
}

.slot {
  display: grid;
  grid-template-columns: 54px 4px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.slot:last-child {
  border-bottom: 0;
}

.slot:hover {
  background: var(--paper);
}

.slot .t {
  font-family: var(--mono);
  font-size: 13px;
}

.slot .bar {
  align-self: stretch;
  border-radius: 2px;
  background: var(--dc,var(--mark));
}

.slot .what {
  font-size: 12.5px;
  color: var(--ink-3);
}

.slot .need {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.slot.now {
  background: var(--acc-tint);
}

.feed-item {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item .ic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sunken);
}

.feed-item .ic svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 1.7;
}

.feed-item .ic.wa {
  background: var(--wa-bubble);
}

.feed-item .ic.wa svg {
  stroke: var(--wa);
}

.feed-item .ic.acc {
  background: var(--acc-tint);
}

.feed-item .ic.acc svg {
  stroke: var(--acc);
}

.feed-item .ic.alert {
  background: var(--alert-tint);
}

.feed-item .ic.alert svg {
  stroke: var(--alert);
}

.feed-item p {
  font-size: 13.5px;
}

.feed-item .when {
  font-size: 12px;
  color: var(--ink-3);
}

.cal-wrap {
  overflow-x: auto;
}

.cal {
  display: grid;
  grid-template-columns: 56px repeat(6,minmax(128px,1fr));
  min-width: 840px;
  position: relative;
}

.cal .hd {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line-soft);
  font-size: 13px;
}

.cal .hd b {
  display: block;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
}

.cal .hd.today {
  color: var(--acc-ink);
}

.cal .hd.today b {
  color: var(--acc);
}

.cal .hours div {
  height: 52px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-4);
  text-align: right;
  padding: 0 8px;
  transform: translateY(-7px);
}

.cal .col {
  position: relative;
  border-left: 1px solid var(--line-soft);
  background-image: linear-gradient(var(--line-soft) 1px,transparent 1px);
  background-size: 100% 52px;
}

.cal .col.today {
  background-color: color-mix(in srgb,var(--acc-tint) 45%,transparent);
}

.ev {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: var(--r-sm);
  padding: 5px 7px;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--raised);
  border-left: 3px solid var(--dc,var(--mark));
}

.ev b {
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.ev span {
  color: var(--ink-3);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev.busy {
  background: repeating-linear-gradient(135deg,var(--sunken) 0 6px,var(--paper) 6px 12px);
  border-style: dashed;
  border-left-style: solid;
  color: var(--ink-3);
  cursor: default;
}

.ev.dim {
  opacity: .28;
}

.ev .conf {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.ev .conf.pend {
  background: var(--watch);
}

.nowline {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid var(--alert);
  z-index: 2;
}

.nowline:before {
  content: "";
  position: absolute;
  left: -4px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alert);
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-2);
  align-items: center;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  flex-wrap: wrap;
}

.seg button {
  border: 0;
  background: none;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-2);
}

.seg button[aria-pressed=true] {
  background: var(--sunken);
  color: var(--ink);
  font-weight: 600;
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.sync svg {
  width: 16px;
  height: 16px;
}

.pt-head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
}

.pt-head h2 {
  font-size: 24px;
  font-weight: 600;
}

.pt-meta {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

.pt-meta span b {
  font-weight: 500;
  color: var(--ink-3);
  margin-right: 5px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.alerts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 22px 18px;
}

.alertchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--alert-tint);
  color: var(--alert-ink);
  border: 1px solid color-mix(in srgb,var(--alert) 30%,transparent);
}

.alertchip svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.alertchip.w {
  background: var(--watch-tint);
  color: var(--watch-ink);
  border-color: color-mix(in srgb,var(--watch) 30%,transparent);
}

.tabs {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--line-soft);
  padding: 0 14px;
  overflow-x: auto;
}

.tabs button {
  border: 0;
  background: none;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tabs button[aria-selected=true] {
  color: var(--ink);
  border-bottom-color: var(--acc);
  font-weight: 600;
}

.tabs button .n {
  font-family: var(--mono);
  font-size: 11px;
  margin-left: 5px;
  color: var(--ink-4);
}

.odo-wrap {
  overflow-x: auto;
  padding: 6px 0;
}

.odo {
  display: grid;
  grid-template-columns: repeat(16,minmax(34px,1fr));
  gap: 4px;
  min-width: 620px;
}

.odo .gap {
  grid-column: span 16;
  height: 10px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}

.tooth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tooth .shape {
  width: 100%;
  max-width: 40px;
  aspect-ratio: .8;
  border-radius: 9px 9px 14px 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  position: relative;
  display: grid;
  place-items: center;
}

.tooth.low .shape {
  border-radius: 14px 14px 9px 9px;
}

.tooth .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

.tooth.rest .shape {
  background: color-mix(in srgb,var(--mark) 35%,var(--surface));
  border-color: var(--mark);
}

.tooth.endo .shape:after {
  content: "";
  width: 3px;
  height: 60%;
  background: var(--ink-2);
  border-radius: 2px;
}

.tooth.miss .shape {
  border-style: dashed;
  background: none;
}

.tooth.miss .shape:after {
  content: "";
  width: 70%;
  height: 1.5px;
  background: var(--ink-4);
  transform: rotate(-40deg);
}

.tooth.plan .shape {
  border-color: var(--acc);
  border-width: 2px;
  background: var(--acc-tint);
}

.tooth.watch .shape {
  border-color: var(--watch);
  background: var(--watch-tint);
}

.odo-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 16px;
}

.odo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.odo-legend i {
  width: 14px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  display: inline-block;
}

.tl-item {
  display: grid;
  grid-template-columns: 92px 16px minmax(0,1fr) auto;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.tl-item:last-child {
  border-bottom: 0;
}

.tl-item .d {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 2px;
}

.tl-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mark);
  margin-top: 6px;
}

.tl-item.next .dot {
  background: var(--surface);
  border: 2px solid var(--acc);
}

.tl-item.done .dot {
  background: var(--ink-2);
}

.tl-item h4 {
  font-size: 14.5px;
  font-weight: 600;
}

.tl-item p {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

.tl-item .teeth {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

.step {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.step:last-child {
  border-bottom: 0;
}

.step .numc {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}

.step.done .numc {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.step.cur .numc {
  border-color: var(--acc);
  color: var(--acc);
  border-width: 2px;
}

.step h4 {
  font-size: 14.5px;
}

.step p {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

.step .price {
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.total {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.qa {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px 16px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  font-size: 13.5px;
}

.qa:last-child {
  border-bottom: 0;
}

.qa .a {
  font-weight: 600;
  text-align: right;
}

.qa .a.yes {
  color: var(--alert-ink);
}

.qa small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 400;
}

.notes .nt {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.notes .nt:last-child {
  border-bottom: 0;
}

.notes .nt p {
  font-size: 14px;
}

.notes .nt.locked p {
  color: var(--ink-4);
  font-style: italic;
}

.compose {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compose textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 14px;
  width: 100%;
  resize: vertical;
}

.studies {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 14px;
}

.study {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t);
}

.study:hover {
  border-color: var(--ink-4);
}

.study.hl {
  border-color: var(--acc);
  box-shadow: 0 0 0 2px var(--acc-tint);
}

.study .thumb {
  aspect-ratio: 16/9;
  max-width: 100%;
  background: var(--film);
  position: relative;
}

.study .thumb svg, .study .thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.study .thumb .fmt {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #0000008c;
  color: #e8e8e2;
  letter-spacing: .04em;
}

.study .meta {
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.study h4 {
  font-size: 14px;
}

.study .src {
  font-size: 12px;
  color: var(--ink-3);
}

.origin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  align-self: flex-start;
}

.origin svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.origin.clinic {
  background: var(--acc-tint);
  color: var(--acc-ink);
}

.origin.partner {
  background: var(--sunken);
  color: var(--ink-2);
}

.origin.wa {
  background: var(--wa-bubble);
  color: var(--wa);
}

.origin.up {
  background: var(--sunken);
  color: var(--ink-2);
}

.study.pending {
  border-style: dashed;
  background: var(--paper);
  cursor: default;
}

.study.pending .thumb {
  background: var(--sunken);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
  padding: 10px;
}

.drop {
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--paper);
  transition: border-color var(--t),background var(--t);
}

.drop.over {
  border-color: var(--acc);
  background: var(--acc-tint);
}

.drop svg {
  width: 26px;
  height: 26px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.5;
  flex: none;
}

.drop .txt {
  flex: 1;
  min-width: 200px;
}

.drop .txt b {
  display: block;
  font-size: 14.5px;
}

.channels {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px;
  background: var(--line-soft);
}

.channel {
  background: var(--surface);
  padding: 14px 18px;
}

.channel p {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
}

.inbox {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.25fr);
  gap: 22px;
  align-items: start;
}

.in-item {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  align-items: center;
}

.in-item:last-child {
  border-bottom: 0;
}

.in-item:hover {
  background: var(--paper);
}

.in-item[aria-current=true] {
  background: var(--acc-tint);
}

.in-item .fi {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--film);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--film-ink);
}

.in-item h4 {
  font-size: 14px;
  font-weight: 600;
}

.in-item p {
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.in-item .side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.chat {
  background: var(--wa-ground);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.bub {
  max-width: 84%;
  padding: 7px 10px 5px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.4;
  background: var(--surface);
  box-shadow: var(--shadow);
  align-self: flex-start;
}

.bub.me {
  align-self: flex-end;
  background: var(--wa-bubble);
}

.bub .ts {
  display: block;
  text-align: right;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.bub .file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 4px;
}

.bub .file i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 5px;
  border-radius: 3px;
  background: var(--alert);
  color: #fff;
}

.bub .file i.img {
  background: var(--ink-2);
}

.bub.bot {
  border-left: 3px solid var(--acc);
}

.bub .cta {
  display: block;
  text-align: center;
  border-top: 1px solid var(--line-soft);
  margin: 8px -10px -5px;
  padding: 8px;
  color: var(--wa);
  font-weight: 600;
  font-size: 13px;
}

.bub ol {
  margin: 6px 0;
  padding-left: 18px;
}

.bub li {
  margin: 2px 0;
}

.bub .who-sent {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--acc-ink);
  margin-bottom: 2px;
  letter-spacing: .02em;
}

.suggest {
  border-top: 1px solid var(--line-soft);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggest .src-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--ink-3);
}

.suggest .src-note svg {
  width: 14px;
  height: 14px;
  stroke: var(--acc);
  fill: none;
  stroke-width: 1.8;
  flex: none;
  margin-top: 2px;
}

.suggest textarea {
  border: 1px solid var(--acc);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 14px;
  width: 100%;
  resize: vertical;
  min-height: 92px;
}

.match {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
}

.match .why {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 3px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 13.5px;
  width: 100%;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  padding: 16px 18px;
}

.fields .full {
  grid-column: 1/-1;
}

.phone {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--wa-ground);
  box-shadow: var(--shadow-2);
}

.phone .ph-top {
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.phone .ph-top svg {
  width: 26px;
  height: auto;
}

.phone .ph-top b {
  font-size: 13.5px;
  display: block;
}

.phone .ph-top span {
  font-size: 11px;
  color: var(--ink-3);
}

.phone .chat {
  max-height: none;
  min-height: 360px;
}

.status-track {
  display: flex;
}

.status-track span {
  flex: 1;
  font-size: 11.5px;
  color: var(--ink-4);
  padding-top: 8px;
  border-top: 3px solid var(--line);
  margin-right: 3px;
}

.status-track span.on {
  color: var(--acc-ink);
  border-top-color: var(--acc);
  font-weight: 600;
}

.sysnote {
  align-self: center;
  font-size: 11px;
  background: var(--surface);
  color: var(--ink-3);
  padding: 3px 10px;
  border-radius: 6px;
  text-align: center;
}

.rule {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}

.rule:last-child {
  border-bottom: 0;
}

.rule h4 {
  font-size: 14.5px;
}

.rule p {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

.rule .when {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 5px;
}

.sw {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  display: inline-block;
}

.sw input {
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.sw span {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 11px;
  background: var(--line);
  transition: background var(--t);
}

.sw span:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform var(--t);
  box-shadow: 0 1px 2px #0003;
}

.sw input:checked+span {
  background: var(--acc);
}

.sw input:checked+span:after {
  transform: translate(16px);
}

.sw input:focus-visible+span {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.sw input:disabled {
  cursor: default;
}

.sw input:disabled+span {
  opacity: .55;
}

.integ {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.integ:last-child {
  border-bottom: 0;
}

.integ .lg {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--surface);
}

.integ .lg svg {
  width: 22px;
  height: 22px;
}

.integ h4 {
  font-size: 14.5px;
}

.integ p {
  font-size: 13px;
  color: var(--ink-2);
}

.chart {
  padding: 10px 18px 16px;
  position: relative;
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart .axis {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink-3);
}

.chart .grid {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.chart .b {
  fill: var(--bar);
  transition: opacity var(--t);
}

.chart .b.sat {
  fill: var(--bar-soft);
}

.chart .hit {
  fill: transparent;
  cursor: crosshair;
}

.chart .hit:hover+.b, .chart g:hover .b {
  opacity: .8;
}

.tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  padding: 6px 9px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  z-index: 3;
  transform: translate(-50%,-110%);
}

.tip b {
  font-family: var(--mono);
  font-weight: 500;
}

.hbar {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr) 110px;
  gap: 12px;
  align-items: center;
  padding: 9px 18px;
  font-size: 13.5px;
}

.hbar .track {
  height: 14px;
  background: var(--sunken);
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

.hbar .fill {
  height: 100%;
  background: var(--bar);
  border-radius: 0 4px 4px 0;
}

.cellbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.cellbar i {
  display: block;
  height: 8px;
  background: var(--bar);
  border-radius: 0 3px 3px 0;
  min-width: 2px;
}

.att {
  display: grid;
  grid-template-columns: minmax(150px,1.4fr) repeat(5,minmax(58px,1fr));
  min-width: 560px;
}

.att>div {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.att .h {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.att .c {
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: center;
}

.att .c.late {
  color: var(--watch-ink);
  background: var(--watch-tint);
}

.att .c.abs {
  color: var(--alert-ink);
  background: var(--alert-tint);
  font-family: var(--font);
  font-weight: 600;
}

.att .c.fut {
  color: var(--ink-4);
}

.act {
  display: grid;
  grid-template-columns: 110px 30px minmax(0,1fr);
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  font-size: 13.5px;
}

.act:last-child {
  border-bottom: 0;
}

.act .d {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

.scrim {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #0f0f0e61;
  z-index: 20;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px,100%);
  background: var(--surface);
  z-index: 21;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  padding-top: env(safe-area-inset-top,0px);
}

.drawer>header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer>header h3 {
  font-size: 17px;
  flex: 1;
  min-width: 0;
}

.drawer .dbody {
  overflow-y: auto;
  flex: 1;
}

.drawer .dfoot {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom,0px));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.viewer {
  background: var(--film);
  aspect-ratio: 16/10;
  max-width: 100%;
  position: relative;
}

.viewer svg, .viewer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.viewer .tools {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.viewer .tools span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  background: #0009;
  color: #e8e8e2;
}

.kv {
  display: grid;
  grid-template-columns: 140px minmax(0,1fr);
  gap: 9px 14px;
  padding: 16px 20px;
  font-size: 13.5px;
}

.kv dt {
  color: var(--ink-3);
}

.kv dd {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom,0px));
  transform: translate(-50%);
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
}

.toast svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex: none;
}

.fab {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom,0px));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 28px;
  padding: 10px 18px 10px 10px;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  font-size: 14px;
  font-weight: 600;
}

.fab .orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--acc);
  display: grid;
  place-items: center;
}

.fab .orb svg {
  width: 17px;
  height: 17px;
  stroke: var(--on-acc);
  fill: none;
  stroke-width: 2;
}

.fab small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: .7;
}

.asst {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px,100%);
  z-index: 25;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top,0px);
}

.asst>header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.asst>header .orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--acc);
  display: grid;
  place-items: center;
  flex: none;
}

.asst>header .orb svg {
  width: 16px;
  height: 16px;
  stroke: var(--on-acc);
  fill: none;
  stroke-width: 2;
}

.asst>header h3 {
  font-size: 16px;
}

.asst>header p {
  font-size: 12px;
  color: var(--ink-3);
}

.asst .log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 92%;
  font-size: 14px;
  line-height: 1.45;
}

.msg.me {
  align-self: flex-end;
  background: var(--sunken);
  padding: 8px 12px;
  border-radius: 12px 12px 2px;
}

.msg.ai {
  align-self: flex-start;
}

.msg.ai .steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.msg.ai .st {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: 8px;
  font-size: 13.5px;
  align-items: start;
  animation: fadein .25s ease both;
}

.msg.ai .st svg {
  width: 16px;
  height: 16px;
  stroke: var(--ok);
  fill: none;
  stroke-width: 2.2;
  margin-top: 2px;
}

.msg.ai .st.wait svg {
  stroke: var(--ink-4);
  animation: spin 1s linear infinite;
}

.msg.ai .card {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--raised);
}

.msg.ai .card .ch {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg.ai .card .cb {
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg.ai .card .cf {
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.msg.ai .kvs {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 4px 12px;
}

.minis {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}

.minis div {
  aspect-ratio: 16/10;
  background: var(--film);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.minis svg {
  width: 100%;
  height: 100%;
  display: block;
}

.minis span {
  position: absolute;
  left: 4px;
  bottom: 3px;
  font-size: 10px;
  color: #e8e8e2;
  background: #0000008c;
  padding: 0 4px;
  border-radius: 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 6px 11px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}

.chip:hover {
  border-color: var(--acc);
  background: var(--acc-tint);
}

.asst .composer {
  border-top: 1px solid var(--line);
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom,0px));
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.asst .composer textarea {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 18px;
  padding: 9px 14px;
  font-size: 14px;
  resize: none;
  min-height: 40px;
  max-height: 120px;
}

.mic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--acc);
  color: var(--on-acc);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.mic svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.mic.on {
  background: var(--alert);
  animation: pulse 1.2s ease-in-out infinite;
}

.send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.send svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 2;
}

.listening {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--alert-ink);
  padding: 0 4px 8px;
}

.wave {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 18px;
}

.wave i {
  width: 3px;
  background: var(--alert);
  border-radius: 2px;
  animation: wave .9s ease-in-out infinite;
}

.wave i:nth-child(2) {
  animation-delay: .1s;
}

.wave i:nth-child(3) {
  animation-delay: .2s;
}

.wave i:nth-child(4) {
  animation-delay: .3s;
}

.wave i:nth-child(5) {
  animation-delay: .4s;
}

@keyframes wave {
  0%, to {
    height: 4px;
  }
  50% {
    height: 18px;
  }
}

@keyframes pulse {
  0%, to {
    box-shadow: 0 0 color-mix(in srgb,var(--alert) 50%,transparent);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadein {
  0% {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tooth {
  cursor: pointer;
}

.tooth.ro {
  cursor: default;
}

.tooth:not(.ro):hover .shape {
  border-color: var(--ink-3);
}

.tooth.caries .shape:before {
  content: "";
  position: absolute;
  top: 28%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--alert);
}

.tooth.crown .shape {
  box-shadow: inset 0 0 0 3px var(--mark);
}

.tooth.impl .shape:after {
  content: "";
  width: 4px;
  height: 62%;
  border-radius: 1px;
  background: repeating-linear-gradient(var(--ink-2) 0 2px,transparent 2px 4px);
}

.tooth.veneer .shape:before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 12%;
  height: 3px;
  border-radius: 2px;
  background: var(--ink-2);
}

.tooth.ext .shape:before, .tooth.ext .shape:after {
  content: "";
  position: absolute;
  width: 70%;
  height: 2px;
  background: var(--alert);
  transform: rotate(45deg);
}

.tooth.ext .shape:after {
  transform: rotate(-45deg);
}

.tooth.frac .shape:before {
  content: "";
  position: absolute;
  width: 2px;
  height: 55%;
  background: var(--alert);
  transform: rotate(18deg);
}

.tooth.plan .n {
  color: var(--acc-ink);
  font-weight: 600;
}

.sym-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}

.sym {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 7px 9px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.sym:hover {
  border-color: var(--ink-4);
}

.sym[aria-pressed=true] {
  border-color: var(--acc);
  background: var(--acc-tint);
  font-weight: 600;
}

.sym .mini {
  width: 16px;
  height: 18px;
  flex: none;
  transform: scale(.9);
}

.sym .mini .shape {
  width: 16px;
  height: 18px;
  border-width: 1.5px;
  border-radius: 4px 4px 6px 6px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--acc-tint);
  color: var(--acc-ink);
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.banner.w {
  background: var(--watch-tint);
  color: var(--watch-ink);
}

.banner.a {
  background: var(--alert-tint);
  color: var(--alert-ink);
}

.banner svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex: none;
}

.banner .grow {
  flex: 1;
  min-width: 200px;
}

tr.new td {
  background: color-mix(in srgb,var(--acc-tint) 60%,transparent);
}

.docprev {
  background: #fff;
  color: #171717;
  margin: 18px;
  border: 1px solid #DCDCD4;
  box-shadow: 0 8px 24px -12px #00000059;
  padding: 26px 26px 22px;
  font-size: 12.5px;
  line-height: 1.45;
}

.docprev .lh {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #DCDCD4;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.docprev .lh svg {
  width: 30px;
  height: auto;
}

.docprev .lh b {
  letter-spacing: .2em;
  font-size: 14px;
  display: block;
}

.docprev .lh span {
  font-size: 10px;
  color: #6e7074;
  letter-spacing: .08em;
}

.docprev h4 {
  font-size: 15px;
  margin: 0 0 8px;
}

.docprev table {
  font-size: 12px;
  margin: 10px 0;
}

.docprev td, .docprev th {
  padding: 5px 4px;
  border-bottom: 1px solid #ECECE6;
  text-align: left;
}

.docprev th {
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6e7074;
}

.docprev .r {
  text-align: right;
  font-family: var(--mono);
}

.docprev .foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 18px;
  font-size: 11px;
  color: #46484b;
}

.docprev .sign {
  border-top: 1px solid #171717;
  padding-top: 4px;
  min-width: 170px;
  text-align: center;
  font-size: 11px;
}

.docprev .rp {
  font-family: Georgia,serif;
  font-size: 22px;
  font-style: italic;
  margin: 6px 0;
}

.docprev .qr {
  width: 84px;
  height: 84px;
  flex: none;
}

.warnbox {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--alert-tint);
  color: var(--alert-ink);
  font-size: 13.5px;
  border: 1px solid color-mix(in srgb,var(--alert) 35%,transparent);
}

.warnbox svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex: none;
  margin-top: 1px;
}

.okbox {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--ok-tint);
  color: var(--ok-ink);
  font-size: 13px;
}

.okbox svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex: none;
  margin-top: 2px;
}

.late {
  color: var(--alert-ink);
  font-weight: 600;
}

.v3d {
  position: relative;
  background: #121311;
  aspect-ratio: 16/11;
  max-width: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.v3d canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.v3d.measuring {
  cursor: crosshair;
}

.v3d .hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.v3d .hud button {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 3px;
  background: #0009;
  color: #e8e8e2;
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
}

.v3d .hud button[aria-pressed=true] {
  background: #596301;
  border-color: #596301;
}

.v3d .readout {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: #e8e8e2;
  background: #0009;
  padding: 4px 9px;
  border-radius: 3px;
}

.v3d .hint {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: #b9bab2;
}

.wl {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  font-size: 13.5px;
}

.wl:last-child {
  border-bottom: 0;
}

.pin {
  width: 120px;
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--r-sm);
  padding: 4px 6px;
}

.pin:hover {
  border-color: var(--line);
}

.pin:focus {
  border-color: var(--acc);
  background: var(--surface);
  outline: none;
}

tr.mod .pin {
  border-color: var(--watch);
  background: var(--watch-tint);
}

.modnote {
  display: block;
  font-size: 11px;
  color: var(--watch-ink);
  margin-top: 2px;
  white-space: nowrap;
}

.sumgrid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 8px;
}

.sumgrid .sec {
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.sumgrid .sec:first-child {
  border-top: 0;
  padding-top: 0;
}

.sumgrid .k {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 3px;
}

.origin.exo {
  background: #e6eef8;
  color: #1f4e86;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .origin.exo {
    background: #14253a;
    color: #9cc2ee;
  }
}

:root[data-theme=dark] .origin.exo {
  background: #14253a;
  color: #9cc2ee;
}

@media (max-width:1180px) {
  .grid2, .grid2.even, .inbox {
    grid-template-columns: minmax(0,1fr);
  }
  .kpis, .kpis.five {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:820px) {
  .sym-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .docprev {
    margin: 12px;
    padding: 18px;
  }
  .app {
    grid-template-columns: minmax(0,1fr);
  }
  .rail {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 14px 16px;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 6px 10px 10px;
  }
  .nav .grp, .rail-foot {
    display: none;
  }
  .nav button {
    width: auto;
    white-space: nowrap;
  }
  .topbar {
    padding: 12px 16px;
    position: static;
  }
  .search {
    width: 100%;
    order: 5;
  }
  .view {
    padding: 18px 16px 110px;
  }
  .pt-head {
    grid-template-columns: auto minmax(0,1fr);
    padding: 16px;
  }
  .pt-head .actions {
    grid-column: 1 / -1;
  }
  .alerts {
    padding: 0 16px 16px;
  }
  .channels, .fields {
    grid-template-columns: minmax(0,1fr);
  }
  .tl-item {
    grid-template-columns: 76px 12px minmax(0,1fr);
  }
  .tl-item>:last-child {
    grid-column: 3;
  }
  .kv {
    grid-template-columns: minmax(0,1fr);
    gap: 2px;
  }
  .kv dd {
    margin-bottom: 8px;
  }
  .hbar {
    grid-template-columns: 100px minmax(0,1fr) 84px;
    padding: 9px 16px;
  }
  .fab {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom,0px));
    padding: 8px;
  }
  .fab .txt {
    display: none;
  }
  .act {
    grid-template-columns: minmax(0,1fr);
    gap: 4px;
  }
  .act>span:nth-child(2) {
    display: none;
  }
}

:root, :root[data-theme=dark] {
  color-scheme: light;
  --paper: #F8F8F5;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --sunken: #F1F1EC;
  --line: #E3E3DC;
  --line-soft: #EEEEE8;
  --ink: #1B1C1A;
  --ink-2: #4A4C4F;
  --ink-3: #77797C;
  --ink-4: #ADAEAF;
  --mark: #949498;
  --acc: #596301;
  --acc-hover: #4A5200;
  --acc-tint: #F1F3E2;
  --acc-ink: #434A00;
  --on-acc: #FFFFFF;
  --ok: #2F7D4F;
  --ok-tint: #E8F4EC;
  --ok-ink: #1E5A37;
  --watch: #B8690B;
  --watch-tint: #FCF1E0;
  --watch-ink: #7A4400;
  --alert: #B42318;
  --alert-tint: #FDECEA;
  --alert-ink: #8E1A11;
  --blue: #2F6DB5;
  --blue-tint: #E7F0FA;
  --blue-ink: #1F4E86;
  --wa: #1F8F4E;
  --wa-bubble: #DCF3E3;
  --wa-ground: #F3F1EB;
  --film: #0E0F0E;
  --film-ink: #D8D9D2;
  --d1: #6B7A12;
  --d2: #3F72B5;
  --d3: #B2643A;
  --d4: #8C5A96;
  --shadow: 0 1px 2px rgba(27,28,26,.04);
  --shadow-2: 0 24px 48px -20px rgba(27,28,26,.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: light;
    --paper: #F8F8F5;
    --surface: #FFFFFF;
    --raised: #FFFFFF;
    --sunken: #F1F1EC;
    --line: #E3E3DC;
    --line-soft: #EEEEE8;
    --ink: #1B1C1A;
    --ink-2: #4A4C4F;
    --ink-3: #77797C;
    --ink-4: #ADAEAF;
    --mark: #949498;
    --acc: #596301;
    --acc-hover: #4A5200;
    --acc-tint: #F1F3E2;
    --acc-ink: #434A00;
    --on-acc: #FFFFFF;
    --ok: #2F7D4F;
    --ok-tint: #E8F4EC;
    --ok-ink: #1E5A37;
    --watch: #B8690B;
    --watch-tint: #FCF1E0;
    --watch-ink: #7A4400;
    --alert: #B42318;
    --alert-tint: #FDECEA;
    --alert-ink: #8E1A11;
    --wa: #1F8F4E;
    --wa-bubble: #DCF3E3;
    --wa-ground: #F3F1EB;
    --d1: #6B7A12;
    --d2: #3F72B5;
    --d3: #B2643A;
    --d4: #8C5A96;
    --shadow: 0 1px 2px rgba(27,28,26,.04);
    --shadow-2: 0 24px 48px -20px rgba(27,28,26,.22);
  }
}

.view {
  padding: 32px 40px 96px;
  gap: 28px;
  max-width: 1240px;
  width: 100%;
}

.panel {
  border-radius: 10px;
  border-color: var(--line);
}

.panel>header {
  padding: 18px 22px;
}

.panel>header h3 {
  font-size: 15.5px;
}

.panel .body {
  padding: 20px 22px;
}

.topbar {
  padding: 16px 40px;
  background: color-mix(in srgb,var(--paper) 92%,transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.rail {
  background: var(--surface);
}

.btn {
  border-radius: 8px;
}

.grid2, .stack {
  gap: 28px;
}

.hello h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.hello p {
  color: var(--ink-3);
  margin-top: 4px;
  font-size: 15px;
}

.next-enc {
  display: grid;
  grid-template-columns: 96px minmax(0,1fr) minmax(220px,300px);
  gap: 28px;
  padding: 26px 28px;
  align-items: center;
}

.date-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  padding: 12px 6px 10px;
  background: var(--surface);
}

.date-tile span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--acc);
}

.date-tile b {
  display: block;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.date-tile small {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
}

.next-enc h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 6px;
}

.next-enc .meta {
  color: var(--ink-2);
  margin-top: 6px;
  font-size: 14px;
}

.next-enc .desc {
  color: var(--ink-3);
  margin-top: 10px;
  font-size: 13.5px;
  max-width: 60ch;
}

.plan-box {
  background: var(--paper);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.plan-box b {
  font-size: 15px;
}

.plan-box p {
  font-size: 13px;
  color: var(--ink-3);
}

.plan-box.warn {
  background: var(--watch-tint);
}

.plan-box.warn b {
  color: var(--watch-ink);
}

.plan-box.ok {
  background: var(--ok-tint);
}

.plan-box.ok b {
  color: var(--ok-ink);
}

.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--sunken);
  overflow: hidden;
  width: 100%;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--acc);
  border-radius: 3px;
  transition: width .3s;
}

.todo {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: 14px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  position: relative;
  align-items: start;
}

.todo:last-of-type {
  border-bottom: 0;
}

.todo:hover {
  background: var(--paper);
}

.todo input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.todo .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: background var(--t),border-color var(--t);
}

.todo .tick svg {
  width: 13px;
  height: 13px;
  stroke: #fff;
  fill: none;
  stroke-width: 3;
  opacity: 0;
}

.todo input:checked+.tick {
  background: var(--acc);
  border-color: var(--acc);
}

.todo input:checked+.tick svg {
  opacity: 1;
}

.todo input:focus-visible+.tick {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.todo b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.todo span.d {
  display: block;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 2px;
}

.todo input:checked~div b {
  color: var(--ink-3);
  text-decoration: line-through;
}

.todo.static {
  cursor: default;
}

.todo.static:hover {
  background: none;
}

.todo.static .tick {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--acc);
  margin: 7px 7px 0;
}

.panel-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-3);
}

.reads {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px 22px;
}

.read {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color var(--t);
}

.read:hover {
  border-color: var(--ink-4);
}

.kind {
  width: 42px;
  height: 48px;
  border-radius: 4px 12px 4px 4px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  font-weight: 500;
  background: var(--acc-tint);
  color: var(--acc-ink);
}

.kind.video {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.kind.guia {
  background: var(--watch-tint);
  color: var(--watch-ink);
}

.kind.plantilla {
  background: var(--sunken);
  color: var(--ink-2);
}

.read h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.read p {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 3px;
}

.aviso {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.aviso:last-child {
  border-bottom: 0;
}

.aviso p {
  font-size: 14px;
}

.aviso span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}

.year-h {
  display: flex;
  align-items: baseline;
  gap: 6px 14px;
  flex-wrap: wrap;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.year-h h3 {
  font-size: 17px;
}

.enc-row {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background var(--t);
}

.enc-row:last-child {
  border-bottom: 0;
}

.enc-row:hover {
  background: var(--paper);
}

.dt-s {
  text-align: center;
}

.dt-s span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--ink-3);
}

.dt-s b {
  display: block;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.enc-row h4 {
  font-size: 15px;
  font-weight: 600;
}

.enc-row h4 em {
  font-style: normal;
  color: var(--ink-4);
  font-weight: 500;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

.enc-row p {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 2px;
}

.enc-row.done h4 {
  color: var(--ink-2);
  font-weight: 500;
}

.enc-row.done .dt-s b {
  color: var(--ink-3);
}

.enc-row.next {
  background: var(--acc-tint);
}

.enc-row.next .dt-s span {
  color: var(--acc);
}

.done-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.done-mark svg {
  width: 14px;
  height: 14px;
  stroke: var(--ok);
  fill: none;
  stroke-width: 2.4;
}

.plan-row {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.plan-row:last-child {
  border-bottom: 0;
}

.plan-row p {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 1px;
}

.av.sm {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.lib-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.lib-tools .search {
  width: 340px;
  padding: 10px 14px;
  border-radius: 10px;
}

.chipset {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fchip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-2);
}

.fchip:hover {
  border-color: var(--ink-4);
}

.fchip[aria-pressed=true] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.lib-sec {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lib-sec>header {
  display: flex;
  align-items: baseline;
  gap: 6px 12px;
  flex-wrap: wrap;
}

.lib-sec>header h3 {
  font-size: 16px;
}

.lib-sec>header span {
  font-size: 13px;
  color: var(--ink-3);
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: 14px;
}

.lib-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.lib-card h4 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.lib-card p {
  font-size: 12.5px;
  color: var(--ink-3);
}

.lib-card .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.tagk {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--acc-tint);
  color: var(--acc-ink);
}

.tagk.video {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.tagk.guia {
  background: var(--watch-tint);
  color: var(--watch-ink);
}

.tagk.plantilla {
  background: var(--sunken);
  color: var(--ink-2);
}

.lib-sec.hl {
  background: var(--acc-tint);
  border-radius: 14px;
  padding: 22px;
}

.lib-sec.hl .lib-card {
  border-color: transparent;
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr));
  gap: 16px;
}

.pin-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--pc,var(--acc));
  border-radius: 10px;
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.pin-card .ty {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pc,var(--acc));
}

.pin-card h4 {
  font-size: 16px;
  font-weight: 600;
}

.pin-card p {
  font-size: 13.5px;
  color: var(--ink-2);
}

.pin-card .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

.pin-card .foot span {
  font-size: 12px;
  color: var(--ink-3);
}

.arch {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.25fr) minmax(0,1fr);
  gap: 16px;
}

.arch .col {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.arch .col.core {
  background: var(--acc-tint);
  border-color: var(--acc);
}

.arch .col.core h4, .arch .col.core .lbl {
  color: var(--acc-ink);
}

.arch h4 {
  font-size: 17px;
}

.arch ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.road {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.road>div {
  background: var(--surface);
  padding: 16px 18px;
}

.road span {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.road b {
  display: block;
  font-size: 14px;
}

.road p {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

.road .now {
  background: var(--acc-tint);
}

body.show-core [data-core] {
  position: relative;
  outline: 2px dashed var(--acc);
  outline-offset: 3px;
}

body.show-core [data-core]:after {
  content: "Núcleo · " attr(data-core);
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--acc);
  color: var(--on-acc);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 9px;
  border-radius: 10px;
  z-index: 4;
  white-space: nowrap;
}

.core-sw {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.kiosk {
  margin: 18px 20px;
  border: 10px solid var(--ink);
  border-radius: 24px;
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kiosk h4 {
  font-size: 17px;
}

.kiosk .yn {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}

.kiosk .yn span {
  display: inline-flex;
  gap: 4px;
}

.kiosk .yn i {
  font-style: normal;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12.5px;
}

.kiosk .yn i.on {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
}

.sig {
  height: 64px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: Georgia,serif;
  font-style: italic;
  font-size: 22px;
}

.opt {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  background: var(--surface);
  width: 100%;
  align-items: start;
}

.opt[aria-pressed=true] {
  border-color: var(--acc);
  background: var(--acc-tint);
}

.opt .ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sunken);
  display: grid;
  place-items: center;
}

.opt .ic svg {
  width: 17px;
  height: 17px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 1.7;
}

.opt b {
  display: block;
  font-size: 14px;
}

.opt span {
  font-size: 12.5px;
  color: var(--ink-3);
}

.folder>header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 10px;
  font-weight: 600;
  font-size: 14px;
}

.folder>header svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.7;
}

.folder .studies {
  padding: 0 22px 20px;
  grid-template-columns: repeat(auto-fill,minmax(170px,1fr));
}

.folder+.folder {
  border-top: 1px solid var(--line-soft);
}

.cep {
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cep h2 {
  font-size: 26px;
  font-weight: 600;
}

.cep .lead {
  color: var(--ink-3);
  font-size: 14.5px;
  margin-top: 4px;
}

.cep-big {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--acc);
  color: var(--on-acc);
  border: 0;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.cep-big:hover {
  background: var(--acc-hover);
}

.cep-big svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.cep-big[disabled] {
  opacity: .55;
  cursor: default;
}

.cep-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cep-card h3 {
  font-size: 16px;
}

.cep-sec {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cep-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: -8px;
}

.cal7 {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 5px;
}

.cal7 .wd {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-3);
  text-align: center;
  padding: 4px 0;
}

.cal7 .dy {
  aspect-ratio: 1/1.05;
  border-radius: 7px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 7px;
  gap: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}

.cal7 .dy.we {
  background: var(--sunken);
  color: var(--ink-3);
}

.cal7 .dy.today {
  border-color: var(--acc);
  font-weight: 600;
}

.cal7 .dy i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.cal7 button.dy {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.cal7 button.dy:hover {
  border-color: var(--acc);
}

.cal7 .dy.off {
  background: none;
  color: var(--ink-4);
}

.cal7 .dy.sel {
  background: var(--acc);
  color: var(--on-acc);
}

.cal7 .dy.course {
  background: var(--acc-tint);
  color: var(--acc-ink);
  font-weight: 600;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-nav b {
  font-size: 15px;
  min-width: 140px;
  text-align: center;
}

.cal-nav .btn {
  padding: 4px 9px;
}

.legend3 {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-2);
}

.legend3 span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend3 i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.st-esperando {
  background: var(--watch);
}

.st-aprobado {
  background: var(--blue);
}

.st-pagado {
  background: var(--ok);
}

.st-observado {
  background: var(--alert);
}

.pill.blue {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.cep-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cep-tabs span {
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
}

.cep-tabs span i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--sunken);
  color: var(--ink-2);
}

.cep-tabs span.on {
  background: var(--ink);
  border-color: var(--ink);
}

.cep-tabs span.on i {
  background: var(--acc);
  color: var(--on-acc);
}

.cep-tabs span.ok {
  background: var(--ok-tint);
  border-color: var(--ok-tint);
}

.cep-tabs span.ok svg {
  width: 22px;
  height: 22px;
  stroke: var(--ok);
  fill: none;
  stroke-width: 2.6;
  background: none;
}

.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.fld label {
  font-size: 12.5px;
  color: var(--ink-2);
}

.fld label small {
  color: var(--ink-3);
  font-size: 11px;
}

.fld input, .fld select, .fld .fake {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 14px;
  font-size: 14.5px;
  background: var(--surface);
  width: 100%;
  color: var(--ink);
}

.fld input:focus, .fld select:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-tint);
}

.fld input[readonly] {
  background: var(--sunken);
  color: var(--ink-2);
}

.fld .fake {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.fld .fake svg {
  width: 16px;
  height: 16px;
  stroke: var(--acc);
  fill: none;
  stroke-width: 1.8;
}

.fld .fake.ph {
  color: var(--ink-4);
}

.fld.err input, .fld.err select, .fld.err .fake {
  border-color: var(--alert);
}

.fld .em {
  font-size: 12px;
  color: var(--alert-ink);
}

.pop {
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  z-index: 8;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pop .note {
  text-align: center;
}

.cep-next {
  display: flex;
  justify-content: flex-end;
}

.cep-next .btn, .cep-acts .btn.pri {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
}

.cep-acts {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cep-acts .btn {
  padding: 11px 16px;
}

.cep-del {
  align-self: center;
}

.cep-del svg {
  stroke: var(--alert);
}

.tipo {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  cursor: pointer;
}

.tipo:hover {
  border-color: var(--ink-4);
}

.tipo[aria-pressed=true] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
  font-weight: 600;
}

.radio {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: var(--surface);
  text-align: left;
  width: 100%;
  font-size: 13.5px;
}

.radio .rd {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-4);
  display: grid;
  place-items: center;
}

.radio[aria-pressed=true] {
  background: var(--acc-tint);
  border-color: var(--acc);
}

.radio[aria-pressed=true] .rd {
  border-color: var(--acc);
  background: var(--acc);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.radio .pr {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

.radio.sq .rd {
  border-radius: 4px;
}

.radio.sq[aria-pressed=true] .rd {
  box-shadow: none;
}

.radio.sq[aria-pressed=true] .rd:after {
  content: "";
  width: 9px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px,-1px);
}

.acc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.acc-h {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 15px 18px;
  background: none;
  border: 0;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.acc-h svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 2;
  transition: transform var(--t);
}

.acc-h[aria-expanded=false] svg {
  transform: rotate(-90deg);
}

.acc-h .cnt {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--ink-3);
}

.acc-h .cnt.on {
  background: var(--acc);
  color: var(--on-acc);
}

.acc-card.sel .acc-h {
  background: var(--acc-tint);
}

.acc-b {
  padding: 4px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
}

.brands {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.bchip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bchip[aria-pressed=true] {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
  font-weight: 600;
}

.bchip i {
  font-style: normal;
  font-size: 10.5px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--acc-ink);
  display: grid;
  place-items: center;
}

.irow {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
}

.irow.on {
  border-color: var(--acc);
  background: var(--acc-tint);
}

.irow .pr {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

.stp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stp button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-2);
}

.stp button.plus.on {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
}

.stp span {
  width: 38px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface);
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.prod {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  background: var(--surface);
}

.prod.on {
  border-color: var(--acc);
  background: var(--acc-tint);
}

.prod .im {
  height: 110px;
  border-radius: 7px;
  background: var(--paper);
  display: grid;
  place-items: center;
}

.prod .im svg {
  width: 60%;
  height: 80%;
}

.prod .nm {
  font-size: 12.5px;
  line-height: 1.3;
  min-height: 2.6em;
}

.prod .pr {
  font-family: var(--mono);
  font-size: 13.5px;
  text-align: center;
  font-weight: 500;
}

.prod .stp {
  justify-content: center;
}

.guide-q {
  background: var(--paper);
  border-radius: 9px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -2px 0 4px 18px;
}

.guide-q .lbl {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.cep-info {
  background: var(--watch-tint);
  color: var(--watch-ink);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
}

.cep-info b {
  font-weight: 600;
}

.extra-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 120px auto;
  gap: 8px;
}

.extra-row input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13.5px;
  min-width: 0;
}

.cep-bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -10px 24px -16px #00000040;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cep-bar .row1 {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cep-bar .tot {
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  padding: 0;
  margin-right: auto;
}

.cep-bar .tot span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ink-3);
}

.cep-bar .tot span svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  transform: rotate(180deg);
}

.cep-bar .tot b {
  display: block;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cep-bar .tot small {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}

.cep-bar .cep-send {
  background: var(--acc);
  color: var(--on-acc);
  border: 0;
  border-radius: 9px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}

.cep-bar .cep-send[disabled] {
  opacity: .5;
  cursor: default;
}

.cep-bar .brk {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 4px 16px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
  max-height: 220px;
  overflow: auto;
}

.cep-bar .brk span:nth-child(2n) {
  font-family: var(--mono);
  text-align: right;
}

.med-head {
  background: var(--watch-tint);
  border-radius: 12px;
  padding: 16px 18px;
}

.med-head h3 {
  color: var(--watch-ink);
  font-size: 17px;
}

.med-head p {
  color: var(--watch-ink);
  font-size: 13px;
  margin-top: 4px;
}

.med-line .top {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 12px;
  align-items: center;
}

.med-line .top .im {
  width: 36px;
  height: 44px;
  border-radius: 6px;
  background: var(--paper);
  display: grid;
  place-items: center;
}

.med-line .top .im svg {
  width: 70%;
  height: 85%;
}

.med-line .top b {
  font-size: 14.5px;
}

.med-line .top p {
  font-size: 12.5px;
  color: var(--ink-3);
}

.zoom {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.zoom button {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 15px;
  width: 22px;
  color: var(--ink-2);
}

.med-wrap {
  overflow-x: auto;
}

.med {
  border-collapse: separate;
  border-spacing: 5px;
  width: auto;
  --z: 1;
}

.med th {
  font-family: var(--mono);
  font-size: calc(11px * var(--z));
  color: var(--ink-3);
  font-weight: 500;
  padding: 2px 4px;
  text-align: center;
  white-space: nowrap;
}

.med td button, .med td .on {
  width: calc(64px * var(--z));
  height: calc(36px * var(--z));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  color: var(--ink-3);
  font-size: calc(15px * var(--z));
}

.med td .on {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  border-color: var(--acc);
  background: var(--acc-tint);
  color: var(--acc-ink);
  font-family: var(--mono);
  font-size: calc(13px * var(--z));
  cursor: default;
}

.med td .on button {
  width: auto;
  height: auto;
  border: 0;
  background: none;
  color: var(--acc-ink);
  padding: 0 4px;
  font-size: calc(15px * var(--z));
}

.cep-ok {
  text-align: center;
  align-items: center;
  padding: 36px 24px;
}

.cep-ok .ck {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ok-tint);
  display: grid;
  place-items: center;
}

.cep-ok .ck svg {
  width: 30px;
  height: 30px;
  stroke: var(--ok);
  fill: none;
  stroke-width: 2.6;
}

.cep-ok h3 {
  font-size: 20px;
}

.cep-ok p {
  color: var(--ink-3);
}

.cir-list .cr {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.cir-list .cr:last-child {
  border-bottom: 0;
}

.cir-list .cr:hover {
  background: var(--paper);
}

.cir-list .cr h4 {
  font-size: 14.5px;
  font-weight: 600;
}

.cir-list .cr p {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 1px;
}

.sumk {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr);
  gap: 8px 16px;
  padding: 18px 22px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-soft);
}

.sumk dt {
  color: var(--ink-3);
}

.sumk dd {
  margin: 0;
}

.sumk h4 {
  grid-column: 1/-1;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

@media (max-width:820px) {
  .view {
    padding: 22px 16px 110px;
    gap: 22px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .next-enc {
    grid-template-columns: 72px minmax(0,1fr);
    padding: 20px;
    gap: 18px;
  }
  .next-enc .plan-box {
    grid-column: 1/-1;
  }
  .date-tile b {
    font-size: 30px;
  }
  .arch, .road {
    grid-template-columns: minmax(0,1fr);
  }
  .enc-row {
    grid-template-columns: 48px minmax(0,1fr);
    gap: 14px;
  }
  .enc-row>:last-child {
    grid-column: 2;
  }
  .plan-row {
    grid-template-columns: 32px minmax(0,1fr);
  }
  .plan-row>:last-child {
    grid-column: 2;
    justify-self: start;
  }
  .lib-tools .search {
    width: 100%;
  }
  .sumk {
    grid-template-columns: minmax(0,1fr);
    gap: 2px;
  }
  .sumk dd {
    margin-bottom: 8px;
  }
  .extra-row {
    grid-template-columns: minmax(0,1fr) 96px;
  }
  .extra-row>:last-child {
    grid-column: 1/-1;
  }
}

.av.ph {
  background-size: cover;
  background-position: center;
}

.av.xs {
  width: 28px;
  height: 28px;
  font-size: 10.5px;
}

.av.xl {
  width: 84px;
  height: 84px;
  font-size: 26px;
}

.prof-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px 4px;
}

.banner-card {
  overflow: hidden;
}

.banner-card .banner {
  border-bottom: 0;
  padding: 14px 20px;
}

.frow {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.frow:last-child {
  border-bottom: 0;
}

.fi-k {
  height: 30px;
  border-radius: 6px;
  background: var(--film);
  color: var(--film-ink);
  font-family: var(--mono);
  font-size: 10px;
  display: grid;
  place-items: center;
}

.ic-inl {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  vertical-align: -1px;
  margin-right: 4px;
}

.study .thumb .v3 {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--acc);
  color: var(--on-acc);
}

.mail {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.mail-h {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-2);
}

.mail-h b {
  color: var(--ink-3);
  font-weight: 600;
  margin-right: 6px;
}

.mail-b {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

.mail-btn {
  align-self: flex-start;
  background: var(--acc);
  color: var(--on-acc);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13.5px;
}

.pd-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: -4px;
}

.pd-quick .note {
  margin-left: 4px;
}

.fld textarea {
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14.5px;
  background: var(--surface);
  width: 100%;
  color: var(--ink);
  resize: vertical;
}

.grp-list {
  display: flex;
  flex-direction: column;
}

.grp-i {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 22px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.grp-i:last-child {
  border-bottom: 0;
}

.grp-i:hover {
  background: var(--paper);
}

.grp-i[aria-pressed=true] {
  background: var(--acc-tint);
}

.grp-i .av {
  font-family: var(--mono);
}

.grp-i .av svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 1.7;
}

.grp-i b {
  display: block;
  font-size: 14px;
}

.grp-i span span {
  font-size: 12.5px;
  color: var(--ink-3);
}

.gr-pick {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px 14px;
  padding: 0 22px 20px;
}

.rule .lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.rule .lead select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12.5px;
  background: var(--surface);
}

.radio[disabled] {
  cursor: default;
}

body.vw-open {
  overflow: hidden;
}

.vw {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  background: #111210;
  color: #e8e8e2;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  color-scheme: dark;
  --line: #2E302B;
  --line-soft: #242621;
  --surface: #1F201D;
  --sunken: #0B0C0B;
  --paper: #191A18;
  --ink: #EDEDE8;
  --ink-2: #BDBEB8;
  --ink-3: #8D8F89;
  --ink-4: #62645F;
  --acc: #B7C26A;
  --acc-tint: #262A12;
  --acc-ink: #D3DB96;
  --on-acc: #171A06;
}

.vw-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  padding-top: calc(12px + env(safe-area-inset-top,0px));
}

.vw-t b {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.vw-t span {
  font-size: 12.5px;
  color: var(--ink-3);
}

.vw .spacer {
  flex: 1;
}

.vw .btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.vw .btn:hover {
  background: #2a2b27;
}

.vw .btn.ghost {
  background: none;
  border-color: transparent;
  color: var(--ink-2);
}

.vw .btn[aria-pressed=true] {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
}

.vw-body {
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  min-height: 0;
}

.vw-side {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 6px 0 16px;
}

.vw-sec {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
}

.vw-sec .lbl {
  color: var(--ink-3);
}

.vw-seg {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.vw-seg button {
  border: 0;
  background: none;
  color: var(--ink-2);
  padding: 6px 10px;
  font-size: 12.5px;
  cursor: pointer;
}

.vw-seg button:hover {
  background: #2a2b27;
}

.vw-seg button[aria-pressed=true] {
  background: var(--acc);
  color: var(--on-acc);
  font-weight: 600;
}

.vw-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.vw-chk input {
  accent-color: var(--acc);
}

.vw-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vw-out {
  font-size: 12.5px;
  color: var(--acc-ink);
  white-space: pre-line;
}

.vw-kv {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 16px;
  font-size: 12.5px;
  margin: 0;
}

.vw-kv dt {
  color: var(--ink-3);
}

.vw-kv dd {
  margin: 0;
  font-family: var(--mono);
  text-align: right;
}

.vw-rng {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) 44px;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  width: 100%;
  color: var(--ink-2);
}

.vw-rng input {
  accent-color: var(--acc);
  width: 100%;
}

.vw-rng span {
  text-align: right;
  font-size: 11.5px;
}

.vw-help {
  padding: 14px 18px;
  font-size: 12px;
  color: var(--ink-3);
}

.vw-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.vw-stage>canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.vw-load {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 14px;
}

.vw-foot {
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom,0px));
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-4);
}

.mpr {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  grid-template-rows: repeat(2,minmax(0,1fr));
  gap: 2px;
  background: #000;
}

.mpr-pane {
  position: relative;
  background: #0b0c0b;
  min-width: 0;
  min-height: 0;
}

.mpr-pane[data-view=axial] {
  grid-row: 1 / 3;
}

.mpr-pane canvas {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.mpr.measuring canvas {
  cursor: copy;
}

.mpr-lbl {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #b9bab2;
  pointer-events: none;
}

.mpr-sl {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 11px;
  color: #8d8f89;
  pointer-events: none;
}

.mpr-max {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  background: #0009;
  color: #e8e8e2;
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
}

.mpr[data-max]:not([data-max=""]) {
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: minmax(0,1fr);
}

.mpr[data-max]:not([data-max=""]) .mpr-pane {
  display: none;
  grid-row: auto;
}

.mpr[data-max=axial] .mpr-pane[data-view=axial], .mpr[data-max=coronal] .mpr-pane[data-view=coronal], .mpr[data-max=sagital] .mpr-pane[data-view=sagital] {
  display: block;
}

@media (max-width:820px) {
  .vw-body {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: minmax(0,1fr) auto;
  }
  .vw-side {
    order: 2;
    border-right: 0;
    border-top: 1px solid var(--line);
    max-height: 38vh;
  }
  .mpr {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: repeat(3,minmax(0,1fr));
  }
  .mpr-pane[data-view=axial] {
    grid-row: auto;
  }
  .gr-pick {
    grid-template-columns: minmax(0,1fr);
  }
  .prof-head {
    padding: 18px 16px 4px;
  }
}

.asst .as-ta {
  width: 100%;
  border: 1px solid var(--acc);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  background: var(--surface);
  resize: vertical;
  line-height: 1.45;
}

.asst .card .field {
  gap: 4px;
}

.asst .card .field select {
  width: 100%;
  text-align: left;
}

.asst .card a {
  color: var(--acc-ink);
}

.asst .card .read {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  margin: 0 -12px;
}

.asst .card .read:last-child {
  border-bottom: 0;
}

.asst .minis div img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asst .sumgrid {
  margin-top: 4px;
}

.asst .chips {
  margin-top: 10px;
}

body.vw-open .fab {
  display: none;
}

@media (max-width:820px) {
  .fab {
    right: 16px;
    bottom: 16px;
  }
  .fab>span:last-child {
    display: none;
  }
  .fab {
    padding: 8px;
  }
}
