:root {
  color-scheme: dark;
  --bg: #080e17;
  --panel: #101b29;
  --surface: #0c1521;
  --input: #070f1a;
  --line: #26384b;
  --line-soft: #1d2c3d;
  --text: #e6edf5;
  --muted: #96a8bd;
  --accent: #42cdf2;
  --lithium: #ecd092;
  --metal: #bfcddd;
  --crystal: #7fc6f0;
  --deut: #8cd4b0;
  --font: Inter, 'Segoe UI', Arial, sans-serif;
  --tech: Rajdhani, 'Segoe UI', Arial, sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; font-size: 13px; line-height: 1.5; }
body.dialog-open { overflow: hidden; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid #354b62; border-radius: 4px; background: #162536; padding: 8px 12px; font-size: 12px; font-weight: 600; transition: background .15s, border-color .15s; }
button:hover { border-color: #6b9cbb; background: #20364a; }
button:disabled { opacity: .38; cursor: not-allowed; }
input, select { border: 1px solid #304359; border-radius: 4px; background: var(--input); padding: 8px 10px; min-width: 0; }
input { font-variant-numeric: tabular-nums; }
input:hover, select:hover { border-color: #55718f; }
input:focus, select:focus { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input[aria-invalid=true] { border-color: #f89090; }
h1, h2, h3, p { margin: 0; }
h2 { font-family: var(--tech); font-size: 23px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 13px; font-weight: 600; }
main, .site-header, footer { width: min(1512px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; border-bottom: 1px solid var(--line); }
.tool-brand { display: flex; align-items: center; gap: 15px; }
.home-link { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #2e5870; background: #122534; border-radius: 5px; flex-shrink: 0; }
.home-link:hover { background: #1c3d50; }
.home-link svg { width: 18px; fill: currentColor; }
h1 { font: 700 34px/1 var(--tech); letter-spacing: 1.4px; white-space: nowrap; }
h1 span { color: var(--accent); }
.tool-brand p { color: var(--muted); margin-top: 5px; font-size: 11px; }
.suite-nav { display: flex; gap: 25px; align-items: center; font-size: 12px; }
.suite-nav a { color: var(--muted); text-decoration: none; }
.suite-nav a:hover { color: var(--text); }
.suite-nav .suite-all { border-left: 1px solid var(--line); padding-left: 25px; color: var(--text); }
.view-tabs { display: flex; gap: 32px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.view-tabs button { display: flex; gap: 10px; align-items: center; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 20px 0 16px; color: var(--muted); font-size: 13px; }
.view-tabs button:hover { color: var(--text); }
.view-tabs button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); }
.view-tabs button:last-child[aria-pressed=true] { color: var(--lithium); border-bottom-color: var(--lithium); }
.view-tabs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.li-symbol { display: inline-grid; place-items: center; width: 23px; height: 23px; border: 1px solid currentColor; border-radius: 3px; font: 600 17px/1 var(--tech); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); margin-bottom: 22px; padding: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.quiet-button { border-color: transparent; background: transparent; color: var(--muted); padding: 6px 8px; font-size: 11px; }
.quiet-button:hover { border-color: var(--line); background: #1a2b3c; color: var(--text); }
.primary-button, #add { color: #06131c; border-color: #42b5d6; background: #48c6e7; }
.primary-button:hover, #add:hover { background: #7ed9ef; }
.hint { font-size: 11px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.muted { color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }
.badge { font-size: 10px; color: var(--muted); display: block; margin-top: 6px; }
.common-settings { display: grid; grid-template-columns: 230px 1fr; gap: 10px 28px; padding: 18px 22px 14px; background: #0e1926; }
.common-settings .section-head { display: block; align-self: center; margin: 0; }
.common-settings h2 { font-size: 19px; }
.common-settings .hint { grid-column: 2; margin: 0; font-size: 10px; }
.parameter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.parameter-grid label { color: var(--muted); font-size: 11px; min-width: 0; }
.parameter-grid input, .parameter-grid select { display: block; width: 100%; margin-top: 6px; min-height: 35px; color: var(--text); }
.common-settings input { font-size: 15px; font-weight: 500; }
body[data-view=lithium] .common-settings { display: flex; gap: 32px; align-items: center; padding-block: 14px; }
body[data-view=lithium] .common-settings .section-head { display: flex; align-items: baseline; gap: 16px; }
body[data-view=lithium] .common-settings .parameter-grid { display: block; margin-left: auto; }
body[data-view=lithium] .common-settings label { display: flex; align-items: center; gap: 12px; }
body[data-view=lithium] .common-settings input { width: 90px; margin: 0; }
.table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 4px; scrollbar-color: #425970 var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); background: #0b1420; font-size: 10px; font-weight: 500; text-align: right; }
td, th { padding: 12px; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
td { text-align: right; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover { background: #162334; }
.plan-table { min-width: 1100px; }
.plan-table th { padding-block: 11px; }
.plan-table td { padding: 13px 12px; }
.plan-table td:first-child { width: 29%; min-width: 285px; max-width: 325px; white-space: normal; }
.structure-identity { display: flex; gap: 12px; align-items: center; }
.structure-symbol { width: 34px; height: 34px; display: grid; place-items: center; color: #7892ad; background: #142537; border: 1px solid #2a3d52; border-radius: 4px; flex-shrink: 0; }
.structure-symbol svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.scanner-row .structure-symbol { color: var(--accent); border-color: #326579; background: #143243; }
.structure-name { display: block; font-weight: 500; font-size: 12px; line-height: 1.4; }
.structure-meta { display: block; margin-top: 3px; font-size: 9px; color: #8aa0b9; }
.row-factories { display: flex; gap: 14px; margin: 8px 0 0 46px; }
.row-factories label { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 9px; }
.plan-table input { width: 58px; text-align: center; padding: 7px 3px; font-size: 13px; min-height: 35px; }
.row-factories input { width: 37px; min-height: 23px; padding: 2px; font-size: 10px; border-color: #263c52; }
.plan-table td small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.plan-table td[data-time] { min-width: 133px; max-width: 170px; white-space: normal; color: #e3c895; }
.plan-table td[data-time] strong { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-family: var(--tech); font-size: 17px; line-height: 1.15; font-weight: 600; }
.plan-table td[data-cost] { font-size: 12px; }
.plan-table .active { background: #142232; }
.plan-table .active td:first-child { box-shadow: inset 2px 0 #3ca1c1; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-actions button { color: #a5bdd3; font-size: 10px; padding: 7px 9px; background: transparent; border-color: #34495e; }
.row-actions button:hover { background: #23384d; color: #fff; border-color: #6492b2; }
.plan-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; gap: 16px; }
.plan-bottom .hint { text-align: right; margin: 0; font-size: 10px; }
.add-row { display: flex; align-items: center; gap: 10px; }
.add-row label { color: var(--muted); font-size: 11px; }
.add-row select { width: 270px; max-width: 100%; font-size: 12px; }
.metal { color: var(--metal); }
.crystal { color: var(--crystal); }
.deut { color: var(--deut); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.resource-card { padding: 18px 24px; min-width: 0; border-right: 1px solid var(--line); }
.resource-card:last-child { border-right: 0; }
.resource-card h3 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.resource-card h3::before, .lithium-resources h3::before { content: ''; width: 6px; height: 6px; border: 1px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }
.resource-card strong { display: block; font: 600 clamp(22px, 2vw, 30px)/1.2 var(--tech); font-variant-numeric: tabular-nums; margin: 10px 0 20px; overflow-wrap: anywhere; }
.resource-card label { color: var(--muted); display: block; font-size: 10px; margin-bottom: 5px; }
.resource-card input { text-align: right; width: 100%; font-size: 12px; }
.resource-card p { display: flex; justify-content: space-between; color: var(--muted); gap: 10px; margin-top: 10px; font-size: 10px; }
.resource-card b { color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.valuation { display: flex; align-items: center; gap: 35px; padding-top: 22px; }
.valuation>div { flex: 1; min-width: 0; }
.valuation span { color: var(--muted); font-size: 10px; }
.valuation strong { display: block; font: 600 24px/1.4 var(--tech); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.valuation fieldset { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; }
.valuation legend { font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.valuation label { font-size: 9px; color: var(--muted); }
.valuation input { display: block; width: 62px; margin-top: 4px; text-align: center; }
.advanced-settings { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.advanced-settings summary { color: var(--muted); cursor: pointer; font-size: 11px; }
.advanced-settings summary:hover { color: var(--text); }
.time-settings, .conversion-settings { min-width: 0; border: 0; padding: 16px 0 0; margin: 0; }
.time-settings legend, .conversion-settings legend { display: none; }
.time-settings .hint { margin-top: 12px; margin-bottom: 0; }
.detail-dialog { width: min(1120px, calc(100% - 40px)); max-width: none; max-height: 88dvh; padding: 0; margin: auto; border: 1px solid #48637d; border-radius: 7px; background: var(--panel); color: var(--text); box-shadow: 0 24px 90px #0009; overflow: auto; overscroll-behavior: contain; }
.detail-dialog::backdrop { background: #030810c4; backdrop-filter: blur(3px); }
.dialog-header { position: sticky; top: 0; z-index: 3; background: #142233; padding: 20px 24px; margin: 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.dialog-header h2 { font-size: 26px; }
.dialog-header button { flex-shrink: 0; }
.dialog-content { padding: 22px 24px 26px; }
#detail-range { font-size: 10px; margin-top: 6px; }
#detail-effect { margin-bottom: 3px; }
#detail-unlock { font-size: 10px; }
.time-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.time-summary strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font: 600 28px/1.2 var(--tech); color: var(--lithium); text-align: right; }
#detail .advanced-settings { margin-top: 0; margin-bottom: 22px; border-top: 0; }
#detail .table-scroll { max-height: 42dvh; }
#detail th { position: sticky; top: 0; z-index: 1; }
#detail td { font-size: 11px; }
.lithium-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.lithium-editor { padding: 22px; }
.lithium-editor .section-head { margin-bottom: 10px; }
.lithium-groups-table th { white-space: normal; }
.lithium-groups-table td { padding: 16px 10px; }
.lithium-groups-table th[scope=row] { background: transparent; color: var(--text); font-size: 11px; text-align: left; padding-inline: 14px; white-space: nowrap; }
.lithium-groups-table input { width: 74px; min-height: 38px; text-align: center; }
.lithium-groups-table [data-li-unit] { color: var(--muted); font-size: 11px; }
.lithium-groups-table [data-li-total] { color: var(--lithium); font: 600 20px/1.2 var(--tech); font-variant-numeric: tabular-nums; }
.lithium-groups-table button { border-color: transparent; background: transparent; color: var(--muted); font-size: 10px; padding: 6px; }
.lithium-groups-table button:hover { color: #ffb0a2; background: #40292d; }
.lithium-add { display: flex; align-items: center; gap: 16px; padding-top: 16px; }
.lithium-add .hint { margin: 0; font-size: 10px; }
.lithium-result { position: sticky; top: 20px; padding: 0; overflow: hidden; }
.result-heading { display: flex; align-items: center; gap: 10px; padding: 17px 20px; background: #19222c; border-bottom: 1px solid #49483d; }
.result-heading .li-symbol { color: var(--lithium); }
.result-heading h2 { font: 600 18px/1.2 var(--tech); }
.workload-label { color: var(--muted); font-size: 10px; margin-left: auto; }
.lithium-totals { padding: 24px 22px 20px; }
.lithium-primary span { display: block; color: var(--muted); font-size: 11px; }
.lithium-primary strong { display: block; font: 600 clamp(32px, 3.1vw, 46px)/1.15 var(--tech); color: var(--lithium); margin-top: 8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lithium-secondary { display: grid; grid-template-columns: .5fr 1fr; gap: 20px; padding-top: 18px; }
.lithium-secondary span { display: block; color: var(--muted); font-size: 10px; }
.lithium-secondary strong { display: block; font: 600 24px/1.3 var(--tech); margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lithium-consumption-head { padding: 18px 22px 10px; border-top: 1px solid var(--line); }
.lithium-consumption-head h3 { font-size: 12px; margin-bottom: 5px; }
.lithium-consumption-head .hint { margin: 0; font-size: 10px; }
.lithium-resources { padding: 0 22px 14px; }
.lithium-resources article { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.lithium-resources article:last-child { border-bottom: 0; }
.lithium-resources h3 { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 400; white-space: nowrap; }
.lithium-resources strong { font: 600 20px/1.2 var(--tech); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.catalyst-field { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); background: var(--surface); font-size: 11px; }
.catalyst-field small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.catalyst-field input { width: 70px; flex-shrink: 0; text-align: center; }
#li-model { padding: 0 22px 14px; margin: 0; background: var(--surface); font-size: 9px; }
.error { border-left: 3px solid #eb8d8d; background: #31212a; color: #ffd0d0; border-radius: 3px; padding: 12px 15px; margin-top: 15px; font-size: 12px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding: 22px 0; margin-top: 20px; font-size: 10px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.footer-brand { font: 600 15px/1 var(--tech); letter-spacing: 1px; }
footer nav { display: flex; gap: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 15px; z-index: 10; background: var(--panel); padding: 12px; }
.skip-link:focus { top: 10px; }
[hidden] { display: none !important; }
@media(min-width: 1600px) { .plan-table td { padding-block: 14px; } }
@media(max-width: 1250px) {
  main, .site-header, footer { width: calc(100% - 40px); }
  .common-settings { grid-template-columns: 185px 1fr; gap: 12px 20px; }
  .lithium-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
  .lithium-editor { padding: 18px; }
  .lithium-groups-table td { padding: 13px 7px; }
  .lithium-groups-table input { width: 57px; }
  .lithium-groups-table th[scope=row] { padding-inline: 9px; }
}
@media(max-width: 1050px) {
  .lithium-layout { grid-template-columns: 1fr; }
  .lithium-result { position: static; }
  .lithium-groups-table input { width: 90px; }
  .lithium-primary strong { font-size: 46px; }
  .lithium-secondary { grid-template-columns: 120px 1fr; }
  .suite-nav { gap: 16px; }
  .suite-nav .suite-all { padding-left: 16px; }
}
@media(max-width: 800px) {
  .site-header { min-height: 90px; }
  .suite-nav a:not(.suite-all) { display: none; }
  .suite-nav .suite-all { border-left: 0; padding-left: 0; }
  .common-settings { grid-template-columns: 1fr; gap: 16px; }
  .common-settings .section-head { display: flex; align-items: baseline; justify-content: space-between; }
  .common-settings .hint { grid-column: 1; }
  .parameter-grid { gap: 12px; }
  .plan-bottom { flex-direction: column; align-items: stretch; }
  .plan-bottom .hint { text-align: left; }
  .add-row { flex-wrap: wrap; }
  .valuation { flex-wrap: wrap; gap: 20px; }
  .valuation fieldset { width: 100%; }
  .plan-table, .plan-table tbody { display: block; min-width: 0; }
  .plan-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .plan-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px; gap: 12px; border-bottom: 1px solid var(--line); }
  .plan-table tr:last-child { border-bottom: 0; }
  .plan-table td { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; text-align: left; }
  .plan-table td:first-child { grid-column: 1 / -1; min-width: 0; max-width: none; width: 100%; padding-bottom: 8px; }
  .plan-table .active td:first-child { box-shadow: none; }
  .structure-name { font-size: 14px; }
  .row-factories input { min-height: 30px; }
  .row-factories label { font-size: 10px; }
  .plan-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
  .plan-table input { width: 100%; min-height: 40px; }
  .plan-table .row-factories input { width: 45px; min-height: 30px; }
  .plan-table td[data-time] { grid-column: 1 / -1; min-width: 0; max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-block: 1px solid var(--line); }
  .plan-table td[data-time]::before { margin: 0 auto 0 0; }
  .plan-table td[data-time] small { display: none; }
  .plan-table td[data-cost] { grid-column: 1 / -1; text-align: right; font-size: 13px; overflow-wrap: anywhere; }
  .plan-table td[data-cost]::before { float: left; margin: 0 10px 0 0; color: inherit; }
  .plan-table td:last-child { grid-column: 1 / -1; }
  .row-actions button { min-height: 38px; font-size: 12px; padding-inline: 16px; }
}
@media(max-width: 600px) {
  input, select, .plan-table input, .plan-table .row-factories input, .resource-card input, .add-row select { font-size: 16px; }
  .plan-table .row-factories input { width: 48px; min-height: 40px; }
  main, .site-header, footer { width: calc(100% - 28px); }
  .site-header { gap: 12px; min-height: 83px; }
  .tool-brand { gap: 10px; }
  .home-link { width: 32px; height: 32px; }
  h1 { font-size: 27px; letter-spacing: .8px; }
  .tool-brand p { font-size: 9px; max-width: 175px; }
  .suite-nav { font-size: 9px; }
  .view-tabs { gap: 20px; margin-bottom: 18px; }
  .view-tabs button { font-size: 11px; gap: 7px; padding-block: 17px 13px; }
  .view-tabs svg { width: 16px; }
  .li-symbol { width: 20px; height: 20px; font-size: 15px; }
  .panel { padding: 16px; margin-bottom: 16px; }
  .section-head { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  h2 { font-size: 22px; }
  .hint { font-size: 10px; margin-bottom: 14px; }
  .actions { gap: 4px; }
  .quiet-button { padding: 5px; font-size: 10px; }
  .common-settings { padding: 16px; }
  .parameter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .common-settings .badge { margin: 0; font-size: 9px; }
  .common-settings input { min-height: 40px; font-size: 16px; }
  body[data-view=lithium] .common-settings { gap: 16px; flex-wrap: wrap; }
  body[data-view=lithium] .common-settings .section-head { display: block; }
  body[data-view=lithium] .common-settings .badge { margin-top: 4px; }
  body[data-view=lithium] .common-settings label { display: block; font-size: 9px; }
  body[data-view=lithium] .common-settings input { margin-top: 5px; width: 72px; }
  .add-row label { width: 100%; }
  .add-row select { width: 100%; }
  .add-row button { width: 100%; min-height: 40px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px; }
  .resource-card:last-child { border-bottom: 0; }
  .resource-card strong { font-size: 30px; margin-bottom: 16px; }
  .valuation { flex-direction: column; align-items: stretch; gap: 16px; }
  .valuation strong { font-size: 25px; }
  .detail-dialog { width: calc(100% - 16px); max-height: 94dvh; }
  .dialog-header { padding: 16px; flex-wrap: nowrap; }
  .dialog-header h2 { font-size: 21px; }
  .dialog-header button { padding: 7px; font-size: 10px; }
  .dialog-content { padding: 16px; }
  .time-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
  .time-summary strong { text-align: left; }
  .time-settings .parameter-grid { grid-template-columns: 1fr; }
  .lithium-layout { gap: 0; }
  .lithium-editor .section-head { flex-wrap: nowrap; align-items: center; }
  .lithium-groups-table, .lithium-groups-table tbody { display: block; }
  .lithium-groups-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lithium-groups-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
  .lithium-groups-table tr:last-child { border-bottom: 0; }
  .lithium-groups-table td, .lithium-groups-table th[scope=row] { display: block; padding: 0; border: 0; text-align: left; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .lithium-groups-table th[scope=row] { grid-column: 1; grid-row: 1; align-self: center; }
  .lithium-groups-table td:last-child { grid-column: 2; grid-row: 1; text-align: right; }
  .lithium-groups-table button { min-height: 32px; }
  .lithium-groups-table td[data-label]::before { content: attr(data-label); display: block; font: 400 9px/1.5 var(--font); color: var(--muted); margin-bottom: 6px; }
  .lithium-groups-table input { width: 100%; }
  .lithium-add { flex-direction: column; align-items: stretch; gap: 8px; }
  .lithium-add button { min-height: 42px; }
  .lithium-add .hint { text-align: center; }
  .lithium-result { padding: 0; }
  .lithium-primary strong { font-size: 42px; }
  .lithium-secondary { grid-template-columns: .5fr 1fr; }
  .lithium-secondary strong { font-size: 26px; }
  footer { flex-wrap: wrap; gap: 16px; margin-top: 10px; }
  footer>span { font-size: 9px; }
}
@media(prefers-reduced-motion: reduce) { * { transition: none !important; } }
