/* Backed's own parts, in Optic's tokens (app.css is Optic's stylesheet as it is). Colour stays for up / down only:
 * ranks read by fill (the top two filled white, the middle outlined, the start plain). */
.tag.rk.lv1 { color: var(--mut); }
.tag.rk.lv2 { color: var(--ink2); }
.tag.rk.lv3 { color: var(--ink); border-color: var(--ink2); }
.tag.rk.lv4 { color: var(--ink); border-color: var(--ink); }
.tag.rk.lv5 { background: var(--ink2); color: #000; border-color: var(--ink2); }
.tag.rk.lv6 { background: var(--ink); color: #000; border-color: var(--ink); }
.tag.rk.out { color: var(--down); border-color: rgba(239, 68, 68, .5); }
.tag.cnt { color: var(--up); border-color: rgba(34, 197, 94, .4); }
.tag.dmp { color: var(--down); border-color: rgba(239, 68, 68, .45); }
.tag.dem { color: var(--dim); border-style: dashed; }

.cn { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cn b { color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.cn small { font-size: 11px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn:hover b { text-decoration: underline; text-underline-offset: 3px; }
.st-open { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.ut td small { font-size: 11px; }
.ut td .tag { vertical-align: 1px; }

.nums .v.sm { font-size: 17px; }
.nums.guards .s, .nums.wrap2 .s { white-space: normal; }
.nums.guards > div { padding-bottom: 18px; }
.nums .s b { color: var(--ink2); font-weight: 600; }
.rail .st p b { color: var(--ink2); font-weight: 600; }
p.note { margin: 14px 0 0; font-size: 12.5px; color: var(--mut); line-height: 1.6; }
p.note b { color: var(--ink2); font-weight: 600; }
.ladder td { height: 50px; }
.ladder .up-need { color: var(--mut); white-space: normal; }
.ladder .up-need b { color: var(--ink2); font-weight: 600; }

/* a dev's page: the head, the climb */
.dhd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 30px 0 22px; }
.dhd .id { display: flex; gap: 18px; align-items: center; min-width: 0; }
.dhd .lg { width: 72px; height: 72px; border: 1px solid var(--line2); background: var(--s3); display: grid; place-items: center; flex: 0 0 auto; }
.dhd .lg span { font: 700 28px/1 var(--mono); color: var(--mut); }
.dhd .t1 { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.dhd .nm { font-size: 26px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhd .sub2 { font-size: 12.5px; color: var(--mut); }
.dhd .t2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.climb { min-width: 420px; border: 1px solid var(--line2); padding: 16px 20px 15px; }
.climb .k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); display: flex; justify-content: space-between; gap: 12px; }
.climb .k b { color: var(--ink); font-weight: 600; letter-spacing: .06em; }
.climb .v { margin-top: 8px; font: 700 28px/1 var(--pix); letter-spacing: .03em; text-transform: uppercase; }
.climb .s { margin-top: 8px; font-size: 12px; color: var(--ink2); }
.climb.top { background: var(--ink); color: #000; border-color: var(--ink); }
.climb.top .k, .climb.top .s, .climb.top .k b { color: #333; }
.climb.bad .v { color: var(--down); }
.bars { display: grid; gap: 9px; margin-top: 14px; }
.bars .b { display: grid; grid-template-columns: 92px minmax(0, 1fr) 96px; gap: 10px; align-items: center; font-size: 11.5px; color: var(--mut); }
.bars .b i { display: block; height: 4px; background: var(--s3); position: relative; }
.bars .b i em { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.bars .b i em.neg { background: var(--down); }
.bars .b span:last-child { text-align: right; color: var(--ink2); }
.climb.top .bars .b, .climb.top .bars .b span:last-child { color: #333; }

/* apply */
.apply { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; align-items: start; }
.apply .term { width: 100%; margin: 0; }
.apply .term + .term { margin-top: 12px; }
.apply .go.wide2 { height: 28px; }
.ares { margin-top: 20px; }
.ares .verdict { border: 1px solid var(--line2); padding: 18px 20px; }
.ares .verdict.ok { border-color: var(--ink); }
.ares .verdict .k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.ares .verdict .v { margin-top: 8px; font: 700 24px/1.1 var(--pix); letter-spacing: .03em; text-transform: uppercase; }
.ares .verdict .s { margin-top: 10px; font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.ares .verdict .s b { color: var(--ink); }
.ares .verdict.ok .v { color: var(--up); }
.ares .err { margin-top: 12px; font-size: 12.5px; color: var(--down); }
.checks { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.checks li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.checks li:last-child { border-bottom: 0; }
.checks li::before { counter-increment: c; content: counter(c, decimal-leading-zero); font-size: 10px; font-weight: 700; height: 17px; line-height: 17px; text-align: center; background: var(--s3); color: var(--ink2); margin-top: 2px; }
.checks li.done::before { background: var(--ink); color: #000; content: "✓"; }
.checks li b { color: var(--ink); font-weight: 600; }

/* rules page */
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.flow > div { background: var(--bg); padding: 16px 18px; position: relative; }
.flow > div:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); background: #000; color: var(--dim); font-size: 12px; z-index: 1; padding: 0 2px; }
.flow .k { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--mut); }
.flow .v { margin-top: 7px; font-size: 15px; font-weight: 700; }
.flow .s { margin-top: 4px; font-size: 11.5px; color: var(--mut); line-height: 1.5; }

.demo-note { margin: 0 0 14px; padding: 9px 14px; border: 1px dashed var(--line2); font-size: 12px; color: var(--mut); }
.demo-note b { color: var(--ink2); }

@media (max-width: 1100px) {
  .dhd { grid-template-columns: 1fr; }
  .climb { min-width: 0; }
  .apply, .rgrid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow > div::after { display: none; }
  #tape, #tbl, .wtb { min-width: 900px; }
}
@media (max-width: 640px) {
  .dhd .nm { font-size: 20px; }
  .bars .b { grid-template-columns: 80px minmax(0, 1fr) 80px; }
}
