.builder-section-control{display:flex;flex:0 0 360px;width:360px;height:38px;border:1px solid var(--line-strong);border-radius:4px;overflow:hidden;background:var(--surface-raised)}
.builder-section-control button{flex:1 1 0;min-width:0;padding:0 8px;border:0;border-right:1px solid var(--line);background:transparent;color:var(--muted);font-size:13px;font-weight:700;cursor:pointer}.builder-section-control button:last-child{border-right:0}.builder-section-control button.active{color:var(--green2);background:var(--accent-soft)}
.deck-information{max-width:900px;margin:10px auto;padding:clamp(22px,3vw,42px);border:1px solid var(--line);background:var(--surface)}.deck-information h2{margin:4px 0 8px;font:34px Georgia,serif}.deck-information>div>p:last-child{color:var(--muted)}.deck-information textarea{width:100%;margin-top:8px;padding:14px;border:1px solid var(--line);background:var(--surface-raised);color:var(--ink);font:inherit;line-height:1.6;resize:vertical}.deck-information fieldset{margin-top:24px;padding:18px;border:1px solid var(--line)}.deck-information legend{padding:0 6px;font-weight:700}.deck-information-tags{display:flex;flex-wrap:wrap;gap:8px;min-height:34px}.deck-information-tag{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;border-radius:99px;background:var(--accent-soft);color:var(--green2);font-size:12px;font-weight:700}.deck-information-tag button{display:grid;width:18px;height:18px;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer}.deck-tag-add{display:flex;gap:8px;margin-top:12px}.deck-tag-add input{margin:0}.deck-tag-add button{flex:0 0 auto}.construction-main.information-view>.deck-legality-warning,.construction-main.information-view>#deck-cards,.construction-main.information-view>.deck-group{display:none}.construction-main.information-view .construction-toolbar>:not(.builder-section-control){display:none}
.deck-information-roles{margin-top:24px;padding:18px;border:1px solid var(--line)}.deck-information-roles h3{margin:0 0 6px;font:19px Georgia,serif}.deck-information-roles p{margin:0 0 12px;color:var(--muted);font-size:12px;line-height:1.5}

.manage-roles-dialog{width:min(620px,calc(100vw - 32px))}
.manage-roles-list{display:grid;gap:6px;max-height:min(46vh,420px);margin:14px 0;overflow-y:auto;overscroll-behavior:contain}
.manage-roles-list[aria-busy="true"]{opacity:.55;pointer-events:none}
.manage-role-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);background:var(--surface-raised)}
.manage-role-row.built-in{background:var(--surface-muted)}
.manage-role-copy{display:grid;gap:2px;min-width:0}
.manage-role-copy strong{font-size:14px}
.manage-role-copy small{color:var(--muted);font-size:11px}
.manage-role-rename{width:100%;margin:0;padding:5px 7px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);font:inherit;font-size:14px}
.manage-role-actions{display:flex;flex:0 0 auto;align-items:center;gap:5px}
.manage-role-actions button{padding:5px 8px;font-size:11px}
.manage-role-actions button.danger{color:var(--danger);border-color:var(--danger)}
.manage-role-actions button:disabled{opacity:.35;cursor:default}
.manage-role-move{min-width:28px;line-height:1}
.manage-role-spacer{display:block;width:20px}
.manage-roles-merge{display:flex;align-items:end;gap:10px;padding:12px;border:1px solid var(--line);background:var(--accent-soft)}
.manage-roles-merge label{display:grid;flex:1 1 auto;gap:4px;margin:0;min-width:0;font-size:12px}
.manage-roles-merge select{margin:0}
.manage-roles-merge button{flex:0 0 auto}
.manage-roles-add{display:flex;align-items:end;gap:10px;margin-top:14px}
.manage-roles-add label{display:grid;flex:1 1 auto;gap:4px;margin:0;font-size:12px}
.manage-roles-add input{margin:0}
.manage-roles-add button{flex:0 0 auto}
#manage-roles-status{display:block;margin-top:10px;color:var(--muted);font-size:11px;text-transform:none;letter-spacing:0}
@media(max-width:850px){.deck-information{margin:8px 0;padding:20px}.deck-tag-add{align-items:stretch;flex-direction:column}.manage-role-row{grid-template-columns:20px minmax(0,1fr)}.manage-role-actions{grid-column:1/-1;flex-wrap:wrap}.manage-roles-merge,.manage-roles-add{align-items:stretch;flex-direction:column}}

/* Primer editing: Write and Preview over the same field, so the writer can see the
   rendered result without leaving the builder. The preview borrows .deck-primer for its
   typography and drops that rule's separator, which belongs to the public page. */
.deck-primer-field{margin:15px 0}
.deck-primer-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.deck-primer-head label{margin:0}
.deck-primer-modes{display:flex;height:30px;border:1px solid var(--line-strong);border-radius:4px;overflow:hidden;background:var(--surface-raised)}
.deck-primer-modes button{padding:0 12px;border:0;border-right:1px solid var(--line);background:transparent;color:var(--muted);font-size:12px;font-weight:700;cursor:pointer}
.deck-primer-modes button:last-child{border-right:0}
.deck-primer-modes button.active{color:var(--green2);background:var(--accent-soft)}
.deck-primer-field small{display:block;margin-top:8px;color:var(--muted);font-size:12px;line-height:1.6}
.deck-primer-preview{min-height:calc(14 * 1.6em + 28px);margin-top:8px;padding:14px 18px;border:1px solid var(--line);border-top:1px solid var(--line);background:var(--surface-raised);overflow-wrap:break-word}
.construction-main.combos-view>.deck-legality-warning,.construction-main.combos-view>#deck-cards,.construction-main.combos-view>.deck-group{display:none}.construction-main.combos-view .construction-toolbar>:not(.builder-section-control){display:none}.deck-combos{max-width:980px;margin:10px auto;padding:clamp(22px,3vw,42px);border:1px solid var(--line);background:var(--surface)}.deck-combos>header{display:flex;justify-content:space-between;align-items:start;gap:24px;border-bottom:1px solid var(--line);padding-bottom:22px}.deck-combos h2{margin:4px 0 8px;font:34px Georgia,serif}.deck-combos>header p:last-child,.spellbook-privacy,.spellbook-cache-note,.spellbook-combo-group>p,.spellbook-empty p{color:var(--muted);line-height:1.55}.deck-combos>header a,.spellbook-combo-card a{color:var(--green2);font-size:12px;font-weight:700;text-decoration:none}.spellbook-privacy{padding:12px 14px;border-left:3px solid var(--copper);background:var(--surface-raised);font-size:12px}.spellbook-cache-note{font-size:11px}.spellbook-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px 0}.spellbook-summary>div{padding:18px;border:1px solid var(--line);background:var(--surface-raised)}.spellbook-summary strong,.spellbook-summary span{display:block}.spellbook-summary strong{font:30px Georgia,serif}.spellbook-summary span{color:var(--muted);font-size:12px}.spellbook-combo-group{margin-top:30px}.spellbook-combo-group>h2,.spellbook-empty h2{font:26px Georgia,serif}.spellbook-combo-group>div{display:grid;gap:12px}.spellbook-combo-card{padding:20px;border:1px solid var(--line);border-left:3px solid var(--deck-accent);background:var(--surface-raised)}.spellbook-combo-card>header{display:flex;justify-content:space-between;align-items:start;gap:20px}.spellbook-combo-card h3{margin:0;font:20px/1.3 Georgia,serif}.spellbook-combo-card .eyebrow{margin-bottom:7px}.spellbook-results{display:flex;flex-wrap:wrap;gap:6px;margin:15px 0;padding:0;list-style:none}.spellbook-results li{padding:6px 9px;border-radius:99px;background:var(--accent-soft);color:var(--green2);font-size:11px;font-weight:700}.spellbook-missing{color:var(--ink)}.spellbook-combo-card details p{white-space:pre-line;color:var(--muted);line-height:1.55}.spellbook-combo-card summary{cursor:pointer;color:var(--green2);font-size:12px;font-weight:700}.spellbook-empty{padding:38px;text-align:center;border:1px dashed var(--line)}@media(max-width:650px){.deck-combos>header,.spellbook-combo-card>header{display:block}.deck-combos>header a,.spellbook-combo-card a{display:inline-block;margin-top:12px}.spellbook-summary{grid-template-columns:1fr}}

.construction-main.statistics-view>.deck-legality-warning,.construction-main.statistics-view>#deck-cards,.construction-main.statistics-view>.deck-group{display:none}.construction-main.statistics-view .construction-toolbar>:not(.builder-section-control){display:none}.deck-statistics{max-width:980px;margin:10px auto;padding:clamp(22px,3vw,42px);border:1px solid var(--line);background:var(--surface)}.deck-statistics>header{padding-bottom:22px;border-bottom:1px solid var(--line)}.deck-statistics h2{margin:4px 0 8px;font:34px Georgia,serif}.deck-statistics>header p:last-child,.deck-stat-list p{color:var(--muted)}.deck-stat-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0}.deck-stat-summary article,.deck-stat-panel{padding:20px;border:1px solid var(--line);background:var(--surface-raised)}.deck-stat-summary span,.deck-stat-summary strong,.deck-stat-summary small{display:block}.deck-stat-summary strong{margin:7px 0;font:30px Georgia,serif}.deck-stat-summary span,.deck-stat-summary small{color:var(--muted);font-size:12px}.deck-stat-panels{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:12px}.deck-stat-curve{display:flex;align-items:end;gap:8px;height:210px;padding-top:20px}.deck-stat-curve>div{display:grid;grid-template-rows:1fr auto auto;align-items:end;gap:4px;height:100%;min-width:0;flex:1;text-align:center}.deck-stat-curve span{display:block;width:100%;min-height:2px;background:var(--deck-accent);border-radius:3px 3px 0 0}.deck-stat-curve small,.deck-stat-list span,.deck-stat-boards span{color:var(--muted);font-size:11px}.deck-stat-list{display:grid;gap:0}.deck-stat-list>div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--line)}.deck-stat-list>div:last-child{border-bottom:0}.deck-stat-boards{margin-top:12px}.deck-stat-boards>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.deck-stat-boards article{padding:12px;background:var(--surface)}.deck-stat-boards span,.deck-stat-boards strong{display:block}.deck-stat-boards strong{margin-top:4px;font:22px Georgia,serif}@media(max-width:700px){.deck-stat-summary,.deck-stat-panels{grid-template-columns:1fr}.deck-stat-boards>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
.spellbook-combo-card{padding:0;overflow:hidden;transition:border-color .16s,box-shadow .16s}.spellbook-combo-card:hover{border-color:var(--deck-accent);box-shadow:var(--shadow-soft)}.spellbook-combo-card>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px;list-style:none;cursor:pointer;color:var(--ink)}.spellbook-combo-card>summary::-webkit-details-marker{display:none}.spellbook-combo-card>summary:focus-visible{outline:2px solid var(--deck-accent);outline-offset:-3px}.spellbook-combo-card>summary>span{min-width:0}.spellbook-combo-card>summary strong{display:block;font:20px/1.3 Georgia,serif}.spellbook-combo-card>summary small{display:block;margin-top:8px;color:var(--muted);font-size:12px;font-weight:400}.spellbook-combo-card>summary i{font:24px/1 Georgia,serif;color:var(--deck-accent);transition:transform .16s}.spellbook-combo-card[open]>summary i{transform:rotate(180deg)}.spellbook-combo-card[open]>summary{border-bottom:1px solid var(--line);background:var(--accent-soft)}.spellbook-combo-details{display:grid;gap:18px;padding:20px}.spellbook-detail h4{margin:0 0 7px;font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}.spellbook-detail p{margin:0;white-space:pre-line;color:var(--ink);line-height:1.6}.spellbook-steps p{counter-reset:spellbook-step}.spellbook-combo-details>a{justify-self:start}@media(max-width:650px){.spellbook-combo-card>summary{padding:17px}.spellbook-combo-details{padding:17px}}
.builder-page .builder-section-control{margin-left:auto}
/* Four equal buttons in a 313px row leave 61px of text each, and "Information" needs about 81px
   at 13px bold. `.builder-section-control{overflow:hidden}` clips at the *container* edge, so
   the overflow used to bleed across "Combos" before being cut. Ellipsis on the button keeps a
   label inside its own box whatever the width, and 11px with tighter padding means it does not
   come to that at 375px. */
.builder-section-control button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:620px){.builder-section-control{flex:1 1 100%;width:100%}.builder-section-control button{padding:0 4px;font-size:11px}}

/* Comments, in the Information tab of both the builder and the public viewer. One block of
 * rules because one module renders both. */
.deck-comments{margin-top:30px;padding-top:22px;border-top:1px solid var(--line)}
.deck-comments h3{margin:0 0 12px}
.deck-comments-list{display:grid;gap:14px}
.deck-comment{position:relative;padding:13px 15px;border:1px solid var(--line);border-radius:6px;background:var(--surface-raised)}
.deck-comment-byline{margin:0 0 7px;color:var(--muted);font-size:12px}
.deck-comment-byline strong{color:var(--ink);font-size:13px}
.deck-comment-byline time{margin-left:7px}
/* The bounded Markdown renderer can only produce these, so nothing else needs a rule. */
.deck-comment-body{font-size:14px;line-height:1.65}
.deck-comment-body p{margin:0 0 9px}
.deck-comment-body p:last-child{margin-bottom:0}
.deck-comment-body ul,.deck-comment-body ol{margin:0 0 9px;padding-left:22px}
.deck-comment-body a{color:var(--green2);font-weight:600}
.deck-comment-body h4,.deck-comment-body h5,.deck-comment-body h6{margin:12px 0 6px;font:14px Georgia,serif;font-weight:700}
.deck-comment-delete{position:absolute;top:10px;right:10px;padding:4px 9px;font-size:10px}
.deck-comments-compose{margin-top:16px}
.deck-comments-compose label{display:block;margin-bottom:6px;font-size:12px;font-weight:600;color:var(--ink)}
.deck-comments-compose textarea{width:100%;padding:10px 12px;border:1px solid var(--line-strong);border-radius:4px;background:var(--surface-raised);color:var(--ink);font:14px/1.6 inherit;resize:vertical}
.deck-comments-compose textarea:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.deck-comments-actions{display:flex;justify-content:flex-end;margin-top:10px}
.deck-comments-signin{margin:0;color:var(--muted);font-size:13px}
.deck-comments-signin a{color:var(--green2);font-weight:600}

.deck-stat-sequence{margin-top:12px}.deck-stat-sequence h3{margin:4px 0 5px;font:25px Georgia,serif}.deck-stat-sequence>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:16px;border-bottom:1px solid var(--line)}.deck-stat-sequence-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.deck-stat-sequence header small{color:var(--muted);font-size:11px}/* What the model assumed, under the rows it produced. */.deck-stat-note{margin:14px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.deck-stat-on-curve{margin-top:12px}.deck-stat-on-curve>header{display:flex;align-items:end;justify-content:space-between;gap:20px;padding-bottom:18px;border-bottom:1px solid var(--line)}.deck-stat-on-curve h3{margin:4px 0 5px;font:25px Georgia,serif}.deck-stat-on-curve header small{color:var(--muted);font-size:11px}.deck-stat-role-menu{position:relative;min-width:190px}.deck-stat-role-menu summary{padding:9px 11px;border:1px solid var(--line);border-radius:4px;background:var(--surface-raised);font-size:12px;font-weight:700;cursor:pointer;list-style-position:inside}.deck-stat-role-menu summary strong{float:right;margin-left:16px;color:var(--green2)}.deck-stat-role-menu fieldset{position:absolute;z-index:8;top:calc(100% + 6px);right:0;display:grid;grid-template-columns:1fr;gap:3px;width:max-content;min-width:190px;max-width:min(320px,80vw);max-height:280px;overflow:auto;margin:0;padding:8px;border:1px solid var(--line-strong);border-radius:4px;background:var(--surface-raised);box-shadow:0 10px 28px rgba(20,25,21,.18)}.deck-stat-role-menu legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.deck-stat-role-menu label{margin:0;padding:0;letter-spacing:normal;text-transform:none;display:grid;grid-template-columns:16px minmax(0,1fr);align-items:center;min-height:20px;column-gap:7px;font-size:12px;font-weight:700;line-height:1.15;white-space:nowrap}.deck-stat-role-menu input{width:14px;height:14px;margin:0;justify-self:center}.deck-stat-curve-odds article{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(160px,1fr) 58px;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}.deck-stat-curve-odds article>div strong,.deck-stat-curve-odds article>div small{display:block}.deck-stat-curve-odds article>div small{margin-top:3px;color:var(--muted);font-size:10px}.deck-stat-curve-odds article>strong{text-align:right;font:19px Georgia,serif}.deck-stat-curve-odds progress{width:100%;height:9px;accent-color:var(--deck-accent)}@media(max-width:800px){.deck-stat-on-curve>header{align-items:stretch;flex-direction:column}.deck-stat-role-menu{align-self:flex-start}}@media(max-width:500px){.deck-stat-role-menu fieldset{right:auto;left:0;max-width:80vw}.deck-stat-curve-odds article{grid-template-columns:minmax(125px,1fr) minmax(80px,1fr) 50px;gap:8px}}
.deck-stat-draws{margin-top:12px}.deck-stat-draws>header{display:flex;align-items:end;justify-content:space-between;gap:20px;padding-bottom:18px;border-bottom:1px solid var(--line)}.deck-stat-draws h3{margin:4px 0 5px;font:25px Georgia,serif}.deck-stat-draws header small{color:var(--muted);font-size:11px}.deck-stat-draw-controls{display:flex;align-items:end;gap:14px}.deck-stat-draw-mode{display:inline-flex;border:1px solid var(--line);border-radius:4px;overflow:hidden}.deck-stat-draw-mode button{border:0;border-right:1px solid var(--line);padding:9px 11px;background:transparent;color:var(--muted);font-weight:700;cursor:pointer}.deck-stat-draw-mode button:last-child{border-right:0}.deck-stat-draw-mode button.active{background:var(--accent-soft);color:var(--green2)}.deck-stat-hand-size{display:grid;grid-template-columns:auto 30px 28px 30px;align-items:center;gap:5px}.deck-stat-hand-size>span{grid-column:1/-1;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.1em}.deck-stat-hand-size .ghost{width:30px;height:30px;padding:0}.deck-stat-hand-size>strong{text-align:center;font:20px Georgia,serif}.deck-stat-probabilities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px}.deck-stat-probabilities article{display:grid;grid-template-columns:minmax(105px,.75fr) minmax(110px,1fr) 54px;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.deck-stat-probabilities article>div strong,.deck-stat-probabilities article>div small{display:block}.deck-stat-probabilities article>div small{margin-top:3px;color:var(--muted);font-size:10px}.deck-stat-probabilities article>strong{text-align:right;font:19px Georgia,serif}.deck-stat-probabilities progress{width:100%;height:9px;accent-color:var(--deck-accent)}@media(max-width:800px){.deck-stat-draws>header{align-items:stretch;flex-direction:column}.deck-stat-draw-controls{justify-content:space-between}.deck-stat-probabilities{grid-template-columns:1fr}}@media(max-width:500px){.deck-stat-draw-controls{align-items:stretch;flex-direction:column}.deck-stat-hand-size{align-self:flex-start}.deck-stat-probabilities article{grid-template-columns:minmax(90px,.8fr) minmax(80px,1fr) 50px;gap:8px}}

/* --- Stats on a narrow screen -------------------------------------------------------------
   Three-column rows (label · bar · figure) do not fit a phone. At 375px the panel's content
   box is about 255px, and the Color consistency template still demanded 309px of it — so the
   rows pushed out of the card rather than clipping, because the narrow `.construction-main`
   rule sets `overflow:visible`.
   Below 560px the rows become two lines instead: label and percentage on the first, the bar
   full-width beneath. Nothing can overflow, because nothing is asked to be a fixed width. */
@media(max-width:560px){
  .deck-statistics{padding:14px}
  .deck-stat-panel,.deck-stat-summary article{padding:14px}
  .deck-stat-probabilities article{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"label figure" "bar bar";gap:4px 10px;padding:10px 0}
  .deck-stat-probabilities article>div{grid-area:label;min-width:0}
  .deck-stat-probabilities article>progress{grid-area:bar;width:100%}
  .deck-stat-probabilities article>strong{grid-area:figure;text-align:right;white-space:nowrap}
  /* The curve had no narrow treatment at any width: eight columns kept an 8px gap and a
     210px height, leaving each bar about 25px to hold a label and a count. */
  .deck-stat-curve{gap:3px;height:150px;padding-top:12px}
  .deck-stat-boards>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media(max-width:380px){
  /* Four board counts at 22px do not share 340px. One column reads; two truncate. */
  .deck-stat-boards>div{grid-template-columns:1fr}
}

/* The empty states, and the note a card package gets in place of the three panels it cannot
   be asked about. `.composition-empty` was borrowed here from the sidebar, which sets it at
   8px italic — the smallest text in the product, for the one string a reader needs when a
   panel has nothing to show. */
.deck-stat-empty{margin:14px 0 0;color:var(--muted);font-size:12px;font-style:italic}
.deck-stat-fragment p{margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.6}
.deck-stat-sequence-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px}.deck-stat-sequence-footer .deck-stat-note{flex:1;margin:0}.deck-stat-sequence-actions{display:flex;justify-content:flex-end;flex:0 0 auto}.deck-stat-sequence-actions button{min-width:130px}
.deck-stat-suggestions{width:min(680px,calc(100vw - 32px));max-height:min(720px,calc(100vh - 32px));padding:0;border:1px solid var(--line);background:var(--surface-raised);color:var(--ink);box-shadow:var(--shadow)}.deck-stat-suggestions::backdrop{background:rgba(12,18,15,.58)}.deck-stat-suggestions form{padding:22px}.deck-stat-suggestions .panel-title{align-items:start;margin-bottom:14px}.deck-stat-suggestions h3{margin:5px 0 0;font:22px Georgia,serif}
.deck-stat-suggestion-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.deck-stat-suggestions article{padding:14px;border-left:3px solid var(--deck-accent);background:var(--surface)}
.deck-stat-suggestions article strong{font:17px Georgia,serif}
.deck-stat-suggestions article p{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.55}
.deck-stat-explanation{width:min(620px,calc(100vw - 32px));padding:0;border:1px solid var(--line);background:var(--surface-raised);color:var(--ink);box-shadow:var(--shadow)}.deck-stat-explanation::backdrop{background:rgba(12,18,15,.58)}.deck-stat-explanation form{padding:22px}.deck-stat-explanation .panel-title{align-items:start;margin-bottom:16px}.deck-stat-explanation h3{margin:5px 0 0}.deck-stat-explanation form>p{margin:0;color:var(--muted);font-size:13px;line-height:1.7}
@media(max-width:600px){.deck-stat-sequence>header{align-items:stretch;flex-direction:column}.deck-stat-sequence-header-actions{justify-content:flex-start}.deck-stat-sequence-footer{align-items:stretch;flex-direction:column}.deck-stat-sequence-actions{justify-content:flex-end}.deck-stat-suggestion-list{grid-template-columns:1fr}}

/* --- The mana sequence chart ---------------------------------------------------------------
   Two lines with the unspent mana shaded between them, in place of seven progress rows that
   were each normalised to their own turn. That normalisation misled: on a real Commander deck
   turn one read 30% — the worst figure on the panel — while idling 0.7 mana, and turn seven
   read 58% while idling 2.6. One absolute scale makes idle mana comparable across turns.
   A trend rather than columns on purpose. Columns are how a mana *curve* is drawn, and the
   Mana curve panel is already on this page; a shape that resembles it invites the two to be
   read as the same thing, when this one is seven turns of one game.
   The `viewBox` scales to any width, so this needs none of the media queries the rows did. */
.deck-stat-chart{margin-top:16px}
.deck-stat-sequence-chart{display:block;width:100%;height:auto}
.deck-stat-gridline{stroke:var(--line);stroke-width:.5}
/* The band is the diagnosis: where it opens, the deck has mana it cannot spend. Kept as a
   quiet wash rather than a warning colour — idle mana on turn seven is information, not an
   error, and a deck that curves out perfectly is not what anybody builds. */
.deck-stat-idle-band{fill:var(--accent-soft);opacity:.85}
.deck-stat-available-line{fill:none;stroke:var(--line-strong);stroke-width:1.5;stroke-dasharray:3 3}
.deck-stat-spent-line{fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round}
.deck-stat-spent-dot{fill:var(--accent)}
.deck-stat-hand-sustainability{margin-top:12px}.deck-stat-hand-sustainability>header{padding-bottom:16px;border-bottom:1px solid var(--line)}.deck-stat-hand-sustainability h3{margin:4px 0 5px;font:25px Georgia,serif}.deck-stat-hand-sustainability header small{color:var(--muted);font-size:11px}.deck-stat-hand-line{fill:none;stroke:var(--deck-accent);stroke-width:2;stroke-linejoin:round}.deck-stat-hand-dot{fill:var(--deck-accent)}.deck-stat-key-hand:before{background:var(--deck-accent)}.deck-stat-hand-actions{margin-top:14px}
/* The role menu splits the spent line rather than filtering the deck. Excluding a role does
   not stop the spell being cast — you would cast the removal in a real game — so the mana is
   still spent; what the second line shows is how much of it went into the roles being asked
   about. Both regions keep meaning one thing, which a filter would have destroyed: mana spent
   on removal shown as *idle* would simply be false.
   Invisible until the menu is used, because with nothing excluded the two lines coincide. */
.deck-stat-other-band{fill:var(--surface-sunken);opacity:.7}
.deck-stat-counted-line{fill:none;stroke:var(--muted);stroke-width:1.5;stroke-linejoin:round}
.deck-stat-counted-dot{fill:var(--muted)}
.deck-stat-axis{fill:var(--faint);font:10px system-ui}
.deck-stat-turn{fill:var(--muted);font:700 11px system-ui}
.deck-stat-value{fill:var(--ink);font:600 11px system-ui}
.deck-stat-chart-legend{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:10px 0 0;color:var(--muted);font-size:11px}
.deck-stat-key{display:inline-flex;align-items:center;gap:6px}
.deck-stat-key::before{content:"";width:12px;height:0;border-radius:2px}
.deck-stat-key-spent::before{border-top:2px solid var(--accent)}
.deck-stat-key-available::before{border-top:2px dashed var(--line-strong)}
.deck-stat-key-idle::before{height:11px;background:var(--accent-soft);border:.5px solid var(--line)}
.deck-stat-key-counted::before{border-top:2px solid var(--muted)}
.deck-stat-key-note{color:var(--faint)}
@media(max-width:560px){
  /* The per-point figures go: seven of them do not fit 340px, and the hidden table carries
     the exact numbers for anybody who wants them. The lines still show the shape. */
  .deck-stat-chart{margin-top:12px}
  .deck-stat-value{display:none}
  .deck-stat-chart-legend{gap:10px}
  .deck-stat-key-note{flex:1 1 100%}
}
