@charset "utf-8";
/* ==========================================================================
   Sparrow Loop — assets/css/loop.css

   Design hand: a chart margin, not a magazine. Everything is measured against
   a narrow technical column, annotated with hairline rules and dotted leaders,
   and set in one typeface. There is no card, no shadow, no lift on hover and
   no emoji: the only decoration is the drawing itself.
   ========================================================================== */

/* ---- self-hosted type. One variable file per subset, no third-party call. -- */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/assets/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/assets/fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* the three names this site's spec fixes */
  --loop-soft: #fffaf2;   /* page base */
  --loop-round: #ef7f6d;  /* coral — round marks, links, decreases */
  --stitch-mark: #7fc7b0; /* mint — increase marks, chips, ticks */

  --loop-ink: #35322f;
  --loop-mute: #8d867c;
  --loop-rule: #ded6c9;
  --loop-wash: #f7f1e6;
  --loop-measure: 68ch;
  --loop-gutter: 1.35rem;

  --f-sans: 'Nunito', 'Segoe UI', system-ui, -apple-system, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
  background: var(--loop-soft);
  color: var(--loop-ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
}

body.lp {
  margin: 0;
  background: var(--loop-soft);
  font-variant-numeric: tabular-nums;
}

a { color: var(--loop-ink); text-decoration: none; border-bottom: 1px solid var(--loop-rule); }
a:hover { border-bottom-color: var(--loop-round); color: var(--loop-round); }
:focus-visible { outline: 2px solid var(--stitch-mark); outline-offset: 2px; }

.lp-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--loop-ink); color: var(--loop-soft);
  padding: .5rem .85rem; border: 0; z-index: 5;
}
.lp-skip:focus { left: .5rem; top: .5rem; }

/* ---- header: wordmark, one line of orientation, language switch ---------- */
.lp-band {
  max-width: var(--loop-measure);
  margin: 0 auto;
  padding: 1.9rem var(--loop-gutter) .95rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "mark switch" "note note";
  align-items: baseline;
  gap: .35rem 1rem;
  border-bottom: 3px double var(--loop-rule);
}
.lp-wordmark {
  grid-area: mark;
  display: inline-flex; align-items: center; gap: .55rem;
  border: 0; font-weight: 900; font-size: 1.12rem; letter-spacing: -.01em;
}
.lp-wordmark:hover { color: var(--loop-round); }
.lp-wordmark__loop {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid var(--loop-round);
  border-right-color: var(--stitch-mark);
  border-bottom-color: transparent;
  transform: rotate(-32deg);
  flex: none;
}
.lp-wordmark__text { border-bottom: 1px solid transparent; }
.lp-band__note {
  grid-area: note; margin: 0; color: var(--loop-mute);
  font-size: .82rem; line-height: 1.45; max-width: 46ch;
}
.lp-switch {
  grid-area: switch; display: flex; align-items: baseline; gap: .4rem;
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
}
.lp-switch__on { color: var(--loop-ink); font-weight: 900; border-bottom: 2px solid var(--stitch-mark); }
.lp-switch__off { color: var(--loop-mute); border-bottom: 1px dotted var(--loop-rule); }
.lp-switch__off:hover { color: var(--loop-round); }

/* ---- the measured column ------------------------------------------------- */
.lp-main {
  max-width: var(--loop-measure);
  margin: 0 auto;
  padding: 2.1rem var(--loop-gutter) 4rem;
}

/* ---- headings: annotated, ruled, never centred --------------------------- */
.lp-h1 {
  font-size: 1.82rem; line-height: 1.22; font-weight: 900;
  letter-spacing: -.015em; margin: 0 0 .7rem;
}
.lp-h1--detail { margin-top: .55rem; padding-bottom: .85rem; border-bottom: 3px double var(--loop-rule); }
.lp-h2 {
  font-size: .82rem; font-weight: 900; letter-spacing: .13em;
  text-transform: uppercase; color: var(--loop-mute);
  margin: 2.6rem 0 .9rem;
}
.lp-h2--rule {
  display: flex; align-items: center; gap: .7rem; color: var(--loop-ink);
  margin-top: 3rem;
}
.lp-h2--rule::after {
  content: ""; flex: 1; height: 1px; background: var(--loop-rule);
}
.lp-h2__n {
  order: 9; font-size: .72rem; color: var(--loop-mute); letter-spacing: .04em;
  border: 1px solid var(--loop-rule); border-radius: 999px; padding: 0 .45rem;
}
.lp-h3 {
  font-size: .78rem; font-weight: 900; letter-spacing: .1em;
  text-transform: uppercase; color: var(--loop-ink);
  margin: 1.8rem 0 .5rem;
}

.lp-intro { padding-bottom: .4rem; }
.lp-lede { margin: .9rem 0; color: #4a463f; }
.lp-lede--q { font-weight: 700; color: var(--loop-ink); }
.lp-hint { color: var(--loop-mute); font-size: .84rem; margin: -.45rem 0 .9rem; }
.lp-count { color: var(--loop-mute); font-size: .84rem; margin: 1.1rem 0 0; }
.lp-count__n { font-weight: 900; color: var(--loop-ink); }

.lp-back { font-size: .82rem; color: var(--loop-mute); margin: 0 0 .6rem; }
.lp-back a { border-bottom-style: dotted; }
.lp-back__sep { color: var(--loop-rule); }

/* ---- chips: capsules, hairlines, no fill --------------------------------- */
.lp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .2rem; }
.lp-chip {
  display: inline-block; font-size: .7rem; letter-spacing: .07em;
  text-transform: uppercase; font-weight: 900;
  padding: .12rem .62rem; border: 1px solid var(--loop-rule);
  border-radius: 999px; color: var(--loop-mute); border-bottom-width: 1px;
}
a.lp-chip:hover { border-color: var(--loop-round); color: var(--loop-round); }
.lp-chip--kind { border-color: var(--stitch-mark); color: #3f8b76; }
.lp-chip--date { border-style: dotted; }
/* the byline: same capsule as the other stamps, but set in ink so the desk that
   wrote the entry reads as the page's author and not as another topic tag */
.lp-chip--by { border-color: var(--loop-ink); color: var(--loop-ink); }

/* ---- the folded index ---------------------------------------------------- */
.lp-index { margin-top: .5rem; }
.lp-group { margin-bottom: .3rem; }
.lp-fold {
  border-bottom: 1px solid var(--loop-rule);
}
.lp-fold[open] { background: linear-gradient(90deg, var(--loop-wash), transparent 62%); }
.lp-fold__q {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .82rem .2rem .82rem 0;
  cursor: pointer; list-style: none; font-weight: 700; line-height: 1.4;
}
.lp-fold__q::-webkit-details-marker { display: none; }
.lp-fold__caret {
  flex: none; width: 11px; height: 11px; position: relative; top: .12em;
  border: 1px solid var(--loop-mute); border-radius: 2px;
}
.lp-fold__caret::before,
.lp-fold__caret::after {
  content: ""; position: absolute; background: var(--loop-mute);
}
.lp-fold__caret::before { left: 1px; right: 1px; top: 4px; height: 1px; }
.lp-fold__caret::after  { top: 1px; bottom: 1px; left: 4px; width: 1px; }
.lp-fold[open] > .lp-fold__q > .lp-fold__caret::after { display: none; }
.lp-fold[open] > .lp-fold__q > .lp-fold__caret { border-color: var(--loop-round); }
.lp-fold[open] > .lp-fold__q > .lp-fold__caret::before { background: var(--loop-round); }
.lp-fold__text { flex: 1; }
.lp-fold__q:hover .lp-fold__text { color: var(--loop-round); }
.lp-fold__kind {
  flex: none; font-size: .66rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--loop-mute); font-weight: 900;
}
.lp-fold__body { padding: 0 0 1.05rem 1.6rem; }
.lp-fold__a { margin: 0 0 .6rem; color: #4a463f; }
.lp-fold__more {
  margin: 0; display: flex; gap: 1rem; align-items: baseline;
  font-size: .84rem; font-weight: 700;
}
.lp-fold__date { color: var(--loop-mute); font-weight: 400; margin-left: auto; font-size: .78rem; }

/* ---- index toolbar, added by loop.js only -------------------------------- */
.lp-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem;
  margin: 2rem 0 .2rem; padding-bottom: .7rem;
  border-bottom: 1px solid var(--loop-rule);
}
.lp-tools__q {
  flex: 1 1 15rem; min-width: 10rem;
  font: inherit; font-size: .88rem; color: var(--loop-ink);
  background: transparent; padding: .3rem .1rem;
  border: 0; border-bottom: 1px solid var(--loop-rule);
  border-radius: 0;
}
.lp-tools__q:focus { outline: none; border-bottom-color: var(--stitch-mark); }
.lp-tools__btn {
  font: inherit; font-size: .72rem; font-weight: 900;
  letter-spacing: .09em; text-transform: uppercase; color: var(--loop-mute);
  background: transparent; padding: .25rem .6rem; cursor: pointer;
  border: 1px solid var(--loop-rule); border-radius: 999px;
}
.lp-tools__btn:hover { color: var(--loop-round); border-color: var(--loop-round); }
.lp-tools__n { flex: 1 1 100%; margin: 0; font-size: .74rem; color: var(--loop-mute); }

/* ---- most-read strip ----------------------------------------------------- */
.lp-pop__list { list-style: none; margin: .3rem 0 0; padding: 0; }
.lp-pop__list li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .32rem 0; border-bottom: 1px dotted var(--loop-rule);
}
.lp-pop__n { margin-left: auto; color: var(--loop-mute); font-size: .78rem; }

/* ---- flat lists ---------------------------------------------------------- */
.lp-list { list-style: none; margin: 1.4rem 0 0; padding: 0; counter-reset: row; }
.lp-list__row {
  display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.2rem;
  padding: .78rem 0; border-bottom: 1px solid var(--loop-rule);
}
.lp-list__link { font-weight: 700; border-bottom: 0; }
.lp-list__link:hover { border-bottom: 1px solid var(--loop-round); }
.lp-list__meta { color: var(--loop-mute); font-size: .78rem; white-space: nowrap; }

/* ---- detail page --------------------------------------------------------- */
.lp-detail { position: relative; }
.lp-answer {
  margin: 1.5rem 0 1.7rem; padding: .9rem 1.1rem .95rem;
  border-left: 3px solid var(--stitch-mark);
  background: var(--loop-wash);
}
.lp-answer__h {
  margin: 0 0 .35rem; font-size: .72rem; font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase; color: #3f8b76;
}
.lp-answer p { margin: 0; }

/* the diagram sits in a plain hairline frame — the only "box" on the page */
.lp-fig { margin: 2.2rem 0; }
.lp-fig__img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--loop-rule); background: var(--loop-soft);
}
.lp-fig__cap {
  margin: .55rem 0 0; font-size: .78rem; color: var(--loop-mute); line-height: 1.5;
}
.lp-fig__tag {
  display: inline-block; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; font-size: .66rem; color: var(--loop-ink);
  border-bottom: 2px solid var(--stitch-mark); margin-right: .35rem;
}

/* steps / rounds: folded, with the round chip as the summary label */
.lp-steps { margin-top: .3rem; }
.lp-step { border-bottom: 1px solid var(--loop-rule); }
.lp-step__s {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  padding: .7rem .2rem .7rem 0; cursor: pointer; list-style: none;
}
.lp-step__s::-webkit-details-marker { display: none; }
.lp-step__caret {
  flex: none; width: 0; height: 0; position: relative; top: .18em;
  border-left: 5px solid var(--loop-mute);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .12s linear;
}
.lp-step[open] > .lp-step__s > .lp-step__caret { transform: rotate(90deg); border-left-color: var(--loop-round); }
.lp-step__h { font-weight: 700; flex: 1; min-width: 12ch; }
.lp-step__body { padding: 0 0 1rem 1.5rem; }
.lp-step__body p { margin: 0 0 .75rem; }
.lp-step__body p:last-child { margin-bottom: 0; }
.lp-step--round .lp-step__body { padding-left: 1.5rem; }

.lp-round {
  display: inline-block; flex: none;
  font-size: .74rem; font-weight: 900; letter-spacing: .04em;
  padding: .1rem .55rem; border-radius: 999px;
  border: 1px solid var(--loop-rule); color: var(--loop-ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.lp-round--plain { border-style: dotted; color: var(--loop-mute); font-weight: 700; letter-spacing: .06em; }
.lp-step--inc > .lp-step__s > .lp-round { border-color: var(--stitch-mark); background: rgba(127, 199, 176, .16); }
.lp-step--dec > .lp-step__s > .lp-round { border-color: var(--loop-round); background: rgba(239, 127, 109, .14); }
.lp-mark {
  font-size: .64rem; font-weight: 900; letter-spacing: .1em;
  text-transform: uppercase; color: var(--loop-mute);
}
.lp-mark--inc { color: #3f8b76; }
.lp-mark--dec { color: var(--loop-round); }

/* spec sheet with dotted leaders */
.lp-spec {
  margin: 1.8rem 0 0; border-top: 1px solid var(--loop-rule);
  border-bottom: 1px solid var(--loop-rule); padding: .3rem 0;
}
.lp-spec__row {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .42rem 0; font-size: .9rem;
}
.lp-spec__row + .lp-spec__row { border-top: 1px dotted var(--loop-rule); }
.lp-spec__k {
  flex: none; min-width: 8.5rem; font-weight: 900; font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--loop-mute);
}
.lp-spec__v { margin: 0; flex: 1; }

.lp-duo { display: grid; gap: 1.4rem 2.2rem; grid-template-columns: 1fr; margin-top: 1.9rem; }
.lp-tick { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.lp-tick li { position: relative; padding-left: 1.15rem; margin-bottom: .3rem; }
.lp-tick li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .5rem; height: .5rem; border-radius: 50%;
  border: 1.5px solid var(--stitch-mark);
}

.lp-bugs { margin: 0; padding-left: 1.2rem; }
.lp-bugs li { margin-bottom: .5rem; }
.lp-bugs li::marker { color: var(--loop-round); }

.lp-num { margin: 0; padding-left: 1.3rem; }
.lp-num li { margin-bottom: .55rem; }
.lp-num li::marker { color: var(--loop-mute); font-weight: 900; }

.lp-trouble { border-top: 1px solid var(--loop-rule); }
.lp-trouble__row { padding: .85rem 0; border-bottom: 1px solid var(--loop-rule); }
.lp-trouble__q { margin: 0 0 .3rem; font-weight: 900; }
.lp-trouble__q::before { content: "? "; color: var(--loop-round); }
.lp-trouble__a { margin: 0; color: #4a463f; }
.lp-trouble__a::before { content: "→ "; color: var(--stitch-mark); font-weight: 900; }

.lp-rel { margin-top: 3rem; }
.lp-rel__list { list-style: none; margin: .3rem 0 0; padding: 0; }
.lp-rel__list li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .5rem 0; border-bottom: 1px dotted var(--loop-rule);
}
.lp-rel__kind { margin-left: auto; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--loop-mute); font-weight: 900; }

/* ---- legal documents ----------------------------------------------------- */
.lp-doc { max-width: var(--loop-measure); }
.lp-doc p { margin: .85rem 0; }
.lp-doc__head { margin-bottom: 1.4rem; }
.lp-doc__stamp {
  margin: .2rem 0 1.4rem; font-size: .76rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--loop-mute); font-weight: 900;
}
.lp-doc h2 { margin-top: 2.4rem; }
.lp-legalnav { margin-top: 3.4rem; border-top: 3px double var(--loop-rule); padding-top: .9rem; }
.lp-legalnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0; padding: 0; font-size: .84rem; }
.lp-legalnav a { border-bottom-style: dotted; }
.lp-legalnav a.on { border-bottom: 2px solid var(--stitch-mark); font-weight: 900; }

/* ---- footer: the full index ---------------------------------------------- */
.lp-foot {
  border-top: 3px double var(--loop-rule);
  max-width: var(--loop-measure);
  margin: 0 auto;
  padding: 2rem var(--loop-gutter) 3.4rem;
}
.lp-foot__grid { display: grid; gap: 1.6rem 2.4rem; grid-template-columns: 1fr; }
.lp-foot__h {
  font-size: .72rem; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; color: var(--loop-mute);
  margin: 0 0 .55rem; padding-bottom: .3rem;
  border-bottom: 1px solid var(--loop-rule);
}
.lp-foot__list { list-style: none; margin: 0; padding: 0; font-size: .84rem; line-height: 1.5; }
.lp-foot__list li { margin-bottom: .34rem; }
.lp-foot__list a { border-bottom-style: dotted; }
.lp-foot__meta {
  margin: 2.2rem 0 0; padding-top: .8rem; border-top: 1px solid var(--loop-rule);
  font-size: .78rem; color: var(--loop-mute);
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
}
.lp-foot__n { margin-left: auto; }
/* one line of editorial scope, under the colophon */
.lp-foot__note { margin: .9rem 0 0; font-size: .76rem; color: var(--loop-mute); max-width: 64ch; }

/* ---- wide enough to hold a second column --------------------------------- */
@media (min-width: 46rem) {
  html { font-size: 17.5px; }
  .lp-duo { grid-template-columns: 1fr 1fr; }
  .lp-foot__grid { grid-template-columns: 1.25fr 1.25fr 1fr; }
  .lp-h1 { font-size: 2.05rem; }
  .lp-h1--detail { font-size: 1.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- print: a chart should come off the printer legibly ------------------ */
@media print {
  .lp-band__note, .lp-switch, .lp-foot, .lp-skip, .lp-pop { display: none; }
  body.lp { background: #fff; }
  .lp-fold__body, .lp-step__body { display: block !important; }
  .lp-detail { max-width: none; }
}
