/* Hermina shared product shell — used by Downloads, Docs and Personas. */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;600;700&display=swap");

:root {
  --bg: #f4f7f6;
  --sidebar-bg: #edf1ef;
  --sidebar-border: rgba(9, 10, 10, 0.12);
  --surface: #fbfcfc;
  --text-primary: #090a0a;
  --text-secondary: #4e5351;
  --text-tertiary: #777d7a;
  --border: rgba(9, 10, 10, 0.13);
  --border-light: rgba(9, 10, 10, 0.09);
  --accent: #8d68ff;
  --accent-soft: #e8e0ff;
  --shadow-border: 0 0 0 1px rgba(9, 10, 10, 0.13);
  --shadow-card: none;
  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;
  --radius-pill: 0;
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --nav-height: 72px;
  --shell-offset: 110px;
}

/* Keep the navigation grid fixed when moving between long and short pages. */
html { overflow-y: scroll; }

[data-theme="dark"] {
  --bg: #080909;
  --sidebar-bg: #0e1010;
  --sidebar-border: rgba(245, 247, 246, 0.13);
  --surface: #0d0f0f;
  --text-primary: #f5f7f6;
  --text-secondary: #a8aeab;
  --text-tertiary: #747a77;
  --border: rgba(245, 247, 246, 0.13);
  --border-light: rgba(245, 247, 246, 0.09);
  --accent: #a98cff;
  --accent-soft: #272033;
  --shadow-border: 0 0 0 1px rgba(245, 247, 246, 0.13);
}

html { scroll-padding-top: calc(var(--shell-offset) + 20px); }

.shell-page {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

.shell-root {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex: 1;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  overflow-x: hidden;
}

.shell-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(45% 30% at 72% 8%, rgba(141, 104, 255, 0.13), transparent 74%),
    linear-gradient(rgba(9, 10, 10, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 10, 10, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

.shell-page main,
.shell-page .page-wrapper,
.shell-page footer { position: relative; z-index: 1; }

[data-theme="dark"] .shell-page::before {
  background:
    radial-gradient(45% 30% at 72% 8%, rgba(169, 140, 255, 0.15), transparent 74%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

.shell-announcement {
  position: fixed;
  inset: 0 0 auto;
  z-index: 150;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 48px;
  background: #090a0a;
  color: #f7f8f8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-sans);
  font-size: 0.76rem;
}

.shell-announcement .shell-signal {
  color: #c1acff;
  font-family: var(--font-mono);
}

.shell-announcement a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.shell-page > nav {
  top: 38px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 max(32px, calc((100% - 1240px) / 2 + 32px));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--font-sans);
}

.shell-page .nav-left {
  gap: 0;
  color: var(--text-primary);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.shell-page .nav-left img {
  width: 28px !important;
  height: 28px !important;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 5px !important;
  filter: grayscale(1) contrast(1.1);
}

.shell-page .nav-left > span:first-of-type { margin-left: 0; }
.shell-page .brand-word {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin-left: 0 !important;
  color: inherit;
  font-weight: 700;
  white-space: nowrap;
}
.shell-page .brand-word .brand-suffix {
  margin-left: 0 !important;
  color: inherit;
  font-weight: 300;
}

.shell-page .nav-right {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 1px;
  margin-left: 43px;
}

.shell-page .nav-right > a:not(.nav-cta) {
  padding: 8px 10px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.6;
}

.shell-page .nav-right > a:not(.nav-cta):hover { background: color-mix(in srgb, var(--text-primary) 5%, transparent); }
.shell-page .nav-right > a.active:not(.nav-cta) { background: transparent; }

.shell-page .nav-cta {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  margin-left: 7px;
  border-radius: 0;
  background: #090a0a;
  color: #fff !important;
  font-family: var(--font-mono);
  font-size: 0.71rem !important;
  font-weight: 700;
  letter-spacing: 0.015em;
}

[data-theme="dark"] .shell-page .nav-cta { background: #f5f7f6; color: #090a0a !important; }

.shell-page .theme-toggle,
.shell-page .mobile-menu-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
}
.shell-page .theme-toggle { margin-left: auto; }

.shell-page .lang-toggle {
  width: 64px;
  padding: 0;
  margin-left: 7px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.shell-page .lang-toggle button {
  flex: 1;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 0 !important;
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.shell-page .lang-toggle button.active,
.shell-page .lang-toggle button.active::before {
  background: var(--text-primary);
  color: var(--bg);
  box-shadow: none;
  border-radius: 0;
}

/* Downloads */
.shell-downloads main {
  width: min(100%, 1240px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 186px 32px 110px;
  align-items: stretch;
  justify-content: flex-start;
}

.shell-downloads .downloads-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 8vw;
  align-items: end;
  margin: 0 0 64px;
  text-align: left;
}

.shell-downloads .downloads-header::before,
.shell-personas .page-header::before {
  content: "> PRODUCT ACCESS";
  grid-column: 1 / -1;
  margin-bottom: -4vw;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.shell-downloads .downloads-header::first-letter,
.shell-personas .page-header::first-letter { color: var(--accent); }

.shell-downloads .downloads-header h1 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.shell-downloads .downloads-header p {
  max-width: 420px;
  padding-bottom: 9px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.shell-downloads .download-grid {
  max-width: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--border);
}

.shell-downloads .download-card {
  min-height: 350px;
  align-items: flex-start;
  padding: 28px 24px 24px;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  text-align: left;
  box-shadow: none;
  transition: background 0.25s ease;
}

.shell-downloads .download-card:hover { background: var(--accent-soft); box-shadow: none; }

.shell-downloads .download-card .platform-icon {
  width: 54px;
  height: 54px;
  margin: 0 0 auto;
  background: var(--accent-soft);
  color: var(--text-primary);
}

.shell-downloads .download-card:hover .platform-icon { background: var(--surface); }
.shell-downloads .download-card .platform-icon svg { width: 26px; height: 26px; }
.shell-downloads .download-card h3 { margin-top: 28px; font-size: 1.05rem; }
.shell-downloads .download-card .version { color: var(--text-secondary); }
.shell-downloads .download-card .size { min-height: 22px; margin: 0 0 16px; color: var(--text-tertiary); }

.shell-downloads .download-card .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.shell-downloads .download-card .btn-primary { background: #090a0a; color: #fff; }
.shell-downloads .download-card .btn-secondary { border-color: var(--border); }

.shell-downloads .downloads-note {
  margin: 28px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  text-align: left;
}

/* Personas */
.shell-personas main {
  width: 100%;
  min-width: 0;
  max-width: 1240px;
  padding: 186px 32px 110px;
}

.shell-personas .page-header {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 8vw;
  align-items: end;
  margin-bottom: 56px;
  text-align: left;
}

.shell-personas .page-header::before { content: "> PERSONA LIBRARY"; }

.shell-personas .page-header h1 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.shell-personas .page-header p {
  max-width: 430px;
  margin: 0;
  padding-bottom: 8px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.shell-personas .search-bar {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.shell-personas .search-bar::before {
  content: "/";
  left: 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

.shell-personas .search-bar input {
  height: 58px;
  padding: 0 20px 0 42px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.shell-personas .search-bar input:focus { border-color: var(--accent); }

.shell-personas .categories {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
  gap: 1px;
  margin: 0 0 32px;
  padding: 1px;
  background: var(--border);
}

.shell-personas .category-btn {
  flex: 1;
  min-width: max-content;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.shell-personas .category-btn:hover { background: var(--accent-soft); border-color: transparent; }
.shell-personas .category-btn.active { background: #090a0a; color: #fff; }

.shell-personas .personas-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--border);
}

.shell-personas .persona-card {
  min-width: 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  transition: background 0.25s ease;
}

.shell-personas .persona-card:hover { background: var(--accent-soft); box-shadow: none; }
.shell-personas .persona-icon { border-radius: 0; background: var(--accent-soft); }
.shell-personas .persona-card:hover .persona-icon { background: var(--surface); }
.shell-personas .persona-name { font-size: 1rem; }
.shell-personas .persona-category { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; }
.shell-personas .persona-desc { color: var(--text-secondary); }
.shell-personas .persona-tags { margin-top: auto; }
.shell-personas .persona-tag { border-radius: 0; background: var(--bg); font-size: 0.64rem; }
.shell-personas .persona-actions { gap: 1px; padding: 1px; background: var(--border); }

.shell-personas .btn-sm {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.shell-personas .btn-sm.primary { background: #090a0a; color: #fff; }

/* Docs */
.shell-docs .page-wrapper {
  margin-top: var(--shell-offset);
  min-height: calc(100vh - var(--shell-offset));
}

.shell-docs .sidebar {
  top: var(--shell-offset);
  width: 300px;
  height: calc(100vh - var(--shell-offset));
  padding: 38px 24px 48px max(32px, calc((100vw - 1240px) / 2));
  background: var(--sidebar-bg);
  border-color: var(--sidebar-border);
}

.shell-docs .sidebar-section-title {
  margin: 0 0 8px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

.shell-docs .sidebar-link {
  padding: 7px 10px;
  border-radius: 0;
  font-size: 0.8rem;
}

.shell-docs .sidebar-link:hover { background: var(--accent-soft); }
.shell-docs .sidebar-link.active { padding-left: 16px; background: var(--accent-soft); border-left: 3px solid var(--accent); }

.shell-docs .content {
  width: min(100%, 940px);
  max-width: 940px;
  padding: 66px 72px 120px;
}

.shell-docs .content h1 {
  margin-bottom: 50px;
  font-size: clamp(3.3rem, 6vw, 5.5rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.shell-docs .content h1::before {
  content: "> DOCUMENTATION";
  display: block;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.shell-docs .content h1 .sub {
  max-width: 540px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.shell-docs .content h2 {
  margin: 70px 0 24px;
  padding-bottom: 16px;
  border-color: var(--border);
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.shell-docs .content h3 { margin-top: 34px; font-size: 1.08rem; }
.shell-docs .content p,
.shell-docs .content li { color: var(--text-secondary); font-size: 0.92rem; }
.shell-docs .content a { color: var(--text-primary) !important; text-decoration-color: var(--accent); }

.shell-docs .content .tag {
  padding: 0;
  margin-bottom: 18px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

.shell-docs .content pre {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: #090a0a;
  box-shadow: none;
}

.shell-docs .content pre code { color: #eef1ef; }
.shell-docs .content code { border-radius: 0; background: var(--accent-soft); box-shadow: none; }
.shell-docs .content table { border: 1px solid var(--border); }
.shell-docs .content th { background: var(--accent-soft); font-family: var(--font-mono); font-size: 0.66rem; }
.shell-docs .content th,
.shell-docs .content td { padding: 11px 13px; border-color: var(--border); }
.shell-docs .docs-footer { margin-top: 80px; padding-top: 24px; border-color: var(--border); }

/* Shared footer */
.shell-downloads footer,
.shell-personas footer {
  min-height: 112px;
  padding: 32px max(32px, calc((100vw - 1240px) / 2));
  border: 0;
  background: #090a0a;
  color: #8f9692;
}

.shell-downloads footer a,
.shell-personas footer a { color: #b2b7b4; }

@media (max-width: 1040px) {
  .shell-page > nav { padding-inline: 32px; }
  .shell-page .nav-right > a:nth-of-type(n + 4):not(.nav-cta) { display: none; }
  .shell-downloads .download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shell-personas .personas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell-docs .content { padding-inline: 48px; }
}

@media (max-width: 960px) {
  .shell-page .nav-right > a:not(.nav-cta) { display: none !important; }
  .shell-downloads .hamburger { display: none !important; }
  .shell-downloads .nav-cta { display: inline-flex !important; }
  .shell-downloads .downloads-header,
  .shell-personas .page-header { grid-template-columns: 1fr; gap: 28px; }
  .shell-downloads .downloads-header::before,
  .shell-personas .page-header::before { margin-bottom: -8px; }
  .shell-docs .content { max-width: 100%; padding: 54px 30px 100px; }
}

@media (max-width: 760px) {
  :root { --nav-height: 62px; --shell-offset: 96px; }
  .shell-announcement { height: 34px; padding-inline: 16px; font-size: 0.68rem; white-space: nowrap; overflow: hidden; }
  .shell-page > nav { top: 34px; height: 62px; padding-inline: 20px; }
  .shell-page .nav-left { font-size: 1.12rem; }
  .shell-page .nav-left img { width: 26px !important; height: 26px !important; }
  .shell-page .nav-right { gap: 5px; }
  .shell-page .nav-right .theme-toggle,
  .shell-page .nav-right .lang-toggle { display: none; }
  .shell-page .nav-cta { min-height: 36px; margin-left: auto; padding: 8px 15px; font-size: 0.71rem !important; }
  .shell-downloads main,
  .shell-personas main { padding: 144px 18px 76px; }
  .shell-downloads .downloads-header,
  .shell-personas .page-header { margin-bottom: 38px; }
  .shell-downloads .downloads-header h1,
  .shell-personas .page-header h1 {
    max-width: 100%;
    font-size: clamp(3.5rem, 17vw, 4.6rem);
    line-height: 0.92;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .shell-downloads .download-grid,
  .shell-personas .personas-grid { grid-template-columns: 1fr; }
  .shell-downloads .download-card { min-height: 320px; }
  .shell-personas .categories { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .shell-personas .category-btn { flex: 0 0 auto; }
  .shell-docs .content { padding: 44px 20px 80px; }
  .shell-docs .content h1 { font-size: clamp(3.1rem, 15vw, 4.4rem); margin-bottom: 42px; }
  .shell-docs .content h2 { margin-top: 56px; font-size: 1.9rem; }
  .shell-downloads footer,
  .shell-personas footer { min-height: 140px; padding-inline: 20px; flex-wrap: wrap; }
}
