/* =========================================================
   Clipio — sub-pages (Support, FAQ, Docs, Changelog,
   About, Blog)
   ---------------------------------------------------------
   Layers on css/styles.css and inherits its tokens and its
   three rules: one hue, no drop shadows, no one-off values.
   Nothing here redefines a token.
   ========================================================= */

/* ---------------- page masthead ----------------
   Every sub-page opens with the same block, so the set reads
   as one site rather than six one-offs. */
.masthead{
  background:var(--page-alt);
  border-bottom:1px solid var(--line);
  padding:clamp(48px,6vw,80px) 0 clamp(40px,5vw,64px);
}
.masthead__inner{ max-width:720px; }
.masthead__inner--center{ margin-inline:auto; text-align:center; }
.masthead h1{ font-size:clamp(32px,4.6vw,48px); }
.masthead p{ margin-top:18px; color:var(--ink-2); font-size:17.5px; line-height:1.6; letter-spacing:-.009em; }
.masthead .eyebrow{ margin-bottom:20px; }

/* `flex` rather than `inline-flex`: the masthead can carry a crumb and an
   eyebrow, and inline-flex puts them on the same line. width:fit-content
   keeps the hover target the size of the text. */
.crumb{
  display:flex; width:fit-content; align-items:center; gap:6px;
  font-size:13.5px; color:var(--ink-3); margin-bottom:20px;
}
.crumb:hover{ color:var(--ink); }
.crumb svg{ width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* ---------------- generic prose ---------------- */
.prose{ max-width:720px; }
.prose h2{ font-size:clamp(22px,2.6vw,28px); margin:44px 0 14px; }
.prose h2:first-child{ margin-top:0; }
.prose h3{ margin:30px 0 10px; }
.prose p{ color:var(--ink-2); font-size:16.5px; line-height:1.68; letter-spacing:-.008em; margin-bottom:16px; }
.prose p:last-child{ margin-bottom:0; }
.prose a:not(.btn):not(.link-arrow){ color:var(--brand); }
.prose a:not(.btn):not(.link-arrow):hover{ text-decoration:underline; }
.prose ul,.prose ol{ margin:0 0 16px; padding-left:22px; color:var(--ink-2); font-size:16.5px; line-height:1.68; }
.prose li{ margin-bottom:8px; }
.prose code{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:.88em; background:var(--panel); color:var(--ink);
  padding:2px 6px; border-radius:var(--r-xs);
}
.prose strong{ color:var(--ink); font-weight:600; }

.note{
  border:1px solid var(--brand-line); background:var(--brand-soft);
  border-radius:var(--r-md); padding:18px 20px; margin:24px 0;
}
.note p{ font-size:15px; margin-bottom:0; color:var(--brand-ink); }
.note strong{ color:var(--brand-ink); }

/* ---------------- support cards ---------------- */
.cardgrid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
/* Four cards of body copy across a 1140px page are too narrow to read. This
   caps the row at two so each card gets a sensible measure. */
.cardgrid--2{ grid-template-columns:repeat(auto-fit,minmax(420px,1fr)); }
.scard2{
  display:flex; flex-direction:column;
  border:1px solid var(--line); border-radius:var(--r-xl);
  background:var(--page); padding:26px;
  transition:border-color .18s var(--ease);
}
a.scard2:hover{ border-color:var(--line-strong); }
.scard2__ico{
  width:36px; height:36px; border-radius:var(--r-sm);
  display:grid; place-items:center; margin-bottom:16px;
  background:var(--brand-soft); color:var(--brand);
}
.scard2__ico svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.scard2 h3{ margin-bottom:8px; }
.scard2 p{ color:var(--ink-2); font-size:14.5px; line-height:1.58; }
.scard2 .link-arrow{ margin-top:auto; padding-top:18px; }

/* ---------------- docs layout ----------------
   Sticky table of contents beside the article. The TOC is a
   plain nav list, highlighted by js/pages.js as you scroll. */
.docs{ display:grid; grid-template-columns:220px minmax(0,1fr); gap:clamp(32px,5vw,64px); align-items:start; }
.toc{ position:sticky; top:88px; }
.toc__label{
  font-size:11px; font-weight:620; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-4); margin-bottom:12px;
}
.toc a{
  display:block; padding:6px 0 6px 12px;
  font-size:14px; color:var(--ink-3);
  border-left:2px solid var(--line);
  transition:color .15s, border-color .15s;
}
.toc a:hover{ color:var(--ink-2); }
.toc a.is-active{ color:var(--brand); border-left-color:var(--brand); font-weight:560; }

.docs__body h2{ scroll-margin-top:96px; }

/* keyboard shortcut table */
.keys{ width:100%; border-collapse:collapse; margin:0 0 16px; }
.keys th{
  text-align:left; font-size:11px; font-weight:620; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-4);
  padding:0 0 10px; border-bottom:1px solid var(--line);
}
.keys td{ padding:13px 0; border-bottom:1px solid var(--line); vertical-align:top; font-size:15px; color:var(--ink-2); }
.keys td:first-child{ color:var(--ink); font-weight:500; padding-right:20px; }
.keys td:last-child{ text-align:right; white-space:nowrap; }
.keys .hint{ display:block; font-size:13px; color:var(--ink-3); margin-top:4px; line-height:1.5; }
kbd{
  display:inline-block;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:12px;
  color:var(--ink); background:var(--page); border:1px solid var(--line-strong);
  border-radius:var(--r-xs); padding:3px 7px; margin-left:3px;
}

/* ---------------- changelog ---------------- */
.log{ max-width:760px; }
.log__group{
  font-size:11px; font-weight:620; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-4); margin:36px 0 4px;
}
.log__group:first-child{ margin-top:0; }
.log__item{ display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--line); }
.log__dot{ flex:none; margin-top:7px; width:8px; height:8px; border-radius:50%; background:var(--brand); }
.log--upcoming .log__dot{ background:transparent; border:1.5px solid var(--line-strong); }
.log__item b{ display:block; font-size:15.5px; font-weight:560; color:var(--ink); letter-spacing:-.012em; line-height:1.4; }
.log__item span{ display:block; font-size:14.5px; color:var(--ink-2); line-height:1.58; margin-top:4px; }

/* the shipped / upcoming segmented control reuses .modes__tabs */
.log__switch{ margin-bottom:32px; }

/* ---------------- blog ---------------- */
.postgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.post{
  display:flex; flex-direction:column;
  border:1px solid var(--line); border-radius:var(--r-xl);
  background:var(--page); padding:26px;
}
.post__meta{ font-size:12.5px; color:var(--ink-4); margin-bottom:12px; }
.post h3{ margin-bottom:10px; }
.post p{ color:var(--ink-2); font-size:14.5px; line-height:1.58; }
.post .link-arrow{ margin-top:auto; padding-top:18px; }

.empty{
  border:1px dashed var(--line-strong); border-radius:var(--r-2xl);
  background:var(--page-alt); padding:clamp(44px,6vw,72px) 28px; text-align:center;
}
.empty__ico{
  width:44px; height:44px; margin:0 auto 20px; border-radius:var(--r-md);
  display:grid; place-items:center; background:var(--page);
  border:1px solid var(--line); color:var(--ink-3);
}
.empty__ico svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.empty h2{ font-size:clamp(22px,2.6vw,26px); }
.empty p{ margin:14px auto 0; max-width:420px; color:var(--ink-2); font-size:15.5px; line-height:1.6; }

/* ---------------- about ---------------- */
.valgrid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1px;
  background:var(--line); border:1px solid var(--line); border-radius:var(--r-xl); overflow:hidden; }
.val{ background:var(--page); padding:26px 24px; }
.val svg{ width:19px; height:19px; margin-bottom:14px; color:var(--brand);
  fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.val h4{ margin-bottom:6px; }
.val p{ font-size:14px; line-height:1.55; color:var(--ink-3); }

.factrow{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-top:36px; }
.fact{ border:1px solid var(--line); border-radius:var(--r-lg); background:var(--page); padding:22px; }
.fact b{ display:block; font-size:26px; font-weight:660; letter-spacing:-.035em; line-height:1; }
.fact span{ display:block; font-size:13.5px; color:var(--ink-3); margin-top:8px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:900px){
  .docs{ grid-template-columns:1fr; }
  .toc{ position:static; padding-bottom:8px; border-bottom:1px solid var(--line); }
  .toc__list{ display:flex; flex-wrap:wrap; gap:4px 0; }
  .toc a{ border-left:0; border-bottom:2px solid transparent; padding:6px 12px 6px 0; }
  .toc a.is-active{ border-left:0; border-bottom-color:var(--brand); }
}

@media (max-width:620px){
  .keys td:last-child{ text-align:left; padding-top:0; }
  .keys tr{ display:block; }
  .keys td{ display:block; border-bottom:0; padding:10px 0 0; }
  .keys td:last-child{ padding-bottom:14px; border-bottom:1px solid var(--line); }
  .keys thead{ display:none; }
  kbd{ margin-left:0; margin-right:3px; }
}
