/* Untethered LLM — printed-manual theme.
 * Paper, ink, hairlines. No gradients, no glow, no cards-that-look-alike.
 * Type is system only so the page renders identically offline. */

:root {
  --paper: #f6f3ec;
  --paper-raise: #fdfbf6;
  --ink: #1b1a16;
  --muted: #5d5a50;
  --faint: #8a867a;
  --line: #d9d3c1;
  --line-soft: #e7e2d2;
  --accent: #8c2f1b;
  --accent-ink: #ffffff;
  --mark: #efe7d3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 46rem;
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161511;
    --paper-raise: #1e1d18;
    --ink: #ece8db;
    --muted: #b3ae9e;
    --faint: #7d7869;
    --line: #3a372c;
    --line-soft: #2a2921;
    --accent: #e07856;
    --accent-ink: #161511;
    --mark: #2a2517;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: min(100% - 40px, var(--wide));
  margin: 0 auto;
}

.sheet {
  max-width: var(--measure);
  margin-inline: auto;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.brand-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 4px 14px;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.locale-picker {
  position: relative;
  font-size: 0.9rem;
}

.locale-picker summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--paper-raise);
}

.locale-picker summary::-webkit-details-marker {
  display: none;
}

.locale-picker summary:hover {
  color: var(--ink);
  border-color: var(--faint);
}

.locale-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 25;
  min-width: 230px;
  max-height: 340px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-raise);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.locale-menu a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.locale-menu a:hover,
.locale-menu a[aria-current="true"] {
  color: var(--ink);
  background: var(--mark);
  text-decoration: none;
}

/* ---------- pages ---------- */

.page {
  padding: 40px 0 80px;
}

.kicker {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.masthead {
  display: grid;
  gap: 30px;
}

@media (min-width: 960px) {
  .masthead {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }
}

.hero-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 6px 0 0;
  /* Cap the visual so the icon + placeholders stay proportionate to
     the copy; minmax(0, …) floors stop the 1024px image's intrinsic
     min-content from blowing the tracks out (grid blowout). */
  width: 100%;
  max-width: 460px;
  align-self: start;
}

@media (max-width: 959px) {
  .hero-visual {
    margin-inline: auto;
  }
}

.hero-visual > * {
  min-width: 0;
  min-height: 0;
}

.hero-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 22%;
}

.hero-shot {
  aspect-ratio: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-raise);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.hero-shot span {
  padding: 0 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--faint);
}

.masthead h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
}

.lede {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink);
}

.standfirst {
  margin: 16px 0 0;
  max-width: 40rem;
  color: var(--muted);
}

.publine {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--faint);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid var(--accent);
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

.textlink {
  font-size: 0.98rem;
  white-space: nowrap;
}

.at-a-glance {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.92rem;
  color: var(--muted);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 44px 0;
}

.section-label {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.section-intro {
  margin: 0 0 8px;
  color: var(--muted);
  max-width: 42rem;
}

/* fact list: short bold label, plain explanation */
.facts {
  display: grid;
  gap: 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 8px 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.facts dt {
  font-weight: 700;
  font-size: 0.95rem;
}

.facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* editorial entries: headline + paragraph, separated by rules */
.entries {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.entry h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.entry p {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
}

/* honest-limits list */
.limits {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.limits li {
  padding: 12px 0 12px 1.6rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  position: relative;
}

.limits li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

/* maker note: signed, set apart */
.maker {
  margin: 44px 0 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--paper-raise);
  border-radius: 0 8px 8px 0;
}

.maker h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.maker p {
  margin: 0 0 10px;
  color: var(--muted);
}

.maker p:last-of-type {
  margin-bottom: 14px;
}

.maker-sign {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}

/* two-column link index */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.linklist {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.linklist li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.96rem;
}

.linklist li:first-child {
  border-top: 1px solid var(--line-soft);
}

/* ---------- models table ---------- */

.wide-sheet {
  max-width: var(--wide);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-raise);
}

table.models {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 560px;
}

table.models caption {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}

table.models th,
table.models td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

table.models thead th {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}

table.models tbody tr:last-child th,
table.models tbody tr:last-child td {
  border-bottom: 0;
}

table.models tbody th {
  font-family: var(--sans);
  font-weight: 700;
  white-space: nowrap;
}

table.models td.specs {
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--muted);
}

table.models td.notes {
  color: var(--muted);
}

.repo-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  word-break: break-all;
}

/* ---------- article pages ---------- */

.article h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.4vw, 3rem);
}

.article h2 {
  margin: 34px 0 10px;
  font-size: 1.4rem;
}

.article p,
.article ul,
.article ol {
  color: var(--ink);
}

.article ul,
.article ol {
  padding-left: 1.3rem;
}

.article li {
  margin-bottom: 8px;
}

.article li::marker {
  color: var(--faint);
}

.byline {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.faqs {
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}

.faq {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.faq dt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.faq dd {
  margin: 0;
  color: var(--muted);
}

.contact-block {
  margin-top: 30px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: var(--paper-raise);
  border-radius: 8px;
}

.contact-block h2 {
  margin-top: 0;
}

.contact-block p {
  margin: 0 0 8px;
  color: var(--muted);
}

.contact-block p:last-child {
  margin-bottom: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 8px 32px;
  flex-wrap: wrap;
  padding: 26px 0 30px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 6px 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.colophon {
  flex-basis: 100%;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--faint);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding: 28px 0 60px;
  }

  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .cols {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .locale-menu {
    left: 0;
    right: auto;
    width: min(100vw - 48px, 280px);
  }
}

/* RTL locales (ar, he, fa) */
[dir="rtl"] .locale-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .article ul,
[dir="rtl"] .article ol {
  padding-left: 0;
  padding-right: 1.3rem;
}

[dir="rtl"] .limits li {
  padding-left: 0;
  padding-right: 1.6rem;
}

[dir="rtl"] .limits li::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .maker {
  border-left: 1px solid var(--line);
  border-right: 3px solid var(--accent);
  border-radius: 8px 0 0 8px;
}

[dir="rtl"] table.models th,
[dir="rtl"] table.models td,
[dir="rtl"] table.models caption {
  text-align: right;
}
