/* PREGIO — app styles. Tokens and marks carried over unchanged from Style Tile V2 (design/style-tile-v2.html). */

/* ── Tokens ── */
:root, [data-theme="vellum"] {
  --paper:  #F3F0EA;
  --plate:  #E7E2D9;
  --ink:    #1C1B19;
  --ink-2:  #5D5952;
  --ink-3:  #958F86;
  --rule:   rgba(28,27,25,.15);
  --rule-2: rgba(28,27,25,.32);
  --au:     #94825F;   /* muted champagne gold */
  --ag:     #78808A;
  --pt:     #6F7B7E;
  --up:     #3D6A55;
  --down:   #8B3A2F;
  --sel:    rgba(148,130,95,.16);
  --amber:  #A07B48;   /* medium confidence: a muted amber, not bright gold */
  --pad: 20px;
  --bar: 64px;
}
[data-theme="lacquer"] {
  --paper:  #141311;
  --plate:  #1F1D1A;
  --ink:    #ECE7DE;
  --ink-2:  #A9A296;
  --ink-3:  #6E685F;
  --rule:   rgba(236,231,222,.13);
  --rule-2: rgba(236,231,222,.30);
  --au:     #C8B795;
  --ag:     #A7AEB6;
  --pt:     #9FAAAD;
  --up:     #8DB49F;
  --down:   #D0877B;
  --sel:    rgba(200,183,149,.18);
  --amber:  #CDA57A;
}

/* ── Base ── */
* { box-sizing: border-box; margin: 0; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: "Newsreader", Georgia, serif; font-optical-sizing: auto;
  font-size: 17px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .6s ease, color .6s ease;
  min-height: 100vh; min-height: 100dvh;
}
::selection { background: var(--sel); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; line-height: 1.6; letter-spacing: .02em; font-weight: 400; }
.caps { text-transform: uppercase; letter-spacing: .09em; }
.fig  { font-variant-numeric: lining-nums tabular-nums; }
.it   { font-style: italic; }
.i2   { color: var(--ink-2); }
.i3   { color: var(--ink-3); }
.au   { color: var(--au); }
.ag   { color: var(--ag); }
.up   { color: var(--up); }
.down { color: var(--down); }
.u    { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; margin-left: .5em; color: var(--ink-3); font-weight: 400; }
.n    { white-space: nowrap; }
.lnk, a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--rule-2), var(--rule-2)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 1px; cursor: pointer; }
.lnk:active, a:active { background-image: linear-gradient(var(--ink), var(--ink)); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
[hidden] { display: none !important; }
.hr { border: 0; border-top: 1px solid var(--rule); }

/* ── Shell ── */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 14px) var(--pad) 12px;
  border-bottom: 1px solid var(--rule);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.wordmark svg { display: block; }
.top .acts { display: flex; gap: 18px; align-items: baseline; }
main { padding: 0 var(--pad) calc(var(--bar) + env(safe-area-inset-bottom) + 40px); max-width: 720px; margin: 0 auto; }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--paper); border-top: 1px solid var(--rule);
  padding: 0 var(--pad) env(safe-area-inset-bottom);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: calc(var(--bar) + env(safe-area-inset-bottom));
}
.bar a { background: none; font-size: 16px; color: var(--ink-3); position: relative; padding: 8px 0; }
.bar a:last-child { justify-self: end; }
.bar a.on { color: var(--ink); }
.bar a.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--au); }
.bar a.scan { color: var(--ink); border: 1px solid var(--ink); padding: 8px 22px; display: inline-flex; gap: 9px; align-items: center; }
.bar a.scan.on { background: var(--ink); color: var(--paper); }
.bar a.scan.on::after { display: none; }

/* Framed action, as in the tile's "Add a piece" */
.add { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); font-size: 16px; transition: background .3s, color .3s; }
.add:active, .add.solid { background: var(--ink); color: var(--paper); }
.add[disabled] { opacity: .4; pointer-events: none; }
.add.wide { width: 100%; }
.textswitch { display: inline-flex; align-items: baseline; }
.textswitch button { padding: 2px 0; color: var(--ink-3); }
.textswitch button[aria-pressed="true"] { color: var(--ink); background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.textswitch .sep { color: var(--ink-3); margin: 0 9px; }

/* Chapter heads inside pages */
.chapter { padding: 28px 0 12px; border-top: 1px solid var(--rule-2); margin-top: 40px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.chapter h2 { font-weight: 400; font-style: italic; font-size: 24px; line-height: 1.15; }
.lede { font-size: 16px; color: var(--ink-2); max-width: 34em; }

/* ── Evidence marks ── */
.evi { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.evi i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.evi.verified i { background: var(--ink); }
.evi.measured i { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--ink); }
.evi.observed i { box-shadow: inset 0 0 0 1px var(--ink-2); }
.evi.documented i { box-shadow: inset 0 0 0 1px var(--ink); background: radial-gradient(circle, var(--ink) 0 1.5px, transparent 2px); }
.evi.estimate i { width: auto; height: auto; border-radius: 0; font-style: normal; color: var(--au); font-size: 13px; line-height: 7px; }
.evi.unknown i { width: 8px; height: 1px; border-radius: 0; background: var(--ink-3); }
.sugg { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .04em; color: var(--au); white-space: nowrap; }

/* ── Vault ── */
.statement { padding: 30px 0 26px; }
.statement .date { margin-bottom: 14px; }
.statement .say { font-size: 27px; line-height: 1.25; font-weight: 300; letter-spacing: -.01em; }
.statement .say .n { font-weight: 400; }
.margin { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 22px; }
.margin .row { display: flex; justify-content: space-between; }
.live { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--up); margin-right: 8px; vertical-align: 1px; animation: breathe 5s ease-in-out infinite; }
.live.off { background: var(--ink-3); animation: none; }
@keyframes breathe { 50% { opacity: .25; } }

.scale-band { border-top: 1px solid var(--rule); padding-top: 26px; }
.metals { display: grid; grid-template-columns: 1fr 1fr; text-align: center; gap: 8px; }
.metals.one { grid-template-columns: 1fr; }
.metal .name { font-style: italic; font-size: 17px; }
.metal .w { font-size: 34px; line-height: 1.05; font-weight: 300; letter-spacing: -.02em; margin: 4px 0 2px; white-space: nowrap; }
.metal .val { font-size: 17px; }
.balance { margin-top: 16px; }
.balance svg { display: block; width: 100%; height: auto; overflow: visible; }
.balance-ctl { text-align: center; margin-top: 2px; }

.invest { border-top: 1px solid var(--rule); margin-top: 34px; padding-top: 24px; }
.invest .say { font-size: 20px; line-height: 1.45; font-weight: 300; }
.invest .say b { font-weight: 400; }
.lines { margin-top: 18px; display: grid; gap: 12px; }
.lines .ln { display: grid; grid-template-columns: 1fr 120px; gap: 14px; align-items: center; }
.lines .bar-l { height: 1px; background: var(--rule); position: relative; }
.lines .bar-l span { position: absolute; left: 0; top: -1px; height: 3px; background: var(--ink-2); transform-origin: left; animation: draw 2.2s cubic-bezier(.22,.8,.12,1) both .3s; }
.lines .bar-l span.metal { background: var(--au); }
@keyframes draw { from { transform: scaleX(0); } }
.fn { display: grid; grid-template-columns: 14px 1fr; gap: 4px; margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

.index { margin-top: 34px; }
.index-head { display: flex; justify-content: space-between; padding: 0 0 8px; border-bottom: 1px solid var(--rule-2); font-size: 10px; }
.index-row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; column-gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); background: none; }
.index-row:active { background: linear-gradient(90deg, transparent, var(--sel) 50%, transparent); }
.index-row .title { font-size: 17px; line-height: 1.3; }
.index-row .r { text-align: right; font-size: 16px; }
.thumb { width: 64px; height: 64px; background: var(--plate) center / cover no-repeat; position: relative; }
.thumb::before, .thumb::after, .plate-img::before, .plate-img::after, .shot .ph::before, .shot .ph::after { content: ""; position: absolute; width: 7px; height: 7px; border-color: var(--rule-2); border-style: solid; }
.thumb::before, .plate-img::before, .shot .ph::before { left: 5px; top: 5px; border-width: 1px 0 0 1px; }
.thumb::after, .plate-img::after, .shot .ph::after { right: 5px; bottom: 5px; border-width: 0 1px 1px 0; }
.thumb.has::before, .thumb.has::after { display: none; }
.filters { display: flex; gap: 16px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { color: var(--ink-3); white-space: nowrap; }
.filters button[aria-pressed="true"] { color: var(--ink); background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }

.empty { padding: 48px 0 24px; }
.empty .say { font-size: 27px; line-height: 1.25; font-weight: 300; margin-bottom: 18px; }

/* Discreet */
.v { transition: filter .6s ease, opacity .6s ease; }
.discreet .v { filter: blur(7px); opacity: .55; }

/* ── Scan ── */
.steps { display: flex; gap: 0; align-items: center; margin: 22px 0 6px; }
.steps span { color: var(--ink-3); white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.steps span i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1px currentColor; }
.steps span.done { color: var(--ink-2); }
.steps span.done i { background: currentColor; }
.steps span.now { color: var(--ink); }
.steps span.now i { background: var(--au); box-shadow: 0 0 0 3px var(--sel); }
.steps em { flex: 1; height: 1px; background: var(--rule); margin: 0 10px; min-width: 12px; }
.scan h1 { font-weight: 300; font-size: 32px; line-height: 1.1; letter-spacing: -.012em; margin: 22px 0 8px; }

.shots { margin-top: 20px; border-top: 1px solid var(--rule); }
.shot { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.shot .ph { width: 72px; height: 72px; background: var(--plate) center / cover no-repeat; position: relative; display: flex; align-items: flex-end; padding: 5px 7px; }
.shot .ph.has::before, .shot .ph.has::after { display: none; }
.shot .t { font-size: 17px; }
.shot p { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.shot .acts { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.shot .acts .lnk { white-space: nowrap; }
.shot .tag { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--au); white-space: nowrap; }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.notice { border-left: 1px solid var(--au); padding: 2px 0 2px 14px; margin: 18px 0; font-size: 15px; color: var(--ink-2); }
.notice.plain { border-left-color: var(--rule-2); }
.working { display: flex; gap: 12px; align-items: center; padding: 18px 0; color: var(--ink-2); }
.working i { width: 6px; height: 6px; border-radius: 50%; background: var(--au); animation: breathe 1.6s ease-in-out infinite; }

/* Forms: ruled lines, not boxes */
.form { margin-top: 18px; border-top: 1px solid var(--rule); }
.field { display: grid; grid-template-columns: 104px 1fr; column-gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.field > label, .field > .lab { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-3); padding-top: 4px; }
.field .hint { font-size: 13.5px; color: var(--ink-3); font-style: italic; margin-top: 3px; line-height: 1.4; }
.field.wide { grid-template-columns: 1fr; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=url], input[type=email], select, textarea {
  font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule-2); border-radius: 0;
  padding: 4px 0 5px; width: 100%; font-size: 17px; outline: none; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus { border-bottom-color: var(--ink); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(-45deg, transparent 50%, var(--ink-3) 50%); background-size: 5px 5px; background-position: right 6px top 55%, right 1px top 55%; background-repeat: no-repeat; padding-right: 18px; }
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--ink-3); font-style: italic; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair3 { display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 3px; }
.choices button { color: var(--ink-3); font-size: 16px; }
.choices button[aria-pressed="true"] { color: var(--ink); background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.pp { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 3px 0 8px; }
.pp button { color: var(--ink-3); font-size: 16px; }
.pp button[aria-pressed="true"] { color: var(--ink); background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.check { display: flex; gap: 10px; align-items: baseline; font-size: 15.5px; color: var(--ink-2); }
.check input { accent-color: var(--ink); }
.actions { display: grid; gap: 12px; margin-top: 26px; }
.actions .quiet { text-align: center; font-size: 15px; }

/* ── Piece record ── */
.rec-head { padding-top: 18px; }
.plate-img { position: relative; aspect-ratio: 4 / 5; background: var(--plate) center / cover no-repeat; display: flex; align-items: flex-end; padding: 14px; margin: 0 calc(var(--pad) * -1); }
.plate-img.has::before, .plate-img.has::after { display: none; }
.plate-img .hm { position: absolute; right: 16px; top: 16px; line-height: 0; }
.plate-img .cap { background: var(--paper); padding: 1px 6px; }
.plate-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.plate-strip button { aspect-ratio: 1; background: var(--plate) center / cover no-repeat; position: relative; display: flex; align-items: flex-end; padding: 4px 6px; }
.plate-strip button.on { box-shadow: inset 0 0 0 1px var(--ink); }
.rec h1 { font-weight: 300; font-size: 36px; line-height: 1.06; letter-spacing: -.015em; margin: 18px 0 4px; }
.stages { display: flex; align-items: center; margin: 22px 0 22px; overflow-x: auto; scrollbar-width: none; }
.stages::-webkit-scrollbar { display: none; }
.stages span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); white-space: nowrap; }
.stages span.done { color: var(--ink-2); }
.stages span.now { color: var(--ink); }
.stages span i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1px currentColor; }
.stages span.done i { background: currentColor; }
.stages span.now i { background: var(--au); box-shadow: 0 0 0 3px var(--sel); }
.stages em { flex: 1; height: 1px; background: var(--rule); margin: 0 8px; min-width: 10px; }
.stages b { font-weight: 400; }
.stages small { display: none; font-size: 11px; margin-left: 12px; white-space: nowrap; }
@media (max-width: 560px) {
  .stages span:not(.now) b { display: none; }   /* on a phone, name only the current stage */
  .stages small { display: inline; }
}
.fine.wide { border-top: 0; padding: 0 0 12px 104px; margin-top: -4px; }
.fine.wide svg { max-width: 100%; }
@media (max-width: 420px) { .fine.wide { padding-left: 0; } }

.part { display: grid; grid-template-columns: 92px 1fr auto; column-gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: baseline; width: 100%; }
.part:last-child { border-bottom: 1px solid var(--rule); }
.part .note { display: block; font-size: 14px; color: var(--ink-3); font-style: italic; margin-top: 1px; line-height: 1.4; }
.part > .mono:first-child { padding-top: 3px; }
.fine { margin-top: 8px; }
.fine svg { display: block; width: 100%; max-width: 360px; height: auto; }

.vals { margin-top: 40px; }
.valrow { padding: 20px 0; border-top: 1px solid var(--rule); }
.valrow:last-child { border-bottom: 1px solid var(--rule); }
.valrow .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.valrow h4 { font-weight: 400; font-size: 19px; line-height: 1.25; }
.valrow .amount { font-size: 34px; line-height: 1.1; font-weight: 300; letter-spacing: -.015em; margin: 8px 0 4px; }
.valrow .amount .q { font-size: 16px; font-style: italic; color: var(--ink-3); margin-right: 7px; letter-spacing: 0; }
.valrow .amount.none { font-size: 22px; font-style: italic; color: var(--ink-2); }
.valrow .sub { font-size: 15px; color: var(--ink-3); font-style: italic; }
.valrow dl { display: grid; grid-template-columns: 82px 1fr; gap: 5px 14px; font-size: 15px; margin-top: 14px; }
.valrow dt { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-3); padding-top: 3px; }
.valrow dd { color: var(--ink-2); margin: 0; }
.valrow .amount .conv { font-size: 18px; letter-spacing: 0; white-space: nowrap; }
.valrow .amount .q-up { font-size: 16px; font-style: italic; color: var(--ink-3); margin-right: 7px; letter-spacing: 0; }
/* Confidence: three bars, the level written underneath, coloured by level */
.cwrap { display: inline-flex; align-items: flex-start; gap: 8px; flex: none; }
.confbox { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 6px; }
.confbox.lo  { --c: var(--down); }
.confbox.mid { --c: var(--amber); }
.confbox.hi  { --c: var(--up); }
.conf { display: inline-flex; gap: 3px; }
.conf b { width: 12px; height: 3px; background: var(--rule-2); }
.conf b.on { background: var(--c, var(--ink)); }
.confbox .cl { font-size: 10.5px; line-height: 1; color: var(--c, var(--ink-2)); }

/* The small "?" and what it opens */
.q { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule-2); color: var(--ink-3); font-size: 10px; line-height: 1; vertical-align: 2px; margin-left: 4px; flex: none; position: relative; }
.q::before { content: ""; position: absolute; inset: -12px; }   /* a comfortable target for a finger */
.q[aria-expanded="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.help { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); border-left: 1px solid var(--au); padding: 2px 0 2px 12px; margin: 10px 0 4px; font-style: normal; }
.help p + p { margin-top: 6px; }
.help b { font-weight: 500; color: var(--ink); }
.qrow { display: flex; align-items: center; }

.todo, .hist { margin-top: 44px; }
.todo h5, .hist h5 { font-weight: 400; font-style: italic; font-size: 22px; margin-bottom: 14px; }
.todo ol { list-style: none; padding: 0; counter-reset: t; }
.todo li { counter-increment: t; display: grid; grid-template-columns: 28px 1fr; padding: 14px 0; border-top: 1px solid var(--rule); }
.todo li::before { content: counter(t); font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-3); padding-top: 5px; }
.todo li.done::before { content: "✓"; color: var(--ink-2); }
.todo li.done .t { color: var(--ink-3); }
.todo li .t { font-size: 17px; }
.todo li p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.todo li .acts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.hist .h { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.hist .h:last-of-type { border-bottom: 1px solid var(--rule); }
.hist .h .snap { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; font-style: italic; }

/* ── Sheet (editor) ── */
.scrim { position: fixed; inset: 0; background: rgba(20,19,17,.28); z-index: 40; opacity: 0; transition: opacity .3s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--paper); border-top: 1px solid var(--ink); max-height: 88vh; overflow-y: auto; padding: 18px var(--pad) calc(env(safe-area-inset-bottom) + 24px); transform: translateY(100%); transition: transform .35s cubic-bezier(.22,.8,.12,1); max-width: 720px; margin: 0 auto; }
.sheet.open { transform: none; }
.sheet h3 { font-weight: 400; font-style: italic; font-size: 22px; margin-bottom: 4px; }
.sheet .close { position: absolute; right: var(--pad); top: 18px; }

/* Ledger */
.led .h { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.led .h .snap { font-size: 14.5px; color: var(--ink-2); font-style: italic; margin-top: 2px; }
.led .day { padding: 22px 0 8px; }

/* Settings */
.set-group { margin-top: 30px; }
.set-group h2 { font-weight: 400; font-style: italic; font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); }
.set-row { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.set-row .lab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.set-row p { font-size: 14.5px; color: var(--ink-2); margin-top: 4px; }

.led .lrow { grid-template-columns: 64px minmax(0,1fr); align-items: center; background: var(--paper); }
.led .lrow .t { font-size: 17px; line-height: 1.3; }
.led .lrow .thumb { width: 64px; height: 64px; }
.led .lrow.gone .t { color: var(--ink-3); }
.led .lrow:last-child { border-bottom: 1px solid var(--rule); }

/* Piece record additions */
.plate-src { margin-top: 6px; min-height: 0; }
.plate-src:empty { display: none; }
.reftag { background: var(--paper); color: var(--ink-2); padding: 0 4px; font-size: 9.5px; }
.acts-inline { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.earlier { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 10px; }
.earlier .ea { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0; font-size: 15px; }
.hint { font-size: 13.5px; color: var(--ink-3); font-style: italic; line-height: 1.4; }

/* Web search results */
.webgroup { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.webgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 8px; }
.webgrid button { aspect-ratio: 1; background: var(--plate); overflow: hidden; }
.webgrid img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.webgrid button:active { box-shadow: inset 0 0 0 2px var(--ink); }

/* Photo editor */
body.noscroll { overflow: hidden; }
.editor { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.ed-top { display: flex; justify-content: space-between; align-items: baseline; padding: 14px var(--pad) 12px; border-bottom: 1px solid var(--rule); font-size: 17px; }
.ed-stage { position: relative; overflow: hidden; touch-action: none; background: var(--plate); min-height: 0; }
.ed-stage canvas { display: block; touch-action: none; cursor: grab; }
.ed-tools { padding: 10px var(--pad) 16px; border-top: 1px solid var(--rule); display: grid; gap: 10px; max-width: 720px; width: 100%; margin: 0 auto; }
.ed-row { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; }
.ed-row .choices { padding-top: 0; }
.ed-row .choices button { font-family: "Newsreader", Georgia, serif; font-size: 15.5px; }
.ed-row .lnk { font-family: "Newsreader", Georgia, serif; font-size: 15.5px; }
.ed-row input[type=range] { width: 100%; accent-color: var(--ink); }

/* Find an appraiser */
.apx h1 { font-weight: 300; font-size: 32px; line-height: 1.1; letter-spacing: -.012em; margin: 14px 0 8px; }
.map { position: relative; height: 320px; margin: 18px calc(var(--pad) * -1) 0; overflow: hidden; background: var(--plate); touch-action: none; user-select: none; -webkit-user-select: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.map .tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.map .tiles img { filter: grayscale(.7) sepia(.25) contrast(.92) brightness(1.03); }
.map.dark .tiles img { filter: grayscale(.8) invert(.92) hue-rotate(180deg) brightness(.85) contrast(.9); }
.map .pins > * { position: absolute; left: 0; top: 0; }
.map .pin { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--au), 0 1px 3px rgba(0,0,0,.25); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.map .pin.on { background: var(--au); color: var(--paper); z-index: 2; }
.map .me { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--sel); }
.map-zoom { position: absolute; right: 10px; top: 10px; display: grid; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule-2); z-index: 3; }
.map-zoom button { width: 34px; height: 34px; font-size: 16px; text-align: center; }
.map-zoom button + button { border-top: 1px solid var(--rule); }
.map-attr { position: absolute; right: 0; bottom: 0; background: var(--paper); padding: 1px 6px; font-size: 9.5px; color: var(--ink-3); z-index: 3; }
.aplist { margin-top: 14px; border-top: 1px solid var(--rule); }
.apr { border-bottom: 1px solid var(--rule); }
.apr.on { background: linear-gradient(90deg, var(--sel), transparent 70%); }
.apr-h { display: grid; gap: 1px; width: 100%; padding: 12px 0; }
.apr-h .t { font-size: 17px; line-height: 1.3; }
.apr-h .addr { font-size: 14.5px; }
.apr-more { padding: 0 0 14px; font-size: 15px; }
.apr-more .acts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }

/* Vault sections */
.sec-h { font-size: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); margin-bottom: 14px; }
.ov, .vc, .nw, .st { margin-top: 34px; }
.invest { border-top: 0; padding-top: 0; }
.ov-tot { display: grid; grid-template-columns: 1.35fr 1fr .55fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.ov-tot > div { display: grid; align-content: start; gap: 2px; min-width: 0; }
.ov-tot b { font-weight: 300; font-size: 21px; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; }
.ov-row { padding: 11px 0 10px; border-bottom: 1px solid var(--rule); }
.ov-l { display: flex; gap: 10px; align-items: baseline; }
.ov-l .name { font-style: italic; font-size: 17px; }
.ov-pc { margin-left: auto; }
.ov-row.empty .name, .ov-row.empty .ov-pc { color: var(--ink-3); }
.ov-bar { height: 3px; background: var(--rule); margin: 7px 0 6px; }
.ov-bar span { display: block; height: 100%; background: var(--au); transform-origin: left; animation: draw 1.6s cubic-bezier(.22,.8,.12,1) both .2s; }
.ov-bar span.ag { background: var(--ag); }

.vc-ranges { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; margin-bottom: 12px; }
.vc-ranges button { color: var(--ink-3); padding: 4px 2px; }
.vc-ranges button[aria-pressed="true"] { color: var(--ink); background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.vc-ranges .sep { color: var(--ink-3); }
.vc-read { min-height: 108px; }
.vc-read .vc-v { font-size: 30px; font-weight: 300; line-height: 1.15; letter-spacing: -.015em; }
.vc-svg { display: block; width: 100%; height: 170px; margin-top: 10px; touch-action: pan-y; cursor: crosshair; outline: none; overflow: visible; }
.vc-svg:focus-visible { box-shadow: 0 0 0 1px var(--rule-2); }
.vc-line { fill: none; stroke: var(--au); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.vc-gap { fill: none; stroke: var(--au); stroke-width: 1; stroke-dasharray: 3 4; opacity: .6; }
.vc-base { stroke: var(--rule); }
.vc-hold { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1; }
.vc-area { fill: var(--au); opacity: .09; stroke: none; }
.vc-pt { fill: var(--au); }
.vc-cur { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 2 3; }
.vc-note { font-size: 10.5px; margin-top: 6px; }

/* Product details read from a product page */
.prod-box { padding: 10px 0 12px; margin-bottom: 10px; border-bottom: 1px solid var(--rule); }
.prod { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 4px 12px; margin: 8px 0; font-size: 15px; }
.prod dt { font-size: 10.5px; padding-top: 3px; }
.prod dd { margin: 0; overflow-wrap: anywhere; }
.prod-link { margin: -2px 0 10px; }
.vc-dot { fill: var(--au); stroke: var(--paper); stroke-width: 2; }
.vc-axis { display: flex; justify-content: space-between; font-size: 10px; margin-top: 4px; }
.vc-empty { font-size: 15px; padding: 6px 0; }
.discreet .vc-svg { filter: blur(7px); opacity: .55; }

.nw-total { font-size: 34px; font-weight: 300; line-height: 1.1; letter-spacing: -.015em; margin-bottom: 12px; }
.nw-tab > div { display: grid; grid-template-columns: 1fr 1.25fr 1fr .6fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.nw-tab > div > span:not(:first-child) { text-align: right; }
.nw-h { font-size: 10px; }
.nw-sum { color: var(--ink); border-bottom-color: var(--rule-2) !important; }
.nw-ch { margin-top: 12px; }
.nw-ch > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }

.goal { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.goal-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 17px; }
.goal-pace { font-size: 14.5px; margin: 3px 0 6px; }

/* Record history: swipe left to delete */
.hrow { position: relative; overflow: hidden; border-top: 1px solid var(--rule); }
.hist .hrow:last-of-type { border-bottom: 1px solid var(--rule); }
.hrow.open .hdel, .hrow.swiping .hdel { visibility: visible; }
.led .hrow:last-of-type { border-bottom: 1px solid var(--rule); }
.hrow .h { border: 0 !important; background: var(--paper); position: relative; transition: transform .25s cubic-bezier(.22,.8,.12,1); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hdel { position: absolute; right: 0; top: 1px; bottom: 1px; visibility: hidden; width: 92px; background: var(--down); color: var(--paper); font-size: 12px; text-align: center; }

.toast { position: fixed; left: var(--pad); right: var(--pad); bottom: calc(var(--bar) + env(safe-area-inset-bottom) + 14px); z-index: 50; background: var(--ink); color: var(--paper); padding: 11px 14px; font-size: 15px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; pointer-events: none; max-width: 680px; margin: 0 auto; }
.toast.show { opacity: 1; transform: none; }

@media (min-width: 760px) {
  :root { --pad: 32px; }
  .statement .say { font-size: 34px; }
  .metal .w { font-size: 48px; }
  .plate-img { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
