:root {
  color-scheme: dark;
  --bg: #090d0c;
  --panel: #111715;
  --panel-soft: #151e1b;
  --line: rgba(255, 255, 255, 0.11);
  --text: #f5f7f6;
  --muted: #aeb9b5;
  --brand: #b6f36b;
  --brand-ink: #132008;
  --accent: #b6f36b;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 30rem),
    radial-gradient(circle at 94% 100%, rgba(182, 243, 107, 0.11), transparent 32rem),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.24;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; overflow: hidden; border: 1px solid rgba(182, 243, 107, .42); border-radius: 11px; background: rgba(182, 243, 107, .08); }
.brand-mark img { display: block; width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.header-link { color: var(--muted); font-size: 14px; text-underline-offset: 4px; }
.header-link:hover { color: var(--text); }

.gateway { padding: clamp(34px, 7vw, 88px) 0 72px; }
.gateway-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: clamp(34px, 7vw, 92px); align-items: start; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { max-width: 780px; margin: 0; font-size: clamp(42px, 6.3vw, 80px); line-height: .98; letter-spacing: -.055em; }
.lede { max-width: 710px; margin: 26px 0 0; color: #c6cfcc; font-size: clamp(17px, 2vw, 21px); line-height: 1.62; }
.trust-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 28px 0 0; padding: 0; list-style: none; }
.trust-row li { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 12px; }

.journey { margin-top: 48px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(17, 23, 21, .72); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.journey h2 { margin: 0 0 17px; font-size: 14px; letter-spacing: .02em; }
.journey ol { display: grid; gap: 14px; margin: 0; padding: 0; counter-reset: demo-step; list-style: none; }
.journey li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; color: var(--muted); font-size: 14px; line-height: 1.5; counter-increment: demo-step; }
.journey li::before { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); content: counter(demo-step, decimal-leading-zero); font-size: 10px; font-weight: 800; }

.role-panel { position: sticky; top: 24px; padding: 10px; border: 1px solid var(--line); border-radius: 26px; background: rgba(15, 21, 19, .88); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.panel-heading { padding: 18px 18px 12px; }
.panel-heading h2 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.025em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.role-list { display: grid; gap: 9px; }
.role-card { position: relative; display: grid; grid-template-columns: 42px 1fr 18px; gap: 13px; align-items: center; min-height: 112px; padding: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: rgba(255,255,255,.025); text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.role-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.052); }
.role-card.primary { border-color: color-mix(in srgb, var(--brand) 43%, transparent); background: linear-gradient(135deg, rgba(182,243,107,.15), rgba(182,243,107,.055)); }
.role-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.role-copy { min-width: 0; }
.role-copy small { display: block; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.role-copy strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.role-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.role-arrow { color: var(--muted); font-size: 20px; transition: transform .18s ease; }
.role-card:hover .role-arrow { transform: translateX(3px); color: var(--text); }

.panel-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 12px; color: var(--muted); font-size: 12px; }
.panel-footer a { text-underline-offset: 4px; }
.panel-footer a:hover { color: var(--text); }
.privacy-note { display: flex; gap: 9px; align-items: flex-start; width: 100%; margin-top: 2px; padding-top: 15px; border-top: 1px solid var(--line); line-height: 1.5; }
.privacy-note::before { color: var(--brand); content: "●"; font-size: 9px; transform: translateY(4px); }

.notice { margin: 0 0 22px; padding: 13px 15px; border: 1px solid rgba(244, 185, 66, .38); border-radius: 13px; color: #f7d99b; background: rgba(244, 185, 66, .08); font-size: 13px; line-height: 1.5; }
.manual { margin: 11px 8px 3px; color: var(--muted); font-size: 12px; }
.manual summary { padding: 10px; cursor: pointer; }
.manual dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 0; padding: 5px 10px 13px; }
.manual dt { color: var(--muted); }
.manual dd { margin: 0; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.manual p { margin: 0; padding: 0 10px 14px; }
.manual a { color: var(--text); text-underline-offset: 4px; }

.directory { padding: clamp(42px, 7vw, 90px) 0 80px; }
.directory-head { max-width: 760px; }
.directory h1 { font-size: clamp(42px, 7vw, 78px); }
.plugin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.plugin-card { display: flex; min-height: 250px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 21px; color: var(--text); background: rgba(17,23,21,.78); text-decoration: none; box-shadow: 0 18px 50px rgba(0,0,0,.16); transition: transform .2s ease, border-color .2s ease; }
.plugin-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--card-accent) 55%, transparent); }
.plugin-card .card-code { color: var(--card-accent); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.plugin-card h2 { margin: 24px 0 10px; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; }
.plugin-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plugin-card strong { margin-top: auto; padding-top: 25px; color: var(--card-accent); font-size: 13px; }

.loading { display: grid; min-height: 70vh; place-items: center; color: var(--muted); }
.error-card { max-width: 620px; margin: 80px auto; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.error-card h1 { font-size: 32px; }
.error-card p { color: var(--muted); line-height: 1.6; }

.site-footer { display: flex; justify-content: space-between; gap: 18px; padding: 26px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 4px; }

@media (max-width: 920px) {
  .gateway-grid { grid-template-columns: 1fr; }
  .role-panel { position: static; }
  .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 26px, 1180px); }
  .site-header { padding: 18px 0; }
  .brand small, .header-link { display: none; }
  .gateway { padding-top: 34px; }
  h1 { font-size: clamp(39px, 13vw, 58px); }
  .role-card { grid-template-columns: 38px 1fr 14px; padding: 15px; }
  .role-icon { width: 38px; height: 38px; }
  .plugin-grid { grid-template-columns: 1fr; }
  .plugin-card { min-height: 220px; }
  .site-footer { flex-direction: column; }
}

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