:root {
  --brand-primary: #37bdbf;
  --brand-secondary: #686677;
  --brand-accent: #1d2638;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-dark: #1d2638;
  --text: #1d2638;
  --text-muted: #686677;
  --text-on-dark: #ffffff;
  --border: #e6e8ec;
  --radius: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(29, 38, 56, 0.08);
  --shadow-md: 0 8px 24px rgba(29, 38, 56, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-dark);
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

#password-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-dark);
}

#password-gate::before {
  content: "";
  position: absolute;
  top: -45%;
  right: -8%;
  width: 72%;
  height: 180%;
  background: radial-gradient(circle, rgba(55, 189, 191, 0.2) 0%, transparent 62%);
  pointer-events: none;
}

.gate-card {
  width: 100%;
  max-width: 520px;
  padding: 48px 42px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.gate-logo-img {
  display: block;
  height: auto;
}

.gate-logo-pixeltree { width: 130px; }
.gate-logo-hl { width: 96px; }

.gate-brand .gate-logo-img {
  filter: brightness(0) invert(1);
}

.gate-brand-separator {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  padding: 0 6px;
}

.gate-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-primary);
  font-weight: 600;
}

.gate-card h1 {
  color: var(--text-on-dark);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 14px;
}

.gate-card p { color: rgba(255, 255, 255, 0.78); margin-bottom: 24px; }

label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

#gate-input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
}

#gate-input::placeholder { color: rgba(255, 255, 255, 0.45); }
#gate-input:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

#gate-submit {
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: var(--brand-primary);
  cursor: pointer;
}

#gate-submit:hover { filter: brightness(1.06); }
#gate-submit:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

#gate-error {
  min-height: 24px;
  margin-top: 14px;
  color: #ff9fb0;
  font-size: 0.88rem;
}

.gate-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.64);
}

#hub-content { display: none; background: var(--bg); min-height: 100vh; }
#hub-content.unlocked { display: block; }

html.hub-session-unlocked #password-gate { display: none !important; }
html.hub-session-unlocked #hub-content { display: block; }

.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  display: block;
  height: auto;
}

.header-logo-pixeltree { width: 130px; }
.header-logo-hl { width: 96px; }

.header-logo-separator {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}

.header-tag { color: var(--text-muted); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 840px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

main { padding: 72px 0 96px; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 42%); }
.intro { max-width: 760px; margin-bottom: 48px; }
.intro h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -0.02em; margin-bottom: 16px; }
.intro p { color: var(--text-muted); }

.docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.doc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.doc-card--hero {
  grid-column: 1 / -1;
  border: 1px solid rgba(55, 189, 191, 0.45);
  border-radius: calc(var(--radius-lg) + 4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 16px 48px rgba(55, 189, 191, 0.22),
    0 8px 24px rgba(29, 38, 56, 0.08);
  background:
    radial-gradient(ellipse 90% 120% at 100% -20%, rgba(255, 255, 255, 0.95) 0%, transparent 52%),
    radial-gradient(ellipse 70% 80% at 0% 100%, rgba(55, 189, 191, 0.2) 0%, transparent 48%),
    linear-gradient(125deg, #dff9fa 0%, #b8eef0 22%, #f2fdfe 48%, #e8f4ff 78%, #d4f8f9 100%);
  position: relative;
  overflow: hidden;
}

.doc-card--hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-primary), #7ae4e6 45%, #4a90d9 100%);
  pointer-events: none;
}

.doc-card--hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -12%;
  width: min(420px, 55vw);
  height: 140%;
  background: radial-gradient(circle, rgba(55, 189, 191, 0.18) 0%, transparent 68%);
  pointer-events: none;
}

.doc-card--hero:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 56px rgba(55, 189, 191, 0.28),
    0 10px 28px rgba(29, 38, 56, 0.1);
}

.doc-card:hover:not(.doc-card--hero) { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.doc-link--hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 32px;
  align-items: center;
  padding: 32px 32px 34px;
}

.doc-hero-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.doc-link--hero .doc-hero-main .doc-meta {
  margin-bottom: 12px;
}

.doc-link--hero .doc-hero-main h3 {
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .doc-link--hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .doc-link--hero .doc-cta {
    justify-self: flex-start;
  }
}

.doc-link--hero .doc-meta {
  color: var(--brand-accent);
  letter-spacing: 0.14em;
}

.doc-link--hero h3 {
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  letter-spacing: -0.03em;
  color: var(--brand-accent);
  max-width: 20ch;
}

.doc-link--hero p {
  color: rgba(29, 38, 56, 0.78);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 0;
}

.doc-link--hero .doc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, #4ad0d2 0%, var(--brand-primary) 45%, #2aa6a8 100%);
  color: var(--brand-accent);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(55, 189, 191, 0.35);
  white-space: nowrap;
}

.doc-link--hero:hover .doc-cta {
  filter: brightness(1.05);
}

.doc-link {
  display: block;
  padding: 28px;
  text-decoration: none;
  height: 100%;
}

.doc-link:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-lg);
}

.doc-link--hero:focus-visible {
  outline-color: var(--brand-accent);
  outline-offset: 4px;
  border-radius: calc(var(--radius-lg) + 4px);
}

.doc-meta {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-primary);
  font-weight: 600;
}

.doc-link h3 { margin-bottom: 10px; font-size: 1.2rem; }
.doc-link p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.doc-cta { font-weight: 600; color: var(--brand-accent); }
.coming-soon .doc-cta { color: var(--text-muted); }
.coming-soon .doc-link { cursor: default; }
