/* ==========================================================================
   Library (library.html). Page styles only.
   Shared: tokens, base, nav, tino. Dark panels on this page: 0.
   Pink appears only where Tino is: the live dot in "Tino knows what's in it",
   and the wordmark home baked into the window shots. Never on files or people.
   ========================================================================== */

body { background: var(--surface); }

.lb-nb { white-space: nowrap; }

/* ===================================================================== Hero */
.lb-hero { padding-top: clamp(48px, 6vw, 88px); text-align: center; }
.lb-eyebrow {
  font-size: var(--t-17); line-height: 1.2; font-weight: var(--w-medium);
  letter-spacing: -0.01em; color: var(--ink-2);
}
.lb-h1 { margin: var(--s-4) auto 0; max-width: 11em; }
.lb-sub {
  margin: 22px auto 0; max-width: 30em;
  font-size: var(--t-24); line-height: 1.36; letter-spacing: var(--tr-24);
  color: var(--ink-3); text-wrap: balance;
}
.lb-actions {
  margin-top: var(--s-8);
  display: flex; align-items: center; justify-content: center; gap: var(--s-6);
}
.lb-actions .btn-link { font-size: var(--t-17); }
.lb-note { margin-top: var(--s-4); font-size: var(--t-14); color: var(--ink-3); }

.lb-stage { margin-top: clamp(48px, 5.6vw, 80px); }
/* Window shots sit on the page column (1200), edges in line with the nav, as on the home page */
.lb-stage.wrap-wide { max-width: calc(var(--max) + var(--gutter) * 2); }

/* A window, framed like product imagery: hairline edge, long soft shadow. */
.lb-shot {
  max-width: 1280px; margin: 0 auto;
  border-radius: 14px; overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 0 0 0.5px rgba(17, 17, 20, 0.18),
    0 2px 6px rgba(17, 17, 20, 0.04),
    0 40px 90px -30px rgba(17, 17, 20, 0.26),
    0 12px 28px -16px rgba(17, 17, 20, 0.12);
}
.lb-shot img { display: block; width: 100%; height: auto; }

/* ============================================================ Shared split */
.lb-split {
  display: grid; gap: clamp(40px, 6vw, 96px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 1000px) {
  .lb-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.lb-copy > * + * { margin-top: var(--s-5); }
.lb-copy .intro { max-width: 30em; }

/* =================================================================== Folder */
.lb-facts { margin-top: var(--s-10) !important; border-top: 1px solid var(--line); }
.lb-facts > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.lb-facts dt { font-size: var(--t-17); line-height: 1.4; font-weight: var(--w-semibold); letter-spacing: -0.01em; color: var(--ink); }
.lb-facts dd { margin: 4px 0 0; font-size: var(--t-17); line-height: var(--lh-17); color: var(--ink-2); max-width: 32em; }
/* A link row under a fact: its own line, flush with the text, same 17 px as the other text links */
.lb-facts .lb-dd-link { margin-top: 8px; }
.lb-dd-link .btn-link { padding-inline: 0; }

/* The Finder tree: file names in Geist 14/400 on #F4F4F6, ink and greys only
   (mono is for timecodes and sizes; the home page project tree matches). */
.lb-tree {
  margin: 0;
  background: #F4F4F6;
  border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 40px) clamp(20px, 3vw, 44px) clamp(28px, 3.2vw, 44px);
  font-family: var(--font); font-size: 14px; line-height: 1; letter-spacing: -0.005em;
  font-weight: var(--w-regular); color: #111114;
}
.lb-tree-path {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 16px; margin-bottom: 10px;
  border-bottom: 1px solid #E3E3E8;
  font-family: var(--font); font-size: var(--t-14); font-weight: var(--w-medium); color: var(--ink-3);
}
.lb-tree-path span:last-child { color: var(--ink); }
.lb-chev { color: var(--ink-4); }

.lb-t, .lb-t ul { margin: 0; padding: 0; }
.lb-t ul { position: relative; margin-left: 7px; padding-left: 19px; }
.lb-t ul::before {           /* the indent guide, a hairline */
  content: ""; position: absolute; left: 0; top: 2px; bottom: 14px;
  width: 1px; background: #DCDCE2;
}
.lb-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 31px;
  white-space: nowrap;
}
.lb-row em {
  margin-left: auto; padding-left: 16px;
  font-family: var(--font); font-style: normal; font-size: 13px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis;
}
.lb-t > li + li { margin-top: 2px; }
.lb-kits { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid #E3E3E8; }

/* File glyphs, drawn in CSS so they stay crisp and grey */
.lb-ic { position: relative; flex: none; width: 15px; height: 13px; color: var(--ink-3); }
.lb-ic::before, .lb-ic::after { content: ""; position: absolute; box-sizing: border-box; }
.lb-ic-dir::before { inset: 2px 0 0 0; border: 1.2px solid currentColor; border-radius: 2px; }
.lb-ic-dir::after { left: 0; top: 0; width: 7px; height: 4px; border: 1.2px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.is-open > .lb-row .lb-ic-dir::before { background: rgba(107, 107, 115, 0.12); }
.lb-ic-doc { width: 12px; height: 15px; margin-inline: 1.5px; }
.lb-ic-doc::before { inset: 0; border: 1.2px solid currentColor; border-radius: 2px; }
.lb-ic-doc::after { left: 3px; right: 3px; top: 5px; height: 4px; border-top: 1.2px solid currentColor; border-bottom: 1.2px solid currentColor; }
.lb-ic-img::before { inset: 0; border: 1.2px solid currentColor; border-radius: 2.5px; }
.lb-ic-img::after { left: 3px; bottom: 3px; width: 6px; height: 4px; border-left: 1.2px solid currentColor; border-top: 1.2px solid currentColor; transform: skewX(-30deg); opacity: 0.8; }
.lb-ic-movie::before, .lb-ic-deck::before, .lb-ic-play::before { inset: 0; border: 1.2px solid currentColor; border-radius: 3px; }
.lb-ic-movie::before { background: rgba(17, 17, 20, 0.06); }
.lb-ic-movie::after, .lb-ic-play::after { left: 6px; top: 3.5px; border-left: 4.5px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.lb-ic-deck::after { left: 3px; right: 3px; top: 4px; height: 5px; border: 1.2px solid currentColor; border-radius: 1px; }
.lb-ic-kit::before { left: 0; top: 1px; width: 11px; height: 11px; border: 1.2px solid currentColor; border-radius: 50%; }
.lb-ic-kit::after { left: 5px; top: 1px; width: 11px; height: 11px; border: 1.2px solid currentColor; border-radius: 50%; }
.lb-ic-kit { width: 16px; }
/* Work packages read a touch stronger: a film and a deck are one thing each */
.lb-ic-movie, .lb-ic-deck { color: var(--ink-2); }

/* ===================================================================== Sync */
.lb-sync-intro { max-width: 34em; margin-inline: auto; }

.lb-macs {
  margin: clamp(48px, 5vw, 72px) auto 0; max-width: 1000px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 0;
}
.lb-mac {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px 20px 22px;
  box-shadow: 0 0 0 0.5px rgba(17, 17, 20, 0.14), 0 1px 2px rgba(17, 17, 20, 0.04), 0 20px 44px -24px rgba(17, 17, 20, 0.18);
  font-size: 13px; line-height: 1.4;
  user-select: none;
}
.lb-mac-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: var(--w-medium); color: var(--ink-3);
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2);
}
.lb-mac-name svg, .lb-state svg, .lb-link-tag svg { width: 15px; height: 15px; flex: none; }
.lb-work { display: flex; align-items: center; gap: 14px; }
.lb-work img {
  width: 112px; aspect-ratio: 16 / 9; height: auto; flex: none;
  border-radius: 6px; object-fit: cover;
  box-shadow: inset 0 0 0 0.5px rgba(17, 17, 20, 0.14);
}
.lb-work-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lb-work-meta b { font-size: 14px; font-weight: var(--w-semibold); letter-spacing: -0.01em; color: var(--ink); }
.lb-work-meta span { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-state {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px; height: 32px;
  color: var(--ink-2);
}
.lb-choice { display: flex; gap: 8px; margin-top: 18px; }
.lb-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: var(--w-medium); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  white-space: nowrap;
}

.lb-link { display: flex; align-items: center; gap: 0; width: clamp(140px, 17vw, 200px); }
.lb-link-line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.lb-link-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px; font-weight: var(--w-medium); color: var(--ink-2);
  white-space: nowrap;
}

/* Coming: the two-Macs picture and the sync rules ship with a later Library (LIBRARY.md §2.2). */
.lb-macs-tag {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: clamp(40px, 4.4vw, 56px);
  font-size: var(--t-14); color: var(--ink-3);
}
.lb-macs-tag + .lb-macs { margin-top: 20px; }
.lb-rule-tag { margin-left: 6px; vertical-align: 0.12em; }

.lb-rules {
  margin: clamp(56px, 6vw, 80px) auto 0; max-width: 1000px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8);
}
.lb-rules h3 { font-size: var(--t-17); line-height: 1.4; font-weight: var(--w-semibold); letter-spacing: -0.01em; color: var(--ink); }
.lb-rules p { margin-top: 6px; font-size: var(--t-17); line-height: var(--lh-17); color: var(--ink-2); }

/* =============================================================== Tino knows */
.lb-asks { margin-top: var(--s-10) !important; display: grid; gap: 10px; max-width: 30em; }
.lb-ask {
  position: relative;
  display: flex; align-items: center;
  min-height: 52px; padding: 0 20px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: var(--t-17); letter-spacing: -0.008em; color: var(--ink-2);
}
.lb-ask.is-live {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 28px -18px rgba(17, 17, 20, 0.22);
}
.lb-ask-stop { display: inline-block; position: relative; width: 0; height: 1em; vertical-align: -0.14em; margin-left: 12px; }
.lb-scope { color: var(--ink-3); font-size: var(--t-14); line-height: var(--lh-14); max-width: 30em; }

.lb-found { margin: 0; }
picture.lb-found-card { display: block; }
.lb-found-card {
  max-width: 560px; margin-inline: auto;
  border-radius: clamp(12px, 1.6vw, 18px); overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 0 0 0.5px rgba(17, 17, 20, 0.16),
    0 2px 6px rgba(17, 17, 20, 0.04),
    0 36px 80px -32px rgba(17, 17, 20, 0.26);
}
.lb-found-card img { display: block; width: 100%; height: auto; }
.lb-found figcaption {
  max-width: 560px; margin: 18px auto 0;
  font-size: var(--t-14); line-height: var(--lh-14); color: var(--ink-3);
}
@media (min-width: 1000px) {
  .lb-found { padding: 48px 40px; border-radius: var(--r-2xl); background: var(--surface-2); }
}

/* ============================================================ Shared volumes */
.lb-vol-h { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.lb-coming { height: 28px; padding: 0 12px; font-size: var(--t-14); letter-spacing: 0; transform: translateY(0.08em); }
.lb-vol-stage .lb-shot { max-width: 1200px; }

.lb-roles {
  margin: clamp(48px, 5vw, 72px) auto 0; max-width: 1000px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8);
}
.lb-roles > div { padding-top: 18px; border-top: 1px solid var(--line); }
.lb-roles dt { font-size: var(--t-19); line-height: 1.3; font-weight: var(--w-semibold); letter-spacing: -0.012em; color: var(--ink); }
.lb-roles dd { margin: 6px 0 0; font-size: var(--t-17); line-height: var(--lh-17); color: var(--ink-2); text-wrap: pretty; }
.lb-vol-foot {
  margin: clamp(40px, 4vw, 56px) auto 0; max-width: 34em; text-align: center;
  font-size: var(--t-14); line-height: var(--lh-14); color: var(--ink-3);
}

/* ================================================================== Closing */
.lb-close-actions { margin-top: var(--s-8); display: flex; justify-content: center; }

/* ================================================================== Tablet */
@media (max-width: 999px) {
  .lb-split-knows .lb-copy { max-width: 640px; }
  .lb-tree { max-width: 640px; }
}
@media (max-width: 860px) {
  .lb-macs { grid-template-columns: minmax(0, 1fr); max-width: 440px; }
  .lb-link { width: auto; flex-direction: column; height: 96px; justify-content: center; }
  .lb-link-line { width: 1px; height: auto; flex: 1; background: repeating-linear-gradient(180deg, var(--line-strong) 0 4px, transparent 4px 8px); }
}

/* =================================================================== Phone */
@media (max-width: 733px) {
  .lb-hero { padding-top: 40px; }
  .lb-sub { font-size: var(--t-19); line-height: var(--lh-19); }
  .lb-actions { flex-direction: column; gap: var(--s-4); }
  .lb-shot { border-radius: 12px; }

  .lb-tree { padding: 22px 16px 24px; border-radius: var(--r-lg); font-size: 13px; }
  .lb-row { min-height: 29px; gap: 8px; }
  .lb-row em { display: none; }
  .lb-t ul { padding-left: 14px; margin-left: 7px; }

  .lb-mac { padding: 16px 16px 18px; }
  .lb-work img { width: 96px; }
  .lb-rules, .lb-roles { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .lb-ask { min-height: 48px; padding: 0 16px; font-size: 16px; }
  /* The live field wraps early, so the dot and its label sit after the last words, never over them */
  .lb-ask.is-live { padding-block: 13px; line-height: 1.45; }
  .lb-ask.is-live .lb-ask-text { max-width: 12.5em; }
  .lb-coming { height: 24px; font-size: var(--t-12); }
}

/* ==========================================================================
   Round 4: the Library live (UI kit windows and cards, a live film).
   ========================================================================== */
.lb-win { max-width: 1280px; margin-inline: auto; }
.lb-vert { display: block; width: 61px; height: 108px; border-radius: 3px; background: #2E2924 url(../img/ui/casa-warm.jpg) 44% 50% / auto 100% no-repeat; box-shadow: 0 0 0 .5px rgba(17,17,20,.12), 0 2px 6px rgba(17,17,20,.10); }
/* The search arrives: field types, then the results rise. */
.lib-results.is-pending { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.lib-results { transition: opacity 260ms var(--ease-out), transform 360ms var(--ease-out); }

/* Folder: the tree, and the kit that lives beside the projects */
.lb-folder-art { display: grid; gap: 20px; justify-items: stretch; }
.lb-kit { max-width: none; }

/* Sync: the film is playing on the Mac where it is open */
.lb-work-film { position: relative; width: 112px; aspect-ratio: 16 / 9; flex: none; border-radius: 6px; overflow: hidden; background: var(--ts-well); box-shadow: inset 0 0 0 .5px rgba(17,17,20,.14); }
.lb-work-film > .film { position: absolute; inset: 0; width: 100%; height: 100%; }
.lb-work-film .film button, .lb-work-film .film [class*="btn"] { display: none !important; }
.lb-work img.is-locked { filter: saturate(.6); opacity: .6; }

/* Tino knows: the asks are buttons, the answer is the conversation */
button.lb-ask { width: 100%; border: 0; font: inherit; font-size: var(--t-17); text-align: left; cursor: pointer; transition: background-color var(--d-2) var(--ease), color var(--d-2) var(--ease), box-shadow var(--d-2) var(--ease); }
@media (hover: hover) { button.lb-ask:not(.is-live):hover { background: var(--surface-3); color: var(--ink); } }
button.lb-ask:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lb-convo { position: relative; min-height: 420px; }
.lb-answer { display: flex; flex-direction: column; }
.lb-answer[hidden] { display: none; }
.lb-answer > * + * { margin-top: 18px; }
.lb-answer .tw-you { max-width: 86%; }
.lb-answer .tw-tino > .uc { margin-top: 16px; max-width: none; }
.lb-shots-card .lib-best { padding: 14px 16px 14px; box-shadow: none; }
.lb-shots-card .lib-shots { display: flex; gap: 6px; margin-top: 10px; }
.lb-shots-card .lib-shots i { flex: 1; height: auto; aspect-ratio: 4 / 3; border-radius: 4px; background-size: cover; background-position: center; }
.lb-shots-card .lib-best p { white-space: normal; }
.lb-files { padding: 4px 16px; }
.lb-files .lib-file:last-child { box-shadow: none; }
@media (min-width: 1000px) { .lb-found { padding: 40px; } }

/* Shared volumes (Coming): the share sheet, drawn live */
.lb-share-stage { margin: clamp(40px, 5vw, 64px) auto 0; max-width: 1000px; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 56px); border-radius: var(--r-2xl); background: var(--surface-2); display: grid; place-items: center; }
.lb-share { width: min(100%, 520px); padding: 24px 24px 20px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 .5px rgba(17,17,20,.16), 0 2px 6px rgba(17,17,20,.05), 0 30px 70px -30px rgba(17,17,20,.28); text-align: left; }
.lb-share-h { display: flex; align-items: center; gap: 10px; }
.lb-share-h b { font-size: 19px; font-weight: var(--w-semibold); letter-spacing: -0.015em; }
.lb-share-sub { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.lb-people { margin-top: 18px; border-top: 1px solid var(--line); }
.lb-people li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lb-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: var(--w-semibold); color: var(--ink-2); }
.lb-pn { flex: 1; min-width: 0; }
.lb-pn b { display: block; font-size: 15px; font-weight: var(--w-medium); }
.lb-pn small { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-role { flex: none; height: 28px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 13px; font-weight: var(--w-medium); }
.lb-share-kit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 16px; font-size: 14px; font-weight: var(--w-medium); }
.lb-share-kit small { flex-basis: 100%; font-size: 13px; font-weight: var(--w-regular); color: var(--ink-3); }
.lb-sws { display: inline-flex; gap: 4px; }
.lb-sws i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(17,17,20,.12); }
@media (max-width: 733px) {
  .lb-convo { min-height: 0; }
  .lb-share { padding: 18px 16px 16px; }
  .lb-pn small { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .lib-results { transition: none; } }
@media (max-width: 733px) {
  /* The hero window on phones: the search, the project and its works. */
  .lb-win .lib-row2 { display: none; }
  /* The results take no room until the search finds them; then they open above the project. */
  .lb-win .lib-results.is-pending { display: none; }
}
