:root {
    color-scheme: dark;
    --ink: #eff5ff;
    --paper: #05070c;
    --header: #080c14;
    --surface: #0e1725;
    --raised: #142338;
    --field: #090f1a;
    --line: #25364d;
    --input-line: #536984;
    --muted: #a0aec3;
    --accent-text: #97c6ff;
    --accent: #1265d8;
    --accent-hover: #185ab1;
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.0125em;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent-text); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #8fc1ff; outline-offset: 4px; }
h1, h2, p { margin: 0 0 .65em; }
h1, h2 { font-weight: 650; line-height: 1.08; letter-spacing: -.048em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.15rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
small { color: var(--muted); }
.shell { width: min(1180px, calc(100% - 4rem)); margin: 0 auto; }
.header { background: var(--header); border-bottom: 1px solid #1b2a3e; }
.head-row, .foot-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.head-row { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); font-size: 1rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.brand-mark { display: block; width: 3rem; height: auto; }
nav { display: flex; gap: clamp(.8rem, 2.4vw, 1.9rem); align-items: center; }
nav a, .footer a { color: var(--muted); text-decoration: none; }
nav a { font-size: .95rem; font-weight: 600; }
nav a:hover, nav a[aria-current], .footer a:hover { color: var(--ink); text-decoration: underline; }
.cart-link { display: inline-flex; align-items: center; gap: .55rem; padding: .44rem .85rem; border: 1px solid #29456c; border-radius: 100px; background: #102039; color: var(--ink); font-weight: 650; text-decoration: none; }
.cart-link:hover { background: #182e4d; }
.cart-link span { display: inline-grid; place-items: center; background: #253f65; border-radius: 50%; min-width: 1.5rem; padding: 0 .22rem; font-size: .82rem; }
.skip { position: absolute; z-index: 3; padding: .6rem; background: var(--surface); translate: 0 -120%; }
.skip:focus { translate: 0; }
main.shell { flex: 1; padding: 2.6rem 0 4.4rem; }

.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; min-height: 460px; border: 1px solid #25364c; border-radius: 1.65rem; overflow: hidden; background: radial-gradient(ellipse at 75% 60%, #142b4d 0%, #0a1320 52%, #090d15 83%); }
.hero-copy { z-index: 1; padding: 3.3rem 0 3.3rem clamp(1.8rem, 5.25vw, 4.5rem); }
.hero h1 { max-width: 17ch; font-size: clamp(2.75rem, 5.6vw, 5.1rem); letter-spacing: -.064em; line-height: 1.02; margin-bottom: .36em; }
.hero h1 span { color: var(--accent-text); background: linear-gradient(110deg, #eff5ff 2%, #78b3fb 67%, #52a1fb); background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.6rem; }
.hero-art { position: relative; min-width: 0; min-height: 370px; display: grid; place-items: center; }
.hero-art::before { content: ""; position: absolute; inset: 0 4%; opacity: .55; background: radial-gradient(circle, #81baff 1px, transparent 1.4px) center / 18px 18px; mask-image: radial-gradient(ellipse, transparent 23%, #000 44%, transparent 70%); transform: rotate(-12deg); }
.shop-orbits { position: absolute; width: min(94%, 440px); aspect-ratio: 1.65; border: 1px solid #35588b80; border-radius: 50%; rotate: -18deg; box-shadow: 0 0 46px #285fbc24, inset 0 0 32px #0b1c30; }
.shop-orbits::after { content: ""; position: absolute; inset: 5%; border: 1px solid #4578b956; border-radius: inherit; rotate: 55deg; }
.shop-tile { position: absolute; width: clamp(136px, 17.5vw, 218px); aspect-ratio: 1; border-radius: 23%; border: 1px solid #6297dd; background: linear-gradient(145deg, #213f69, #142844 75%); rotate: -11deg; box-shadow: 0 22px 56px #050c1b, inset 0 1px 3px #c7e2ff46; }
.tile-back { translate: 15% -11%; opacity: .55; background: linear-gradient(135deg, #254679, #101d30); }
.tile-front { display: grid; place-items: center; translate: -7% 5%; }
.shop-bag { position: relative; width: 39%; height: 37%; margin-top: 10%; border: 2px solid #a2d2ff; border-radius: 9% 9% 18% 18%; box-shadow: 0 0 22px #529ffd4d, inset 0 0 20px #529ffd40; transform: skew(-4deg); }
.shop-bag::before { content: ""; position: absolute; left: 25%; right: 25%; bottom: calc(100% - 6px); height: 47%; border: 2px solid #a2d2ff; border-bottom: 0; border-radius: 100px 100px 0 0; }
.shop-bag::after { content: ""; position: absolute; inset: 43% 32% auto; aspect-ratio: 1.95; background: url("marchio-esse.svg") center / contain no-repeat; }
.shop-glint { position: absolute; width: 6px; aspect-ratio: 1; border-radius: 50%; background: #abd8ff; box-shadow: 0 0 14px 3px #62acffb3; }
.glint-top { top: 26%; right: 15%; }
.glint-bottom { bottom: 21%; left: 16%; }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1.15rem 1.5rem; }
.category { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; padding: 1rem 1.15rem; border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface), #0a101b); border-radius: 1rem; }
.category:hover { background: var(--raised); border-color: #5779a5; }
.category-icon { width: 2.45rem; height: 2.45rem; border-radius: .65rem; background: #152c49; color: #a2ccff; display: grid; place-items: center; flex: none; }
.category-icon::before { content: ""; display: block; border: 2px solid currentColor; border-radius: 3px; width: .85rem; height: 1rem; background: linear-gradient(currentColor, currentColor) center 40% / 55% 2px no-repeat, linear-gradient(currentColor, currentColor) center 68% / 55% 2px no-repeat; }
.hardware .category-icon::before { width: 1.02rem; height: .84rem; background: radial-gradient(currentColor 42%, transparent 48%) center / 55% 70% no-repeat; box-shadow: 0 5px 0 -3px currentColor; }
.software .category-icon::before { width: 1.05rem; height: .93rem; background: linear-gradient(currentColor, currentColor) center 29% / 100% 2px no-repeat; }
.empty, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 2rem); }
.empty { text-align: center; padding-block: 2rem; color: var(--muted); }
.empty p:last-child { margin-bottom: 0; }
.button, button { display: inline-flex; justify-content: center; align-items: center; width: fit-content; max-width: 100%; border: 1px solid transparent; padding: .69rem 1.13rem; border-radius: 100px; background: var(--accent); color: #fff; font: inherit; font-weight: 650; line-height: 1.35; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: var(--accent-hover); }
.secondary { background: var(--raised); color: var(--ink); border-color: #345174; }
.secondary:hover { background: #203855; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; }
.product-card > a { display: block; height: 100%; text-decoration: none; color: var(--ink); }
.product-card a:hover h2 { text-decoration: underline; }
.product-card img { display: block; width: 100%; height: 210px; object-fit: contain; background: var(--raised); }
.product-content { padding: 1.15rem; }
.product-content h2 { font-size: 1.35rem; margin-top: .25rem; }
.product-content p { font-weight: 750; color: var(--accent-text); margin: 0; }
.crumb { margin-bottom: 1.35rem; }
.crumb { flex-wrap: wrap; gap: .55rem; font-size: .9rem; color: var(--muted); }
.crumb a { color: var(--accent-text); }
.detail { display: flex; align-items: flex-start; gap: clamp(1rem, 5vw, 4rem); }
.product-photo { width: min(38%, 420px); padding: 1rem; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: .95rem; }
.product-photo img { display: block; width: 100%; height: auto; max-height: 420px; aspect-ratio: 1; object-fit: contain; }
.detail-price { font-size: 1.65rem; font-weight: 800; color: var(--accent-text); }
.long-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.cart-item, .totals div { display: flex; justify-content: space-between; align-items: start; gap: .75rem; }
.cart-item { border-bottom: 1px solid var(--line); padding: .75rem 0; }
.cart-item:first-child { padding-top: 0; }
.totals { margin: .9rem 0 0; }
dd { margin: 0; overflow-wrap: anywhere; }
.total { border-top: 1px solid var(--line); margin-top: .55rem; padding-top: .55rem; font-weight: 800; }
.fields, label { display: grid; gap: .5rem; }
.fields { gap: 1rem; }
label { font-weight: 650; }
input, textarea, select { border: 1px solid var(--input-line); border-radius: .4rem; padding: .57rem .65rem; color: var(--ink); background: var(--field); font: inherit; width: 100%; min-width: 0; }
input[type="file"] { padding: .45rem; }
.check { display: flex; gap: .55rem; align-items: baseline; font-weight: 450; }
.check input { width: auto; }
.order-items { padding-left: 1.2rem; }
.order-items li + li { margin-top: .7rem; }
.order-items .button { margin-left: .55rem; }
.alert { border: 1px solid #2c6557; background: #102923; color: #b4eedc; border-radius: .55rem; padding: .7rem .95rem; margin-bottom: 1rem; }
.error { background: #301c27; border-color: #7a4053; color: #ffd4dd; }
.auth { max-width: 560px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.toolbar h2 { margin: 0; }
.admin-block { margin-top: 1rem; }
.admin-block .toolbar { margin-bottom: .8rem; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: .75rem; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: .55rem .7rem .55rem 0; }
th { font-size: .92rem; }
.footer { background: var(--header); border-top: 1px solid var(--line); padding: 1.35rem 0; }
.footer .foot-row > div { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; }
.footer .foot-row > div a { font-size: .9rem; }

@media (max-width: 800px) {
    .shell { width: calc(100% - 2rem); }
    main.shell { padding-top: 1.35rem; }
    .head-row { display: grid; grid-template-columns: 1fr auto; gap: 0 .6rem; padding-top: .7rem; }
    .head-row nav { grid-area: 2 / 1 / 3 / 3; overflow-x: auto; padding: .7rem .25rem; white-space: nowrap; }
    .hero { min-height: 390px; }
    .hero-art { min-height: 290px; }
    .hero-copy { padding-inline-start: 1.5rem; }
    .split { grid-template-columns: minmax(0, 1fr); }
    .category-grid { gap: .55rem; }
    .category { padding: .75rem .6rem; font-size: .92rem; gap: .5rem; }
    .category-icon { width: 2rem; height: 2rem; }
}
@media (max-width: 540px) {
    .hero { grid-template-columns: minmax(0, 1fr); min-height: auto; }
    .hero-copy { padding: 2rem 1.2rem 1rem; }
    .hero h1 { font-size: clamp(2.55rem, 9vw, 3.15rem); }
    .hero-art { min-height: 220px; }
    .shop-orbits { width: min(83%, 320px); }
}
@media (max-width: 440px) {
    .category-grid, .field-row { grid-template-columns: minmax(0, 1fr); }
    .category { padding: .6rem .8rem; font-size: .95rem; }
    .detail, .foot-row { display: grid; }
    .product-photo { width: 100%; }
}

.catalog-pages { margin: 1.5rem 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }

.catalog-search { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: .8rem; margin: 0 0 1rem; }
.catalog-search select { text-overflow: ellipsis; }
.catalog-search-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.catalog-unavailable, .product-content .catalog-unavailable { color: var(--muted); font-weight: 650; }
.catalog-shortcuts { flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.catalog-shortcuts a { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 100px; }
.catalog-shortcuts a[aria-current] { color: var(--ink); background: var(--raised); }
.catalog-result { color: var(--muted); display: flex; gap: 1rem; align-items: baseline; }
.catalog-intro { max-width: 64ch; color: var(--muted); margin-bottom: 1.2rem; }
.related-products, .pc-help { margin-top: 1.35rem; }
.pc-help p { max-width: 75ch; }
.legal-info { max-width: 780px; }
@media (max-width: 740px) { .catalog-search { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 430px) { .catalog-search { grid-template-columns: minmax(0,1fr); } }

.shop-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.pc-hero { border-radius: 1.3rem; padding: clamp(1.5rem, 4.5vw, 3.2rem); margin-bottom: 1.45rem; border: 1px solid var(--line); background: radial-gradient(ellipse at 87% 0%, #1a385c, #111d2e 53%, #0b111b); }
.pc-hero p { color: var(--muted); }
.pc-platforms { margin-top: 1.35rem; flex-wrap: wrap; gap: .7rem; }
.pc-platform { display: grid; gap: .05rem; padding: .7rem 1rem; background: var(--field); border: 1px solid var(--line); border-radius: .75rem; min-width: 9rem; }
.pc-platform span { font-size: .82rem; font-weight: 500; color: var(--muted); }
.pc-platform[aria-current] { background: #182f50; border-color: #6eacfe; text-decoration: none; }
.pc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 340px); gap: 1.15rem; align-items: start; }
.pc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.pc-field { padding: 1rem; min-width: 0; }
.pc-field label { display: block; font-weight: 700; margin-bottom: .4rem; }
.pc-field select { width: 100%; }
.pc-part { display: flex; align-items: center; gap: .65rem; font-size: .83rem; color: var(--muted); margin-top: .65rem; }
.pc-part[hidden], .pc-layout [hidden] { display: none; }
.pc-part p { margin: 0; }
.pc-part img { width: 64px; height: 64px; flex: none; object-fit: contain; background: #fff; border-radius: .45rem; }
.pc-summary { position: sticky; top: 1rem; padding: 1.2rem; }
.pc-summary h2 { margin-bottom: .45rem; }
.pc-delivery { margin: 1rem 0; padding: .6rem .75rem .8rem; border: 1px solid var(--line); border-radius: .65rem; }
.pc-delivery legend { padding-inline: .25rem; font-weight: 650; }
.pc-delivery label + label { margin-top: .45rem; }
.pc-delivery strong { color: var(--accent-text); white-space: nowrap; }
.pc-summary #pc-status, .pc-note { color: var(--muted); font-size: .88rem; }
.pc-summary dl { margin: 0 0 1rem; }
.pc-summary dl div { display: flex; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--line); padding: .3rem 0; font-size: .84rem; }
.pc-summary dt { overflow-wrap: anywhere; }
.pc-summary dd { margin: 0; white-space: nowrap; }
.pc-total { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-block: .8rem .45rem; font-weight: 700; }
.pc-total output { color: var(--accent-text); font-size: 1.31rem; }
.pc-summary button { display: flex; width: 100%; margin-top: .6rem; }
.pc-summary button:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 840px) {
    .pc-layout { grid-template-columns: 1fr; }
    .pc-summary { position: static; }
}
@media (max-width: 570px) {
    .pc-fields { grid-template-columns: 1fr; }
}

.shop-affiliate-layout{display:grid;gap:20px;margin-bottom:24px}
.shop-affiliate-layout .category-grid{min-width:0;margin-bottom:0}
.shop-affiliate-layout .affiliate-books{min-width:0;align-self:start}
.affiliate-books h2{margin:0 0 12px;font-size:1.125rem}
.affiliate-books-list{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.affiliate-books-list p{margin:0 0 4px}
.affiliate-books-list a{text-decoration:underline;text-underline-offset:3px}
.affiliate-disclosure{font-size:.85rem;margin:14px 0 0}
@media(min-width:900px){.shop-affiliate-layout{grid-template-columns:minmax(0,1fr) minmax(260px,310px);align-items:center}}

.affiliate-books-list li{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:start}
.affiliate-books-list .affiliate-book-cover{display:block;width:64px;height:auto;aspect-ratio:5/8;border-radius:4px;box-shadow:0 2px 8px #0004}

.manual-banner { margin-bottom: 1.5rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(120deg, var(--surface), #111f34); }
.manual-banner h2 { margin: 0 0 .6rem; font-size: 1rem; }
.manual-banner ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.manual-banner a { display: flex; align-items: center; gap: .7rem; height: 100%; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: .65rem; background: #0d1726; color: var(--ink); text-decoration: none; }
.manual-banner a:hover { border-color: #5779a5; background: var(--raised); }
.manual-banner a:focus-visible { outline: 2px solid #a2ccff; outline-offset: 2px; }
.manual-banner img { width: 2.7rem; height: auto; aspect-ratio: 48 / 77; flex: none; border-radius: .25rem; }
.manual-banner strong { display: block; line-height: 1.3; }
.manual-banner small { display: inline-block; margin-top: .25rem; color: var(--accent-text); text-decoration: underline; text-underline-offset: .15em; }
@media (max-width: 560px) { .manual-banner ul { grid-template-columns: minmax(0, 1fr); } }
