/* FemtoLCC documentation.
   Palette, title bar, buttons and card surface come from the shared brand layer
   at https://www.uncommonmodels.com/css/brand.css (linked in baseof.html before
   this file). Only what is specific to these docs lives here. */

/* FemtoLCC documentation.
   Palette, type and card treatment follow uncommonmodels.com so the two read as
   one property. The brand site is dark only, so this is too - no light variant. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }

/* ---- brand wordmark (docs-specific) ---- */

/* The product name is FemtoLCC - mixed case, as on the silkscreen and in every
   other mention. Only the accent on "LCC" is a brand treatment; the casing is not. */
.brand-wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-optical-sizing: auto;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  line-height: 1;
  padding-left: 12px;
  border-left: 1px solid var(--line-hi);
}
.brand-mark.alt { color: var(--accent); }

/* ---- shell ---- */

.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.sidebar { position: sticky; top: 7rem; align-self: start; }
.nav-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0.15rem 0; }
.sidebar a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: var(--nav-text);
  font-size: 0.92rem;
  font-weight: 500;
}
.sidebar a:hover { background: var(--wash); color: var(--accent-hi); text-decoration: none; }
.sidebar a.active {
  background: var(--accent-wash);
  color: var(--accent-hi);
  font-weight: 600;
}

.sitefoot {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---- prose ---- */

.prose { min-width: 0; }

/* Hold running text to a readable measure. Tables, code blocks and figures are
   deliberately left full width - they need the room, prose does not. */
.prose p,
.prose li,
.prose blockquote { max-width: 70ch; }
.prose h1 {
  font-family: var(--display);
  font-weight: 800;
  font-optical-sizing: auto;
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 0.9rem;
}
.prose h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 2.5rem 0 1.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.prose h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.9rem 0 0.9rem;
}
.lede { font-size: 1.08rem; color: var(--text-muted); margin-top: 0; max-width: 62ch; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  color: var(--accent-hi);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
pre code { background: none; color: var(--text); padding: 0; font-size: 0.85rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
th {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
tbody tr:hover { background: var(--wash); }

blockquote {
  margin: 1.3rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p { margin: 0; }

/* ---- home ---- */

/* The hero pairs the copy and spec cards with the product shot. They sit side by
   side once the content column has the room, and stack below that. */
.hero { margin-bottom: 1.75rem; }
.hero-copy { min-width: 0; }
.specrow { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }
.specrow div {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.7rem 1rem;
  min-width: 130px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.22s ease;
}
.specrow div:hover {
  transform: translateY(-4px);
  border-color: var(--line-hi);
  box-shadow: var(--shadow-hi);
}
.specrow .k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.specrow .v {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
}
.specrow .sub { display: block; font-size: 0.74rem; color: var(--text-muted); }

/* The render is transparent, so the device floats on the page rather than
   sitting on a card. It is centred in a square canvas that is mostly empty, so
   a portrait window plus object-fit: cover crops the dead space away - and
   because the device is centred, symmetrically, with no object-position.

   The ratio is the device's own bounds within that canvas, 870x1782 of 2048,
   which keeps the window tight to the case so the column carries no dead
   width. Sizing runs off the height, the device being tall and narrow. */
/* Centred while stacked; in the two-column layout the column hugs the image, so
   this is a no-op there. */
.hero-device { margin: 1.5rem 0 0; display: flex; justify-content: center; }
.hero-device img {
  display: block;
  height: clamp(300px, 52vw, 400px);
  width: auto; /* beats the width attribute, so the ratio below sets the width */
  aspect-ratio: 870 / 1782;
  object-fit: cover;
}

/* Two columns only once the content area can give the copy a readable measure
   next to the shot; the spec cards square up to 2x2 to match its height. The
   shot's column tracks the image, which is sized by its height. */
@media (min-width: 1000px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
  }
  .hero .specrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-device { margin: 0; }
  .hero-device img { height: clamp(320px, 26vw, 420px); }
}

.cardlist { list-style: none; padding: 0; }
.cardlist li {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 0.7rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.22s ease;
}
.cardlist li:hover {
  transform: translateY(-4px);
  border-color: var(--line-hi);
  box-shadow: var(--shadow-hi);
}
.cardlist a { font-family: var(--display); font-weight: 600; }
.cardlist span { display: block; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; gap: 1.25rem; padding-top: 1.25rem; }
  .sidebar { position: static; }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 0.3rem; }
}

/* ---- device screenshots (docs-specific) ---- */

/* Screenshots are 240x240 device frames, laid out in markdown tables. Let them
   fill the cell so a four-up row stays even, and cap them so a single shot in a
   one-column table doesn't blow up to full width. */
.shot {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--panel);
}
td:has(> .shot) { padding: 0.4rem; vertical-align: top; }

/* ---- parts list ---- */

.parts td:first-child { color: var(--text-muted); width: 3rem; }
.parts code { white-space: nowrap; }
