/* Page shell for losthub.app: fonts, header, footer, long-form text and form.
   Colours, type sizes and spacing come from tokens.css (design handoff,
   variant A). Brand-neutral: no product names or copy in here. */

@font-face {
  font-family: 'Manrope';
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1EFF;
}
@font-face {
  font-family: 'Manrope';
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF;
}
@font-face {
  font-family: 'Manrope';
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-display: swap;
  src: url(fonts/plexmono-500-latin.woff2) format('woff2');
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--c-ink); }
a:hover { color: var(--c-lost); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.mono {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: var(--s-2); background: var(--c-paper); padding: var(--s-2); z-index: 1; }

/* Header */
.hdr { display: flex; align-items: center; height: 76px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--c-ink);
}
.logo img { height: 28px; width: auto; display: block; }

/* Machine-translation notice */
.mt-banner {
  max-width: var(--measure);
  margin: var(--s-5) 0 0;
  padding: var(--s-3) var(--s-4);
  border: var(--rule-strong);
  background: var(--c-slab-yellow);
  font-weight: 600;
}
.mt-banner a { color: var(--c-lost-deep); font-weight: 700; }

/* Long-form legal text: one plain column */
.prose { max-width: var(--measure); padding: var(--s-7) 0 var(--s-9); }
.prose h1 {
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0 0 var(--s-4);
  overflow-wrap: break-word;
  hyphens: auto;
}
.prose h2 {
  font-weight: 700;
  font-size: var(--t-title);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: var(--s-7) 0 var(--s-3);
}
.prose h3 { font-size: 19px; margin: var(--s-5) 0 var(--s-2); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s-4); }
.prose li + li { margin-top: var(--s-2); }
.prose a { overflow-wrap: anywhere; }
.prose .updated { color: var(--c-ink-muted); font-size: var(--t-small); }
.prose code { font-family: var(--f-mono); font-size: .88em; }

/* Content report form */
.report-form { margin-top: var(--s-7); padding-top: var(--s-6); border-top: var(--rule); }
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label { font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--c-ink);
  font: inherit;
}
.field textarea { resize: vertical; }
.field.check { flex-direction: row; align-items: flex-start; gap: var(--s-3); }
.field.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--c-lost); }
.field.check label { font-weight: 500; }
.field-note { margin: 0 0 var(--s-5); color: var(--c-ink-muted); font-size: var(--t-small); }
.cf-turnstile { margin-bottom: var(--s-5); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--c-lost);
  color: var(--c-paper);
  border: 2px solid var(--c-lost);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  font-size: var(--t-small);
  cursor: pointer;
  text-decoration: none;
}
/* color: a link button would take the raspberry of a:hover. */
.btn:hover { background: var(--c-lost-hover); border-color: var(--c-lost-hover); color: var(--c-paper); }
.btn:active { background: var(--c-lost-deep); border-color: var(--c-lost-deep); }
.report-status:empty { display: none; }
.report-status { margin-top: var(--s-4); font-weight: 700; }

/* Footer */
.ft { padding-top: 64px; padding-bottom: 40px; font-size: var(--t-small); }
.ft-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.ft-grid-help { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.ft ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ft ul a { text-decoration: none; }
.ft ul a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.ft .langs { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 40px; }
.ft-bottom { border-top: var(--rule); margin-top: 56px; padding-top: 24px; }
/* The data attribution: last in the footer, small and muted (7.6:1 on paper). */
.ft-bottom .mono { font-size: 12px; color: var(--c-ink-muted); }
.ft-bottom a:not(:hover) { color: inherit; }

@media (max-width: 760px) {
  .hdr { height: 64px; }
  .ft-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* Site header: menu, language list, download button, burger. The menu is
   visible without JavaScript; site.js adds `js` to <html> and toggles `open`
   on #menu. Below 1000px only `.js` collapses it behind the burger. */
.hdr-site { gap: 36px; }
.hdr-menu { display: flex; align-items: center; gap: 36px; flex: 1; min-width: 0; }
.nav { display: flex; gap: 28px; font-weight: 600; font-size: var(--t-small); flex: 1; }
.nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); white-space: nowrap; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
.lang { position: relative; }
.lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  font-weight: 600;
  font-size: var(--t-small);
  cursor: pointer;
  list-style: none;
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2;
  min-width: 160px;
  margin: 0;
  padding: var(--s-2) 0;
  list-style: none;
  background: var(--c-paper);
  border: var(--rule);
}
.lang li a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  font-weight: 600;
  font-size: var(--t-small);
  text-decoration: none;
}
.lang li a[aria-current] { text-decoration: underline; text-underline-offset: .3em; }
.hdr-btn { text-decoration: none; }
.burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: var(--rule);
  color: var(--c-ink);
  cursor: pointer;
}

@media (max-width: 999px) {
  .hdr-site { flex-wrap: wrap; gap: 12px; height: auto; min-height: 76px; }
  .hdr-site .logo { margin-right: auto; }
  .hdr-btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .hdr-menu {
    order: 3;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: var(--s-5);
  }
  .nav { flex-direction: column; gap: 0; }
  .nav a {
    min-height: 56px;
    border-bottom: 1px solid var(--c-ink-muted);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
  }
  .lang ul { position: static; border: 0; padding: 0; }
  /* With JavaScript the menu becomes a full-height panel that slides in from
     the right over the page; the burger stays above it as the close button. */
  .js .burger { display: flex; position: relative; z-index: 31; background: var(--c-paper); }
  .js .hdr-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    width: min(380px, 88vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    justify-content: flex-start;
    padding: 88px var(--gutter) var(--s-6);
    background: var(--c-paper);
    border-left: var(--rule);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  .js .hdr-menu.open { transform: none; visibility: visible; transition: transform .22s ease; }
  .js .hdr-menu .nav { flex: 0 0 auto; }
  .js .hdr-menu .lang { margin-top: var(--s-4); }
  .menu-open, .menu-open body { overflow: hidden; }
}
.burger .ico-close, .burger[aria-expanded="true"] .ico-open { display: none; }
.burger[aria-expanded="true"] .ico-close { display: block; }
@media (prefers-reduced-motion: reduce) {
  .js .hdr-menu, .js .hdr-menu.open { transition: none; }
}
/* Narrow phones: tighter header so an 11-character button label still fits
   beside the logo and the burger at 360px. */
@media (max-width: 400px) {
  .hdr-site { gap: 8px; }
  .hdr-btn { padding: 0 10px; }
}

@media (max-width: 760px) {
  .hdr-site { min-height: 64px; }
}
