/* Testing demo additions on top of app.css: lists, toolbars, forms, charts, week view, printables. */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-meta); color: var(--muted); }
.crumbs a { color: var(--blue); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: end; justify-content: space-between; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 460px; }
.search-box .icon { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search-box .input { padding-inline-start: 46px; min-height: 50px; }
.filter { display: grid; gap: 4px; font-size: var(--fs-meta); color: var(--muted); font-weight: 600; }
.filter .input { min-height: 50px; min-width: 170px; }
.form-grid { display: grid; gap: var(--sp-5) var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: 260px; overflow: auto; padding: 4px; }
.dialog { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; container: sheet / inline-size; }
.dialog.wide { width: min(880px, 100%); }
.row-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--frame); }
.pager { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: var(--fs-small); }
.empty { border: 1.5px dashed var(--control); border-radius: var(--radius); padding: 28px; display: grid; gap: 12px; justify-items: start; color: var(--muted); }
.dropdown { position: absolute; inset-inline: 0; top: 52px; z-index: 30; padding: 6px; box-shadow: 0 12px 30px rgb(6 16 106 / .16); display: grid; gap: 4px; }
.dropdown .person { border-color: transparent; width: 100%; }
.hub { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.hub-card { display: grid; gap: 6px; justify-items: start; text-align: start; padding: 18px 20px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--white); color: var(--heading); min-height: 110px; }
.hub-card:hover { border-color: var(--blue); }
.hub-card .icon { color: var(--blue); }
.hub-card b { font-size: var(--fs-body); }
.hub-card .num { color: var(--muted); font-size: var(--fs-small); }
.setup-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius); background: var(--blue-tint); color: var(--heading); }
.setup-card > div { display: grid; gap: 8px; min-width: 240px; flex: 1; }
.meter { height: 10px; border-radius: 99px; background: var(--white); overflow: hidden; max-width: 420px; }
.meter span { display: block; height: 100%; background: var(--blue); }
.facts.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts.six > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
.facts.six > div:nth-child(4) { border-inline-start: 0; }
.facts .v.minus, .minus { color: var(--danger); }
.h3 { font-size: var(--fs-body); color: var(--heading); margin: 0 0 12px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; font-size: var(--fs-small); }
.bar-track { height: 18px; background: var(--frame); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.bar-fill.grey { background: #8C8676; }
.bar-fill.neg { background: var(--danger); }
.bar-v { white-space: nowrap; color: var(--heading); font-weight: 600; }
.colchart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; height: 220px; padding-top: 12px; }
.col { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; min-width: 0; }
.col-bars { display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: 100%; }
.col-a, .col-b { width: 40%; max-width: 34px; border-radius: 4px 4px 0 0; min-height: 2px; }
.col-a { background: var(--blue); }
.col-b { background: #B9B3A3; }
.col-l { text-align: center; font-size: var(--fs-meta); color: var(--muted); overflow-wrap: anywhere; line-height: 1.3; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--sp-2); }
.week-day { scroll-snap-align: start; }
.week-day { border: 1px solid var(--edge); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 200px; }
.week-day.today { border-color: var(--magenta); box-shadow: inset 0 0 0 1px var(--magenta); }
.week-day h3 { font-size: var(--fs-small); display: grid; }
.week-day h3 small { color: var(--muted); font-weight: 500; }
.week-slot { text-align: start; border: 1px solid var(--blue-tint-2); background: var(--blue-tint); color: var(--heading); border-radius: 8px; padding: 8px; font-size: var(--fs-meta); line-height: 1.45; }
.week-slot span { color: var(--muted); }
.week-slot.full { background: var(--blue); color: var(--white); border-color: var(--blue); }
.week-slot.full span { color: #D5D9F5; }
.lessons-list { margin: 0; padding: 0; list-style: none; }
.lesson-row { display: grid; gap: 2px; width: 100%; text-align: start; border: 0; border-top: 1px solid var(--rule); background: transparent; padding: 14px 0; }
.lesson-row b { color: var(--heading); }
.lesson-row span { color: var(--muted); font-size: var(--fs-meta); }
.pole-steps.eight { grid-template-columns: repeat(8, 1fr); max-width: 760px; }
.mini-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.chip { background: var(--frame); border: 1px solid var(--edge); border-radius: 99px; padding: 6px 14px; font-size: var(--fs-small); color: var(--heading); }
.five { display: grid; gap: 10px; padding-inline-start: 24px; }
.evals { list-style: none; margin: 0; padding: 0; }
.evals li { padding: 16px 0; border-top: 1px solid var(--rule); }
.big-check { width: 26px; height: 26px; accent-color: var(--blue); }
.big-code { font-size: 30px; font-weight: 700; color: var(--heading); letter-spacing: .04em; }
.demo-box { display: grid; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--edge); }
.demo-box b { color: var(--heading); font-size: var(--fs-small); }
.demo-box .btn { justify-content: flex-start; }
.roles select.input { min-height: 48px; font-size: var(--fs-meta); }
.invoice { border: 1px solid var(--edge); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; background: var(--white); }
.inv-head { display: flex; gap: 16px; align-items: center; }
.inv-head img { width: 90px; }
.card-stage { display: grid; place-items: center; padding: var(--sp-6) var(--sp-4); border-radius: var(--radius); background: var(--frame); }
.member-card { width: min(420px, 100%); aspect-ratio: 1.586; border-radius: 16px; background: var(--heading); color: var(--white); padding: 22px; display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }
.member-card img { width: 110px; }
.member-card > div { display: grid; align-content: end; gap: 2px; }
.member-card b { font-size: 24px; }
.member-card .num { font-size: 18px; letter-spacing: .06em; }
.mc-label { font-size: 13px; color: #C9CCF0; }
.member-card .pole { width: 100%; box-shadow: inset 0 0 0 1.5px var(--white); }
.certificate { border: 3px double var(--heading); border-radius: 8px; padding: 32px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; position: relative; background: var(--white); }
.certificate img { width: 120px; }
.certificate .c-seal { width: 70px; position: absolute; inset-inline-end: 20px; bottom: 20px; }
.certificate .c-kicker { font-family: var(--brand); font-size: 26px; color: var(--blue); }
.certificate .c-name { font-size: 30px; font-weight: 700; color: var(--heading); }
.summary dd { margin: 0; }
details.more > summary { min-height: 52px; }
@media (max-width: 900px) {
  .facts.six { grid-template-columns: 1fr 1fr; }
  .facts.six > div { border-inline-start: 0 !important; border-top: 1px solid var(--rule); }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .toolbar { align-items: stretch; }
  .search-box { max-width: none; flex-basis: 100%; }
  .toolbar .filter { flex: 1 1 160px; }
  .filter .input { min-width: 0; width: 100%; }
}
/* tables turn into one card per row when the sheet (or dialog) is too narrow for the columns:
   fields side by side, the name and the buttons full width, two cards per row when there is room */
@container sheet (max-width: 860px) {
  .table-wrap.card { border: 0; background: transparent; overflow: visible; }
  .table-wrap table thead { display: none; }
  .table-wrap table { display: block; width: 100%; }
  .table-wrap tbody { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
  .table-wrap tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr)); align-content: start; gap: var(--sp-3) var(--sp-4); padding: var(--sp-4); border: 1px solid var(--edge); border-radius: var(--radius); background: var(--white); }
  .table-wrap tr.total { border: 2px solid var(--heading); }
  .table-wrap td { display: block; min-width: 0; border: 0; padding: 0; text-align: start !important; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap td:not([data-label]) { grid-column: 1 / -1; }
  .table-wrap td:has(.seg) { grid-column: 1 / -1; }
  .table-wrap td .seg { min-width: 0 !important; }
  .table-wrap td:empty { display: none; }
  .table-wrap td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .table-wrap td:has(.row-acts) { padding-top: var(--sp-3); border-top: 1px solid var(--rule); }
  .row-acts { justify-content: flex-start; width: 100%; }
  .row-acts .btn { flex: 1 1 auto; }
}
@media (max-width: 400px) {
  .brand-sm b { display: none; }
}
@media (max-width: 640px) {
  .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .facts, .facts.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div, .facts.six > div { padding: var(--sp-3) var(--sp-4); border-inline-start: 0 !important; border-top: 1px solid var(--rule); }
  .facts > div:nth-child(-n+2) { border-top: 0; }
  .facts > div:nth-child(even) { border-inline-start: 1px solid var(--rule) !important; }
  .facts .v { font-size: calc(22px * var(--scale)); }
  .dialog { padding: 20px; }
  .colchart { gap: 6px; }
}
/* ---------- phones: app style (bottom bar, number tiles, one-line rows) ---------- */
.bottom-nav, .phone-home, .top .brand-sm, .top .lang-sm { display: none; }
.brand-sm { align-items: center; gap: 8px; text-decoration: none; min-height: 46px; }
.brand-sm img { width: 34px; height: 34px; }
.brand-sm b { font-family: var(--brand); font-weight: 600; font-size: 20px; letter-spacing: .06em; color: var(--blue); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--rule); }
.rows button { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: calc(60px * var(--scale)); padding: var(--sp-3) var(--sp-4); border: 0; background: transparent; text-align: start; color: var(--heading); }
.rows button:active { background: var(--frame); }
.rows .mark { flex: none; width: 10px; height: 10px; border-radius: 99px; background: var(--muted); }
.rows .mark.danger { background: var(--danger); } .rows .mark.warn { background: #C98A12; } .rows .mark.blue { background: var(--blue); } .rows .mark.ok { background: var(--ok); }
.rows .t { flex: 1; min-width: 0; display: grid; gap: 2px; font-weight: 700; font-size: var(--fs-small); line-height: 1.35; }
.rows .t small { font-weight: 600; font-size: var(--fs-meta); color: var(--blue); }
.rows .when { flex: none; min-width: 64px; font-weight: 700; color: var(--blue); font-size: var(--fs-small); }
.rows .icon { color: var(--muted); }
[dir="ltr"] .rows .icon { transform: scaleX(-1); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: var(--sp-3); }
.tile { display: grid; gap: 2px; justify-items: start; text-align: start; padding: var(--sp-3) var(--sp-4); min-height: calc(84px * var(--scale)); border: 1px solid var(--blue-tint-2); border-radius: var(--radius); background: var(--blue-tint); color: var(--heading); }
.tile b { font-size: calc(30px * var(--scale)); line-height: 1.1; color: var(--blue); }
.tile span { font-size: var(--fs-meta); font-weight: 600; }
.quick-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.quick-2 .btn { padding: 0 var(--sp-3); }
@media (max-width: 900px) {
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset-inline: 0; bottom: 0; z-index: 35;
    background: var(--white); border-top: 1px solid var(--edge); padding: 4px max(6px, env(safe-area-inset-left, 0px)) max(4px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px));
    box-shadow: 0 -6px 18px rgb(6 16 106 / .06);
  }
  .bottom-nav a, .bottom-nav button { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 60px; border: 0; background: transparent; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
  .bottom-nav .icon { width: 24px; height: 24px; }
  .bottom-nav [aria-current="page"] { color: var(--blue); }
  .bottom-nav [aria-current="page"] .icon { stroke-width: 2.3; }
  .bottom-nav [aria-current="page"]::before { content: ""; position: absolute; top: 2px; width: 28px; height: 3px; border-radius: 99px; background: var(--blue); }
  .bottom-nav b { position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--magenta); color: var(--white); font-size: 12px; display: grid; place-items: center; }
  .app { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .side.open { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 34; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .phone-home { display: grid; gap: var(--sp-6); }
  .no-phone { display: none !important; }
  .top .menu-btn { display: none; }
  .top .brand-sm { display: inline-flex; }
  .top .lang-sm { display: inline-flex; }
}
/* lists on a phone: one compact card per row with only the key fields (first three, amounts, status) */
@container sheet (max-width: 560px) {
  .table-wrap tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-2) var(--sp-5); padding: var(--sp-3) var(--sp-4); }
  .table-wrap td { flex: 0 1 auto; }
  .table-wrap td:first-child, .table-wrap td:not([data-label]) { flex-basis: 100%; }
  .table-wrap td[data-label]:not(:nth-child(-n+3)):not(.amt):not(.keep):not(:has(.pill)) { display: none; }
  .table-wrap td.keep { flex: 1 1 0; display: grid; justify-items: center; text-align: center !important; }
  .table-wrap td[data-label]::before { font-size: 12px; margin-bottom: 0; }
  .table-wrap td:first-child::before { display: none !important; }
  .table-wrap td:has(.row-acts) { padding-top: var(--sp-2); }
  .table-wrap .row-acts .btn { min-height: 44px; font-size: var(--fs-meta); padding: 0 var(--sp-3); }
  .table-wrap td .avatar { width: 38px; height: 38px; font-size: 16px; }
}
/* ---------- A4 print preview: the sheet looks exactly like the printed page ---------- */
.preview-bar { position: sticky; top: calc(var(--sp-7) * -1); z-index: 2; background: var(--white); padding-block: var(--sp-2); }
.paper-wrap { background: #E7E3D8; border-radius: var(--radius); padding: var(--sp-5); overflow-x: auto; }
.paper { width: min(794px, 100%); min-height: min(1123px, 140vw); margin: 0 auto; background: #fff; color: #1B1F4B; padding: clamp(18px, 5%, 56px); box-shadow: 0 6px 24px rgb(6 16 106 / .14); display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 1.5; }
.paper-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.paper-head img { width: 64px; }
.paper-title h3 { font-size: 20px; color: var(--heading); margin: 0; }
.paper-title span, .paper-club span { color: var(--muted); font-size: 12px; display: block; }
.paper-club { text-align: end; font-size: 12px; }
.paper-club b { color: var(--heading); }
.paper .pole { width: 100%; height: 6px; }
.paper h4 { font-size: 15px; color: var(--heading); margin: 8px 0 4px; }
.paper h4 small { font-weight: 500; color: var(--muted); font-size: 12px; }
.pfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border: 1px solid var(--edge); border-radius: 8px; }
.pfacts > div { padding: 8px 12px; display: grid; }
.pfacts > div + div { border-inline-start: 1px solid var(--rule); }
.pfacts span { font-size: 12px; color: var(--muted); }
.pfacts b { font-size: 17px; color: var(--heading); }
.pcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable th { text-align: start; font-size: 12px; color: var(--muted); border-bottom: 1.5px solid var(--heading); padding: 6px 8px; }
.ptable td { padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ptable .amt { text-align: end; white-space: nowrap; }
.ptable .pill { padding: 0 8px; font-size: 12px; }
.ptotal { text-align: end; font-size: 14px; }
.pslot { break-inside: avoid; }
.paper-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 11px; color: var(--muted); }
@media (max-width: 640px) {
  .paper-wrap { padding: var(--sp-2); margin-inline: calc(var(--sp-2) * -1); }
  .paper-head { grid-template-columns: auto 1fr; }
  .paper-club { grid-column: 1 / -1; text-align: start; }
  .paper-head img { width: 48px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0 0 auto 0; margin: 0 auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* a preview in a dialog prints on its own, across as many pages as it needs */
  body:has(.overlay .print-area) .app, body:has(.overlay .print-area) .bottom-nav, .toast { display: none !important; }
  .overlay { position: static; display: block; background: none; padding: 0; }
  .dialog { width: auto; max-height: none; overflow: visible; box-shadow: none; padding: 0; border-radius: 0; }
  .dialog > :not(.paper-wrap):not(.card-stage):not(.print-area):not(.doc-lang) { display: none !important; }
  .overlay .print-area { position: static; }
  .paper-wrap, .card-stage { background: none; padding: 0; overflow: visible; margin: 0; }
  .paper { width: auto; min-height: 0; padding: 0; box-shadow: none; }
  .ptable tr, .pfacts { break-inside: avoid; }
  .member-card { width: 85.6mm; padding: 5mm; border-radius: 3mm; }
  .member-card img { width: 26mm; }
  .member-card b { font-size: 14pt; }
  /* the receipt fills an A5 landscape sheet (the page size is set by main.js while a receipt is open) */
  .receipt { zoom: 1.169 !important; }
  /* a receipt printed from the "payment saved" page: only the receipt, at the top of one sheet */
  body:has(.done-box .receipt) .app > :not(.sheet), body:has(.done-box .receipt) .bottom-nav,
  body:has(.done-box .receipt) .page > :not(.done-box), .done-box > :not(.receipt):not(.m-printer):not(.doc-lang) { display: none !important; }
  body:has(.done-box .receipt) :is(.app, .sheet, .page, .done-box) { display: block !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important; background: none !important; }
  .done-box .receipt.print-area { position: static !important; margin: 0 auto !important; }
}

/* Excel export: preview dialog drawn like a spreadsheet, and the exports page */
.dialog.xl { width: min(1180px, 100%); gap: 14px; }
.xl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.xl-bar .seg { min-width: 240px; }
.xl-file { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-meta); overflow-wrap: anywhere; }
.xl-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--blue); scrollbar-width: thin; }
.xl-tabs button { flex: 0 0 auto; border: 1px solid var(--edge); border-bottom: 0; background: var(--frame-step, #f3f4fa); color: var(--muted); border-radius: 8px 8px 0 0; padding: 0 16px; min-height: 40px; font-size: var(--fs-meta); font-weight: 600; white-space: nowrap; }
.xl-tabs button.dash { border-top: 3px solid #AB2372; }
.xl-tabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.xl-frame { overflow: auto; max-height: min(58vh, 640px); border: 1px solid var(--edge); border-radius: 0 0 10px 10px; background: #fff; }
.xl-grid { border-collapse: collapse; table-layout: fixed; font-family: Arial, "Helvetica Neue", sans-serif; color: #22264A; width: max-content; }
.xl-grid td { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; border: 1px solid #EEF0F6; position: relative; line-height: 1.25; }
.xl-grid thead th { position: sticky; top: 0; z-index: 2; background: #F1F2F7; color: #8A90AE; font: 600 11px Arial, sans-serif; height: 22px; border: 1px solid #DDE0EC; }
.xl-grid th.xl-rn { background: #F1F2F7; color: #8A90AE; font: 600 11px Arial, sans-serif; border: 1px solid #DDE0EC; position: sticky; inset-inline-start: 0; z-index: 1; }
.xl-grid th.xl-corner { inset-inline-start: 0; z-index: 3; }
.xl-logo { position: absolute; top: 3px; inset-inline-start: 6px; width: auto; }
.xl-grid td.has-logo { overflow: visible; z-index: 1; }
.xl-grid tr.thin td, .xl-grid tr.thin th { font-size: 0; line-height: 0; padding: 0; height: inherit; }
.xl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.xl-card { display: grid; gap: 10px; align-content: space-between; padding: 18px 20px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--white); }
.xl-card-h { display: flex; align-items: center; gap: 10px; color: var(--heading); font-size: var(--fs-body); }
.xl-card-h .icon { color: var(--blue); }
.xl-card p { margin: 0; color: var(--muted); font-size: var(--fs-small); }
@media (max-width: 760px) { .xl-frame { max-height: 52vh; } .xl-bar .seg { min-width: 0; flex: 1 1 100%; } }

/* paper language switch (عربي | English) next to every Print button; it changes the paper only, never the screen */
.doc-lang { display: contents; }
.doc-lang-bar { flex: 0 0 auto; align-items: center; margin-inline-end: auto; }
.doc-lang-bar .dl-lab { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; padding-inline: 8px 4px; }
.doc-lang-bar button { flex: 0 0 auto; min-width: 72px; }
.doc-lang-bar button[lang="en"] { font-family: var(--ui); }
@media print { .doc-lang-bar { display: none !important; } }
