/* The guide pages (resources/views/guides): the legal pages' reading column,
   with the landing's buttons, language switch, a data table and a closing
   call to action. Same tokens as the landing page. */
@import url("landing-tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.65; }
a { color: var(--color-accent); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
a:hover { color: var(--color-accent-deep); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.guide-bar, .guide, .guide-foot { max-width: 46rem; margin-inline: auto; padding-inline: var(--page-gutter); }
.guide-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 4rem; flex-wrap: wrap; }
.guide-bar__actions { display: flex; align-items: center; gap: var(--space-sm); }
.brand { display: inline-flex; align-items: center; gap: var(--space-xs); text-decoration: none; }
.brand img { width: 2.2rem; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: var(--text-md); color: var(--color-ink); }
.wordmark__pal { color: var(--color-accent); }

.langs { list-style: none; margin: 0; padding: 2px; display: flex; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); }
.langs a { display: block; min-width: 2.25rem; padding: 0.3rem 0.5rem; border-radius: var(--radius-pill); text-align: center; color: var(--color-ink-2); font-weight: 700; font-size: var(--text-xs); text-decoration: none; }
.langs a:hover { color: var(--color-accent-deep); }
.langs a[aria-current] { background: var(--color-ink); color: var(--color-paper); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  white-space: nowrap; text-decoration: none; font-family: var(--font-body); font-weight: 700; font-size: var(--text-base);
  padding: 0.8rem 1.4rem; border-radius: var(--radius-pill); border: 2px solid var(--color-accent);
  background: var(--color-accent); color: var(--color-surface);
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--color-accent-deep); border-color: var(--color-accent-deep); color: var(--color-surface); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 0.5rem 1rem; font-size: var(--text-sm); }
.btn--ghost { background: transparent; color: var(--color-accent); }
.btn--ghost:hover { background: var(--color-accent-soft); color: var(--color-accent-deep); }

.guide { padding-block: var(--space-xl) var(--space-2xl); }
.guide h1, .guide h2, .guide h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; text-wrap: balance; }
.guide h1 { font-size: var(--text-2xl); margin: 0; }
.guide h2 { font-size: var(--text-lg); margin: var(--space-xl) 0 var(--space-xs); }
.guide h3 { font-size: var(--text-md); margin: var(--space-lg) 0 var(--space-2xs); }
.guide p, .guide ul, .guide ol { margin: 0 0 var(--space-sm); }
.guide ul, .guide ol { padding-left: 1.25rem; }
.guide li { margin-bottom: var(--space-2xs); }
.guide__kicker { color: var(--color-accent); font-weight: 700; font-size: var(--text-sm); margin: 0 0 var(--space-2xs) !important; }
.guide__updated { color: var(--color-ink-2); font-size: var(--text-sm); margin-top: var(--space-xs); }
.guide__lead { font-size: var(--text-md); color: var(--color-ink-2); }

.answer { background: var(--color-paper-2); border: 1px solid var(--color-paper-3); border-radius: 16px; padding: var(--space-md) var(--space-lg); margin: var(--space-lg) 0; }
.answer p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 var(--space-xs); }
.guide table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.guide th, .guide td { text-align: left; padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--color-rule); white-space: nowrap; }
.guide thead th { font-weight: 700; color: var(--color-ink-2); }
.guide td.num, .guide th.num { text-align: right; }
.guide td:last-child { white-space: normal; min-width: 9rem; }
.guide tbody th { font-weight: 700; }
.source { font-size: var(--text-sm); color: var(--color-ink-2); }

.download { display: flex; gap: var(--space-md); align-items: center; border: 2px dashed var(--color-paper-3); border-radius: 16px; padding: var(--space-md) var(--space-lg); margin: var(--space-xl) 0; }
.download img { width: 4.5rem; image-rendering: pixelated; flex: none; }
.download h2 { margin-top: 0 !important; font-size: var(--text-md) !important; }
.download p { margin-bottom: var(--space-sm); }

/* The printable's two pages, side by side, as they come out of the printer. */
.preview { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin: var(--space-md) 0 var(--space-lg); }
.preview figure { margin: 0; }
.preview img { display: block; width: 100%; border: 1px solid var(--color-rule); border-radius: 8px; box-shadow: var(--shadow-card); background: #fff; }
.preview figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); text-align: center; }
.answer .btn { margin-top: var(--space-xs); }

.related { margin-top: var(--space-xl); }
.related h2 { font-size: var(--text-md) !important; }
.related ul { list-style: none; padding: 0 !important; }
.related li { margin-bottom: var(--space-xs); }

.guide-cta { display: flex; gap: var(--space-lg); align-items: center; background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: 20px; padding: var(--space-lg); margin-top: var(--space-2xl); box-shadow: var(--shadow-card); }
.guide-cta img { width: 6rem; image-rendering: pixelated; flex: none; }
.guide-cta h2 { margin-top: 0 !important; }
.guide-cta__note { font-size: var(--text-sm); color: var(--color-ink-2); margin: var(--space-xs) 0 0 !important; }

@media (max-width: 34rem) {
  .download, .guide-cta { flex-direction: column; align-items: flex-start; }
  .preview { grid-template-columns: 1fr; }
  .guide-bar__actions .btn { display: none; }
}

.guide-foot { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); padding-block: var(--space-lg); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); }
.guide-foot a { color: var(--color-ink-2); }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
