:root {
  --blue: #302e89;
  --red: #bf243b;
  --ink: #26273b;
  --line: #dedee8;
  --tint: #f4f4fa;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f8f8fb; color: var(--ink); font: 16px/1.5 Arial, Helvetica, sans-serif; }
.mast { border-top: 4px solid var(--blue); border-bottom: 1px solid var(--line); background: white; }
main, .mast-inner { width: min(100% - 40px, 1120px); margin: auto; }
.mast-inner { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; }
.mast img { display: block; width: clamp(175px, 23vw, 235px); height: auto; }
.mast a { display: inline-block; }
main { padding: 20px 0 40px; }
h1, h2 { color: var(--blue); line-height: 1.15; }
h1 { margin: 0 0 20px; font-size: clamp(34px, 4vw, 47px); letter-spacing: -.045em; }
h2 { margin: 0 0 16px; font-size: 24px; letter-spacing: -.025em; }
section, details { min-width: 0; margin: 0 0 16px; padding: clamp(16px, 2.6vw, 26px); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.grid { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.summary { border-top: 4px solid var(--blue); }
.setup { background: var(--tint); padding: 13px 19px; }
summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.row, .tabs, .total { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.row > :first-child { flex: 2; }
.tabs { flex-wrap: wrap; margin-bottom: 18px; gap: 6px; }
label { display: block; margin: 13px 0; font-weight: 700; }
input, textarea, select, button, .action { font: inherit; }
input, textarea, select { display: block; width: 100%; margin-top: 5px; min-height: 46px; padding: 10px 12px; border: 1px solid #9695aa; border-radius: 9px; background: white; color: var(--ink); }
textarea { min-height: 76px; resize: vertical; }
select { text-overflow: ellipsis; }
button, .action { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; max-width: 100%; padding: 10px 16px; border: 1px solid var(--red); border-radius: 10px; background: var(--red); color: white; cursor: pointer; font-weight: 700; line-height: 1.3; text-decoration: none; }
button:hover, .action:hover { background: #a51c30; }
.tabs button, .soft { background: white; color: var(--blue); border-color: #bcbad1; }
.tabs button:hover, .soft:hover { background: var(--tint); }
.tabs [aria-pressed=true], .soft[aria-pressed=true] { background: var(--blue); color: white; border-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button:disabled { opacity: .55; cursor: default; }
.primary { width: 100%; }
ul { list-style: none; padding: 0; }
li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
li button { margin-left: 8px; }
#results button { display: block; width: 100%; text-align: left; margin: 5px 0; }
.total { justify-content: space-between; align-items: center; margin: 18px 0; padding: 10px 14px; border-radius: 9px; background: var(--tint); color: var(--blue); font-weight: 700; }
.total strong, .amount { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
#saving { color: var(--blue); font-weight: 700; }
.notice, #message { color: #94233b; }
#message:empty, #saving:empty { display: none; }
a { color: var(--blue); }
.code { font: bold 20px monospace; overflow-wrap: anywhere; }
.foot { margin: 24px 0; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  main, .mast-inner { width: calc(100% - 28px); }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tabs button { flex: 1 1 auto; padding-inline: 10px; }
  .mast img { width: 180px; }
}
@media print {
  body, .mast { background: white; }
  .mast { border: 0; }
  .mast img { width: 155px; }
  main, .mast-inner { width: 100%; }
  section { padding: 0; border: 0; }
  .no-print, button, form, .action { display: none; }
}

.sale-actions {display:flex;flex-wrap:wrap;align-items:stretch;gap:12px}
.sale-actions .action,.sale-actions button {min-height:48px;text-align:center}
@media (max-width:600px) {.sale-actions {display:grid;grid-template-columns:minmax(0,1fr)} .sale-actions>* {width:100%}}
@media print {.sale-actions {display:none}}
