/* Legend pages (site/legend-hub.mjs) reuse set-hub.css. These rules cover what a Legend adds:
   the card beside the hero copy, the ability text, the deck table and the Legends index. */
.legend-hero{grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:0}
.legend-hero .set-hero-art{overflow:hidden}
.legend-hero .set-hero-art img{object-position:50% 22%;filter:blur(3px) saturate(1.15);opacity:.55;transform:scale(1.08)}
.legend-hero .set-hero-copy{align-self:center;max-width:700px}
.legend-hero .set-hero-date{font-size:clamp(20px,2.2vw,26px)}
.legend-domains{display:flex;gap:16px;margin:0 0 16px;color:#f3f3ef}
.legend-domains .domain-label{display:inline-flex;align-items:center;gap:7px;font:15px var(--body)}
.legend-ability{max-width:640px;margin:0 0 22px;padding:14px 18px;border:1px solid rgba(255,255,255,.26);background:rgba(10,10,10,.72)}
.legend-ability p{margin:0;font:17px/1.6 var(--body);color:#f3f3ef}
.legend-hero-card{display:block;width:clamp(220px,24vw,330px);margin:clamp(24px,4vw,48px) clamp(24px,5vw,70px) clamp(24px,4vw,48px) 0}
.legend-hero-card img,.legend-hero-card .hub-face{display:block;width:100%;height:auto;border-radius:14px;box-shadow:0 24px 60px rgba(0,0,0,.6)}
.legend-cards .hub-meta{text-transform:none}
.legend-decks{width:100%;border-collapse:collapse;border:1px solid var(--soft)}
.legend-decks th,.legend-decks td{padding:14px 16px;border-bottom:1px solid var(--soft);text-align:left;font:16px var(--body)}
.legend-decks thead th{font:14px var(--body);color:var(--muted);background:var(--bg2)}
.legend-decks tbody th{font:700 21px/1.1 var(--head);text-transform:uppercase}
.legend-decks tbody th a{color:var(--ink);text-decoration:none}
/* The same finish badge as Decks and deck pages: "1st", "5th". */
.legend-rank{color:var(--ink);white-space:nowrap}
.legend-rank .finish{display:inline-block;font:500 14px/1.5 var(--body);padding:2px 8px;background:var(--bg3);border:1px solid var(--soft);color:var(--ink)}
.legend-rank .finish-winner{font-weight:700;border-color:color-mix(in srgb,var(--ink) 55%,transparent)}
/* The Legends index title already says where you are; a lone "Home" crumb only costs a row. */
body:has(.legend-index-page) main>.breadcrumbs{display:none}
.legend-best-of{white-space:nowrap}
/* Today's bans: the Legend's own line in the hero, and the same flag Decks uses beside banned cards and lists. */
.legend-ban{margin:0 0 16px;font:600 15px/1.4 var(--body);color:#f08a7e}
.legend-ban a{color:inherit}
.legend-hub .deck-flag{display:inline-block;margin-left:6px;padding:1px 6px;border:1px solid #f08a7e;color:#f08a7e;font:600 13px/1.4 var(--body);letter-spacing:.02em;white-space:nowrap;vertical-align:1px}
.legend-date{font:14px var(--mono);color:var(--muted);white-space:nowrap}
.legend-open{text-align:right}
.legend-rulings details{border-bottom:1px solid var(--soft);padding:14px 0}
.legend-rulings summary{cursor:pointer;font:600 17px/1.4 var(--body)}
.legend-rulings p{margin:8px 0 0;font:16px/1.55 var(--body)}
.legend-tag-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin:0 0 14px}
.hub-grid+.legend-tag-head{margin-top:36px}
.legend-tag-head h3{margin:0;font:700 26px/1 var(--head);text-transform:uppercase}
.legend-tag-head h3 a{color:var(--ink);text-decoration:none}
.legend-section-head{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:0 0 20px}
.legend-section-head h2{margin:0}
.legend-section-head>a{margin-left:auto}
.legend-index-page .hub-section:first-child{margin-top:28px}
/* Fixed widths: picking a set or domain never reflows the toolbar (B-16). */
.legend-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:20px 0 24px}
.legend-filters select{width:170px}
.legend-filters select[name=decks]{width:230px}
.legend-filters .grow{flex:1 1 220px}
.legend-filters input,.legend-filters select{min-height:44px;box-sizing:border-box}
/* Digits of one width and room for "12 of 71 Legends", so the count never nudges the search box. */
.legend-filters .fine{margin:0 0 0 auto;min-width:9em;text-align:right;font-variant-numeric:tabular-nums}
.legend-index{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:30px 16px}
.legend-tile a{display:flex;flex-direction:column;gap:6px;color:var(--ink);text-decoration:none}
.legend-tile .hub-card-art img,.legend-tile .hub-face{border-radius:10px}
.legend-tile a:hover img,.legend-tile a:focus-visible img{outline:2px solid var(--ac);outline-offset:3px}
.legend-tile-meta{display:flex;align-items:center;gap:6px;margin-top:6px;font:13px var(--mono);letter-spacing:.04em;color:var(--muted)}
.legend-starter{font:500 13px var(--body);background:var(--bg3);color:var(--ink);padding:2px 6px}
.legend-tile .legend-name{font:700 22px/1 var(--head);text-transform:uppercase}
.legend-tile .legend-subtitle{font:14px/1.25 var(--body);color:var(--muted)}
.legend-tile-decks{font:13px var(--body);color:var(--ac)}
.legend-tile-decks.is-none{color:var(--muted)}
@media(max-width:800px){
.legend-hero{grid-template-columns:1fr;padding-top:0}
.legend-hero .set-hero-art{bottom:0;height:auto}
.legend-hero::after{background:linear-gradient(180deg,rgba(8,8,8,.35) 0%,rgba(8,8,8,.9) 45%,#0b0b0b 70%)}
.legend-hero-card{order:-1;justify-self:center;width:150px;margin:24px auto 0}
.legend-hero .set-hero-copy{padding:20px 18px 26px}
.legend-hero .set-hero-art img{opacity:.45}
/* The hero meets the breadcrumb (no strip of page light between them), and the art credit follows the
   content it credits instead of leading the hero. */
.legend-hero{margin-top:0}
.legend-hero .set-hero-credit{position:relative;inset:auto;z-index:1;max-width:none;margin:-14px 18px 18px;padding:0;background:none;color:#c9c9c3;text-align:left}
}
@media(max-width:700px){
.legend-decks thead{display:none}
.legend-decks tr{display:grid;grid-template-columns:52px 1fr auto;column-gap:10px;padding:12px 0;border-bottom:1px solid var(--soft)}
.legend-decks th,.legend-decks td{padding:0;border:0}
.legend-decks .legend-rank{grid-row:span 2;align-self:center}
.legend-decks tbody th{font-size:19px}
.legend-decks td:nth-child(3){grid-column:2;font:13px var(--body);color:var(--muted)}
.legend-decks .legend-date{grid-column:3;grid-row:1}
.legend-decks .legend-open{display:none}
.legend-decks{border:0}
.legend-index{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}
.legend-filters .fine{margin:0;width:100%}
}
/* Keyword pages (site/keyword-pages.mjs) share the Legend hero; the reminder is the printed chip and text. */
.keyword-hero .set-hero-copy{padding-block:clamp(28px,4vw,52px)}
.keyword-reminder .fine{margin:10px 0 0;color:#c9c9c3}
.keyword-reminder .fine a{color:inherit}
.keyword-explained{max-width:640px;margin:0 0 20px;font:16px/1.6 var(--body);color:#ecece6}
.keyword-explained a{color:inherit}
.keyword-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:12px}
.keyword-list a{display:flex;flex-direction:column;gap:8px;height:100%;box-sizing:border-box;padding:16px 18px;border:1px solid var(--soft);border-top:2px solid var(--ac);background:var(--bg2);color:var(--ink);text-decoration:none}
.keyword-list a:hover,.keyword-list a:focus-visible{border-color:var(--ac)}
.keyword-name{font:700 26px/1 var(--head);text-transform:uppercase}
.keyword-reminder-line{font:15px/1.5 var(--body);color:var(--ink)}
.keyword-list .hub-meta{margin-top:auto}
/* Domain dots beside the Legend's domains, matching the card pages. */
.domain-dot{display:inline-block;width:8px;height:8px;flex:none;border-radius:50%;background:var(--muted)}.domain-fury{background:var(--fury)}.domain-calm{background:var(--calm)}.domain-mind{background:var(--mind)}.domain-body{background:var(--body-color)}.domain-chaos{background:var(--chaos)}.domain-order{background:var(--order)}

/* A Legend page's accent is its first domain, like the card frame; keyword pages stay neutral. */
.legend-hub[data-domain-1=Fury]{--set-accent:var(--fury)}.legend-hub[data-domain-1=Calm]{--set-accent:var(--calm)}.legend-hub[data-domain-1=Mind]{--set-accent:var(--mind)}.legend-hub[data-domain-1=Body]{--set-accent:var(--body-color)}.legend-hub[data-domain-1=Chaos]{--set-accent:var(--chaos)}.legend-hub[data-domain-1=Order]{--set-accent:var(--order)}
.keyword-hub{--set-accent:var(--muted)}
/* What the Legend's decks play: one row per card, the lists that include it and the copies. */
.legend-plays{width:100%;border-collapse:collapse;border:1px solid var(--soft);background:var(--bg)}
.legend-plays th,.legend-plays td{padding:8px 14px;border-bottom:1px solid var(--soft);text-align:left;font:16px var(--body);vertical-align:middle}
.legend-plays thead th{font:14px var(--body);color:var(--muted);background:var(--bg2)}
.legend-plays tbody th{font-weight:600}
.legend-plays tbody th a{color:var(--ink);text-decoration:none}
.legend-plays tbody th a:hover,.legend-plays tbody th a:focus-visible{text-decoration:underline}
.legend-plays .legend-plays-art{width:40px;box-sizing:content-box;padding-right:0}
.legend-plays img,.legend-plays-blank{display:block;width:40px;min-width:40px;max-width:none;height:56px;object-fit:cover;border-radius:4px;background:var(--bg2)}
.legend-plays .legend-plays-lists{font:15px var(--mono);white-space:nowrap}
.legend-plays-line{max-width:80ch;margin:16px 0;font:16px/1.6 var(--body)}
.legend-plays-more{margin-top:16px}
.legend-plays-more>summary{cursor:pointer;font:600 15px var(--body);padding:10px 0}
@media(max-width:700px){.legend-plays th,.legend-plays td{padding:8px 8px;font-size:15px}.legend-plays thead th:nth-child(4),.legend-plays td:nth-child(4){font-size:14px;color:var(--muted)}}
/* A printing tile's card code never breaks across lines. */
.legend-code{white-space:nowrap}

/* Phones (B-05, B-08, B-26): Build and the decks come straight after the name; the stats are one quiet
   line; every tournament deck row is one link; the filters are a tidy grid that never reflows. */
@media(max-width:800px){
 /* Keyword pages share the hero markup but keep their own order. The ban line stays above Build. */
 .legend-hero:not(.keyword-hero) .set-hero-copy{display:flex;flex-direction:column}
 .legend-hero:not(.keyword-hero) .set-hero-copy>.actions{order:1;margin:16px 0 0}
 .legend-hero:not(.keyword-hero) .actions .button.primary{order:-1}
 .legend-hero:not(.keyword-hero) .set-hero-copy>.legend-ability{order:2;margin-top:18px}
 .legend-hero:not(.keyword-hero) .set-hero-copy>.set-stats{order:3;display:flex;flex-wrap:wrap;gap:4px 16px;margin:16px 0 0}
 .legend-hero:not(.keyword-hero) .set-stats li{display:inline-flex;align-items:baseline;gap:6px;min-width:0;flex:none;padding:0;border:0;background:none}
 .legend-hero:not(.keyword-hero) .set-stats strong{display:inline;font:600 15px/1.4 var(--body)}
 .legend-hero:not(.keyword-hero) .set-stats span{display:inline;margin:0;font:15px/1.4 var(--body);color:#c9c9c3}
}
@media(max-width:700px){
 .legend-decks tr{position:relative;min-height:56px;padding-right:28px}
 .legend-decks tbody th a{color:inherit;text-decoration:none}
 .legend-decks tbody th a::after{content:'';position:absolute;inset:0}
 .legend-decks tbody th a:focus-visible::after{outline:2px solid var(--ac);outline-offset:-2px}
 .legend-decks tr::after{content:'›'/'';position:absolute;right:4px;top:50%;transform:translateY(-50%);font:24px var(--body);color:var(--muted)}
 .legend-decks tr:active{background:var(--bg2)}
 .legend-filters{display:grid;grid-template-columns:1fr 1fr}
 .legend-filters .grow{grid-column:1/-1}
 .legend-filters select,.legend-filters select[name=decks]{width:100%}
 .legend-filters .fine{grid-column:1/-1;min-width:0;text-align:left}
}
/* Short phone screens (iPhone SE): a smaller card keeps Build on the first screen. */
@media(max-width:800px) and (max-height:620px){
 .legend-hero:not(.keyword-hero) .legend-hero-card{width:100px;margin-top:16px}
 .legend-hero:not(.keyword-hero) .set-hero-copy{padding-top:14px}
}
