:root {
  --bg: #f4f6f8; --card: #fff; --tx: #17212b; --dim: #5b6875; --brd: #dde3e9;
  --acc: #0b5cab; --acc-tx: #fff; --ok: #1d7a46; --warn: #a65d00; --bad: #b42318;
  --ok-bg: #e5f4ea; --warn-bg: #fff3df; --bad-bg: #fdecea; --chip: #eef1f4;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c; --card: #1a2129; --tx: #e6ebf0; --dim: #9aa7b4; --brd: #2b3540;
    --acc: #5aa2ec; --acc-tx: #0b1520; --ok: #5cc78a; --warn: #f0b056; --bad: #ff7a6e;
    --ok-bg: #173323; --warn-bg: #3a2a12; --bad-bg: #3d1a17; --chip: #26303a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--tx); }
a { color: var(--acc); }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem 1.25rem; padding: .6rem 1rem; background: var(--card); border-bottom: 1px solid var(--brd); }
.brand { justify-self: start; display: flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--tx); font-size: 1.1rem; }
.top nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; }
.top nav a { padding: .35rem .6rem; border-radius: 6px; text-decoration: none; color: var(--dim); }
.top nav a[aria-current="page"] { background: var(--chip); color: var(--tx); font-weight: 600; }
.logout { justify-self: end; }
main { max-width: 1180px; margin: 0 auto; padding: 1rem; }
footer { text-align: center; color: var(--dim); font-size: .8rem; padding: 2rem 1rem; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin: .5rem 0 1rem; }
.card { background: var(--card); border: 1px solid var(--brd); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.auth { max-width: 380px; margin: 3rem auto; }
.muted { color: var(--dim); } .small { font-size: .85rem; } .big { font-size: 1.05rem; }
.bad-text { color: var(--bad); }
.flash { padding: .6rem .9rem; border-radius: 8px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); } .flash.err { background: var(--bad-bg); color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--brd); border-radius: 10px; padding: .75rem 1rem; text-decoration: none; color: var(--tx); display: flex; flex-direction: column; }
.stat b { font-size: 1.4rem; } .stat span { color: var(--dim); font-size: .85rem; }
.stat.bad { border-color: var(--bad); } .stat.bad b { color: var(--bad); }
.stat.warn { border-color: var(--warn); } .stat.warn b { color: var(--warn); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters input[type=search] { flex: 1 1 220px; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--brd); border-radius: 7px; background: var(--card); }
.filters input, .filters select { width: auto; }
textarea { min-height: 4.5rem; resize: vertical; }
button { padding: .5rem .9rem; border-radius: 7px; border: 1px solid var(--brd); background: var(--card); cursor: pointer; }
button.primary { background: var(--acc); color: var(--acc-tx); border-color: var(--acc); font-weight: 600; }
button.danger { background: var(--card); color: var(--bad); border-color: var(--bad); }
button.link { background: none; border: 0; color: var(--acc); padding: 0; text-decoration: underline; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.form { display: grid; gap: .7rem; margin-top: .75rem; }
.form.inline { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 500; }
label small { color: var(--dim); font-weight: 400; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.inline-form { display: inline; margin-left: .5rem; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--brd); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--brd); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--dim); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.lvl { display: flex; align-items: center; gap: .5rem; min-width: 130px; }
.lvl meter { width: 80px; height: 12px; }
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 99px; background: var(--chip); font-size: .78rem; font-weight: 600; white-space: nowrap; margin: .1rem 0; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: .6rem .8rem; border-radius: 8px; background: var(--chip); }
.note.warn { background: var(--warn-bg); } .note.bad { background: var(--bad-bg); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.grid2 > .card { margin-bottom: 0; } .grid2 { margin-bottom: 1rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; }
details { margin-top: .75rem; } summary { cursor: pointer; color: var(--acc); font-weight: 500; }
.chart { position: relative; height: 260px; margin-bottom: 1rem; } .chart.small { height: 180px; }
.seg { display: inline-flex; border: 1px solid var(--brd); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: .3rem .7rem; }
.seg button[aria-pressed="true"] { background: var(--acc); color: var(--acc-tx); }
.alerts, .users { list-style: none; padding: 0; margin: 0; }
.alerts li, .users li { padding: .5rem 0; border-bottom: 1px solid var(--brd); }
.alerts li:last-child, .users li:last-child { border-bottom: 0; }
.timeline ol { margin: 0; padding-left: 1.2rem; } .timeline li { margin-bottom: .4rem; }
.empty { text-align: center; color: var(--dim); }
@media (max-width: 640px) {
  .top { grid-template-columns: 1fr auto; }
  .top nav { grid-column: 1 / -1; grid-row: 2; }
  table.tanks thead { display: none; }
  table.tanks tr { display: grid; grid-template-columns: 1fr auto; padding: .6rem .75rem; border-bottom: 1px solid var(--brd); }
  table.tanks td { border: 0; padding: .15rem 0; }
  table.tanks td:first-child { grid-column: 1 / -1; }
  table.tanks td.num { text-align: left; }
}
[hidden] { display: none !important; }
a.button { display: inline-block; padding: .5rem .9rem; border-radius: 7px; background: var(--acc); color: var(--acc-tx); font-weight: 600; text-decoration: none; }
fieldset { border: 1px solid var(--brd); border-radius: 8px; padding: .6rem .8rem .8rem; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 .3rem; }
.form-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
.form-grid textarea { min-height: 4rem; }

/* Mobil (iPhone/Android): 16 px i fält så att iOS inte zoomar, tryckytor ≥ 44 px, plats för notch/hemknapp. */
.top { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); padding-top: max(.6rem, env(safe-area-inset-top)); }
footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
@media (max-width: 640px), (pointer: coarse) {
  input, select, textarea { font-size: 16px; min-height: 44px; }
  textarea { min-height: 5.5rem; }
  button, a.button { min-height: 44px; }
  .top nav a { padding: .6rem .75rem; }
  summary { padding: .65rem 0; }
  label.check { min-height: 44px; }
  label.check input { width: 22px; height: 22px; min-height: 0; flex: none; }
  .seg button { min-height: 40px; padding: .3rem .9rem; }
  button.link { min-height: 44px; }
  td a { display: inline-block; padding: .55rem 0; }
  .brand { min-height: 44px; }
}
@media (max-width: 640px) {
  /* Hela tankkortet är tryckbart i mobilen. */
  table.tanks tr { position: relative; }
  table.tanks td:first-child a::after { content: ""; position: absolute; inset: 0; }
}

/* Lösa mätare, installationsguide, tankmodeller */
.note.loose { display: block; margin-bottom: 1rem; text-decoration: none; color: var(--tx); background: var(--warn-bg); }
.nowrap { white-space: nowrap; color: var(--acc); font-weight: 600; }
ul.pick { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
ul.pick a { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--brd); border-radius: 8px; text-decoration: none; color: var(--tx); }
ul.pick a:hover { border-color: var(--acc); }
ul.pick .muted { grid-column: 1; } ul.pick .go { grid-column: 2; grid-row: 1 / span 2; padding: .5rem .9rem; border-radius: 7px; background: var(--acc); color: var(--acc-tx); font-weight: 600; }
ul.pick b { font-size: 1.05rem; }
.steps { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 0 0 .5rem; counter-reset: s; }
@media (max-width: 420px) { .steps li::before { content: counter(s); display: block; font-weight: 700; } .steps li { font-size: .72rem; } }
.steps li { flex: 1 1 0; min-width: 0; hyphens: auto; -webkit-hyphens: auto; text-align: center; font-size: .8rem; padding: .4rem .2rem; border-bottom: 3px solid var(--brd); color: var(--dim); counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.done { border-color: var(--ok); color: var(--tx); cursor: pointer; } .steps li.current { border-color: var(--acc); color: var(--tx); font-weight: 600; }
.step legend { font-size: 1.1rem; }
.stepno { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--acc); color: var(--acc-tx); font-size: .9rem; margin-right: .3rem; }
.radios { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.radios input { width: auto; }
.wizard-nav { display: flex; justify-content: space-between; gap: .5rem; }
.wizard-nav [data-next] { margin-left: auto; }
.summary { margin: .5rem 0 1rem; }
.dropzone { overflow-wrap: anywhere; min-width: 0; display: grid; justify-items: center; gap: .35rem; padding: 1.5rem 1rem; border: 2px dashed var(--brd); border-radius: 10px; text-align: center; background: var(--bg); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--acc); background: var(--chip); }
.dropzone.loaded { border-style: solid; border-color: var(--ok); }
.filebtn { display: inline-block; margin-top: .35rem; padding: .45rem .9rem; border: 1px solid var(--acc); border-radius: 7px; color: var(--acc); font-weight: 600; cursor: pointer; }
.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preview h3 { margin: .5rem 0; }
.preview-table { max-height: 18rem; overflow: auto; }
.preview-table table { width: auto; min-width: 14rem; }
.note.ok-bg { background: var(--ok-bg, #e6f4ea); }

/* Sandbergs logga (vit) på Sandbergs-blå rubrikrad */
.top { background: #0b5cab; border-bottom: 0; color: #fff; }
.brand img { display: block; height: 24px; width: auto; }
.top nav a { color: rgba(255, 255, 255, .85); }
.top nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.top nav a[aria-current="page"] { background: rgba(255, 255, 255, .2); color: #fff; }
.top button.link { color: #fff; }
.top :focus-visible { outline-color: #fff; }
@media (min-width: 900px) { .brand img { height: 30px; } }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1rem; }
.head-actions p { margin: 0; }

/* Karta */
.map { height: min(70vh, 640px); border-radius: 8px; z-index: 0; }
.map.small { height: 240px; }
.map-card { padding: .4rem; }
.pin { display: grid !important; place-items: center; border-radius: 13px; font: 700 12px/1 system-ui, sans-serif; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin-good { background: var(--ok); } .pin-low { background: #c77800; } .pin-crit { background: var(--bad); }
.pin-none, .pin-loose { background: #6b7785; }
.pop { min-width: 11rem; line-height: 1.4; } .pop a { font-weight: 700; } .pop .big { font-size: 1.05rem; font-weight: 600; margin: .2rem 0; }
.warn-text { color: var(--warn); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin: 0; }
.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: middle; margin-right: .1rem; }
.dot.good { background: var(--ok); } .dot.low { background: #c77800; } .dot.crit { background: var(--bad); } .dot.loose { background: #6b7785; }
.leaflet-container { font: inherit; }
.leaflet-container a { color: var(--acc); }
/* Mobil: menyn bakom en Meny-knapp (ren CSS, kryssruta + etikett – fungerar utan JS) */
.menu-check, .menu-btn { display: none; }
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; row-gap: 0; }
  .menu-btn { display: inline-flex; align-items: center; gap: .5rem; justify-self: end; min-height: 44px; padding: .4rem .8rem; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; color: #fff; font-weight: 600; cursor: pointer; user-select: none; }
  .burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; position: relative; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -6px; } .burger::after { top: 6px; }
  .menu-check:checked + .menu-btn { background: rgba(255,255,255,.18); }
  .menu-check:checked + .menu-btn .burger { background: transparent; }
  .menu-check:checked + .menu-btn .burger::before { top: 0; transform: rotate(45deg); }
  .menu-check:checked + .menu-btn .burger::after { top: 0; transform: rotate(-45deg); }
  .menu-check:focus-visible + .menu-btn { outline: 2px solid #fff; outline-offset: 2px; }
  .top nav, .top .logout { display: none; grid-column: 1 / -1; }
  .menu-check:checked ~ nav { display: flex; flex-direction: column; gap: 2px; padding: .5rem 0 .25rem; }
  .menu-check:checked ~ .logout { display: block; justify-self: stretch; padding: .25rem 0 .5rem; border-top: 1px solid rgba(255,255,255,.25); }
  .top nav a { padding: .75rem .9rem; font-size: 1.05rem; border-radius: 8px; }
  .top .logout button { padding: .75rem .9rem; width: 100%; text-align: left; font-size: 1.05rem; text-decoration: none; }
  .menu-check { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
}
}

/* Ägare, beställning, QR-etiketter */
.chip.own { background: #dbe8f7; color: #0b5cab; }
.note.own { background: #dbe8f7; color: #0b3c70; }
@media (prefers-color-scheme: dark) { .chip.own, .note.own { background: #19324d; color: #b9d6f5; } }
.own-text { color: var(--acc); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 1rem; }
a.button.ghost { background: var(--card); color: var(--acc); border: 1px solid var(--acc); }
fieldset.plain { border: 0; padding: 0; } fieldset.plain legend { font-weight: 500; padding: 0; margin-bottom: .3rem; }
.order { max-width: 34rem; margin: 0 auto; }
.order-tank { display: grid; gap: .2rem; padding: .75rem; border-radius: 8px; background: var(--chip); margin: .5rem 0 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.seg a.segbtn { display: inline-block; padding: .3rem .9rem; text-decoration: none; color: var(--tx); }
.seg a.segbtn.on { background: var(--acc); color: var(--acc-tx); }
ul.orders { list-style: none; padding: 0; display: grid; gap: .75rem; }
ul.orders li.handled, ul.orders li.cancelled { opacity: .7; }
ul.orders .head { margin: 0 0 .3rem; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(100mm, 1fr)); gap: 6mm; }
.qr-label { width: 100mm; height: 70mm; border: 1px solid #000; border-radius: 3mm; overflow: hidden; background: #fff; color: #000; display: grid; grid-template-rows: auto 1fr; break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qr-label header { background: #0b5cab; padding: 2.5mm 4mm; }
.qr-label header img { height: 7mm; width: auto; display: block; }
.qr-body { display: grid; grid-template-columns: 40mm 1fr; gap: 4mm; padding: 4mm; align-items: center; }
.qr-code svg { width: 40mm; height: 40mm; display: block; }
.qr-text { display: grid; gap: 1.2mm; font-size: 3.2mm; line-height: 1.25; }
.qr-title { font-size: 5mm; line-height: 1.12; }
.qr-tank { font-weight: 700; margin-top: 1mm; }
.qr-id, .qr-url { font-size: 2.8mm; color: #333; } .qr-url { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  .top, footer, .no-print, .flash { display: none !important; }
  main { padding: 0; max-width: none; }
  .qr-sheet { grid-template-columns: repeat(2, 100mm); gap: 6mm; }
}

/* Leveransstatus */
.chip.info { background: #dbe8f7; color: #0b5cab; }
.order-form { margin-top: .5rem; }
.order-h { margin: 1.25rem 0 .25rem; font-size: 1.1rem; }
.delivery { border: 2px solid var(--acc); border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1rem; }
.delivery h2, .fills h2 { margin: 0 0 .3rem; font-size: 1.05rem; }
ol.track { display: flex; list-style: none; padding: 0; margin: .5rem 0; gap: .25rem; }
ol.track li { flex: 1 1 0; min-width: 0; text-align: center; font-size: .78rem; padding-top: .45rem; border-top: 4px solid var(--brd); color: var(--dim); hyphens: auto; }
ol.track li.done { border-color: var(--ok); color: var(--tx); } ol.track li.current { border-color: var(--acc); color: var(--tx); font-weight: 700; }
.fills { margin: 0 0 1rem; } .fills table { width: 100%; }
.nowrap-d { white-space: nowrap; }
.fills td { white-space: nowrap; padding: .45rem .35rem; } .fills td:first-child { padding-left: 0; } .fills td:last-child { padding-right: 0; }

/* Tankinformation på QR-sidan */
.ot-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem .6rem; font-size: 1.1rem; }
.gauge { position: relative; height: 2.2rem; border-radius: 8px; background: var(--card); border: 1px solid var(--brd); overflow: hidden; margin: .4rem 0 .2rem; }
.gauge .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ok); transition: width .4s; }
.gauge.low .fill { background: #c77800; } .gauge.crit .fill { background: var(--bad); }
.gauge span { position: relative; display: block; text-align: center; line-height: 2.2rem; font-weight: 700; font-size: 1.1rem; color: var(--tx); text-shadow: 0 0 3px var(--card), 0 0 3px var(--card); }
.ot-kv { margin: .3rem 0 0; }

/* Statustavla på startsidan */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .3rem; }
.tile { display: grid; gap: .1rem; padding: .8rem 1rem; border-radius: 10px; text-decoration: none; color: #fff; border: 2px solid transparent; }
.tile b { font-size: 2rem; line-height: 1.1; } .tile span { font-weight: 600; }
.tile-red { background: var(--bad); } .tile-orange { background: #c77800; } .tile-green { background: var(--ok); }
.tile.on { outline: 3px solid var(--tx); outline-offset: 2px; }
.board-sum { margin: .2rem 0 1rem; }
ul.events { list-style: none; padding: 0; margin: 0; }
ul.events li + li { border-top: 1px solid var(--brd); }
ul.events a { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .7rem; align-items: center; padding: .6rem .2rem; text-decoration: none; color: var(--tx); min-height: 44px; }
.ev-main { display: grid; min-width: 0; } .ev-main b { font-weight: 600; }
.ev .dot { width: .8rem; height: .8rem; border-radius: 50%; margin: 0; }
.ev-red .dot { background: var(--bad); } .ev-orange .dot { background: #c77800; } .ev-green .dot { background: var(--ok); }
.ev-when { white-space: nowrap; }
.map.home { height: 320px; }
@media (max-width: 640px) {
  .tile { padding: .6rem .7rem; } .tile b { font-size: 1.6rem; } .tile span { font-size: .85rem; }
  ul.events a { grid-template-columns: auto 1fr; } .ev-when { grid-column: 2; }
  .map.home { height: 260px; }
}
details.more { margin-top: 0; } details.more summary { padding: .6rem .2rem; }
@media (max-width: 640px) { ul.events a { grid-template-columns: auto 1fr auto; } .ev-when { grid-column: auto; align-self: start; padding-top: .15rem; } }

/* Artiklar och filter */
ul.articles { list-style: none; padding: 0; display: grid; gap: .5rem; }
ul.articles li { display: grid; grid-template-columns: 64px 1fr auto; gap: .75rem; align-items: center; padding: .6rem .8rem; }
ul.articles img, ul.qr-arts img, .noimg { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #fff; }
.noimg { display: block; background: var(--chip); }
.a-main { display: grid; gap: .1rem; min-width: 0; } .a-main b { overflow-wrap: anywhere; }
.a-thumb { float: left; margin: 0 .6rem .3rem 0; border-radius: 6px; background: #fff; object-fit: contain; }
ul.qr-arts { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
ul.qr-arts li { display: grid; grid-template-columns: 48px 1fr auto; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--brd); }
ul.qr-arts img, ul.qr-arts .noimg { width: 48px; height: 48px; }
.qty { display: grid; font-size: .8rem; } .qty select { width: 4.5rem; }
@media (max-width: 640px) { ul.articles li { grid-template-columns: 48px 1fr; } ul.articles img, ul.articles .noimg { width: 48px; height: 48px; } ul.articles form { grid-column: 1 / -1; } }
ol.track li { font-size: .7rem; overflow-wrap: anywhere; letter-spacing: -.01em; }
.confirm-form { display: grid; gap: .3rem; justify-items: start; margin: .5rem 0; }
footer a.suggest { display: inline-block; margin-bottom: .4rem; padding: .4rem .8rem; border: 1px solid var(--brd); border-radius: 999px; background: var(--card); text-decoration: none; font-size: .9rem; color: var(--acc); }

/* E-postmallar */
ul.tpl-list { list-style: none; padding: 0; margin: 0; }
ul.tpl-list li + li { border-top: 1px solid var(--brd); }
ul.tpl-list a { display: grid; gap: .15rem; padding: .6rem .2rem; text-decoration: none; color: var(--tx); }
pre.mail-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--bg); border: 1px solid var(--brd); border-radius: 8px; padding: .8rem; margin: 0; }
.tpl-vars dt button { font-family: ui-monospace, monospace; font-size: .85rem; min-height: 0; }
.tpl-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
textarea[data-tpl-body] { font-family: ui-monospace, monospace; font-size: .9rem; }
@media (max-width: 640px) { textarea[data-tpl-body] { font-size: 16px; } }
