/* Shared static site shell. The synchronisation script embeds canonical HTML.
   Preserves existing tokens, themes and plain static deployment. */

/* --- Global shell concept --- */
.shell-header .shell-header-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(var(--space-3), 2vw, var(--space-6));
  padding-block: var(--space-3);
}

.shell-brand { min-width: 0; }
.shell-brand .brand-name {
  display: block;
  font-size: clamp(.93rem, 1.1vw, 1.05rem);
  letter-spacing: -.02em;
}
.shell-brand .brand-sub { margin-top: .22rem; }
.shell-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--space-3), 1.8vw, var(--space-6));
  min-width: 0;
  margin-left: 0;
}
.shell-nav a { font-size: var(--text-sm); }
.shell-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--space-2);
}
.shell-review-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.shell-review-link:hover {
  color: var(--color-text-inverse);
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-sm);
}
.shell-review-link:focus-visible { outline-offset: 3px; }
.shell-actions .icon-btn {
  flex: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

/* --- Footer: clear next action, purposeful links, quiet provenance --- */
.shell-footer {
  margin-top: var(--space-12);
  padding-top: 0;
  padding-bottom: var(--space-6);
}
.shell-footer-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: clamp(var(--space-8), 5vw, var(--space-12));
  border-bottom: 1px solid var(--color-divider);
}
.shell-footer-kicker {
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.shell-footer-invite h2 {
  margin-top: var(--space-2);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 500;
}
.shell-footer-invite p:not(.shell-footer-kicker) {
  max-width: 62ch;
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.shell-footer-invite .btn { flex-shrink: 0; }
.shell-footer-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: var(--space-8);
  padding-block: var(--space-10);
}
.shell-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.shell-footer-brand img { flex: none; }
[data-theme="dark"] .shell-footer-brand img {
  content: url("/assets/img/brand-mark-dark.svg");
}
.shell-footer-about > p {
  max-width: 33ch;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.shell-byline {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}
.shell-footer-nav .footer-links,
.shell-footer-related .footer-links { display: grid; gap: var(--space-3); }
.shell-footer-nav .footer-links a,
.shell-footer-related .footer-links a { line-height: 1.4; }
.shell-footer-context {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-text-muted);
}
.shell-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-divider);
}
.shell-footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --- Shared responsive shell --- */
@media (max-width: 1060px) {
  .shell-header .shell-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .shell-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    padding-block: var(--space-2);
  }
  .shell-actions { justify-self: end; }
  .shell-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .shell-header .shell-header-inner { gap: var(--space-2) var(--space-3); }
  .shell-brand .brand-name { font-size: .9rem; }
  .shell-brand .brand-sub { display: none; }
  .shell-review-link { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
  .shell-actions .icon-btn { width: 36px; height: 36px; }
  .shell-nav {
    overflow-x: auto;
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: var(--space-5);
    padding-bottom: var(--space-3);
    scrollbar-width: thin;
  }
  .shell-nav a { font-size: var(--text-xs); }
  .shell-footer-invite { align-items: flex-start; flex-direction: column; }
  .shell-footer-invite .btn { width: 100%; }
  .shell-footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}
@media print {
  .shell-header, .shell-footer { display: none !important; }
}
