/* Shared design foundations and page chrome for every Bare Logic page. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('inter-latin.woff2') format('woff2');
}

:root {
    color-scheme: light;
    --bg: #f7f3eb;
    --surface: #fffdf8;
    --surface-hover: #f2eee5;
    --border: #dce3df;
    --text: #102a33;
    --text-muted: #56676c;
    --accent: #3b7188;
    --accent-deep: #27566b;
    --accent-dim: rgba(59, 113, 136, .11);
    --accent-glow: rgba(59, 113, 136, .24);
    --warm: #c8754b;
    --warm-deep: #965233;
    --warm-light: #d99672;
    --ink: #0d2c36;
    --font-body: 1rem;
    --font-intro: 1.125rem;
    --font-small: .875rem;
    --font-caption: .8125rem;
    --line-body: 1.7;
    --page-width: 1200px;
    --page-gutter: 2rem;
    --header-height: 64px;
    --radius-card: 18px;
    --radius-button: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: var(--font-body);
    line-height: var(--line-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body > main { flex: 1; }
::selection { background: rgba(200, 117, 75, .24); }
a { color: var(--accent-deep); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; }
button { font: inherit; }
[hidden] { display: none !important; }
.site-container { width: min(var(--page-width), calc(100% - var(--page-gutter) * 2)); margin-inline: auto; }
#main, section[id] { scroll-margin-top: calc(var(--header-height) + 24px); }
#main:focus { outline: none; }

.skip-link {
    position: fixed; top: -5rem; left: 1rem; z-index: 1000;
    padding: .7rem 1rem; color: #fff; background: var(--ink);
    border-radius: var(--radius-button); transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.site-header {
    position: fixed; inset: 0 0 auto; z-index: 100;
    background: rgba(247, 243, 235, .96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; flex-shrink: 0; }
.nav-logo img { display: block; width: auto; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); text-decoration: none; font-size: var(--font-small); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--accent-deep); }
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); }

.site-footer { border-top: 1px solid #29434b; padding-block: 32px; background: #09232c; color: #afc0c5; font-size: var(--font-small); text-align: center; }
.site-footer p { margin: 0; }
.footer-details { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 24px; margin-top: 12px; font-size: var(--font-caption); }
.footer-details a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }
.footer-details a:hover { color: var(--surface); }
.footer-registration { display: inline-flex; align-items: center; min-height: 44px; }

/* Editorial pages use the same outer grid; long-form copy has a reading measure. */
.document-page { padding-top: calc(var(--header-height) + clamp(44px, 7vw, 88px)); padding-bottom: 80px; }
.reading-column { max-width: 720px; }
.eyebrow { margin: 0 0 16px; color: var(--warm-deep); font-size: .8125rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.document-page h1 { max-width: 22ch; margin: 0 0 24px; font-size: clamp(2rem, 5.5vw, 4rem); line-height: 1.08; font-weight: 800; letter-spacing: -.055em; overflow-wrap: anywhere; text-wrap: balance; }
.document-page h2 { margin: 0 0 16px; font-size: 1.375rem; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; text-wrap: balance; }
.document-page p { margin: 0 0 16px; }
.document-page .intro { max-width: 55ch; margin: 0; font-size: var(--font-intro); color: var(--text-muted); line-height: var(--line-body); }
.document-page .updated { margin: 20px 0 0; color: var(--text-muted); font-size: var(--font-caption); }
.document-page a { overflow-wrap: anywhere; }
.document-page strong { font-weight: 650; }
.document-page section > :last-child { margin-bottom: 0; }
.reading-column > section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.reading-column ul { margin: 0 0 16px; padding-left: 1.25em; }
.reading-column li { margin-bottom: 12px; padding-left: .25em; }

.details-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; align-items: start; margin-top: 48px; }
.details-grid dl { margin: 0; }
.detail { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.detail:first-child { padding-top: 0; }
.detail dt { color: var(--text-muted); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.detail address { font-style: normal; }
.terms, .privacy-contact { padding: 32px; border-radius: var(--radius-card); background: var(--ink); color: var(--surface); }
.terms p, .privacy-contact p { color: #bfd0d4; }
.terms .version { margin-bottom: 24px; color: #e9a47e; font-size: var(--font-caption); }
.download { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; margin-top: 24px; padding: 12px 16px; border-radius: var(--radius-button); color: var(--ink); background: var(--bg); font-size: .9375rem; font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none; }
.download:hover { background: var(--surface); }
.download svg { flex: 0 0 auto; }
.terms .view-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: #bfd0d4; font-size: var(--font-small); }
.privacy-contact { margin-top: 40px; }
.privacy-contact h2 { margin-bottom: 8px; }
.privacy-contact p { margin-bottom: 0; }
.privacy-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--surface); }

@media (max-width: 768px) {
    html:not(.js) .site-header { position: static; }
    html:not(.js) .nav-inner { flex-wrap: wrap; }
    html:not(.js) .document-page { padding-top: 44px; }
    .nav-links { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; padding: 16px var(--page-gutter) 24px; flex-direction: column; align-items: stretch; gap: 8px; border-bottom: 1px solid var(--border); background: var(--bg); }
    html:not(.js) .nav-links { display: flex; position: static; flex-direction: row; flex-wrap: wrap; padding: 0 0 16px; border: 0; }
    .nav-links.open { display: flex; }
    .nav-links a { width: 100%; }
    .hamburger { display: flex; }
    .details-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 40px; }
}
@media (max-width: 480px) {
    :root { --page-gutter: 1.25rem; }
    .nav-inner { gap: 16px; }
    .document-page { padding-bottom: 64px; }
    .reading-column > section { margin-top: 32px; padding-top: 28px; }
    .detail { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .terms, .privacy-contact { padding: 24px; }
    .footer-details { column-gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
    .site-header, .site-footer, .skip-link, .download svg { display: none; }
    body { display: block; background: white; font-size: 10pt; }
    .document-page { padding-block: 24px; }
    .site-container, .reading-column { width: 100%; max-width: none; }
    .document-page h1 { font-size: 28pt; }
    .document-page h2 { break-after: avoid; }
    .details-grid { display: block; }
    .terms, .privacy-contact { margin-top: 24px; break-inside: avoid; background: white; color: black; border: 1px solid #ccc; }
    .document-page a, .terms p, .terms .version, .privacy-contact p { color: black; }
}
