/* ============ Learn Darija Studio — design system ============ */
@font-face { font-family: "Fraunces"; src: url(/static/fonts/fraunces-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/static/fonts/fraunces-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(/static/fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(/static/fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(/static/fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(/static/fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(/static/fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Cairo"; src: url(/static/fonts/cairo-arabic-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; src: url(/static/fonts/cairo-arabic-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; src: url(/static/fonts/cairo-arabic-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  /* Palette: Majorelle blue, night indigo, saffron gold, terracotta, mint, sand */
  --night: #0c122a; /* matches the Learn Darija Studio logo's navy background */
  --night-2: #171b4f;
  --majorelle: #3b3fd8;
  --majorelle-2: #5b6cff;
  --gold: #f0b44c;
  --gold-2: #ffd98a;
  --terracotta: #c8553d;
  --mint: #2f9e7d;
  --sand: #fbf6ee;
  --sand-2: #f3eadb;
  --ink: #161a33;
  --muted: #5d6280;
  --line: #e7e1d6;
  --card: #ffffff;
  --ok: #1d7a55; --ok-bg: #e6f6ee;
  --warn: #8a5a0a; --warn-bg: #fff4dc;
  --bad: #a8321f; --bad-bg: #fdebe6;
  --radius: 18px;
  --shadow-1: 0 1px 2px rgba(13,16,51,.06), 0 4px 12px rgba(13,16,51,.06);
  --shadow-2: 0 2px 4px rgba(13,16,51,.06), 0 12px 32px rgba(13,16,51,.12);
  --shadow-3: 0 6px 12px rgba(13,16,51,.10), 0 30px 60px rgba(13,16,51,.22);
  --font: "Jakarta", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--ink); background: var(--sand); -webkit-font-smoothing: antialiased; }
[lang="ar"], [dir="rtl"] { font-family: "Cairo", var(--font); }
a { color: var(--majorelle); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--night); line-height: 1.15; letter-spacing: -.01em; }
h1, h2 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(32px, 5.6vw, 58px); margin: .3em 0 .45em; }
h2 { font-size: clamp(24px, 3.4vw, 36px); margin: 1.6em 0 .6em; }
h3 { font-size: 19px; font-weight: 700; }
img { max-width: 100%; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
pre { background: #f2eee6; padding: 12px; border-radius: 12px; overflow-x: auto; }
pre.wrap { white-space: pre-wrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 50; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .88em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* Buttons — tactile 3D */
.btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(180deg, var(--majorelle-2), var(--majorelle)); color: #fff; border: 0; padding: 12px 20px; border-radius: 14px; font: 700 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 #23228f, 0 10px 20px rgba(59,63,216,.35); transform: translateY(0); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 5px 0 #23228f, 0 14px 26px rgba(59,63,216,.4); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #23228f, 0 4px 10px rgba(59,63,216,.3); }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--night); box-shadow: 0 4px 0 #b87a22, 0 10px 20px rgba(240,180,76,.35); }
.btn.ghost { background: rgba(255,255,255,.08); color: inherit; border: 1.5px solid currentColor; box-shadow: none; }
.btn.ghost:hover { background: rgba(255,255,255,.16); }
.btn.ok { background: linear-gradient(180deg, #34b88f, var(--ok)); box-shadow: 0 3px 0 #11553a; }
.btn.danger { background: linear-gradient(180deg, #d9573f, var(--bad)); box-shadow: 0 3px 0 #6e1d10; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ============ Public header ============ */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--night); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: 0 8px 24px rgba(12,18,42,.25); }
.brand img.lockup { width: auto; height: 56px; filter: none; transform: none !important; }
.site-footer { background: var(--night) !important; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { width: 42px; height: 42px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); transition: transform .4s; }
.brand:hover img { transform: rotate(45deg) scale(1.05); }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand .wordmark b { font: 700 20px var(--display); letter-spacing: -.01em; }
.brand .wordmark small { font: 700 10px var(--font); letter-spacing: .32em; color: var(--gold); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.site-nav a { color: #d9dcf5; text-decoration: none; font-weight: 600; font-size: 15px; padding: 7px 12px; border-radius: 10px; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav a.cta { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--night); box-shadow: 0 3px 0 #b87a22; }

/* ============ Hero (3D) ============ */
.hero-wrap { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(91,108,255,.55), transparent 60%), radial-gradient(800px 400px at -10% 110%, rgba(200,85,61,.35), transparent 60%), url(/static/pattern.svg), linear-gradient(160deg, var(--night) 0%, var(--night-2) 60%, #1e2366 100%); }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 72px 0 96px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--gold-2), var(--gold) 50%, #ff9d6c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 6px 12px; border-radius: 99px; }
.lead { font-size: 1.15em; color: var(--muted); max-width: 60ch; }
.hero .lead { color: #c9cdf0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; color: #aab0e0; font-size: 14px; }
.hero-trust span::before { content: "✦ "; color: var(--gold); }

.stage { perspective: 1200px; min-height: 420px; position: relative; }
.stack { position: relative; width: min(420px, 100%); height: 400px; margin: 0 auto; transform-style: preserve-3d; transform: rotateX(14deg) rotateY(-22deg) rotateZ(2deg); animation: drift 9s ease-in-out infinite; }
.phrase-card { position: absolute; left: 0; right: 0; padding: 22px 24px; border-radius: 22px; color: var(--ink); background: linear-gradient(160deg, #fff, var(--sand)); box-shadow: var(--shadow-3), inset 0 1px 0 #fff; border: 1px solid rgba(255,255,255,.7); }
.phrase-card .d { font: 700 26px var(--display); color: var(--night); }
.phrase-card .ar { font: 700 24px "Cairo", sans-serif; color: var(--terracotta); direction: rtl; float: right; }
.phrase-card .en { color: var(--muted); font-size: 15px; margin-top: 6px; }
.phrase-card .tag { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mint); }
.phrase-card.c1 { top: 0; transform: translateZ(90px); }
.phrase-card.c2 { top: 130px; transform: translateZ(40px) translateX(36px); background: linear-gradient(160deg, #eef0ff, #dfe3ff); }
.phrase-card.c3 { top: 260px; transform: translateZ(-10px) translateX(-18px); background: linear-gradient(160deg, #fff3df, #fde4bd); }
.orb { position: absolute; border-radius: 50%; filter: blur(.5px); }
.orb.o1 { width: 96px; height: 96px; right: -36px; top: -54px; background: radial-gradient(circle at 30% 30%, #fff6, transparent 40%), radial-gradient(circle at 50% 50%, var(--gold), #b87a22); box-shadow: 0 20px 40px rgba(0,0,0,.35); animation: float 7s ease-in-out infinite; }
.orb.o2 { width: 70px; height: 70px; left: -10px; bottom: 10px; background: radial-gradient(circle at 30% 30%, #fff6, transparent 40%), radial-gradient(circle at 50% 50%, var(--mint), #145c47); box-shadow: 0 16px 30px rgba(0,0,0,.35); animation: float 6s ease-in-out infinite reverse; }
.star3d { position: absolute; width: 104px; right: 20px; bottom: -14px; border-radius: 24px; transform: rotate(-8deg); box-shadow: 0 6px 0 #c9c3b6, 0 24px 40px rgba(0,0,0,.45); animation: float 6.5s ease-in-out infinite; }
@keyframes drift { 0%,100% { transform: rotateX(14deg) rotateY(-22deg) rotateZ(2deg) translateY(0); } 50% { transform: rotateX(10deg) rotateY(-14deg) rotateZ(1deg) translateY(-10px); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; background: var(--sand); clip-path: ellipse(60% 100% at 50% 100%); }

/* ============ Sections ============ */
.section { padding: 64px 0; }
.section.alt { background: linear-gradient(180deg, var(--sand-2), var(--sand)); }
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head .kicker { color: var(--terracotta); font-weight: 800; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.section-head h2 { margin-top: .3em; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; min-width: 0; box-shadow: var(--shadow-1); }
.card.link { display: block; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.card.link:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.feature { position: relative; padding-top: 78px; transition: transform .25s, box-shadow .25s; }
.feature:hover { transform: translateY(-6px) rotateX(3deg); box-shadow: var(--shadow-2); }
.feature .ic { position: absolute; top: 20px; left: 22px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: #fff;
  background: linear-gradient(145deg, var(--majorelle-2), var(--majorelle)); box-shadow: 0 6px 0 #23228f, 0 12px 20px rgba(59,63,216,.3); }
.feature:nth-child(2) .ic { background: linear-gradient(145deg, #ffcf7a, var(--gold)); box-shadow: 0 6px 0 #b87a22, 0 12px 20px rgba(240,180,76,.35); }
.feature:nth-child(3) .ic { background: linear-gradient(145deg, #4cc39d, var(--mint)); box-shadow: 0 6px 0 #145c47, 0 12px 20px rgba(47,158,125,.35); }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding: 24px 22px 22px 22px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.step::before { counter-increment: s; content: counter(s); font: 700 44px var(--display); color: var(--gold); line-height: 1; display: block; margin-bottom: 8px; text-shadow: 0 3px 0 #f6dfb5; }
.step h3 { margin: 0 0 6px; } .step p { margin: 0; color: var(--muted); }

.phrase-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.chip { background: #fff; border-radius: 16px; padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .2s; }
.chip:hover { transform: translateY(-3px) rotate(-.5deg); }
.chip b { display: block; font: 700 19px var(--display); color: var(--night); }
.chip .ar { display: block; font: 700 18px "Cairo", sans-serif; color: var(--terracotta); direction: rtl; text-align: right; }
.chip span { color: var(--muted); font-size: 14px; }

.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 44px; color: #fff; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
  background: url(/static/pattern.svg), linear-gradient(135deg, var(--majorelle) 0%, var(--night-2) 70%); box-shadow: var(--shadow-3); }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: #d3d6f7; margin: 0; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.page-hero { color: #fff; padding: 56px 0 64px; position: relative; overflow: hidden; background: url(/static/pattern.svg), linear-gradient(160deg, var(--night), var(--night-2)); }
.page-hero h1 { color: #fff; margin-bottom: .2em; }
.page-hero p { color: #c9cdf0; max-width: 62ch; margin: 0; }
.page-body { padding: 44px 0 64px; }
.prose { max-width: 760px; } .prose h2 { margin-top: 1.4em; }
.prose p, .prose li { font-size: 17px; }
.prose ul { padding-left: 1.2em; }
.prose strong { color: var(--night); }
.lesson { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--shadow-2); }

.product { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.buybox { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-2); }
.price { font: 700 34px var(--display); color: var(--night); display: block; margin-bottom: 10px; }
.cover3d { perspective: 900px; margin-bottom: 18px; }
.cover3d .book { aspect-ratio: 3/4; border-radius: 10px 18px 18px 10px; padding: 22px; color: #fff; transform: rotateY(-18deg) rotateX(4deg); transform-style: preserve-3d;
  background: url(/static/pattern.svg), linear-gradient(150deg, var(--majorelle-2), var(--night)); box-shadow: 16px 22px 40px rgba(13,16,51,.35), inset 6px 0 0 rgba(0,0,0,.25); display: flex; flex-direction: column; justify-content: space-between; }
.cover3d .book b { font: 700 22px/1.15 var(--display); }
.cover3d .book small { color: var(--gold-2); font-weight: 700; letter-spacing: .1em; font-size: 11px; }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; display: block; overflow-x: auto; box-shadow: var(--shadow-1); }
@media (min-width: 760px) { table { display: table; } }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f4efe6; font-size: .88em; color: var(--night); }

.form label { display: block; margin: 12px 0; font-weight: 600; }
.form input:not([type=checkbox]), .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid #d9d2c4; border-radius: 12px; font: inherit; font-weight: 400; background: #fff; transition: border-color .15s, box-shadow .15s; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--majorelle); box-shadow: 0 0 0 4px rgba(59,63,216,.15); outline: none; }
.form label.check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.hp { position: absolute; left: -9999px; }
.notice { border-radius: 14px; padding: 12px 16px; margin: 14px 0; border: 1px solid; }
.notice.ok { background: var(--ok-bg); border-color: #b8e6cf; color: var(--ok); }
.notice.warn { background: var(--warn-bg); border-color: #f1d9a6; color: var(--warn); }
.notice.danger { background: var(--bad-bg); border-color: #f2c0b4; color: var(--bad); }

/* ============ Footer ============ */
.site-footer { color: #b5b9e0; background: url(/static/pattern.svg), var(--night); margin-top: 40px; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-top: 48px; padding-bottom: 28px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.site-footer a { color: #d9dcf5; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold-2); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.08); text-align: center; padding: 16px; font-size: 13px; color: #8d92c2; }

/* ============ Admin ============ */
.admin { background: #f6f3ee; }
.admin-header { background: linear-gradient(90deg, var(--night), var(--night-2)); color: #fff; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5; box-shadow: 0 4px 20px rgba(13,16,51,.25); }
.admin-header .brand img { width: 34px; height: 34px; }
.admin-header .brand b { font: 700 18px var(--display); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; } .admin-actions form { margin: 0; }
.admin-header .btn.ghost { color: #fff; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 56px); }
.admin-nav { background: #fff; border-inline-end: 1px solid var(--line); padding: 14px 10px; }
.admin-nav a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.admin-nav a.active { background: linear-gradient(180deg, var(--majorelle-2), var(--majorelle)); color: #fff; box-shadow: 0 3px 0 #23228f; }
.admin-nav a:not(.active):hover { background: #eef0ff; color: var(--majorelle); }
.admin-main { padding: 20px 24px 48px; min-width: 0; }
.admin-main h1 { font-size: 30px; margin-top: 4px; }
.admin-main h2 { font-size: 21px; margin: 1.2em 0 .5em; }
.badge { background: var(--terracotta); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 14px 0 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--muted); font-size: 13px; box-shadow: var(--shadow-1); border-top: 4px solid var(--majorelle); }
.stat:nth-child(2) { border-top-color: var(--gold); } .stat:nth-child(3) { border-top-color: var(--mint); } .stat:nth-child(4) { border-top-color: var(--terracotta); }
.stat span { display: block; font: 700 24px var(--display); color: var(--night); }
.stat.bad span { color: var(--bad); }
.pill { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 700; background: #eceef5; color: #3b4556; white-space: nowrap; }
.pill.s-connected, .pill.s-succeeded, .pill.s-executed, .pill.s-approved, .pill.s-published, .pill.s-enabled, .pill.s-evidence, .pill.s-ready, .pill.s-public, .pill.s-actual, .pill.s-high { background: var(--ok-bg); color: var(--ok); }
.pill.s-pending, .pill.s-queued, .pill.s-in_review, .pill.s-draft_pending_review, .pill.s-not_tested, .pill.s-hypothesis, .pill.s-committed, .pill.s-medium, .pill.s-risk_medium, .pill.s-paused { background: var(--warn-bg); color: var(--warn); }
.pill.s-failed, .pill.s-rejected, .pill.s-blocked_budget, .pill.s-not_connected, .pill.s-not_configured, .pill.s-disabled, .pill.s-risk_high, .pill.s-cancelled { background: var(--bad-bg); color: var(--bad); }
.pill.s-running { background: #e7e9ff; color: var(--majorelle); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; }
.approval header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .approval h2 { margin: 0; font-size: 18px; font-family: var(--font); }
form.inline, .inline-forms { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.inline-forms form { margin: 0; }
ul.plain { list-style: none; padding: 0; } ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; margin-bottom: 16px; }
.pipeline section { background: #ece7de; border-radius: 16px; padding: 10px; min-height: 110px; }
.pipeline h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 4px; }
.filters a { margin-inline-end: 6px; font-size: 13px; } .filters a.active { font-weight: 800; }
.agent h2 { font-size: 18px; margin: 0 0 6px; font-family: var(--font); }
.secret { background: #fff4dc; padding: 2px 6px; word-break: break-all; }
.login { background: url(/static/pattern.svg), linear-gradient(160deg, var(--night), var(--night-2)); min-height: 100vh; }
.login .login-box { max-width: 420px; margin: 0 auto; position: relative; top: 8vh; background: #fff; border-radius: 24px; padding: 28px; box-shadow: var(--shadow-3); }
.login .login-box img { width: 220px; display: block; margin: 0 auto 6px; border-radius: 12px; }
.login .login-box h1 { font-size: 26px; text-align: center; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 920px) {
  .hero, .grid3, .grid2, .steps, .product, .cta-band, .site-footer .container { grid-template-columns: 1fr; }
  .phrase-strip { grid-template-columns: 1fr 1fr; }
  .hero { padding: 48px 0 80px; }
  .stage { min-height: 380px; }
  .cta-band { padding: 30px 22px; } .cta-band .actions { justify-content: flex-start; }
  .buybox { position: static; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { display: flex; overflow-x: auto; gap: 4px; border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .admin-nav a { white-space: nowrap; margin: 0; }
  .admin-main { padding: 14px 16px 40px; }
}
@media (max-width: 520px) {
  .phrase-strip { grid-template-columns: 1fr; }
  .site-nav a { padding: 6px 8px; font-size: 14px; }
  .stack { transform: rotateX(10deg) rotateY(-12deg); }
}

/* 2FA QR code */
.qr{margin:.6rem 0;display:inline-block;background:#fff;padding:8px;border-radius:10px;line-height:0}
.qr svg{width:220px;height:220px;max-width:100%}


/* ---- Mobile navigation (CSS-only <details> menus, CSP-safe) ---- */
.menu-mobile, .admin-menu-mobile { display: none; }
.menu-mobile summary, .admin-menu-mobile summary { list-style: none; cursor: pointer; }
.menu-mobile summary::-webkit-details-marker, .admin-menu-mobile summary::-webkit-details-marker { display: none; }
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; background: rgba(255,255,255,.08); vertical-align: middle; }
.burger i { display: block; height: 2px; background: #fff; border-radius: 2px; }
.burger.dark { background: #eef0ff; width: 40px; height: 40px; } .burger.dark i { background: var(--majorelle); }
.mobile-nav { position: absolute; inset-inline: 0; top: 100%; background: var(--night); padding: 8px 20px 16px; border-top: 1px solid rgba(255,255,255,.08); box-shadow: 0 12px 24px rgba(12,18,42,.35); }
.mobile-nav a { display: block; color: #d9dcf5; text-decoration: none; font-weight: 600; font-size: 16px; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-nav a.cta { margin-top: 10px; text-align: center; border: 0; border-radius: 12px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--night); }
.social { display: flex; justify-content: center; gap: 14px; padding: 4px 16px 18px; }
.social a { color: #d9dcf5; display: inline-flex; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.06); }
.social a:hover { color: var(--gold-2); }
@media (max-width: 760px) {
  .site-header .container { flex-wrap: nowrap; position: relative; }
  .site-header .brand img.lockup { width: 112px; height: auto; }
  .site-nav { display: none; }
  .menu-mobile { display: block; }
  .container { padding: 0 20px; }
  .site-footer { margin-top: 28px; }
  .site-footer .container { grid-template-columns: 1fr 1fr; gap: 14px 20px; padding-top: 24px; padding-bottom: 12px; }
  .site-footer .container > div:first-child { grid-column: 1 / -1; }
  .site-footer .container > div:first-child p { margin: 6px 0 0; }
  .site-footer h4 { margin-bottom: 4px; font-size: 12px; }
  .site-footer a { padding: 4px 0; font-size: 14px; }
  .site-footer .legal { padding: 12px; font-size: 12px; }
  .admin-nav.desktop { display: none; }
  .admin-menu-mobile { display: block; background: #fff; border-bottom: 1px solid var(--line); padding: 6px 12px; }
  .admin-menu-mobile summary { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 4px 0; }
  .admin-nav.mobile { display: block; border: 0; padding: 6px 0 8px; }
  .admin-nav.mobile a { padding: 11px 12px; font-size: 15.5px; }
  .admin-header { padding: 8px 12px; }
  .admin-header .admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-main { padding: 14px 14px 40px; }
  .admin-main h1 { font-size: 24px; }
  .row { flex-wrap: wrap; }
}
/* Product listing: make guides and buy buttons stand out */
.product-card .btn, .buybox .btn { min-height: 46px; font-size: 16px; }

/* Security Center */
.pill.s-pass { background: var(--ok-bg); color: var(--ok); }
.pill.s-fail, .pill.sev-critical, .pill.sev-high { background: var(--bad-bg); color: var(--bad); }
.pill.s-not_checked, .pill.sev-medium { background: var(--warn-bg); color: var(--warn); }
.pill.sev-low, .pill.sev-info { background: #eef0f4; color: #4a5060; }
