/* Font faces used to live in a separate fonts.css. They are inlined here
   because two render-blocking stylesheets meant two round trips before the
   browser could paint any text, and the split bought nothing - both were
   fetched on every page anyway. public/fonts.css is still served, because
   Cloudflare holds cached HTML referencing it for up to an hour after this
   deploy; it can be deleted once that window has passed. */

/* Fonturi găzduite local, nu de la fonts.googleapis.com.
   Motiv: încărcarea fonturilor de la Google trimite adresa IP a fiecărui
   vizitator către serverele Google, ceea ce este o transmitere de date cu
   caracter personal fără temei legal (Tribunalul din München, 2022). Fonturile
   sunt open source, iar Google permite explicit găzduirea locală.
   Doar subseturile latin și latin-ext - restul nu ne trebuie pentru română. */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-sans-3-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* magicthegathering.ro — foaie de stil unică
   Layout: o singură coloană, max 46rem. Breakpoint unic: 48rem.
   Sub 48rem explicația de keyword apare ca panou fixat jos;
   de la 48rem în sus se deschide inline, împingând textul în jos. */

:root{
  --paper:#faf6ef; --surface:#fffdf8; --surface-2:#f7f2e9; --panel:#faf5ec;
  --ink:#2b211a; --muted:#6f6155; --faint:#7b6d59;
  --rule:#e3d9c9; --rule-soft:#efe7d9; --field:#cdbfa9;
  --accent:#af542d; --accent-ink:#8e4123; --accent-soft:#f4ece0; --accent-dot:#c98b62;
  --on-accent:#fffdf8;
  --texture-ink:rgba(43,33,26,.07);
  --wrap:46rem; --pad:1.25rem; --radius:.625rem;
  --sans:"Source Sans 3",-apple-system,"Segoe UI",system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
}
@media (prefers-color-scheme:dark){
  :root{
    --paper:#17140f; --surface:#1f1b16; --surface-2:#1b1712; --panel:#242019;
    --ink:#ece4d8; --muted:#9c9082; --faint:#928777;
    --rule:#342d25; --rule-soft:#2c261f; --field:#463c31;
    --accent:#d98254; --accent-ink:#e39a72; --accent-soft:#28221b; --accent-dot:#8a5836;
    --on-accent:#17140f; --texture-ink:rgba(236,228,216,.05);
  }
}
/* comutare manuală, dacă adaugi un buton de temă */
html[data-theme="dark"]{
  --paper:#17140f; --surface:#1f1b16; --surface-2:#1b1712; --panel:#242019;
  --ink:#ece4d8; --muted:#9c9082; --faint:#928777;
  --rule:#342d25; --rule-soft:#2c261f; --field:#463c31;
  --accent:#d98254; --accent-ink:#e39a72; --accent-soft:#28221b; --accent-dot:#8a5836;
  --on-accent:#17140f;
}
html[data-theme="light"]{color-scheme:light}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font:1rem/1.55 var(--sans);
  text-rendering:optimizeLegibility;
  min-height:100vh;display:flex;flex-direction:column;
}
/* Textură de fundal: motive MTG (vrăjitori, vrăji, cărți) foarte estompate,
   colorate după temă printr-un mask (SVG-ul e negru pe transparent, masca
   preia doar liniile). Umple marginile goale pe desktop fără să concureze
   cu textul. --texture-ink dă culoarea/opacitatea potrivită fiecărei teme. */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-color:var(--texture-ink);
  -webkit-mask:url(/magic-texture.svg) 0 0 / 512px 512px repeat;
          mask:url(/magic-texture.svg) 0 0 / 512px 512px repeat;
}
h1,h2,h3,p,ul,ol{margin:0}
img{max-width:100%;display:block}
a{color:var(--accent);text-underline-offset:.15em}
a:hover{color:var(--accent-ink)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}

.sr-only{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:var(--pad)}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* ---------- antet / subsol ---------- */
.site-header{border-bottom:1px solid var(--rule);background:var(--surface)}
.site-header .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;column-gap:1rem}
.brand{display:inline-flex;align-items:center;min-height:3.25rem;gap:.45rem;font-size:.9375rem;font-weight:700;letter-spacing:-.01em;color:var(--ink);text-decoration:none}
.brand-mark{width:1.75em;height:1.75em;flex:none}
.brand .tld{color:var(--accent)}
.site-nav{order:3;flex:1 0 100%;display:flex;flex-wrap:wrap;gap:.35rem 1.125rem;padding-bottom:.65rem;font-size:.875rem}
.site-nav a{color:var(--muted);text-decoration:none}
.site-nav a:hover{color:var(--ink)}
.header-search{display:flex;align-items:center;gap:.25rem;flex:none}
.header-search input{font:.875rem var(--sans);padding:.4rem .55rem;border:1px solid var(--rule);border-radius:.4rem;background:var(--surface-2);color:var(--ink);width:11rem;max-width:38vw}
.header-search input::placeholder{color:var(--faint)}
.header-search input:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
.header-search button{display:inline-flex;align-items:center;justify-content:center;padding:.4rem;border:1px solid var(--rule);border-radius:.4rem;background:var(--surface-2);color:var(--muted);cursor:pointer}
.header-search button:hover{color:var(--accent);border-color:var(--accent)}
@media (max-width:29.99rem){
  .header-search{flex:1 0 100%;padding-bottom:.6rem}
  .header-search input{flex:1;width:auto;max-width:none;min-width:0}
}
.back{font-size:.8125rem;color:var(--muted);text-decoration:none}

.site-footer{margin-top:2rem;border-top:1px solid var(--rule);background:var(--surface-2)}
.site-footer .wrap{display:flex;flex-direction:column;gap:.5rem;padding-block:1.125rem 1.5rem}
.site-footer p{font-size:.8125rem;line-height:1.5;color:var(--muted)}
.site-footer a{color:var(--accent-ink)}

/* ---------- conținut generic ---------- */
main{flex:1 0 auto;padding-block:1.5rem}
.page-title{font-size:1.5rem;font-weight:700;letter-spacing:-.02em;line-height:1.2;text-wrap:pretty}
.lede{margin-top:.5rem;color:var(--muted);text-wrap:pretty}
.section-title{margin-top:1.5rem;font-size:1.0625rem;font-weight:700}
.prose{margin-top:.5rem;line-height:1.65}
.prose li+li{margin-top:.4375rem}

/* ---------- căutare ---------- */
.search{display:flex;flex-direction:column;gap:.625rem;margin-top:1.5rem}
.search label{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.search input{
  width:100%;padding:.875rem .9375rem;font:1.0625rem/1.2 var(--mono);
  color:var(--ink);background:var(--surface);border:1.5px solid var(--field);border-radius:.5625rem;
}
.search input::placeholder{color:var(--faint)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:2.75rem;padding:.75rem 1rem;border:none;border-radius:.5rem;
  font:600 1rem/1 var(--sans);color:var(--on-accent);background:var(--accent);
  text-decoration:none;cursor:pointer;
}
.btn:hover{background:var(--accent-ink);color:var(--on-accent)}
.btn-quiet{color:var(--accent-ink);background:var(--accent-soft);border:1px solid var(--rule)}
.btn-quiet:hover{background:var(--surface-2);color:var(--accent-ink)}

/* ---------- liste de cărți / termeni ---------- */
.card-list{list-style:none;margin-top:1rem;padding:0;border-top:1px solid var(--rule-soft)}
.card-list a{
  display:flex;justify-content:space-between;gap:.75rem;
  padding:.8125rem 0;border-bottom:1px solid var(--rule-soft);
  color:inherit;text-decoration:none;
}
.card-list a:hover{background:var(--surface-2)}
.card-list .name{font:500 1rem/1.3 var(--mono);letter-spacing:-.01em}
.card-list .meta{font-size:.8125rem;color:var(--muted);margin-top:.1875rem}
.card-list .aside{font-size:.8125rem;color:var(--faint);white-space:nowrap}
.result-count{margin-top:.75rem;font-size:.8125rem;color:var(--muted)}
.result-count strong{font:500 .8125rem var(--mono);color:var(--ink)}

/* ---------- pagina cardului ---------- */
.card-shot{
  /* height:auto is required, not cosmetic. The <img> carries width="488"
     height="680" attributes, and that height overrides aspect-ratio,
     rendering the card 280x680 and cropping the art. Regenerating the
     design drops this - re-apply and re-check every time. */
  width:100%;height:auto;aspect-ratio:488/680;border-radius:.75rem;border:1px solid var(--rule);
  background:var(--surface-2);object-fit:cover;
}
.card-shot--missing{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;
  padding:0 1.75rem;text-align:center;border-style:dashed;
}
.card-shot--missing .cs-name{font:1rem/1.3 var(--mono);color:var(--muted)}
.card-shot--missing .cs-note{font-size:.8125rem;line-height:1.5;color:var(--faint)}
.card-title{margin-top:1.125rem;font:600 1.375rem/1.25 var(--mono);letter-spacing:-.02em}
.card-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;margin-top:.25rem;font-size:.875rem;color:var(--muted)}
.mana{font:.8125rem/1.4 var(--mono);padding:.125rem .4375rem;background:var(--accent-soft);border:1px solid var(--rule);border-radius:.3125rem;color:var(--ink)}
.pt{font:.8125rem var(--mono)}

.oracle{margin-top:1.125rem;padding:1rem;background:var(--panel);border:1px solid var(--rule);border-radius:var(--radius)}
.oracle h2{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--faint)}
.oracle-text{font:.9375rem/1.7 var(--sans);color:var(--ink);overflow-wrap:anywhere}
.oracle-text p+p{margin-top:.6875rem;padding-left:.75rem;border-left:2px solid var(--rule)}
.oracle-text p:first-child:not(:only-child){padding-left:.75rem;border-left:2px solid var(--rule)}
.oracle-ro{font:.9375rem/1.7 var(--sans);color:var(--ink)}
.oracle-hint{margin-top:.75rem;font:.75rem/1.45 var(--sans);color:var(--faint)}
.breadcrumb ol{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;list-style:none;padding:.55rem 0;font:.8125rem/1.3 var(--sans);color:var(--muted)}
.breadcrumb li{display:flex;align-items:center;gap:.4rem}
.breadcrumb li+li::before{content:"›";color:var(--faint)}
.breadcrumb a{color:var(--muted);text-decoration:none}
.breadcrumb a:hover{color:var(--accent);text-decoration:underline}
.breadcrumb li[aria-current="page"]{color:var(--ink)}

/* module pe pagina de start */
.module-kicker{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--faint)}
.home-search{margin-top:1.5rem;padding:1.25rem;background:var(--panel);border:1px solid var(--rule);border-radius:var(--radius);box-shadow:0 1px 3px rgba(43,33,26,.05)}
.home-search .search{margin-top:0}
.home-search .search-hint{margin:.875rem 0 0;font-size:.9375rem;color:var(--muted)}
.feature{margin-top:1.25rem;padding:1.25rem;background:var(--panel);border:1px solid var(--rule);border-radius:var(--radius);box-shadow:0 1px 3px rgba(43,33,26,.05)}
.feature-body{margin-top:.875rem;display:grid;grid-template-columns:1fr;gap:1rem}
.feature-shot{width:9rem;margin:0}
.feature-text h2{font:600 1.25rem/1.25 var(--mono);letter-spacing:-.02em}
.feature-text h2 a{color:inherit;text-decoration:none}
.feature-text h2 a:hover{color:var(--accent-ink)}
.gloss-ro{font:400 .9375rem/1.3 var(--sans);color:var(--muted)}
.type-ro{margin-top:.25rem;font-size:.9375rem;color:var(--muted)}
.type-en{font-family:var(--mono);font-size:.8125rem}
.feature-what{margin-top:.625rem;line-height:1.6;text-wrap:pretty}
.feature-text p:last-child{margin-top:.75rem;font-size:.9375rem}
.modules{margin-top:1rem;display:grid;grid-template-columns:1fr;gap:1rem;align-items:start}
.module{padding:1.125rem;background:var(--panel);border:1px solid var(--rule);border-radius:var(--radius);display:flex;flex-direction:column}
.module-term{margin-top:.5rem;font:500 1.375rem/1.2 var(--mono);letter-spacing:-.02em;color:var(--accent-ink)}
.module-body{margin-top:.5rem;font-size:.9375rem;line-height:1.55;color:var(--ink);text-wrap:pretty}
.module>p:last-child{margin-top:auto;padding-top:.875rem;font-size:.9375rem}
@media (min-width:48rem){
  .feature-body{grid-template-columns:11rem 1fr;gap:1.5rem;align-items:start}
  .feature-shot{width:100%}
  .modules{grid-template-columns:1fr 1fr}
  .module--kw{grid-column:1/-1;display:grid;grid-template-columns:15rem 1fr;column-gap:1.75rem;row-gap:.25rem}
  .module--kw .module-kicker{grid-column:1;grid-row:1}
  .module--kw .module-term{grid-column:1;grid-row:2}
  .module--kw .module-body{grid-column:2;grid-row:1 / span 3;margin-top:0;align-self:center}
  .module--kw>p:last-child{grid-column:1;grid-row:3}
}

/* cuvântul-cheie marcat */
.kw{
  font:inherit;color:var(--accent-ink);background:none;border:none;
  padding:.375rem 0;line-height:1;border-bottom:2px dotted var(--accent-dot);cursor:pointer;
  /* .kw is an <a>, so suppress the default underline; the dotted
     border-bottom above is the intended affordance. Regeneration drops this. */
  text-decoration:none;
}
.kw:hover{border-bottom-style:solid}
.kw[aria-expanded="true"]{background:var(--accent-soft);border-bottom-style:solid}

/* preț */
.price{
  margin-top:1rem;padding:.875rem 1rem;border:1px solid var(--rule);border-radius:var(--radius);
  display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;
}
.price .amount{font-size:1.1875rem;font-weight:700}
.price .dated{font-size:.71875rem;line-height:1.4;color:var(--muted)}
.price--missing{border-style:dashed;background:var(--surface-2);display:block}
.price--missing .amount{color:var(--muted);font-size:.90625rem}
.credit{margin-top:.875rem;font-size:.71875rem;line-height:1.5;color:var(--faint)}

/* ---------- glosar ---------- */
.glossary{list-style:none;margin-top:1rem;padding:0;border-top:1px solid var(--rule-soft)}
.glossary a{display:block;padding:.75rem 0;border-bottom:1px solid var(--rule-soft);text-decoration:none;color:inherit}
.glossary a:hover{background:var(--surface-2)}
.glossary .term{font:500 .9375rem var(--mono);color:var(--accent-ink)}
.glossary .gloss{margin-top:.125rem;font-size:.84375rem;line-height:1.45;color:var(--muted);text-wrap:pretty}
.term-kicker{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--faint)}
.term-title{margin-top:.375rem;font:600 1.875rem/1.1 var(--mono);letter-spacing:-.03em}
.summary{
  margin-top:.75rem;padding:.875rem 1rem;background:var(--accent-soft);
  border:1px solid var(--rule);border-radius:var(--radius);
  font-size:1.03125rem;line-height:1.55;text-wrap:pretty;
}
.chips{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}
.chips a{
  padding:.4375rem .6875rem;font:.8125rem var(--mono);text-decoration:none;
  color:var(--accent-ink);background:var(--accent-soft);border:1px solid var(--rule);border-radius:1.25rem;
}

/* ---------- reclamă ---------- */
.ad{
  margin-top:1.5rem;padding:1.25rem .75rem;border:1px dashed var(--rule);border-radius:.5rem;
  text-align:center;font:.6875rem var(--mono);color:var(--faint);min-height:5.5rem;
  display:flex;align-items:center;justify-content:center;
}

/* ---------- panoul de explicație ----------
   Markup identic pe ambele lățimi; doar poziționarea diferă. */
.kw-panel[hidden]{display:none}
.kw-panel{
  position:fixed;left:0;right:0;bottom:0;z-index:20;
  padding:.75rem var(--pad) 1.25rem;
  background:var(--surface);border-top:1px solid var(--field);
  border-radius:.875rem .875rem 0 0;box-shadow:0 -.5rem 1.75rem rgba(0,0,0,.18);
  animation:kw-up .16s ease-out;
}
@media (prefers-reduced-motion:reduce){.kw-panel{animation:none}}
@keyframes kw-up{from{transform:translateY(1rem);opacity:0}to{transform:none;opacity:1}}
.kw-panel .grip{width:2.375rem;height:.25rem;margin:0 auto .75rem;border-radius:.125rem;background:var(--rule)}
.kw-panel header{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.kw-panel h2{font:500 1rem var(--mono)}
.kw-panel p{margin-top:.125rem;font-size:.9375rem;line-height:1.55;text-wrap:pretty}
.kw-panel .more{display:inline-block;margin-top:.625rem;font-size:.875rem}
.kw-close{
  min-height:2.75rem;min-width:2.75rem;margin:-.625rem -.25rem;
  font:.8125rem var(--sans);color:var(--muted);background:none;border:none;cursor:pointer;
}
.kw-close:hover{color:var(--ink)}

@media (min-width:48rem){
  :root{--pad:1.75rem}
  .kw-panel{
    position:static;margin-top:.875rem;padding:.875rem .9375rem;
    background:var(--surface);border:1px solid var(--rule);border-left:3px solid var(--accent);
    border-radius:.5rem;box-shadow:none;animation:none;
  }
  .kw-panel .grip{display:none}
  .card-figure{float:none}
  .card-layout{display:grid;grid-template-columns:17.5rem 1fr;gap:1.75rem;align-items:start}
  .card-title{margin-top:0}
  .page-title{font-size:1.75rem}
}
@media print{
  .ad,.kw-panel,.site-nav{display:none}
  body{background:#fff;color:#000}
}

/* ---------- index de seturi ---------- */
.year-group{margin-top:1.75rem}
.year-group>h2{
  position:sticky;top:0;z-index:5;
  display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;
  margin:0;padding:.4375rem 0;background:var(--paper);
  border-bottom:2px solid var(--rule);
  font:700 1.125rem/1.2 var(--sans);letter-spacing:-.01em;
}
.year-group>h2 .count{font:.75rem var(--sans);font-weight:400;color:var(--faint)}
.set-list{list-style:none;margin:0;padding:0}
.set-list>li{border-bottom:1px solid var(--rule-soft)}
.set-list a,.set-list .row{
  display:grid;grid-template-columns:3.25rem 1fr auto;gap:.375rem .75rem;
  align-items:baseline;padding:.6875rem 0;color:inherit;text-decoration:none;
}
.set-list a:hover{background:var(--surface-2)}
.set-code{
  grid-row:span 2;align-self:start;margin-top:.125rem;
  font:500 .75rem/1.4 var(--mono);text-transform:uppercase;letter-spacing:.02em;
  text-align:center;padding:.1875rem .25rem;color:var(--accent-ink);
  background:var(--accent-soft);border:1px solid var(--rule);border-radius:.25rem;
}
.set-name{font-size:1rem;font-weight:600;line-height:1.3;text-wrap:pretty}
.set-cards{font:.8125rem/1.4 var(--mono);color:var(--muted);white-space:nowrap;text-align:right}
.set-facts{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:.25rem .5rem;font-size:.8125rem;color:var(--muted)}
.set-facts .sep{color:var(--rule)}
.tag{
  font:.6875rem/1.5 var(--sans);font-weight:600;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);
}
.jump{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:1rem}
.jump a{
  padding:.3125rem .5rem;font:.8125rem var(--mono);text-decoration:none;
  color:var(--accent-ink);background:var(--accent-soft);border:1px solid var(--rule);border-radius:.25rem;
}

/* ---------- pagina de set ---------- */
.set-head{margin-top:.25rem}
.set-head .code-big{font:500 .875rem/1 var(--mono);text-transform:uppercase;letter-spacing:.08em;color:var(--accent-ink)}
.set-head h1{margin-top:.5rem;font-size:1.5rem;font-weight:700;line-height:1.2;letter-spacing:-.02em;text-wrap:balance}
.dl-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:.75rem;margin:1rem 0 0}
.dl-facts div{padding:.625rem .75rem;background:var(--surface-2);border:1px solid var(--rule);border-radius:.375rem}
.dl-facts dt{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--faint)}
.dl-facts dd{margin:.1875rem 0 0;font-size:.9375rem;line-height:1.35}
.setcards{list-style:none;margin-top:1rem;padding:0;border-top:1px solid var(--rule-soft)}
.setcards a{
  display:grid;grid-template-columns:2.75rem 1fr auto;gap:.75rem;align-items:baseline;
  padding:.5625rem 0;border-bottom:1px solid var(--rule-soft);color:inherit;text-decoration:none;
}
.setcards a:hover{background:var(--surface-2)}
.setcards .num{font:.8125rem/1.4 var(--mono);color:var(--faint);text-align:right}
.setcards .name{font:500 .9375rem/1.35 var(--mono);letter-spacing:-.01em;overflow-wrap:anywhere}
.setcards .rar{font:.6875rem/1.5 var(--sans);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);white-space:nowrap}
.setcards .rar[data-r="mythic"]{color:var(--accent-ink)}
.pager{display:flex;justify-content:space-between;gap:.75rem;margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--rule)}
.pager a{max-width:48%;font-size:.875rem;text-decoration:none;color:var(--accent-ink)}
.pager .dir{display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--faint)}
.pager .to{display:block;margin-top:.125rem;line-height:1.3;text-wrap:pretty}
.pager .next{text-align:right;margin-left:auto}
.empty{
  margin-top:1rem;padding:1rem;border:1px dashed var(--rule);border-radius:var(--radius);
  background:var(--surface-2);
}
.empty p{font-size:.875rem;line-height:1.5;color:var(--muted)}
.empty p+p{margin-top:.375rem}

/* ---------- calendar ---------- */
.upcoming{list-style:none;margin-top:1rem;padding:0;display:flex;flex-direction:column;gap:.625rem}
.upcoming>li{
  display:grid;grid-template-columns:4.5rem 1fr;gap:.75rem;align-items:center;
  padding:.75rem .875rem;background:var(--surface);border:1px solid var(--rule);border-radius:var(--radius);
}
.upcoming>li.soon{border-color:var(--accent-dot);border-left:3px solid var(--accent)}
.countdown{text-align:center;line-height:1.05}
.countdown .n{display:block;font:700 1.375rem/1 var(--sans);color:var(--accent-ink)}
.countdown .u{display:block;margin-top:.1875rem;font-size:.6875rem;text-transform:uppercase;letter-spacing:.06em;color:var(--faint)}
.countdown .tba{display:block;font:.75rem/1.3 var(--sans);color:var(--faint)}
.upcoming .set-name{font-size:.9375rem}
.upcoming .when{margin-top:.125rem;font-size:.8125rem;color:var(--muted)}
.upcoming a{color:inherit;text-decoration:none}
.upcoming a:hover .set-name{color:var(--accent-ink)}

@media (min-width:48rem){
  .set-list a,.set-list .row{grid-template-columns:3.5rem 1fr 7rem auto}
  .set-facts{grid-column:auto;justify-content:flex-end}
  .set-head h1{font-size:1.875rem}
}

/* ---------- curs pentru începători ---------- */
.lesson-list{list-style:none;margin-top:1.25rem;padding:0;border-top:1px solid var(--rule-soft)}
.lesson-list a{
  display:flex;align-items:baseline;gap:.875rem;
  padding:.875rem 0;border-bottom:1px solid var(--rule-soft);
  color:inherit;text-decoration:none;
}
.lesson-list a:hover{background:var(--surface-2)}
.lesson-n{
  flex:0 0 1.75rem;font:600 .8125rem/1.75rem var(--mono);text-align:center;
  color:var(--accent-ink);background:var(--accent-soft);border-radius:.3125rem;
}
.lesson-body{flex:1 1 auto;min-width:0}
.lesson-title{display:block;font-weight:600}
.lesson-summary{display:block;margin-top:.125rem;font-size:.8125rem;color:var(--muted)}
.lesson-min{flex:0 0 auto;font-size:.75rem;color:var(--faint);white-space:nowrap}

.lesson-text{margin-top:1.25rem}
.lesson-text .prose-p{margin-top:.875rem;line-height:1.65;text-wrap:pretty}
.lesson-text .section-title{margin-top:1.75rem}
.lesson-text .prose{margin-top:.625rem}

.tip{
  margin-top:1rem;padding:.875rem 1rem;
  background:var(--accent-soft);border-left:3px solid var(--accent);
  border-radius:0 var(--radius) var(--radius) 0;
}
.tip p{font-size:.9375rem;line-height:1.6}

.example{
  margin-top:1rem;padding:.875rem 1rem;
  border:1px solid var(--rule);border-radius:var(--radius);background:var(--panel);
}
.example-label{
  font-size:.6875rem;font-weight:600;text-transform:uppercase;
  letter-spacing:.08em;color:var(--faint);
}
.example-card{margin-top:.25rem;font:500 1rem var(--mono)}
.example p:last-child{margin-top:.375rem;font-size:.9375rem;line-height:1.6;color:var(--muted)}

/* ---------- scena din România ----------
   Componentă proprie, nu .set-list: un magazin are nume lung, oraș, o
   descriere și câteva date de contact, iar layout-ul de seturi (badge fix +
   nume scurt) rupea numele pe verticală. */
.shop-list{list-style:none;margin-top:1rem;padding:0}
.shop{padding:1rem 0;border-bottom:1px solid var(--rule-soft)}
.shop-head{
  display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;
  gap:.5rem .75rem;
}
.shop-name{font:600 1.0625rem/1.3 var(--sans);color:var(--accent-ink);text-decoration:none}
.shop-name:hover{text-decoration:underline}
.shop-city{font:.8125rem/1.4 var(--mono);color:var(--faint);white-space:nowrap}
.shop-note{margin-top:.375rem;font-size:.9375rem;line-height:1.6;color:var(--muted);text-wrap:pretty}
.shop-facts{
  display:flex;flex-wrap:wrap;gap:.375rem 1.25rem;margin-top:.625rem;
  font-size:.8125rem;
}
.shop-facts dt{color:var(--faint)}
.shop-facts dd{margin:0;color:var(--ink)}
.shop-facts>div{display:flex;gap:.375rem}

/* Simbolurile de pe cărți (mana, tap). Publicate de Scryfall pentru afișare. */
.ms{
  display:inline-block;width:1em;height:1em;vertical-align:-.125em;
  margin:0 .0625em;border-radius:50%;
}
.mana .ms{width:1.05em;height:1.05em}
.oracle-text .ms{vertical-align:-.15em}

/* Varianta compactă: aceeași listă, dar în coloana îngustă a paginii de card,
   unde grila de trei coloane strivea numele setului pe verticală
   ("Secret / Lair / Drop"). Numărul de colecționar trece pe rândul de dedesubt. */
.set-list--compact a{grid-template-columns:3.25rem 1fr}
.set-list--compact .set-cards{grid-column:2/-1;text-align:left;order:3}
.set-list--compact .set-facts{grid-column:2/-1;order:4}
.set-list--compact .set-name{order:2}

/* ---------- pagini legale ---------- */
.legal .prose-p{margin-top:.875rem;line-height:1.65;text-wrap:pretty}
.legal .section-title{margin-top:1.75rem}
.legal .prose{margin-top:.5rem}
.footer-nav{display:flex;flex-wrap:wrap;gap:.5rem 1rem;margin-top:.5rem}
.footer-nav a{font-size:.8125rem;color:var(--muted);text-decoration:none}
.footer-nav a:hover{color:var(--accent-ink);text-decoration:underline}

/* ---------- formular de contact ---------- */
.contact-form{margin-top:1.25rem;max-width:34rem}
.contact-form .field{display:flex;flex-direction:column;gap:.3125rem;margin-top:1rem}
.contact-form label{font-size:.8125rem;font-weight:600;color:var(--ink)}
.contact-form .opt{font-weight:400;color:var(--faint)}
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form select,
.contact-form textarea{
  width:100%;padding:.625rem .75rem;font:1rem/1.45 var(--sans);
  color:var(--ink);background:var(--surface);
  border:1.5px solid var(--field);border-radius:.5rem;
}
.contact-form textarea{resize:vertical;min-height:9rem}
.contact-form .hint{font-size:.75rem;line-height:1.5;color:var(--faint)}
.contact-form .err{font-size:.8125rem;color:var(--accent-ink);font-weight:600}
/* Capcana pentru roboți: ascunsă vizual, dar completabilă de un script. */
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Promoții de lansare pe pagina de set - foil-uri de prerelease/lansare. */
.promos{margin:1.75rem 0}
.promo-grid{list-style:none;margin:.75rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));gap:1rem}
.promo-grid a{display:block;text-decoration:none;color:var(--ink)}
.promo-grid img{width:100%;height:auto;border-radius:var(--radius);border:1px solid var(--rule);box-shadow:0 1px 3px rgba(43,33,26,.08);display:block}
.promo-name{display:block;margin-top:.4rem;font-size:.85rem;color:var(--muted);line-height:1.3}
.promos--single .promo-grid{grid-template-columns:minmax(0,15rem);justify-content:start}

/* În ce formate se poate juca - legalitatea pe formate. */
.legalities{list-style:none;margin:.75rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(11rem,1fr));gap:.35rem .9rem}
.legalities li{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;padding:.3rem .5rem;border-radius:.375rem;background:var(--surface-2)}
.legalities .fmt{font-size:.875rem}
.legal-status{font-size:.8125rem;font-weight:600;letter-spacing:.01em}
.legal-status[data-s="legal"]{color:#2f7a4a}
.legal-status[data-s="not_legal"]{color:var(--faint)}
.legal-status[data-s="banned"]{color:var(--accent-ink)}
.legal-status[data-s="restricted"]{color:#9a6b1f}
@media (prefers-color-scheme:dark){
  .legal-status[data-s="legal"]{color:#6fc08c}
  .legal-status[data-s="restricted"]{color:#d3a95c}
}

/* Termenii de reguli, explicați în română - varianta vizibilă, server-side.
   Panoul cu clic rămâne ca îmbunătățire progresivă peste asta. */
.kw-glosses{margin-top:.75rem}
.kw-glosses>div{padding:.55rem 0;border-bottom:1px solid var(--rule-soft)}
.kw-glosses>div:last-child{border-bottom:0}
.kw-glosses dt{font:600 .9375rem var(--mono);letter-spacing:-.01em}
.kw-glosses dt a{text-decoration:none}
.kw-glosses dt a:hover{text-decoration:underline}
.kw-glosses dd{margin:.2rem 0 0;font-size:.9375rem;line-height:1.55;color:var(--muted)}

/* Clarificări oficiale - rulings Wizards, traduse. */
.rulings{list-style:none;margin:.75rem 0 0;padding:0}
.rulings li{padding:.6rem 0 .6rem .85rem;border-left:2px solid var(--rule);font-size:.9375rem;line-height:1.6}
.rulings li+li{margin-top:.35rem}
.ruling-date{display:block;margin-top:.25rem;font-size:.75rem;color:var(--faint)}

/* ---------- skip link ---------- */
.skip-link{position:absolute;left:-9999px;top:0;z-index:100}
.skip-link:focus{left:.5rem;top:.5rem;padding:.5rem .75rem;background:var(--surface-1);color:var(--accent-ink);border:2px solid var(--accent-ink);border-radius:.25rem;font-size:.875rem;font-weight:600}

/* ---------- pagina de formate ---------- */
.format{margin-top:2rem}
.format .dl-facts{margin-top:.75rem}

.term-detail{margin-top:1.5rem}
.term-detail .prose-p{margin-top:.5rem;line-height:1.65;text-wrap:pretty}

/* ---------- filtre de căutare ---------- */
.search--filters{display:flex;flex-direction:column;gap:.75rem;align-items:stretch}
.search--filters .search-row{display:flex;flex-direction:column;gap:.3125rem}
.search--filters .search-row input{width:100%}
.filter-row{display:flex;flex-wrap:wrap;gap:.75rem}
.filter{display:flex;flex-direction:column;gap:.3125rem;flex:1 1 8rem;min-width:0}
.filter label{font-size:.8125rem;font-weight:600;color:var(--muted)}
.filter select{width:100%;max-width:100%;padding:.4375rem .5rem;font:inherit;font-size:.875rem;color:var(--ink);background:var(--surface);border:1px solid var(--field);border-radius:.375rem}
.search--filters .btn{align-self:flex-start}
.filter-note{color:var(--muted);font-weight:400}

/* ---------- ilustrații alternative ---------- */
.art-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:.75rem;margin-top:.75rem;list-style:none;padding:0}
.art-strip a{display:block;text-decoration:none;color:var(--ink)}
.art-strip img{width:100%;height:auto;border-radius:.375rem;border:1px solid var(--rule);display:block}
.art-by{display:block;margin-top:.375rem;font-size:.8125rem;font-weight:600}
.art-set{display:block;font-size:.8125rem;color:var(--muted)}

.xw-grid{display:grid;gap:2px;margin-top:1rem;width:100%}
.xw-cell,.xw-block{aspect-ratio:1}
.xw-cell{position:relative;background:var(--surface);border:1px solid var(--field);border-radius:3px}
.xw-cell input{display:block;width:100%;height:100%;padding:0;border:0;border-radius:2px;background:transparent;color:var(--ink);font:600 1rem/1 var(--mono);text-align:center;text-transform:uppercase;caret-color:var(--accent)}
.xw-cell input:focus{outline:2px solid var(--accent);outline-offset:-1px}
.xw-num{position:absolute;top:1px;left:2px;font-size:.5625rem;line-height:1;color:var(--muted);pointer-events:none}
.xw-active{background:var(--accent-soft)}
.xw-ok{border-color:#3d8b4f}
.xw-ok input{color:#3d8b4f}
.xw-bad{border-color:#c0392b}
.xw-bad input{color:#c0392b}
.xw-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem}
.xw-status{margin-top:.5rem;min-height:1.5em;color:var(--muted)}
.xw-clues ul{list-style:none;padding:0;margin-top:.5rem}
.xw-clues li{padding:.375rem .5rem;border-radius:.375rem;line-height:1.5}
.xw-clues li.xw-current{background:var(--accent-soft)}
.xw-clues li.xw-solved{color:var(--muted)}
.xw-n{font-weight:700;color:var(--ink)}
.xw-len{color:var(--faint);font-size:.875rem}
.xw-link{margin-left:.25rem;font-weight:600}
@media (min-width:46rem){.xw-clues{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}}
