/* Static /guides pages. Layout stands on its own. The built app CSS, when linked,
   supplies the same colours, fonts and marketing gradient. */

.g-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1c1917;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.g-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid color-mix(in srgb, var(--border, #e7e5e4) 60%, transparent);
  background: color-mix(in srgb, var(--background, #fff) 95%, transparent);
  backdrop-filter: blur(8px);
}

.g-header-inner,
.g-wrap,
.g-footer-inner {
  width: min(64rem, calc(100% - 2rem));
  margin-inline: auto;
}

.g-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-block: 0.9rem;
}

.g-logo {
  display: inline-flex;
  align-items: center;
}

.g-logo img {
  height: 2.5rem;
  width: auto;
  max-width: min(260px, 62vw);
  object-fit: contain;
  object-position: left;
}

@media (min-width: 640px) {
  .g-logo img {
    height: 2.75rem;
    max-width: min(300px, 50vw);
  }
}

@media (min-width: 768px) {
  .g-logo img {
    height: 3rem;
  }
}

.g-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.35rem;
}

.g-nav a {
  color: var(--primary, #059669);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.4rem;
  border-radius: 0.375rem;
}

.g-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.g-nav a[aria-current="page"] {
  pointer-events: none;
  opacity: 0.8;
  text-decoration: none;
}

.g-signin {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  margin-left: 0.25rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid color-mix(in srgb, var(--primary, #059669) 45%, transparent);
  background: var(--background, #fff);
  color: var(--primary, #059669);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.g-signin:hover {
  background: color-mix(in srgb, var(--primary, #059669) 10%, transparent);
  text-decoration: none;
}

.g-main {
  flex: 1;
}

.g-wrap {
  width: min(48rem, calc(100% - 2rem));
  padding-block: 2.5rem 3.5rem;
}

.g-kicker {
  margin: 0 0 0.75rem;
  color: var(--primary, #059669);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.g-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .g-title {
    font-size: 2.25rem;
  }
}

.g-byline {
  margin: 0.85rem 0 0;
  color: var(--muted-foreground, #57534e);
  font-size: 0.95rem;
}

.g-crumbs {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.25rem;
  color: var(--muted-foreground, #57534e);
  font-size: 0.875rem;
}

.g-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.g-crumbs li + li::before {
  content: "›";
  color: var(--muted-foreground, #57534e);
}

.g-crumbs a {
  color: var(--primary, #059669);
  text-decoration: none;
}

.g-crumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-prose {
  margin-top: 1.75rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.guide-prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.guide-prose h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.35;
}

.guide-prose p,
.guide-prose ul,
.guide-prose ol {
  margin: 0.85rem 0;
  padding-left: 1.35rem;
}

.guide-prose ul {
  list-style: disc outside;
}

.guide-prose ol {
  list-style: decimal outside;
}

.guide-prose li + li {
  margin-top: 0.35rem;
}

.guide-prose a {
  color: var(--primary, #059669);
  font-weight: 550;
  text-underline-offset: 3px;
}

.guide-prose a:hover {
  text-decoration-thickness: 2px;
}

.guide-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--primary, #059669) 8%, var(--muted, #f5f5f4));
}

.guide-prose td code,
.guide-prose th code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.guide-prose strong {
  font-weight: 650;
}

.g-table-wrap {
  margin: 1rem 0 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border, #e7e5e4);
  border-radius: 0.75rem;
  background: var(--card, #fff);
}

.guide-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.guide-prose th,
.guide-prose td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border, #e7e5e4);
}

.guide-prose tr:last-child td {
  border-bottom: 0;
}

.guide-prose th {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--primary, #059669) 6%, var(--card, #fff));
}

.guide-prose figure {
  margin: 1.25rem 0 1.5rem;
}

.guide-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border, #e7e5e4);
  border-radius: 0.75rem;
  background: #fff;
}

.guide-prose figcaption {
  margin-top: 0.45rem;
  color: var(--muted-foreground, #57534e);
  font-size: 0.9rem;
}

.g-index {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.g-card {
  display: block;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border, #e7e5e4);
  border-radius: 1rem;
  background: var(--card, #fff);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.g-card:hover {
  border-color: color-mix(in srgb, var(--primary, #059669) 45%, var(--border, #e7e5e4));
}

.g-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--foreground, #1c1917);
}

.g-card p {
  margin: 0;
  color: var(--muted-foreground, #57534e);
}

.g-card .g-meta {
  margin-top: 0.65rem;
  font-size: 0.85rem;
}

.g-footer {
  border-top: 1px solid var(--border, #e7e5e4);
  padding: 2.5rem 0;
}

.g-footer-inner {
  width: min(64rem, calc(100% - 2rem));
  text-align: center;
  color: var(--muted-foreground, #57534e);
  font-size: 0.875rem;
}

.g-footer p {
  margin: 0.75rem 0;
}

.g-footer a {
  color: inherit;
  text-underline-offset: 4px;
}

.g-footer a:hover {
  color: var(--foreground, #1c1917);
}

.g-footer-sep {
  margin: 0 0.45rem;
  color: var(--border, #d6d3d1);
}

.g-legal {
  font-size: 0.75rem;
  opacity: 0.85;
}

@media (max-width: 639px) {
  .g-nav-long {
    display: none;
  }
}

@media (min-width: 640px) {
  .g-nav-short {
    display: none;
  }
}
