:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #d9e0ea;
  --text: #17324d;
  --muted: #5d7288;
  --accent: #2f6fed;
  --accent-soft: #eaf1ff;
  --shadow: 0 10px 30px rgba(20, 38, 63, 0.08);
  --radius: 18px;
  --bad: #b42318;
  --ok: #1f8f5f;
  --shell-max-width: 960px;
  --shell-side-pad: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hub-topbar {
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: 20px var(--shell-side-pad) 0;
}

.hub-topbar-page {
  max-width: var(--shell-max-width);
}

.hub-wide {
  max-width: var(--shell-max-width);
}

.hub-topbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.hub-topbar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.hub-topbar-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.hub-topbar-link:hover {
  text-decoration: underline;
}

.hub-topbar-cta {
  background: var(--accent-soft);
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
}

.hub-topbar-cta:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.hub-topbar-link[aria-current="page"] {
  color: var(--text);
  pointer-events: none;
}

.hub-topbar-link-active {
  color: var(--text);
  pointer-events: none;
}

.hub-breadcrumb {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.hub-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.hub-breadcrumb a:hover {
  text-decoration: underline;
}

.hub-topbar-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.hub-topbar-brand:hover {
  color: var(--accent);
}

.hub {
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: 32px var(--shell-side-pad) 48px;
}

.hub-hero {
  background: linear-gradient(135deg, #17324d 0%, #244d82 100%);
  color: #fff;
  border-radius: 28px;
  padding: 28px 28px 32px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  padding: 6px 10px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hub-hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.lead {
  margin: 0 0 22px;
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  line-height: 1.55;
}

.lead code {
  background: rgba(255,255,255,0.12);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

.search-form label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.search-form .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-form input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
}

.search-form-pw-field {
  margin-top: 16px;
}

.search-form-pw-field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.search-form-pw-field input[type="password"] {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  box-sizing: border-box;
}

.search-form-pw-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
}

.search-form button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #17324d;
}

.search-form button:hover {
  filter: brightness(0.97);
}

.search-form-inline label,
.search-form-inline .search-form-pw-field label {
  color: var(--muted);
}

.search-form-inline input[type="text"],
.search-form-inline .search-form-pw-field input[type="password"] {
  border: 1px solid var(--line);
}

.search-form-inline button {
  background: var(--accent);
  color: #fff;
}

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.alert.error {
  background: rgba(255, 220, 220, 0.95);
  color: var(--bad);
}

.alert.ok {
  background: rgba(220, 245, 230, 0.95);
  color: #0d4a2e;
}

.alert code {
  font-size: 13px;
}

.hub-list {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.hub-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.hub-list h2 {
  margin: 0;
  font-size: 18px;
}

.hub-catalog-search-wrap {
  flex: 1 1 200px;
  max-width: 320px;
}

.hub-catalog-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
}

.hub-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hub-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.hub-list li:last-child {
  border-bottom: none;
}

.hub-list a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.hub-list a:hover {
  text-decoration: underline;
}

.hub-list .meta {
  font-size: 12px;
  color: var(--muted);
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hub-view-all {
  margin: 16px 0 0;
  font-size: 14px;
}

.hub-view-all a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.hub-view-all a:hover {
  text-decoration: underline;
}

.hub-catalog-hero {
  margin-bottom: 8px;
}

.hub-catalog-hero h1 {
  margin: 0 0 10px;
  font-size: 26px;
  color: var(--text);
}

.catalog-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 100%;
}

.catalog-lead a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.catalog-lead a:hover {
  text-decoration: underline;
}

.catalog-classify-form {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.catalog-classify-hint {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

.catalog-classify-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent-soft);
  color: var(--accent);
}

.catalog-classify-btn:hover {
  filter: brightness(0.97);
}

.hub-catalog-page-search-wrap {
  display: block;
  margin: 0 0 24px;
}

.hub-catalog-page-search-wrap .hub-catalog-search {
  max-width: 100%;
}

.catalog-grouped {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.catalog-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 8px;
  box-shadow: var(--shadow);
}

.catalog-group-title {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.catalog-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-group-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.catalog-group-list li:last-child {
  border-bottom: none;
}

.catalog-group-list a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.catalog-group-list a:hover {
  text-decoration: underline;
}

.catalog-group-list .meta {
  font-size: 12px;
  color: var(--muted);
}

.catalog-empty {
  margin-top: 16px;
}

.catalog-empty a {
  color: var(--accent);
  font-weight: 600;
}

.new-taxonomy-panel {
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.new-taxonomy-panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.new-taxonomy-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.new-taxonomy-panel .search-form {
  margin: 0;
}

.contact-panel {
  margin-top: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
  box-shadow: var(--shadow);
}

.contact-panel .contact-alert {
  margin: 0 0 18px;
}

.contact-form {
  margin: 0;
}

.contact-field {
  margin-bottom: 16px;
}

.contact-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
}

.contact-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.contact-actions {
  margin-top: 8px;
}

.contact-submit {
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.contact-submit:hover {
  filter: brightness(1.05);
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.blog-post-shell {
  max-width: var(--shell-max-width);
}

.blog-post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
}

.blog-post-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  line-height: 1.2;
}

.blog-post-meta {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.blog-post-content {
  max-width: 760px;
  font-size: 1.03rem;
  line-height: 1.86;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  line-height: 1.3;
  margin: 1.95em 0 0.7em;
}

.blog-post-content p,
.blog-post-content ul,
.blog-post-content ol,
.blog-post-content blockquote,
.blog-post-content pre,
.blog-post-content table {
  margin: 0 0 1.35em;
}

.blog-post-content a {
  color: var(--accent);
}

.blog-post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: #f2f5fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.35em;
}

.blog-post-content pre {
  background: #13253d;
  color: #e9f0fb;
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-post-content pre code {
  background: transparent;
  border: none;
  border-radius: 0;
  color: inherit;
  padding: 0;
  font-size: 0.9em;
}

.blog-post-content img {
  display: block;
  max-width: min(100%, 720px) !important;
  width: auto !important;
  height: auto !important;
  margin: 1.2em auto;
  border-radius: 12px;
}

/* Override common generator inline styles that force edge-to-edge images. */
.blog-post-content img[style*="width"],
.blog-post-content figure[style*="width"] img,
.blog-post-content p[style*="width"] img {
  max-width: min(100%, 720px) !important;
  width: auto !important;
}

.blog-post-content figure {
  margin: 1.2em 0;
}

.blog-post-content figure img {
  margin: 0 auto;
}

.blog-post-content figcaption {
  margin-top: 0.6em;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.blog-post-content iframe,
.blog-post-content video,
.blog-post-content embed {
  max-width: 100%;
}

.blog-post-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.blog-post-content th,
.blog-post-content td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.blog-post-content blockquote {
  margin-left: 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

@media (max-width: 700px) {
  .blog-post-card {
    border-radius: 16px;
  }

  .blog-post-content {
    font-size: 0.98rem;
    line-height: 1.78;
  }

  .blog-post-content pre {
    padding: 12px;
  }

  .blog-post-content table th,
  .blog-post-content table td {
    min-width: 120px;
    white-space: nowrap;
  }
}
