/* Deed: one registry application window. Every surface is a raster from art/ui.py nine-sliced by border-image. */

:root {
  --ink: #1a1412;
  --ink-soft: #4a3a30;
  --paper: #f1e9d6;
  --paper-d: #e2d7be;
  --face: #c9c1b2;
  --wax: #7a1a14;
  --wax-l: #b03a26;
  --brass: #e2bc66;
  --brass-d: #825e22;
  --sel: #fff6c4;
  --ok: #2d6b3a;
  --bad: #9b1c1c;
  --ui: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --num: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --title: "Crimson Pro", Georgia, serif;
  --scene-w: 418;
  --scene-h: 235;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: #2a1d16 url("/ui/office.png") center / cover no-repeat fixed;
  image-rendering: pixelated;
  color: var(--ink);
  font: 17px/1.45 var(--ui);
}
a, button, select, input[type="checkbox"], input[type="radio"], label.file { cursor: pointer; }
img, canvas { image-rendering: pixelated; }

/* ---- the application window ---- */
.app {
  min-height: 100vh; display: flex; flex-direction: column;
  border: 4px solid transparent; border-image: url("/ui/win.png") 4 stretch;
}
.titlebar {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 6px;
  background: url("/ui/titlebar.png") 0 0 / 100% 100%;
  color: #fbf0d8; text-shadow: 1px 1px 0 #3b0c08;
}
.titlebar img { width: 24px; height: 24px; }
.titlebar h1 { margin: 0; font: 700 24px/1 var(--title); letter-spacing: .5px; }
.titlebar .sub { font-size: 15px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar .help { margin-left: auto; }

.toolbar { display: flex; gap: 4px; padding: 5px 6px; background: url("/ui/paper.png"); border-bottom: 2px solid #8a7e6a; flex-wrap: wrap; }
.tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 84px; height: 62px; padding: 4px 10px; color: var(--ink); text-decoration: none; font: 600 15px/1 var(--ui);
  border: 3px solid transparent; border-image: url("/ui/btn.png") 3 fill stretch; background: none;
}
.tool { position: relative; white-space: nowrap; box-sizing: border-box; height: 66px !important; gap: 4px !important; }
.tool img { width: 32px; height: 32px; flex: none; object-fit: contain; }
.tool span { display: block; line-height: 1.3; padding-bottom: 1px; }
/* a signed-in wallet: a small green lamp in the key button's corner, the label never changes */
.tool.signed::after { content: ""; position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; background: var(--ok); box-shadow: 0 0 0 1px var(--ink); }
.tool:active, .tool[aria-current="page"] { border-image-source: url("/ui/btn_down.png"); }

.tool:active img { transform: translate(1px, 1px); }
.tool.plain { border-image: none; }
.tool:focus-visible, .btn:focus-visible, .hot:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, th button:focus-visible {
  outline: 2px dashed var(--wax); outline-offset: 2px;
}

main { flex: 1; position: relative; display: flex; flex-direction: column; }
main > * { flex: 1; }
.pane-wrap { padding: 20px; display: grid; grid-template-columns: minmax(0, 1180px); justify-content: center; align-content: start; min-height: 100%; background: rgba(28, 18, 12, .5); backdrop-filter: blur(7px); }

/* ---- generic surfaces ---- */
.win { border: 4px solid transparent; border-image: url("/ui/win.png") 4 fill stretch; background: var(--face); width: min(1180px, 100%); }
.win > .bar { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 8px; background: url("/ui/titlebar.png") 0 0 / 100% 100%; color: #fbf0d8; font-size: 16px; font-weight: 600; text-shadow: 1px 1px 0 #3b0c08; }
.win > .body { padding: 14px; background: url("/ui/paper.png"); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 4px 16px;
  font: 600 16px/1.1 var(--ui); color: var(--ink); text-decoration: none; background: none;
  border: 3px solid transparent; border-image: url("/ui/btn.png") 3 fill stretch;
}
.btn { white-space: nowrap; flex: none; }
.tabs { flex-wrap: wrap; }
#wallet-list .btn { justify-content: flex-start; }
.btn:active:not(:disabled) { border-image-source: url("/ui/btn_down.png"); padding: 5px 15px 3px 17px; }
.btn.wax { color: #fbf0d8; border-width: 5px; border-image: url("/ui/btn_wax.png") 5 fill stretch; text-shadow: 1px 1px 0 #3b0c08; }
.btn.wax:active:not(:disabled) { border-image-source: url("/ui/btn_wax_down.png"); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .62; }
.btn[aria-disabled="true"] { pointer-events: none; }
.btn img { width: 20px; height: 20px; }
.btn img.mark { filter: none; }
input[type="text"], input[type="number"], textarea, select {
  font: 16px/1.3 var(--num); color: var(--ink); padding: 8px 10px; width: 100%;
  border: 3px solid transparent; border-image: url("/ui/field.png") 3 fill stretch; background: none;
}
textarea { resize: vertical; min-height: 64px; font-family: var(--ui); }
label { display: block; font-size: 16px; font-weight: 600; color: var(--ink-soft); margin: 12px 0 5px; }
.num { font-family: var(--num); }
.muted { color: var(--ink-soft); }
.err { color: var(--bad); }
.okc { color: var(--ok); }
.note { font-size: 15px; color: var(--ink-soft); }
.well { border: 3px solid transparent; border-image: url("/ui/well.png") 3 fill stretch; padding: 8px 10px; }
h2 { font: 700 30px/1.1 var(--title); margin: 0 0 12px; }
h3 { font: 700 22px/1.1 var(--title); margin: 18px 0 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); padding: 10px 14px; background: var(--face); border: 4px solid transparent; border-image: url("/ui/win.png") 4 fill stretch; font-size: 15px; }
.toast[hidden] { display: none; }

/* ---- the office scene ---- */
.office { padding: 0; background: rgba(20, 12, 8, .5); backdrop-filter: blur(6px); min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.scene { position: relative; width: min(100%, calc((100vh - 116px) * 418 / 235)); aspect-ratio: 418 / 235; background: url("/ui/office.png") 0 0 / 100% 100%; overflow: hidden; container-type: inline-size; }
.scene > * { position: absolute; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the clickable objects are cut-outs of the same pixels: at rest invisible, on hover they lift and glow along their outline */
.obj { display: block; padding: 0; margin: 0; border: 0; background: none; transform-origin: 50% 100%; transition: transform .22s cubic-bezier(.2, .8, .3, 1.2), filter .22s ease; z-index: 1; }
.obj img { display: block; width: 100%; height: 100%; }
.obj:hover, .obj:focus-visible { z-index: 3; outline: none; transform: scale(1.045);
  filter: brightness(1.1) drop-shadow(0 0 1px #fff6d8) drop-shadow(0 0 3px #ffd98a) drop-shadow(0 0 9px rgba(255, 186, 84, .8)); }
.o-shelf { left: 0; top: 0; width: calc(118 / 418 * 100%); height: calc(188 / 235 * 100%); transform-origin: 0 100%; }
.o-window { left: calc(144 / 418 * 100%); top: calc(14 / 235 * 100%); width: calc(133 / 418 * 100%); height: calc(108 / 235 * 100%); }
.o-press { left: calc(305 / 418 * 100%); top: calc(83 / 235 * 100%); width: calc(105 / 418 * 100%); height: calc(124 / 235 * 100%); }
.obj .tag {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); white-space: nowrap; pointer-events: none;
  font: 600 clamp(12px, 1.05cqw, 17px)/1 var(--ui); color: #fbf0d8; background: rgba(24, 16, 12, .9); padding: .5em .9em;
  border: 1px solid #c79a48; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .18s ease;
}
.o-press .tag, .o-window .tag { top: auto; bottom: 100%; transform: translate(-50%, -6px); }
.o-shelf .tag { left: 58%; }
.obj:hover .tag, .obj:focus-visible .tag { opacity: 1; }
/* the paper sign hangs inside the clerk's window and moves with it */
.o-window .sign {
  position: absolute; left: calc(26 / 133 * 100%); top: calc(20 / 108 * 100%); width: calc(80 / 133 * 100%);
  padding: .55em .7em .6em; background: url("/ui/paper.png"); border: 1px solid #6b5436; box-shadow: 0 3px 0 rgba(20, 10, 6, .45);
  font: 600 clamp(11px, 1.05cqw, 19px)/1.3 var(--ui); color: var(--ink); text-align: center;
}
.sign b { font: 700 clamp(14px, 1.5cqw, 26px)/1.05 var(--title); display: block; margin-bottom: .2em; color: var(--wax); }
.sign .stats { margin-top: .35em; font: 400 clamp(10px, .85cqw, 15px)/1.35 var(--num); color: var(--ink-soft); }

/* the press dialog: the deed slides up out of the press and prints at a readable size */
#press { border: 0; padding: 0; background: none; max-width: none; max-height: none; width: 100%; height: 100%; }
#press::backdrop { background: rgba(14, 9, 6, .72); backdrop-filter: blur(4px); }
.press-card { position: fixed; inset: 0; margin: auto; width: min(980px, 94vw); height: fit-content; max-height: 94vh; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px; align-items: center; padding: 28px; }
.press-sheet { width: min(480px, calc(84vh * .75), 72vw); aspect-ratio: 96 / 128; filter: drop-shadow(6px 8px 0 rgba(0, 0, 0, .45)); }
.press-sheet canvas { width: 100%; height: 100%; display: block; }
#press.out .press-sheet { animation: fromPress .7s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes fromPress { from { transform: translate(40vw, 30vh) scale(.25) rotate(8deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
.press-info { color: #fbf0d8; max-width: 420px; }
.press-info .kicker { font: 600 15px/1 var(--num); color: #e2bc66; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.press-info h2 { font: 700 44px/1 var(--title); color: #fff7e6; margin: 0 0 6px; }
.press-info .muted { color: #d8c8a8; font-size: 18px; margin: 0 0 18px; }
.facts2 { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 22px; font-size: 17px; }
.facts2 dt { color: #cdb892; }
.facts2 dd { margin: 0; color: #fff7e6; }
@media (max-width: 760px) {
  .press-card { grid-template-columns: 1fr; justify-items: center; gap: 16px; padding: 20px 16px; overflow-y: auto; }
  .press-info .row { justify-content: center; }
  .press-sheet { width: min(280px, 64vw, calc(46vh * .75)); }
  .press-info { text-align: center; }
  .facts2 { justify-content: center; text-align: left; }
  .press-info h2 { font-size: 34px; }
}

/* the $DEED plaque screwed to the counter: a generated brass plate, nine-sliced on its screws, engraved lettering */
.plate {
  left: calc(146 / 418 * 100%); top: calc(125 / 235 * 100%); width: calc(132 / 418 * 100%); z-index: 2;
  border: 1.9cqw solid transparent; border-image: url("/ui/plaque.png") 64 72 fill stretch;
  padding: .1cqw .5cqw .25cqw; display: grid; gap: .45cqw; justify-items: center; text-align: center;
  filter: drop-shadow(0 .25cqw .3cqw rgba(20, 10, 4, .6));
}
.plate, .plate .bbtn { color: #3b2605; text-shadow: 0 1px 0 rgba(255, 238, 180, .55), 0 -1px 0 rgba(90, 58, 10, .35); }
.plate-head { display: flex; align-items: baseline; gap: .7cqw; }
.plate-head strong { font: 700 2.25cqw/1 var(--title); letter-spacing: .04em; }
.plate-head span { font: 600 .95cqw/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.plate .ca { font: 600 .98cqw/1.25 var(--num); word-break: break-all; user-select: all; max-width: 100%; }
.plate .ca.none { font: 600 1cqw/1.2 var(--ui); font-style: italic; opacity: .8; word-break: normal; }
.plate .links { display: flex; gap: .5cqw; justify-content: center; }
.bbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em; white-space: nowrap;
  min-height: 2.7cqw; padding: 0 .9em; font: 700 1.05cqw/1 var(--ui); text-decoration: none; background: none;
  border: .55cqw solid transparent; border-image: url("/ui/brassbtn.png") 34 fill stretch; cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.bbtn img { width: 1.25cqw; height: 1.25cqw; }
.bbtn.icon { padding: 0 .55em; }
.bbtn:hover:not([aria-disabled="true"]):not(:disabled) { filter: brightness(1.12); }
.bbtn:active:not([aria-disabled="true"]):not(:disabled) { transform: translateY(1px) scale(.98); filter: brightness(.95); }
.bbtn:disabled, .bbtn[aria-disabled="true"] { cursor: default; filter: saturate(.55) brightness(.92); opacity: .78; }
.bbtn:focus-visible { outline: 2px solid #fff3c4; outline-offset: 2px; }

/* phones: the scene stays a picture, the sign and the plate step out under it at a readable size */
@media (max-width: 760px) {
  .titlebar .sub { display: none; }
  .toolbar { flex-wrap: nowrap; gap: 3px; padding: 4px; }
  .tool { min-width: 0; flex: 1 1 0; height: 56px; padding: 3px 2px; font-size: 12px; }
  .tool img { width: 26px; height: 26px; }
  .scene .sign, .scene .plate { display: none; }
  .under { display: grid; gap: 12px; padding: 12px; background: url("/ui/paper.png"); }
  .under { container-type: inline-size; width: 100%; align-self: stretch; box-sizing: border-box; }
  .under .sign { background: url("/ui/paper.png"); border: 1px solid #6b5436; box-shadow: 0 3px 0 rgba(20, 10, 6, .35); padding: 12px 14px; text-align: center; font: 600 17px/1.35 var(--ui); }
  .under .sign, .under .plate { position: static; width: auto; font-size: 17px; }
  .under .plate { border-width: 5cqw; gap: 2cqw; padding: 0 2cqw 1cqw; }
  .under .plate-head strong { font-size: 8.5cqw; }
  .under .plate-head { flex-direction: column; align-items: center; gap: 1cqw; }
  .under .plate-head span { font-size: 3.6cqw; }
  .under .plate .ca, .under .plate .ca.none { font-size: 4cqw; }
  .under .bbtn { font-size: 4.5cqw; min-height: 12cqw; border-width: 2.2cqw; }
  .under .bbtn img { width: 4.4cqw; height: 4.4cqw; }
  .under .sign b { font-size: 26px; }
  .under .sign .stats { font-size: 15px; }

  .grid2 { grid-template-columns: 1fr; }
  .pane-wrap { padding: 8px; }
  .office { justify-content: flex-start; }
  table.grid th:nth-child(4), table.grid td:nth-child(4), table.grid th:nth-child(5), table.grid td:nth-child(5),
  table.grid th:nth-child(6), table.grid td:nth-child(6), table.grid th:nth-child(11), table.grid td:nth-child(11),
  table.grid th:nth-child(1), table.grid td:nth-child(1) { display: none; }
  table.grid th, table.grid td { padding: 8px 6px; font-size: 15px; }
  table.grid td img.thumb { width: 36px; height: 48px; }
  .win > .body { padding: 10px; }
  table.grid td.l { white-space: normal; }
  table.grid td .coin small { word-break: break-word; }
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; }
  .facts th { padding: 8px 0 0; }
  .facts td { padding: 2px 0 4px; }
}
@media (min-width: 761px) { .under { display: none; } }

/* ---- market: the reference's grid ---- */
.tablewrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 16px; background: #fffdf2; }
table.grid th, table.grid td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid #d9cfb8; }
table.grid th { background: var(--face); font-weight: 600; font-size: 15px; position: sticky; top: 0; border-bottom: 2px solid #8a7e6a; }
table.grid th button { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
table.grid td.l, table.grid th.l { text-align: left; }
table.grid tr.row-link:hover td, table.grid tr.row-link:focus-within td { background: var(--sel); }
table.grid td img.thumb { width: 48px; height: 64px; flex: none; display: block; background: #e8dcc0; }
table.grid td .coin { display: flex; align-items: center; gap: 8px; }
table.grid td .coin a { color: var(--ink); text-decoration: none; }
table.grid td .coin a { font-weight: 600; }
table.grid td .coin small { display: block; color: var(--ink-soft); font-size: 14px; font-weight: 400; }
.tier { font: 600 14px/1.2 var(--ui); padding: 2px 8px; border: 1px solid currentColor; }
.tier-0 { color: #5b4a3a; } .tier-1 { color: #a3552a; } .tier-2 { color: #5d6570; } .tier-3 { color: #9a6b12; } .tier-4 { color: #4b3a78; }
.filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.empty { padding: 28px; text-align: center; color: var(--ink-soft); }

/* ---- one deed ---- */
.deedview { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.bigdeed { position: relative; width: min(480px, 86vw); aspect-ratio: 96 / 128; }
.bigdeed canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(4px 5px 0 rgba(20, 10, 6, .45)); }
.facts { width: 100%; border-collapse: collapse; font-size: 16px; }
.facts th { text-align: left; font-weight: 400; color: var(--ink-soft); padding: 5px 10px 5px 0; white-space: nowrap; vertical-align: top; }
.facts td { font: 15px/1.4 var(--num); padding: 6px 0; word-break: break-all; }
.facts a { color: var(--ink); }
.chain { list-style: none; padding: 0; margin: 0; font: 15px/1.6 var(--num); }
.chain li { display: flex; gap: 10px; }
.chain li b { color: var(--wax); min-width: 2.5em; font-weight: 600; }
@media (max-width: 900px) { .deedview { grid-template-columns: 1fr; } .bigdeed { margin: 0 auto; } }

/* ---- register ---- */
.tabs { display: flex; gap: 4px; margin-bottom: -3px; position: relative; z-index: 1; }
.tabs .btn[aria-selected="true"] { background: url("/ui/paper.png"); border-image-source: url("/ui/btn.png"); }
.reg { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px 26px; align-items: start; }
label.file { display: inline-flex; }
.warn { border: 2px solid var(--wax); padding: 10px 12px; background: rgba(255, 240, 220, .8); font-size: 16px; }

/* the proof: the deed as it will print, on the counter's walnut, with its plaque and the three steps */
.proof { display: grid; align-content: start; gap: 14px; padding: 16px 18px 18px; background: url("/ui/walnut.png"); box-shadow: inset 0 0 0 2px #2a170c, inset 0 0 40px rgba(0, 0, 0, .55); color: #f3e6c8; }
.proof-kicker { margin: 0; font: 600 13px/1 var(--num); letter-spacing: .28em; text-transform: uppercase; color: #e2bc66; text-align: center; }
.proof-sheet { width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 96 / 128; filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, .5)); }
.proof-sheet canvas { width: 100%; height: 100%; display: block; }
.proof-plaque {
  display: grid; gap: 5px; justify-items: center; text-align: center; padding: 6px 10px 8px;
  border: 16px solid transparent; border-image: url("/ui/plaque.png") 64 72 fill stretch;
  color: #3b2605; text-shadow: 0 1px 0 rgba(255, 238, 180, .55), 0 -1px 0 rgba(90, 58, 10, .3);
}
.proof-plaque strong { font: 700 22px/1.05 var(--title); }
.proof-plaque span { font: 600 13px/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; }
.tiers { list-style: none; display: flex; flex-wrap: nowrap; justify-content: center; gap: 3px; margin: 4px 0 0; padding: 0; }
.tiers li { white-space: nowrap; font: 700 12px/1 var(--ui); padding: 4px 5px; border: 1px solid currentColor; background: rgba(255, 248, 225, .55); text-shadow: none; }
.tiers em { font: 600 11px/1 var(--num); font-style: normal; opacity: .8; }
.tiers .t0 { color: #5b4a3a; } .tiers .t1 { color: #8a3d18; } .tiers .t2 { color: #4a525c; } .tiers .t3 { color: #7a520a; } .tiers .t4 { color: #3f2e6e; }
.steps { grid-column: 1 / -1; list-style: none; counter-reset: step; margin: 0; padding: 16px 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; background: url("/ui/walnut.png"); box-shadow: inset 0 0 0 2px #2a170c, inset 0 0 30px rgba(0, 0, 0, .5); }
.steps li { counter-increment: step; position: relative; padding-left: 44px; font: 15px/1.4 var(--ui); color: #e9dcc0; min-height: 30px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center;
  background: url("/ui/wax.png") center / 32px 32px no-repeat; image-rendering: pixelated;
  font: 700 15px/1 var(--title); color: #ffe9d2; text-shadow: 0 1px 0 #4a0a06;
}
.steps b { display: block; font: 700 17px/1.2 var(--title); color: #fff3dc; margin-bottom: 2px; }

/* ---- market header, legend, empty state ---- */
.mk-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: flex; gap: 4px; }
.seg .btn[aria-pressed="true"], .tool[aria-current="page"] { border-image: url("/ui/btn_down.png") 3 stretch; background: #fff3b8; box-shadow: inset 0 -3px 0 var(--wax); }
.mk-stats { display: flex; gap: 0; margin: 0; border: 3px solid transparent; border-image: url("/ui/well.png") 3 fill stretch; }
.mk-stats div { padding: 6px 14px; border-left: 1px solid #d9cfb8; text-align: right; }
.mk-stats div:first-child { border-left: 0; }
.mk-stats dt { font: 600 12px/1 var(--ui); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.mk-stats dd { margin: 0; font: 600 17px/1 var(--num); color: var(--ink); }
.mk-stats small { font-size: 12px; color: var(--ink-soft); }
.mk-legend { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #cfc3a8; font-size: 15px; color: var(--ink-soft); }
.mk-legend img { width: 24px; height: 24px; flex: none; margin-top: -2px; }
.mk-legend b { color: var(--ink); }
.empty { display: grid; justify-items: center; gap: 12px; padding: 40px 20px; text-align: center; color: var(--ink-soft); font-size: 17px; background: #fffdf2; border: 1px solid #d9cfb8; }
.empty img { width: 64px; height: 64px; opacity: .9; }
.empty p { margin: 0; max-width: 460px; }

@media (max-width: 900px) {
  .reg { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tiers { flex-wrap: wrap; }
  .proof-sheet { max-width: 260px; }
  .mk-stats { width: 100%; }
  .mk-stats div { flex: 1; padding: 6px 8px; }
  .mk-stats dd { font-size: 15px; }
}
@media (max-width: 760px) {
  .seg { width: 100%; }
  .seg .btn { flex: 1; padding: 4px 6px; }
  .mk-stats { flex-wrap: wrap; }
  .mk-stats div { flex: 1 1 45%; min-width: 0; border-left: 0; border-top: 1px solid #d9cfb8; text-align: left; }
  .mk-head { gap: 10px; }
  .seg .btn { min-width: 0; }
  .mk-stats div:nth-child(-n+2) { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* phone rules that must come after the base rules above */
@media (max-width: 760px) {
  .tabs { display: grid; grid-template-columns: 1fr; gap: 4px; margin-bottom: 6px; }
  .tabs .btn { width: 100%; }
  .filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .filters .btn { width: 100%; padding: 4px 6px; }
  .filters .note { grid-column: 1 / -1; margin: 0 !important; }
  .tool { font-size: 11.5px; }
}
@media (max-width: 360px) {
  .toolbar { gap: 2px; padding: 3px; }
  .tool { padding: 3px 0; font-size: 11px; letter-spacing: -.1px; }
}
