/* Racine — "atelier notebook": warm paper, ink, vermilion seal (Toyota / hanko) */
:root {
  --paper: #F3EFE6;
  --paper-2: #EAE4D6;
  --card: #FBF9F4;
  --ink: #1C1A17;
  --ink-2: #4A453D;
  --ink-3: #7C766B;
  --line: #D9D1BF;
  --red: #C8361F;
  --red-ink: #A3260F;   /* small red text (contrast) */
  --red-soft: #F4DDD5;
  --green: #2F6B4A;
  --green-soft: #DDEBDF;
  --amber: #B7791F;
  --amber-soft: #F5E7C9;
  --display: "Fraunces", Georgia, serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); }
body { font-family: var(--body); color: var(--ink); background: var(--paper); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; display: block; line-height: 1; }
.brand small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.seal { display: inline-grid; place-items: center; width: 38px; height: 38px; background: var(--red); color: var(--paper); font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 22px; border-radius: 9px; transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); flex: none; }
.top-actions { display: flex; gap: 8px; }
.btn-ghost { background: none; border: 1px solid transparent; padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.btn-ghost:hover { border-color: var(--line); background: var(--card); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--ink); color: var(--paper); font: 600 11px var(--mono); margin-left: 4px; }

/* language switch */
.top-actions { align-items: center; }
.btn-ghost .ico { display: none; }
.lang { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: 2px; margin-left: 6px; background: var(--card); }
.lang button { border: 0; background: none; font: 600 12px var(--mono); letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; color: var(--ink-3); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* layout */
.layout { position: relative; z-index: 1; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 48px) 80px; }
.rail { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.rail-i { display: grid; grid-template-columns: 34px 1fr; align-items: center; text-align: left; background: none; border: 0; padding: 9px 12px 9px 0; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); transition: color .2s, border-color .2s; }
.rail-i .rn { font: 600 12px var(--mono); text-align: center; }
.rail-i .rl { font-size: 14px; font-weight: 500; }
.rail-i:hover { color: var(--ink); }
.rail-i.done { color: var(--ink-2); }
.rail-i.done .rn { color: var(--green); }
.rail-i.done .rn::after { content: " ✓"; font-size: 9px; }
.rail-i.on { color: var(--ink); border-left-color: var(--red); }
.rail-i.on .rn { color: var(--red-ink); }

/* steps */
.stage { min-width: 0; }
.step { display: none; animation: rise .5s var(--ease); }
.step.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kicker { font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); margin-bottom: 14px; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.04; font-variation-settings: "opsz" 120; }
h1 { font-size: clamp(36px, 5vw, 62px); max-width: 16ch; }
h2 { font-size: clamp(30px, 3.8vw, 46px); max-width: 20ch; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--red); }
.lede { margin-top: 22px; font-size: 18px; color: var(--ink-2); max-width: 62ch; }
.hint { margin: 16px 0 26px; color: var(--ink-2); max-width: 66ch; font-size: 15.5px; }
.hint.small { font-size: 13px; margin: 10px 0 24px; }
.source { margin-top: 26px; font-size: 13px; color: var(--ink-3); max-width: 64ch; }
.method { list-style: none; counter-reset: m; margin: 34px 0 34px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.method li { counter-increment: m; padding: 14px 16px 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr; column-gap: 4px; }
.method li::before { content: counter(m, decimal-leading-zero); grid-row: span 2; font: 600 12px var(--mono); color: var(--red); padding-top: 3px; }
.method b { font-weight: 600; }
.method span { font-size: 14px; color: var(--ink-2); }

/* fields */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; border: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.field > legend { margin-bottom: 8px; }
.field small { font-weight: 400; color: var(--ink-3); }
input[type=text], input[type=number], input[type=date], textarea, select {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 54px; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200, 54, 31, .1); }
::placeholder { color: #A9A294; }
.field.big input { font-family: var(--display); font-size: 24px; padding: 16px 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.span-2 { grid-column: span 2; }
.combo { display: flex; align-items: stretch; }
.combo input { border-radius: 10px 0 0 10px; }
.combo select, .combo em { border-radius: 0 10px 10px 0; border-left: 0; }
.combo select { width: auto; flex: none; }
.combo em { display: grid; place-items: center; padding: 0 12px; font-style: normal; font: 500 13px var(--mono); background: var(--paper-2); border: 1px solid var(--line); border-left: 0; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .scale button, .seg button { background: var(--card); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: all .2s var(--ease); }
.chips button:hover, .scale button:hover, .seg button:hover { border-color: var(--ink); }
.chips button.on, .scale button.on, .seg button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { border-radius: 10px; padding: 10px 4px; font: 600 16px var(--mono); display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; justify-content: center; }
.scale button small { font: 500 11px var(--body); color: var(--ink-2); }
.scale button.on small { color: rgba(243, 239, 230, .75); }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; padding: 6px 0; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--red); margin-top: 2px; flex: none; }

/* cost meter */
.meter { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); border-radius: 14px; overflow: hidden; margin: 4px 0 26px; background: var(--card); }
.meter .m { padding: 16px 18px; border-right: 1px solid var(--line); }
.meter .m:nth-child(3) { border-right: 0; }
.meter span { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.meter b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 6px 0 2px; }
.meter small { font-size: 12.5px; color: var(--ink-3); }
.meter .hot { background: var(--ink); color: var(--paper); }
.meter .hot span, .meter .hot small { color: rgba(243, 239, 230, .85); }
.meter small { font-size: 13px; }
.m-note { grid-column: 1 / -1; padding: 10px 18px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); background: var(--paper-2); }

/* verdict */
.verdict:empty { display: none; }
.verdict { margin-top: 8px; padding: 20px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; }
.verdict p { font-size: 15.5px; }
.verdict small { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; }
.stamp { display: inline-block; font: 700 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; border: 2px solid currentColor; border-radius: 6px; transform: rotate(-3deg); white-space: nowrap; }
.verdict.go, .stamp.go { color: var(--green); } .verdict.go { background: var(--green-soft); border-color: transparent; }
.verdict.maybe, .stamp.maybe { color: var(--amber); } .verdict.maybe { background: var(--amber-soft); border-color: transparent; }
.verdict.no, .stamp.no { color: var(--red); } .verdict.no { background: var(--red-soft); border-color: transparent; }
.verdict p, .verdict small { color: var(--ink); }

/* whys */
.whys { position: relative; display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }
.whys::before { content: ""; position: absolute; left: 17px; top: 20px; bottom: 20px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.why { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 6px 14px; padding: 10px 0 14px; }
.why .wn { grid-row: span 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--ink); font: 600 14px var(--mono); z-index: 1; }
.why:last-child .wn { background: var(--red); border-color: var(--red); color: var(--paper); }
.wq { font-size: 14px; color: var(--ink-2); padding-top: 7px; }
.wq q { font-family: var(--display); font-style: italic; color: var(--ink); quotes: "« " " »"; }
.w-tools { display: flex; gap: 14px; }
.link { background: none; border: 0; padding: 2px 0; font-size: 13px; font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.link.dim { color: var(--ink-3); font-weight: 500; text-decoration: none; }
.link.dim:hover { color: var(--red); }
.btn-line { background: none; border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
#add-why, #add-sol, #add-ben, #add-fear { border-style: dashed; border-color: var(--ink-3); }
.root-field { margin-top: 26px; padding: 18px; background: var(--ink); border-radius: 14px; color: var(--paper); }
.root-field textarea { background: #2A2723; border-color: #3E3A34; color: var(--paper); font-family: var(--display); font-size: 19px; }
.root-field ::placeholder { color: #8C857A; }

/* solutions */
.sol-head, .sol { display: grid; grid-template-columns: minmax(0, 1fr) 176px 92px 110px 118px 26px; gap: 12px; align-items: center; }
.sol-head { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.sol-head span:nth-child(n+3) { text-align: right; }
.sol { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sol textarea { min-height: 48px; font-size: 15px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); gap: 2px; }
.seg button { border: 0; padding: 7px 12px; font-size: 13px; background: none; }
.seg.tiny button { padding: 4px 9px; font-size: 11.5px; }
.mini span { display: none; }
.mini input { text-align: right; padding: 10px; font: 500 15px var(--mono); }
.pay { text-align: right; }
.pay span { display: none; }
.pay b { font: 600 14px var(--mono); }
.pay.good b { color: var(--green); }
.solutions + .hint { margin: 12px 0 10px; }
#add-sol { margin: 4px 0 26px; }

/* blocker balance */
.balance-wrap[hidden] { display: none; }
.balance { position: relative; height: 150px; margin: 6px auto 22px; max-width: 520px; }
.beam { --t: 0deg; position: absolute; left: 8%; right: 8%; top: 30px; height: 5px; background: var(--ink); border-radius: 3px; transform: rotate(var(--t)); transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); }
.beam::after { content: ""; position: absolute; left: 50%; top: -6px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--red); border: 3px solid var(--paper); }
.pan { position: absolute; top: 0; width: 150px; margin-left: -75px; transform: rotate(calc(-1 * var(--t))); transform-origin: 50% 0; transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); display: flex; flex-direction: column; align-items: center; }
.pan::before { content: ""; width: 96px; height: 46px; margin-top: -2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 46' preserveAspectRatio='none'%3E%3Cpath d='M48 1 L3 46 M48 1 L93 46' stroke='%231C1A17' stroke-width='2' fill='none'/%3E%3Ccircle cx='48' cy='4' r='4' fill='%231C1A17'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.pan b { display: block; width: 150px; padding: 8px 0 12px; text-align: center; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--card); border: 2px solid var(--ink); border-top-width: 3px; border-radius: 0 0 80px 80px; }
.pan.l { left: 0; } .pan.l b { color: var(--green); }
.pan.r { left: 100%; } .pan.r b { color: var(--red-ink); }
.pivot { position: absolute; left: 50%; top: 34px; transform: translateX(-50%); width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 96px solid var(--ink); }
.pivot::after { content: ""; position: absolute; left: -60px; top: 96px; width: 120px; height: 6px; background: var(--ink); border-radius: 3px; }
.lists { align-items: start; }
.list-h { font-family: var(--display); font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.list-h.pos { color: var(--green); } .list-h.neg { color: var(--red); }
.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.li { display: grid; grid-template-columns: 1fr 26px; gap: 6px 8px; align-items: center; }
.li input { border-left: 4px solid var(--green); font-size: 15px; }
.li.neg .seg { grid-column: 1; grid-row: 2; justify-self: start; }
.li.neg .link { grid-column: 2; grid-row: 1; }
.li.neg input { border-left-color: var(--red); }
.balance-note { margin-top: 18px; padding: 14px 16px; background: var(--paper-2); border-radius: 10px; font-size: 14.5px; }

/* nav */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.btn-solid { background: var(--ink); color: var(--paper); border: 0; padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; box-shadow: 0 6px 0 -2px var(--red); transition: transform .15s, box-shadow .15s; }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 8px 0 -2px var(--red); }
.btn-solid:active { transform: translateY(1px); box-shadow: 0 3px 0 -2px var(--red); }
.btn-solid.alt { background: var(--red); box-shadow: 0 6px 0 -2px var(--ink); }
.saved { font: 500 12px var(--mono); color: var(--ink-3); }
.saved.pulse { animation: pulse 1.2s var(--ease); }
@keyframes pulse { 0% { color: var(--green); } 100% { color: var(--ink-3); } }

/* summary */
.exports { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.report { margin-top: 10px; }
.rp { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 40px); }
.rp-h { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.rp-h small { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rp-h h3 { font-family: var(--display); font-size: clamp(24px, 3vw, 34px); font-weight: 600; line-height: 1.1; }
.rp section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.rp section:last-of-type { border-bottom: 0; }
.rp h4 { font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); margin-bottom: 10px; }
.rp .big { font-family: var(--display); font-size: 20px; line-height: 1.35; margin-bottom: 10px; }
.rp dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; font-size: 14.5px; }
.rp dt { color: var(--ink-3); }
.rp .na { color: var(--ink-3); }
.rp-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; }
.rp-k div { background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.rp-k span { display: block; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.rp-k b { font-family: var(--display); font-size: 22px; font-weight: 600; }
.rp .calc { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.rp .note { margin-top: 10px; font-size: 14px; font-style: italic; color: var(--ink-2); }
.rp-why { padding-left: 22px; display: grid; gap: 6px; font-size: 15px; }
.rp-why li::marker { font: 600 12px var(--mono); color: var(--ink-3); }
.rp-root { margin-top: 14px; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; }
.rp-root span { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #F0A090; }
.rp-root b { font-family: var(--display); font-size: 19px; font-weight: 600; }
.rp-root small { font-size: 12px; color: rgba(243, 239, 230, .7); }
.rp-root .na { color: rgba(243, 239, 230, .6); }
.rp table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.rp th { text-align: left; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border-bottom: 1px solid var(--ink); padding: 6px 8px 6px 0; }
.rp td { border-bottom: 1px solid var(--line); padding: 8px 8px 8px 0; vertical-align: top; }
.rp-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; font-size: 14.5px; }
.rp-bal ul { padding-left: 18px; margin-top: 4px; }
.rp-f { margin-top: 18px; font: 500 11px var(--mono); color: var(--ink-3); }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(28, 26, 23, .35); display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-in { width: min(420px, 100%); height: 100%; background: var(--paper); padding: 22px; display: flex; flex-direction: column; gap: 14px; animation: slide .35s var(--ease); overflow: auto; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer header { display: flex; justify-content: space-between; align-items: center; }
.drawer h3 { font-family: var(--display); font-size: 26px; font-weight: 600; }
#lib-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lib-i { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 4px 4px; }
.lib-i.on { border-color: var(--ink); }
.lib-open { text-align: left; background: none; border: 0; padding: 10px 12px; display: grid; gap: 2px; }
.lib-open small { color: var(--ink-3); font-size: 12px; }
.lib-open i { display: block; height: 3px; background: linear-gradient(90deg, var(--red) var(--p), var(--line) var(--p)); border-radius: 2px; margin-top: 6px; }
.drawer footer { display: flex; flex-wrap: wrap; gap: 8px; }
.file { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.print-root { display: none; }

/* responsive */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .rail { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); gap: 0; margin: -8px 0 8px; scrollbar-width: none; }
  .rail-i { grid-template-columns: auto; padding: 8px 12px; border-left: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px; }
  .rail-i .rl { display: none; }
  .rail-i.on { border-bottom-color: var(--red); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .sol-head { display: none; }
  .sol { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sol textarea { grid-column: 1 / -1; }
  .mini span, .pay span { display: block; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
  .pay { text-align: left; }
  .sol .seg { justify-self: start; }
  .sol .link.dim { justify-self: end; }
  .rp-k { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .rp-bal { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .meter { grid-template-columns: 1fr; }
  .meter .m { border-right: 0; border-bottom: 1px solid var(--line); }
  .brand small { display: none; }
  .btn-ghost { white-space: nowrap; padding: 8px 6px; font-size: 13px; }
  .top { padding-left: 12px; padding-right: 12px; }
  .btn-ghost .lbl { display: none; }
  .btn-ghost .ico { display: inline; }
  #btn-new { font-size: 20px; line-height: 1; padding: 4px 10px; }
  .brand b { font-size: 19px; } .seal { width: 32px; height: 32px; font-size: 18px; }
  .lang button { padding: 5px 7px; }
  .scale button small { font-size: 9.5px; }
  .rp dl { grid-template-columns: 1fr; gap: 0; }
  .rp dd { margin-bottom: 8px; }
  .rp-h { grid-template-columns: auto 1fr; }
  .rp-h .stamp { grid-column: 1 / -1; justify-self: start; }
  .verdict { grid-template-columns: 1fr; }
  .beam { left: 19%; right: 19%; }
  .pan, .pan b { width: 110px; } .pan { margin-left: -55px; } .pan::before { width: 74px; }
  .nav .btn-solid { padding: 12px 18px; }
}

/* print = PDF export */
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  html, body { background: #fff; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block !important; }
  .print-root .rp { border: 0; padding: 0; background: #fff; }
  .print-root section { break-inside: avoid; }
  .print-root .rp-k div { background: #F4F1EA; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
