/* Packnai — industrial, clean, mobile-first. No external fonts/CDNs (fast, CSP-safe). */
:root {
  --ink: #0f1f2a;
  --ink-2: #41535f;
  --muted: #667783;
  --line: #dbe3e8;
  --bg: #ffffff;
  --bg-alt: #f3f6f8;
  --accent: #e8590c;
  --accent-ink: #b84600;
  --ok: #1b7f4b;
  --err: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 31, 42, .06), 0 8px 24px rgba(15, 31, 42, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; }
a { color: var(--accent-ink); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code { background: var(--bg-alt); padding: .1em .4em; border-radius: 6px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent-ink); margin-bottom: .6em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; border-radius: 6px; }

.moq-banner { background: #ffd93d; color: #000; border-bottom: 1px solid #e6c130; text-align: center; font-size: .78rem; font-weight: 600; padding: 4px 12px; }
.moq-banner strong { font-weight: 800; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { font-weight: 800; letter-spacing: .06em; font-size: 1.25rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 8px 0; }
.nav a:hover { color: var(--ink); }
.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--line); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .15s ease, background .15s ease; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-mobile[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile nav { position: absolute; right: 0; top: calc(100% + 10px); width: min(86vw, 300px); display: grid; gap: 2px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15,31,42,.16); }
.nav-mobile nav a:not(.btn) { padding: 12px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-mobile nav a:not(.btn):hover { background: var(--bg-alt); }
.nav-mobile nav .btn { margin-top: 6px; }
@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .bar { min-height: 58px; gap: 10px; flex-wrap: nowrap; }
  .header-cta { min-height: 40px; padding: 0 12px; font-size: .9rem; }
}
@media (max-width: 360px) { .header-cta { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .12s ease, background .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn.block { width: 100%; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.4em; }

.hero { background: linear-gradient(180deg, var(--bg-alt), #fff); padding-block: clamp(36px, 8vw, 96px); }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.3fr 1fr; } }
.steps-card { list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); counter-reset: s; }
.steps-card li { display: flex; flex-direction: column; padding: 16px 18px 16px 62px; position: relative; border-bottom: 1px solid var(--line); counter-increment: s; }
.steps-card li:last-child { border-bottom: 0; }
.steps-card li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.steps-card span { color: var(--muted); font-size: .95rem; }

.section { padding-block: clamp(36px, 6vw, 72px); }
.section.alt { background: var(--bg-alt); }
.grid { display: grid; gap: 20px; margin-top: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,31,42,.08), 0 14px 32px rgba(15,31,42,.10); }
.card .link { color: var(--accent-ink); font-weight: 700; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 16px 0 0; }
.chips a { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.chips a:hover { border-color: var(--ink); }
.cta-band { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--ink); color: #fff; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); }
.cta-band p { color: #c9d5dc; margin: 0; }
.cta-band h2 { margin-bottom: .2em; }
.ticks { padding-left: 1.2em; }
.ticks li { margin-bottom: .3em; }

.site-footer { background: var(--ink); color: #c9d5dc; padding-block: 44px 0; font-size: .95rem; }
.site-footer .brand { color: #fff; font-size: 1.15rem; }
.site-footer a { color: #e8eef2; }
.site-footer a:hover { color: #fff; }
.site-footer .muted { color: #9fb0bb; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; } }
.footer-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.footer-col h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #9fb0bb; margin: 0 0 4px; }
.footer-col p { margin: 0; overflow-wrap: anywhere; }
.footer-col nav, nav.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-legal { font-size: .88rem; line-height: 1.6; }
.footer-bottom { margin-top: 36px; padding-block: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #9fb0bb; }

/* forms */
.form, .steps { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #b9c6ce; border-radius: 10px;
}
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus { border-color: #2f6fed; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.err { color: var(--err); font-weight: 600; margin: 0; }
.hint { color: var(--muted); font-size: .92rem; margin: 0; }
.field.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.field.check input, .radios input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.radios { display: grid; gap: 10px; }
.radios label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 500; cursor: pointer; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.sub { padding: 16px; background: var(--bg-alt); border-radius: 12px; display: grid; gap: 16px; }
.notice { padding: 14px 18px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); }
.notice.ok { background: #e8f6ee; border-color: #b6e2c8; color: #0f5132; }
.notice.warn { background: #fff4e5; border-color: #f5cf99; color: #663c00; margin-bottom: 20px; }
.notice.warn ul { margin: 8px 0 0; }
.notice.err-box { background: #fdecea; border-color: #f5c2bd; color: #7a1c14; margin-bottom: 20px; }

/* configurator */
.config-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; padding-bottom: 130px; }
@media (min-width: 960px) { .config-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); padding-bottom: 0; } }
fieldset.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0; display: grid; gap: 14px; background: #fff; box-shadow: var(--shadow); min-width: 0; }
fieldset.step legend { font-weight: 800; font-size: 1.1rem; padding: 0 8px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .9rem; margin-right: 6px; }
.js fieldset.step.reveal { animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.price-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.price-panel h2 { font-size: 1.1rem; margin: 0; }
@media (min-width: 960px) { .side { position: sticky; top: 84px; display: grid; gap: 16px; } }
@media (max-width: 959px) {
  .price-panel { position: fixed; inset: auto 0 0 0; z-index: 30; border-radius: 16px 16px 0 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-bottom: 0; }
  .price-panel .hint { display: none; }
  /* compact one-row bar (total + button) so it covers as little of the page as possible */
  .price-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; }
  .price-panel h2 { display: none; }
  .price-panel dl > div:not(.total):not(.tpl) { display: none; }
  .price-panel dl .tpl { font-size: .85rem; }
  .price-panel dl .total { border-top: 0; padding-top: 0; font-size: 1.05rem; }
  .price-panel #price-body p { font-size: .9rem; margin: 0; }
  .price-panel .btn.block { width: auto; }
  .side { display: contents; }
  .studio { order: -1; }
  .studio > .hint { display: none; }
}

/* configurator 3D studio (static/js/studio.js) */
.studio { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; min-width: 0; }
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-head h2 { font-size: 1.1rem; margin: 0; }
.studio-reset { background: none; border: 0; padding: 4px 0; color: var(--accent-ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.studio-reset:hover { text-decoration: underline; }
/* Fixed, viewport-aware heights: the sticky side column (studio + price panel) must fit on screen
   so the price and the submit button are never pushed below the fold. */
.studio-stage { position: relative; border-radius: 10px; overflow: hidden; background: #5c6a74; height: clamp(220px, 38vh, 340px); }
@media (min-width: 960px) { .studio-stage { height: clamp(230px, calc(100vh - 500px), 400px); } }
@media (min-width: 960px) and (max-height: 820px) { .studio > .hint { display: none; } }
/* absolutely positioned: the canvas's pixel size can never feed back into the layout */
.studio-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.studio-stage canvas:active { cursor: grabbing; }
.studio-stage canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.studio-dims { position: absolute; left: 10px; bottom: 8px; margin: 0; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink-2); font-size: .82rem; font-weight: 600; pointer-events: none; }
.studio-dims:empty { display: none; }
.studio-zoom { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.studio-zoom label { font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.studio-zoom input { width: 100%; accent-color: var(--accent); }
dl { margin: 0; display: grid; gap: 6px; }
dl > div { display: flex; justify-content: space-between; gap: 12px; }
dt { color: var(--ink-2); }
dd { margin: 0; font-weight: 700; }
dl .total { border-top: 1px solid var(--line); padding-top: 8px; font-size: 1.15rem; }
dl .total dd { color: var(--accent-ink); }
.price-box { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); max-width: 460px; }

/* admin: its own dark shell (header = logo + account, dark sidebar/footer, light work area) */
.admin-body { --admin-dark: #0b1620; --admin-dark-2: #122230; background: #eef2f5; min-height: 100vh; display: flex; flex-direction: column; }
.admin-header { position: sticky; top: 0; z-index: 30; background: var(--admin-dark); color: #dbe3e8; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 8px clamp(16px, 3vw, 28px); flex-wrap: wrap; }
.brand-dark { color: #fff; margin-right: 0; }
.brand-dark small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #9fb0bb; font-weight: 700; margin-left: 6px; }
.admin-account { display: flex; align-items: center; gap: 12px; }
.admin-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; }
.admin-user { display: flex; flex-direction: column; line-height: 1.2; font-weight: 700; color: #fff; }
.admin-user small { font-weight: 500; font-size: .72rem; color: #9fb0bb; }
@media (max-width: 480px) { .admin-bar { flex-wrap: nowrap; } .admin-user { display: none; } .admin-account { gap: 8px; } }
.btn-dark { background: transparent; border-color: #3b5060; color: #dbe3e8; }
.btn-dark:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-footer { background: var(--admin-dark); color: #9fb0bb; font-size: .85rem; margin-top: auto; }
.admin-footer .admin-bar { min-height: 48px; }
.admin-footer a { color: #dbe3e8; }
.admin-shell { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); flex: 1; }
@media (min-width: 900px) { .admin-shell { grid-template-columns: 250px minmax(0, 1fr); } }
.admin-sidebar { background: var(--admin-dark-2); color: #fff; padding: 18px 14px; }
@media (min-width: 900px) { .admin-sidebar { position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow-y: auto; } }
.admin-sidebar-title { margin: 14px 0 4px 12px; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: #7f93a1; }
.admin-sidebar-title:first-child { margin-top: 0; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a { display: block; padding: 9px 12px; border-radius: 10px; color: #dbe3e8; text-decoration: none; font-weight: 600; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar nav a.active { background: var(--accent); color: #fff; }
/* phones: sidebar becomes a horizontal scroller under the header */
@media (max-width: 899px) {
  .admin-sidebar { padding: 8px 10px; }
  .admin-sidebar nav { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: thin; }
  .admin-sidebar nav a { white-space: nowrap; }
  .admin-sidebar-title { display: none; }
}
.admin-main { padding: clamp(16px, 3vw, 40px); min-width: 0; }
.admin-main > * { max-width: 1000px; }
.admin-main h1 { margin-bottom: .6em; max-width: none; }
.admin-form { max-width: 640px; }
.admin-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); max-width: none; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); gap: 12px; }
.admin-card h2 { font-size: 1.15rem; margin: 0; }
.admin-card-media { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--bg-alt); display: grid; place-items: center; overflow: hidden; }
.admin-card-media img { width: 100%; height: 100%; object-fit: cover; }
.option-list { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.option-row { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.option-row input[type="text"] { flex: 1; min-width: 0; }
.option-row .check { display: flex; gap: 6px; align-items: center; white-space: nowrap; font-size: .92rem; }
.option-summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 8px; font-size: .92rem; }
.option-summary dt { font-weight: 600; }
.option-summary dd { margin: 0; }
.admin-card .check { display: flex; gap: 8px; align-items: center; font-size: .92rem; }
.thumb-md { display: block; max-width: 180px; max-height: 90px; object-fit: contain; margin-bottom: 8px; background: var(--bg-alt); border-radius: 8px; }

/* login: same dark shell */
.admin-body .login-section { flex: 1; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(circle at 30% 20%, #1c3242, var(--admin-dark) 70%); }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.35); padding: clamp(24px, 4vw, 40px); width: 100%; max-width: 420px; }

/* admin content */
.admin-main table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-main th, .admin-main td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-main thead th { background: var(--bg-alt); color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.admin-main tbody tr:hover { background: var(--bg-alt); }
.table-scroll { overflow-x: auto; border-radius: var(--radius); max-width: none; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.badge.warn { background: #fff4e5; border-color: #f5cf99; }
.badge.ok { background: #e8f6ee; border-color: #b6e2c8; color: #0f5132; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.8rem; color: var(--accent-ink); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form .field { min-width: 140px; }

.spaced { margin-top: 20px; }
a.stat { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .15s ease; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,31,42,.08), 0 14px 32px rgba(15,31,42,.10); }

/* featured products (admin + homepage) */
/* Fixed 2-per-row on tablet/desktop (not auto-fit -- with 1 item, auto-fit stretches it to
   fill the whole row, which looked oversized). 1 column on mobile. */
.featured-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
@media (min-width: 640px) { .featured-grid { grid-template-columns: repeat(2, 1fr); max-width: none; margin-inline: 0; } }
.featured-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.featured-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-alt); }
.featured-card .featured-body { padding: 18px; display: grid; gap: 6px; flex: 1; }
.featured-card .featured-specs { color: var(--muted); font-size: .9rem; margin: 0; }
.featured-card .btn { margin-top: 10px; }
.thumb-sm { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--bg-alt); }

/* utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* homepage: materials */
.material-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.material-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.material-media { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e9eff3, #d6e0e7); display: grid; place-items: center; }
.material-media img { width: 100%; height: 100%; object-fit: cover; }
.material-mark { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: .06em; color: #7f93a1; }
.material-body { padding: 18px; }
.material-body h3 { margin: 0 0 6px; }
.material-body p { margin: 0; color: var(--ink-2); }

/* homepage: partners */
.partner-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(45%, 160px), 1fr)); }
.partner { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 96px; display: grid; place-items: center; padding: 14px; }
.partner a { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink); text-decoration: none; font-weight: 700; }
.partner img { max-width: 100%; max-height: 64px; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .15s ease, opacity .15s ease; }
.partner:hover img { filter: none; opacity: 1; }

/* newsletter (above the footer) */
.newsletter { background: linear-gradient(135deg, #fff3ea, #ffe3d0); border-top: 1px solid #f6d3bc; padding-block: clamp(32px, 5vw, 56px); }
.newsletter-inner { display: grid; gap: 20px; align-items: center; }
@media (min-width: 900px) { .newsletter-inner { grid-template-columns: 1fr 1fr; gap: 40px; } }
.newsletter h2 { margin: 0 0 .3em; }
.newsletter p { margin: 0; color: var(--ink-2); }
.newsletter-form { display: grid; gap: 10px; position: relative; }
.newsletter-row { display: flex; gap: 10px; }
.newsletter-row input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .newsletter-row { flex-direction: column; } }
.nl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.nl-consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--accent); }

/* legal pages */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose code { background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
