/* One header system for the whole site. Page content may have its own width;
   the navigation remains visually identical everywhere. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line, #e7dac6);
  background: var(--header, rgba(247, 240, 229, .9));
  backdrop-filter: blur(14px);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  width: 100%;
  padding: 0 32px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text, var(--ink, #1b1611));
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.site-brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.site-nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  min-width: 0;
  z-index: auto;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  font-size: .92rem;
  font-weight: 600;
}

.site-nav a {
  color: var(--text, var(--ink, #1b1611));
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--accent, var(--orange, #c2410c)); }

.site-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: max-content;
}

.site-header .account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line, #e7dac6);
  border-radius: 12px;
  background: transparent;
  color: var(--text, var(--ink, #1b1611));
  font: 700 .92rem/1.2 "Inter", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .account-button:hover { border-color: var(--accent, var(--orange, #c2410c)); color: var(--accent, var(--orange, #c2410c)); }

.site-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--accent, var(--orange, #c2410c));
  box-shadow: 0 10px 20px rgba(194, 65, 12, .18);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-header-cta:hover { background: var(--accent-dark, var(--orange-dark, #9a3412)); transform: translateY(-1px); }

.site-header a:focus-visible,
.site-header button:focus-visible { outline: 3px solid var(--accent-soft, var(--orange-soft, #f8e6d8)); outline-offset: 3px; }

/* The simulator enters a distraction-free mode while a test is running. */
.test-active .site-header { display: none; }

@media (max-width: 1100px) {
  .site-nav a { display: none; }
}

@media (max-width: 600px) {
  .site-header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-width: 0; min-height: 68px; padding: 0 16px; }
  .site-nav { display: none; }
  .site-brand { min-width: 0; font-size: .96rem; }
  .site-brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .site-header-actions { gap: 4px; }
  .site-header .account-button { padding-inline: 10px; }
  .site-header-cta { min-height: 48px; padding-inline: 12px; }
}

@media (max-width: 380px) {
  .site-brand span { max-width: 118px; }
  .site-header .account-button { padding-inline: 8px; }
  .site-header-cta { padding-inline: 10px; font-size: .88rem; }
}

/* Shared corner language: every page uses the same soft 8px radius. */
:root { --site-corner-radius: 12px; }
body :where(*) { border-radius: var(--site-corner-radius) !important; }
