:root {
  --bg: #08101b;
  --panel: rgba(255,255,255,0.04);
  --line: rgba(255,255,255,0.08);
  --text: #eef4ff;
  --muted: #a8b7d6;
  --accent: #79c7ff;
  --accent2: #8ff0ca;
  --max: 1180px;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(121,199,255,0.20), transparent 24%),
    radial-gradient(circle at 100% 8%, rgba(143,240,202,0.10), transparent 18%),
    linear-gradient(180deg, #06101a 0%, #08101b 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(6,16,26,0.76);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #fff;
  font-size: 28px;
}

.brand-name {
  font-size: 18px;
  color: #5EEAD4;
}

.brand-suffix {
  font-size: 18px;
  color: #fff;
}

.brand-logo {
  display: block;
  width: 148px;
  height: auto;
  max-height: 58px;
}

.brand-symbol { display:block; width:40px; height:40px; flex:0 0 40px; }
.brand-text { color:#fff; font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:18px; font-weight:800; white-space:nowrap; }

.navlinks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.navlinks a {
  color: var(--muted);
}

.navlinks a:hover {
  color: #fff;
}

.hero {
  padding: 74px 0 28px;
}

/* A byline/author-page heading can fall back to a raw email address when no
   display name is set -- with no spaces for the browser to wrap on, that
   would otherwise overflow the viewport at narrow widths. */
.hero h1 {
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(121,199,255,0.08);
  border: 1px solid rgba(121,199,255,0.18);
  color: #d4ebff;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -1.8px;
}

.hero-subtitle {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--accent);
  font-weight: 700;
}

.lead {
  color: var(--muted);
  font-size: 20px;
  max-width: 760px;
}

.cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 700;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #5c93ff);
  color: #07111f;
}

.btn.secondary {
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
}

.hero-photo-card,
.media-card,
.mini-media-card,
.role-card,
.faq-item,
.stat,
.tool-photo-card,
.contact-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}


.hero-photo-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo {
  width: 100%;
  max-height: 500px;
  display: block;
  border-radius: 16px;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}
section {
  padding: 28px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.8px;
  text-align: center;
  color: #fff;
}

.section-copy {
  color: var(--muted);
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-body {
  min-width: 0;
}

.value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.label {
  font-size: 14px;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.media-card,
.mini-media-card,
.role-card {
  overflow: hidden;
}

.media-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 180px;
}

.thumb {
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-body {
  padding: 20px;
}

.media-body h3,
.mini-body h3,
.role-body h3,
.faq-item h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
}

.media-body p,
.mini-body p,
.role-body p,
.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: #dce6fb;
  font-size: 14px;
}

.mini-media-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 140px;
}

.mini-thumb {
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-body {
  padding: 18px;
}

.role-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 150px;
}

.role-thumb {
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.role-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-body {
  padding: 18px;
}

.quote-card {
  margin-top: 18px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(121,199,255,0.08), rgba(143,240,202,0.04));
  border: 1px solid rgba(121,199,255,0.18);
}

.quote-card h3 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 22px;
}

.quote-card p {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.faq-item {
  padding: 20px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.tools-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tool-category-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.tool-category-card h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.role-tags-card {
  margin-bottom: 18px;
}

.tool-photo-card {
  padding: 14px;
  text-align: center;
}

.tool-photo {
  width: 100%;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 12px;
  background: rgba(255,255,255,0.03);
}

.tool-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-photo-card span {
  display: block;
  font-size: 16px;
  color: #eaf2ff;
  font-weight: 700;
}

.contact-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.contact-strip a {
  padding: 22px;
  text-align: center;
  font-size: 18px;
  color: #fff;
}

.contact-strip a:first-child {
  border-right: 1px solid var(--line);
}

.footer {
  padding: 24px 0 44px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.footer-brand { display:inline-block; margin:0 0 18px; }
.footer-brand img { display:block; width:170px; height:auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--text);
}

.blog-hero {
  padding: 56px 0 20px;
}

.back-link {
  display: inline-block;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.back-link:hover {
  color: #fff;
}

.draft-badge {
  background: rgba(255,196,105,0.1);
  border-color: rgba(255,196,105,0.28);
  color: #ffd9a0;
}

.post-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}

.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.blog-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.15s ease;
}

.blog-card:hover {
  border-color: rgba(121,199,255,0.35);
}

.blog-card-body h3 {
  margin: 6px 0 10px;
  color: #fff;
  font-size: 24px;
}

.blog-card-body p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 16px;
}

.blog-card-body .pillrow {
  margin-top: 16px;
}

/* The card itself is a plain container (article), not a link -- an <a>
   cannot contain another <a>, and the byline just above already links to
   the author page. Title and "Read article" are their own separate links. */
.blog-card-title-link {
  color: inherit;
}
.blog-card-title-link:hover {
  color: var(--accent);
}

.blog-card-read-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.blog-card-read-link:hover {
  text-decoration: underline;
}

.post-body {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: 12px;
}

.post-body h2 {
  color: #fff;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 40px 0 16px;
}

.post-body h2:first-child {
  margin-top: 0;
}

.post-body h3 {
  color: #fff;
  font-size: 20px;
  margin: 28px 0 10px;
}

.post-body p {
  color: var(--text);
  font-size: 17px;
  margin: 0 0 18px;
}

.post-body ul,
.post-body ol {
  color: var(--text);
  font-size: 17px;
  margin: 0 0 18px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 10px;
}

.post-body strong {
  color: #fff;
}

.post-body code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 15px;
  color: var(--accent2);
}

.post-body pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  overflow-x: auto;
  margin: 0 0 24px;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.post-diagram {
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.post-diagram figcaption {
  padding: 12px 20px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  border-top: 1px solid var(--line);
}

.post-diagram img {
  width: 100%;
  display: block;
}

@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .contact-strip,
  .statgrid {
    grid-template-columns: 1fr;
  }

  .media-card,
  .mini-media-card,
  .role-card {
    grid-template-columns: 1fr;
  }

  .thumb,
  .mini-thumb,
  .role-thumb {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
}

@media (max-width: 680px) {
  .brand-symbol { width:36px; height:36px; flex-basis:36px; }
  .brand-text { font-size:16px; }

  .brand-logo {
    width: 124px;
    max-height: 52px;
  }

  .grid-4,
  .tools-grid,
  .tools-categories {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 46px;
  }

  .lead {
    font-size: 18px;
  }

  .contact-strip a:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 420px) {
  .brand-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group select {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  padding: 12px 14px;
  padding-right: 36px;
  border-radius: 10px;
  background-color: rgba(255,255,255,0.03);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.form-group select option {
  background-color: var(--bg);
  color: var(--text);
}

.auth-card .btn {
  width: 100%;
  margin-top: 6px;
}

.form-message {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.form-message.success {
  background: rgba(143,240,202,0.08);
  border: 1px solid rgba(143,240,202,0.25);
  color: #c8f5e0;
}

.form-message.error {
  background: rgba(255,110,110,0.08);
  border: 1px solid rgba(255,110,110,0.25);
  color: #ffd3d3;
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
}

.auth-status {
  text-align: center;
}

.auth-status .value {
  font-size: 20px;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.password-warning {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,196,105,0.1);
  border: 1px solid rgba(255,196,105,0.3);
  color: #ffd9a0;
  font-size: 13px;
  line-height: 1.5;
}

.info-box {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(120,170,255,0.08);
  border: 1px solid rgba(120,170,255,0.25);
  color: #c9dcff;
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   Shared admin/my-posts table + edit-modal styling
   (moved out of per-page <style> blocks so the modal fix only needs one
   source of truth instead of two identical copies)
   ========================================================================== */

#content {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: middle;
}
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-actions button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-approve {
  background: linear-gradient(135deg, var(--accent2), #4fd6a8);
  color: #07111f;
  border-color: transparent;
}
.btn-reject {
  background: rgba(255,110,110,0.08);
  color: #ffb3b3;
  border-color: rgba(255,110,110,0.25);
}
.btn-neutral {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.admin-empty {
  color: var(--muted);
  padding: 24px 0;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-published { background: rgba(143,240,202,0.12); color: #8ff0ca; }
.status-draft { background: rgba(255,196,105,0.12); color: #ffd9a0; }
.status-disabled_by_admin { background: rgba(255,196,105,0.12); color: #ffd9a0; }
.status-deleted { background: rgba(255,110,110,0.12); color: #ffb3b3; }

/* Body-scroll-lock class, toggled by JS while the modal is open. */
body.modal-open {
  overflow: hidden;
}

.edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,8,14,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}
.edit-overlay[hidden] {
  display: none;
}

.edit-panel {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: var(--panel);
  background-color: #0d1826;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.edit-panel-header {
  flex: 0 0 auto;
  padding: 24px 28px 12px;
  border-bottom: 1px solid var(--line);
}
.edit-panel-header h2 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.edit-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 28px;
  min-height: 0; /* required for a flex child to actually shrink & scroll */
}
.edit-panel-body .form-group {
  width: 100%;
}
.edit-panel-body .form-group input,
.edit-panel-body .form-group select,
.edit-panel-body .form-group textarea {
  width: 100%;
  box-sizing: border-box;
}

.edit-panel textarea#edit-markdown {
  width: 100%;
  height: 380px;
  min-height: 320px;
  max-height: 450px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
}

.edit-panel-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: inherit;
}

@media (max-width: 600px) {
  .edit-overlay {
    padding: 0;
    align-items: stretch;
  }
  .edit-panel {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .edit-panel-actions button,
  .edit-panel-header button {
    min-height: 44px;
  }
}

.image-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.image-row:last-child {
  border-bottom: none;
}
.image-row.is-selected {
  background: rgba(121,199,255,0.08);
  outline: 1px solid rgba(121,199,255,0.4);
  border-radius: 8px;
  padding-left: 8px;
  padding-right: 8px;
}
.image-row-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  cursor: grab;
}
.image-row-thumb:active {
  cursor: grabbing;
}
.image-row-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.image-row-fields input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.image-row-status {
  font-size: 12px;
  color: var(--muted);
}
.image-row-status.error {
  color: #ffb3b3;
}
.image-row-status.success {
  color: #8ff0ca;
}
.image-row-remove {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  align-self: flex-start;
}
.image-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.image-row-actions button {
  font-size: 11px;
  padding: 4px 8px;
  min-height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.image-row-actions button:hover {
  background: rgba(255,255,255,0.08);
}
.image-drop-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 10px;
}
.edit-panel textarea#edit-markdown.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

/* Shared admin/contributor toolbar (assets/js/admin-nav.js) -- sits directly
   below the global header, full-bleed bar with a max-width inner row so its
   content lines up with the rest of the page. */
.admin-toolbar {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line);
}
.admin-toolbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.admin-toolbar-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(121,199,255,0.08);
  border: 1px solid rgba(121,199,255,0.18);
  color: #d4ebff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-nav-toggle {
  display: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}
.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.admin-nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.admin-nav-link.is-active {
  color: #07111f;
  background: linear-gradient(135deg, var(--accent2), #4fd6a8);
}
.admin-nav-link.is-external {
  color: var(--accent);
  border: 1px solid rgba(121,199,255,0.25);
}
.admin-nav-link.is-external:hover {
  color: var(--accent);
  background: rgba(121,199,255,0.08);
}
.admin-nav-logout {
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  padding: 8px 14px 8px 16px;
  border-radius: 0 8px 8px 0;
  border-top: 1px solid rgba(255,110,110,0.25);
  border-right: 1px solid rgba(255,110,110,0.25);
  border-bottom: 1px solid rgba(255,110,110,0.25);
  background: rgba(255,110,110,0.08);
  color: #ffb3b3;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.admin-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.admin-breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
}
.admin-breadcrumb a:hover {
  color: var(--text);
}
.admin-page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-page-title-row h1 {
  margin: 0;
}
.hero.admin-page-hero {
  padding: 32px 0 28px;
}

@media (max-width: 1024px) {
  .admin-nav-toggle {
    display: inline-block;
  }
  .admin-toolbar-right {
    position: relative;
  }
  .admin-nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: max-content;
    min-width: 200px;
    max-width: calc(100vw - 32px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #0c1826;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  }
  .admin-nav-links.is-open {
    display: flex;
  }
  .admin-nav-logout {
    margin-left: 0;
    border-radius: 8px;
    border: 1px solid rgba(255,110,110,0.25);
  }
}

/* Author byline + published/updated dates (post header, homepage cards) */
.post-author-byline {
  color: var(--accent);
  font-weight: 700;
}
.post-author-byline:hover {
  text-decoration: underline;
}
.post-date-updated {
  color: var(--muted);
}

/* Author bio card, shown below every article */
.author-bio-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-bio-body {
  flex: 1;
  min-width: 0;
}
.author-bio-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.author-bio-name:hover {
  text-decoration: underline;
}
.author-bio-title {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}
.author-bio-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.author-bio-links {
  margin-top: 12px;
  font-size: 14px;
}
.author-bio-links a {
  color: var(--accent);
}
.author-bio-links a:hover {
  text-decoration: underline;
}

/* Author page hero */
.author-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
}
.author-hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Authors directory grid */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 20px 0 60px;
}
.author-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.author-card:hover {
  border-color: var(--accent);
}
.author-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-card-body h3 {
  margin: 0;
  font-size: 16px;
}
.author-card-title {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.author-card-count {
  color: var(--accent);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 700;
}

/* Related posts, shown below the author bio card on every article */
#related-posts:empty {
  display: none;
}
.related-posts-heading {
  margin: 40px 0 16px;
  font-size: 20px;
}

/* Search */
.search-form {
  display: flex;
  gap: 10px;
  margin: 20px 0 32px;
}
.search-form input[type="search"] {
  flex: 1;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
.search-form button {
  min-height: 44px;
  padding: 0 24px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #5c93ff);
  color: #07111f;
  font-weight: 700;
  cursor: pointer;
}
.search-result-count {
  color: var(--muted);
  margin-bottom: 16px;
}

/* Long-form static content pages (About, Privacy, Terms, Guidelines, etc.) */
.static-page-body {
  max-width: 780px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.static-page-body h2 {
  color: var(--text);
  margin-top: 36px;
}
.static-page-body ul {
  padding-left: 20px;
}

/* Profile-management form */
.profile-form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 600px) {
  .profile-form-row {
    grid-template-columns: 1fr;
  }
}
