/* Sheetly blog (/blog): built by _build/blog/build.py.
   Musicnotes-blog layout on the app's brown: dark bar, one centred 720px
   article column, Noto Sans headings, Noto Serif body. The wordmark alone is
   Sheetly Logo (design-system/fonts), as on every other page. */
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/notosans.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("/assets/fonts/notoserif.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("/assets/fonts/notoserif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Sheetly Logo"; src: url("/assets/fonts/sheetly-logo.woff2?v=1") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  color-scheme: dark;
  --sans: "Noto Sans", system-ui, sans-serif;
  --serif: "Noto Serif", Georgia, serif;
  --col: 720px;
  --wide: 1200px;
  --page: #2C1A0E;
  --card: #3D2817;
  --ink: #F5ECD7;
  --text: #E0D4BA;
  --muted: #AEA088;
  --quiet: #9A8C74;
  --rule: rgba(190, 150, 80, 0.22);
  --link: #DDB65A;
  --bar: #150C06;
  --bar-ink: #F5ECD7;
  --btn: #C4952A;
  --btn-hover: #D4A94A;
  --btn-ink: #2C1A0E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Top bar ───────────────────────────────────────── */
.b-bar { background: var(--bar); color: var(--bar-ink); position: relative; z-index: 5; }
.b-bar-in { max-width: var(--wide); margin: 0 auto; height: 88px; padding: 0 24px; display: flex; align-items: center; gap: 56px; }
.b-brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.b-brand img { width: 36px; height: 36px; border-radius: 50%; }
.b-brand-word { font-family: "Sheetly Logo", "Noto Sans", system-ui, sans-serif; font-weight: 900; font-size: 25px; letter-spacing: 0; text-decoration: none; }
.b-brand-sep { width: 1px; height: 24px; background: currentColor; opacity: 0.45; margin: 0 2px 0 4px; }
.b-brand-blog { font-size: 22px; font-weight: 400; letter-spacing: 0.12em; opacity: 0.9; text-decoration: none; }
.b-links { display: flex; align-items: center; gap: 30px; flex: 1; }
.b-links a { text-decoration: none; font-size: 16px; font-weight: 500; opacity: 0.92; white-space: nowrap; }
.b-links a:hover, .b-links a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.b-links svg, .b-menu svg { width: 12px; height: 12px; margin-left: 5px; }
.b-burger { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; margin-left: auto; }
.b-menu { display: none; }

/* ── Article head ──────────────────────────────────── */
.b-main { padding: 0 16px; }
.b-post { max-width: var(--col); margin: 0 auto; padding: 84px 0 96px; }
.b-tags { display: flex; gap: 14px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.b-tags a { text-decoration: none; }
.b-tag-quiet { color: var(--quiet); }
.b-tag { color: var(--ink); }
.b-head h1 { font-weight: 800; color: var(--ink); font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 22px; }
.b-dek { font-size: 20px; line-height: 1.45; color: var(--text); margin: 0 0 26px; }
.b-byline { display: flex; align-items: center; gap: 12px; }
.b-avatar { width: 52px; height: 52px; border-radius: 50%; }
.b-author { font-weight: 700; font-size: 17px; color: var(--ink); }
.b-date { font-size: 14px; color: var(--muted); margin-top: 3px; }
.b-dot { margin: 0 7px; }
.b-hero { margin: 64px 0 72px; }
.b-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 40%; }

/* ── Body: serif text, sans headings ───────────────── */
.b-body { font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--text); }
.b-body p { margin: 0 0 1.5em; }
.b-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.b-body strong { color: var(--ink); }
.b-body h2 { font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; margin: 1.5em 0 0.5em; scroll-margin-top: 24px; }
.b-body h3 { font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 24px; line-height: 1.3; margin: 1.8em 0 0.5em; scroll-margin-top: 24px; }
.b-body h4 { font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 20px; line-height: 1.3; margin: 1.6em 0 0.4em; }
.b-body ul, .b-body ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.b-body li { margin: 0 0 0.45em; padding-left: 0.2em; }
.b-body li::marker { color: var(--muted); }
.b-body figure { margin: 2.4em 0; }
.b-body figcaption { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; margin-top: 12px; }
.b-body .dgf { margin: 2.2em 0; }
.b-body .dgf img { width: 100%; height: auto; }
.b-body figure.shot img { width: 100%; }
.b-body figure.photo img { width: 100%; border-radius: 4px; }
.b-body table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 16px; margin: 0 0 1.6em; }
.b-body th, .b-body td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.b-body th { color: var(--ink); font-weight: 700; }
.b-body .table-wrap { overflow-x: auto; margin: 0 0 1.6em; }
.b-body .table-wrap table { margin: 0; min-width: 520px; }
.b-body .cta-line { font-family: var(--sans); font-size: 16px; }
.b-body .btn { display: inline-block; background: var(--btn); color: var(--btn-ink); font-family: var(--sans); font-weight: 800; font-size: 16px; text-decoration: none; padding: 13px 24px; border-radius: 999px; }
.b-body .btn:hover { background: var(--btn-hover); }

/* Questions: hairline list */
.b-body .faq-list { border-top: 1px solid var(--rule); }
.b-body .faq-item { border-bottom: 1px solid var(--rule); }
.b-body .faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-family: var(--sans); font-weight: 700; font-size: 18px; color: var(--ink); }
.b-body .faq-item summary::-webkit-details-marker { display: none; }
.b-body .faq-mark::before { content: "+"; font-weight: 400; font-size: 24px; color: var(--muted); }
.b-body .faq-item[open] .faq-mark::before { content: "\2212"; }
.b-body .faq-a p { margin: 0 0 18px; }

/* End-of-post app box: same words as the popup */
.b-body .b-cta { display: flex; align-items: center; gap: 20px; margin: 40px 0 48px; padding: 24px 24px 24px 22px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 20px; font-family: var(--sans); }
.b-cta-icon { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.b-cta-copy { flex: 1; min-width: 0; }
.b-body .b-cta-title { margin: 0 0 4px; font-weight: 800; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.b-body .b-cta-text { margin: 0; font-size: 16px; line-height: 1.5; color: #CCBEA2; }
.b-body .b-cta-btn { flex: none; display: inline-block; background: var(--btn); color: var(--btn-ink); font-weight: 800; font-size: 16px;
  text-decoration: none; padding: 14px 24px; border-radius: 999px; white-space: nowrap; }
.b-body .b-cta-btn:hover { background: var(--btn-hover); }

/* Read next: three post cards with thumbnails under the article, wider than the text column */
.b-more { border-top: 1px solid var(--rule); }
.b-more-in { max-width: var(--wide); margin: 0 auto; padding: 56px 8px 96px; }
.b-more h2 { font-weight: 800; color: var(--ink); font-size: 28px; letter-spacing: -0.01em; margin: 0 0 32px; }
.b-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.b-more-grid .b-card { grid-column: auto; }

/* Read next (old hairline list, kept for any post that still has it inline) */
.b-body .doc-links { border-top: 1px solid var(--rule); }
.b-body .doc-link-card { display: block; padding: 18px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.b-body .doc-link-card .link-title { display: block; font-family: var(--sans); font-weight: 700; font-size: 18px; color: var(--ink); }
.b-body .doc-link-card .link-desc { display: block; font-size: 17px; color: var(--muted); margin-top: 2px; }
.b-body .doc-link-card:hover .link-title { text-decoration: underline; text-underline-offset: 4px; }

/* ── Compare pages (/compare/*, built from the same template) ───── */
:root { --a1: #8EC1EA; --a2: #A9CF8B; --other: #6E5A44; }
.b-body .cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6em 0 2em; }
.b-body .cmp-table { min-width: 520px; margin: 0; font-size: 15px; line-height: 1.45; }
.b-body .cmp-table caption { caption-side: bottom; text-align: left; padding: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.b-body .cmp-table th, .b-body .cmp-table td { padding: 12px 14px 12px 0; vertical-align: top; }
.b-body .cmp-table thead th { font-size: 14px; color: var(--muted); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--muted); }
.b-body .cmp-table thead th.us { color: var(--a1); }
.b-body .cmp-table tbody th { min-width: 160px; font-weight: 700; color: var(--ink); }
.b-body .cmp-table td { color: var(--text); font-variant-numeric: tabular-nums; }
.b-body .cmp-table col.us { background: rgba(142, 193, 234, 0.06); }
.b-body .cmp-table tr.is-us th, .b-body .cmp-table tr.is-us td { color: var(--a1); }
.b-body .cmp-table td.yes, .b-body .cmp-table td.no, .b-body .cmp-table td.part { white-space: nowrap; }
.b-body .cmp-table td.yes { color: var(--a2); font-weight: 700; }
.b-body .cmp-table td.no { color: var(--muted); }
.b-body .cmp-table td.yes::before { content: "\2713  "; }
.b-body .cmp-table td.no::before { content: "\2715  "; }
.b-body .cmp-table .only { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--page); background: var(--a1); border-radius: 999px; padding: 1px 8px; }
.cmp-num { font-variant-numeric: tabular-nums; }
.b-body .pp-wrap { max-height: 560px; overflow: auto; }
.b-body .pp-table { min-width: 760px; }
.b-body .pp-table th, .b-body .pp-table td { font-size: 14px; padding: 9px 12px 9px 0; }
.b-body .pp-table thead th { position: sticky; top: 0; z-index: 1; background: var(--page); }
.pp-name { display: block; }
.pp-sub, .pp-desc { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; white-space: normal; }
.b-body .pp-table .cmp-num.us { color: var(--a1); font-weight: 700; }
.b-body .doc-code { margin: 1em 0 1.4em; padding: 12px 14px; overflow-x: auto; background: rgba(0, 0, 0, 0.25); border-radius: 8px; font-size: 14px; line-height: 1.6; }
.b-body .doc-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); white-space: pre; }
.b-body .doc-source { font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--muted); }
/* Accuracy chart: Sheetly in the diagrams' blue, the other app in brown */
.b-body .bench { margin: 2.4em 0; font-family: var(--sans); }
.stapel-legend { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.stapel-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--other); margin-right: 7px; }
.stapel-legend span.us { color: var(--ink); }
.stapel-legend span.us::before { background: var(--a1); }
.stapel-chart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: end; border-bottom: 1px solid var(--rule); }
.stapel-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; justify-items: center; }
.stapel-group .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 100%; }
.stapel-group .col b { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.stapel-group .col.us b { color: var(--a1); font-weight: 800; }
.stapel-group .col i { display: block; width: 100%; max-width: 56px; height: calc(var(--v) * 1.7px); background: var(--other); border-radius: 4px 4px 0 0; }
.stapel-group .col.us i { background: var(--a1); }
.stapel-label { grid-column: 1 / -1; font-size: 14px; color: var(--text); padding: 10px 0 12px; text-align: center; }
.b-body figure.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.b-body figure.pair img { width: 100%; }
@media (max-width: 640px) {
  .stapel-chart { gap: 16px; }
  .stapel-group .col i { height: calc(var(--v) * 1.3px); }
  .stapel-label { font-size: 13px; }
  .b-body figure.pair { grid-template-columns: 1fr; }
  /* two-app tables fit the phone without sideways scrolling; wider ones still scroll */
  .b-body .cmp-table:not(:has(thead th:nth-child(4))) { min-width: 0; font-size: 14px; }
  .b-body .cmp-table:not(:has(thead th:nth-child(4))) tbody th { min-width: 0; width: 34%; }
  .b-body .cmp-table th, .b-body .cmp-table td { padding-right: 10px; }
}

/* ── Blog home + category pages ────────────────────── */
.b-cover { position: relative; color: var(--ink); text-align: center; overflow: hidden; background: var(--bar); }
.b-cover img.b-cover-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.38; }
.b-cover-in { position: relative; padding: 110px 24px 120px; }
.b-cover-mark { display: inline-flex; align-items: center; gap: 18px; }
.b-cover-mark img { width: 84px; height: 84px; border-radius: 50%; }
.b-cover-mark .b-brand-sep { height: 64px; opacity: 0.6; }
.b-cover-mark span.word { font-size: 64px; font-weight: 400; letter-spacing: 0.12em; }
.b-cover p { font-size: 20px; margin: 18px 0 0; color: var(--ink); opacity: 0.9; }
.b-cover-cat { padding: 72px 24px 64px; }
.b-cover-cat h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; margin: 0; letter-spacing: -0.015em; }

.b-feed { max-width: var(--wide); margin: 0 auto; padding: 64px 24px 96px; }
.b-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 56px 32px; }
.b-card { grid-column: span 2; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.b-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--card); margin-bottom: 18px; }
.b-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1); }
.b-card:hover .b-card-img img { transform: scale(1.03); }
.b-card-tag { font-size: 13px; font-weight: 700; color: var(--quiet); margin-bottom: 6px; }
.b-card h2, .b-card h3 { font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--ink); margin: 0 0 10px; letter-spacing: -0.01em; }
.b-card p { font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--text); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-card-meta { font-size: 13px; color: var(--muted); margin-top: auto; }
.b-card:hover h2, .b-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
/* first card: wide, image left + text right; next two: halves */
.b-card.big { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.b-card.big .b-card-img { margin: 0; aspect-ratio: 16 / 9; }
.b-card.big h2 { font-size: 40px; line-height: 1.08; letter-spacing: -0.02em; }
.b-card.big p { font-size: 16px; -webkit-line-clamp: 5; }
.b-card.half { grid-column: span 3; }
.b-card.half h2 { font-size: 26px; }
.b-pager { display: flex; justify-content: center; gap: 12px; margin-top: 72px; font-size: 16px; }
.b-pager a { text-decoration: none; padding: 10px 18px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); }

/* ── Footer ────────────────────────────────────────── */
.b-foot { background: var(--bar); color: var(--bar-ink); }
.b-foot-in { max-width: var(--wide); margin: 0 auto; padding: 40px 24px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; font-size: 15px; }
.b-foot nav { display: flex; gap: 22px; flex-wrap: wrap; flex: 1; }
.b-foot a { text-decoration: none; opacity: 0.85; }
.b-foot a:hover { opacity: 1; }
.b-foot-copy { opacity: 0.6; }

/* ── App popup (blog-popup.js) ─────────────────────── */
.app-pop { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 360px; max-width: calc(100vw - 32px);
  background: var(--card); color: var(--ink); border-radius: 18px; padding: 20px 20px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); font-family: var(--sans);
  opacity: 0; transform: translateY(16px); transition: opacity .35s ease, transform .45s cubic-bezier(0.22, 1, 0.36, 1); }
.app-pop.in { opacity: 1; transform: none; }
.app-pop-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.app-pop-x:hover { background: rgba(245, 236, 215, 0.08); color: var(--ink); }
.app-pop-head { display: flex; align-items: center; gap: 12px; margin: 0 28px 10px 0; }
.app-pop-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.app-pop-title { margin: 0; font-weight: 800; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; }
.app-pop-text { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: #CCBEA2; }
.app-pop-btn { display: block; text-align: center; text-decoration: none; background: var(--btn); color: var(--btn-ink);
  font-weight: 800; font-size: 16px; padding: 13px 16px; border-radius: 999px; }
.app-pop-btn:hover { background: var(--btn-hover); }
@media (prefers-reduced-motion: reduce) { .app-pop { transition: opacity .2s; transform: none; } }

/* ── Narrow screens ────────────────────────────────── */
@media (max-width: 1100px) {
  .b-links { display: none; }
  .b-burger { display: block; }
  .b-menu.open { display: flex; flex-direction: column; background: var(--bar); padding: 4px 24px 20px; }
  .b-menu a { text-decoration: none; color: var(--bar-ink); font-size: 18px; font-weight: 600; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .b-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 24px; }
  .b-card, .b-card.half { grid-column: span 1; }
  .b-card.big { grid-template-columns: 1fr; gap: 18px; }
  .b-more-grid { gap: 24px; }
  .b-more-grid .b-card h3 { font-size: 19px; }
  .b-card.big h2 { font-size: 32px; }
}
@media (max-width: 640px) {
  .b-bar-in { height: 64px; padding: 0 16px; gap: 16px; }
  .b-brand-word { font-size: 22px; }
  .b-brand-blog { font-size: 18px; }
  .b-menu.open { padding: 0 16px 16px; }
  .b-post { padding: 44px 0 64px; }
  .b-tags { font-size: 14px; }
  .b-dek { font-size: 17px; }
  .b-hero { margin: 36px 0 40px; }
  .b-body { font-size: 19px; }
  .b-body h2 { font-size: 23px; }
  .b-body h3 { font-size: 21px; }
  .b-body h4 { font-size: 18px; }
  .b-body .dgf { margin-left: -12px; margin-right: -12px; }
  .b-cover-in { padding: 64px 16px 72px; }
  .b-cover-mark { gap: 12px; }
  .b-cover-mark img { width: 52px; height: 52px; }
  .b-cover-mark .b-brand-sep { height: 40px; }
  .b-cover-mark span.word { font-size: 40px; }
  .b-cover p { font-size: 17px; }
  .b-feed { padding: 40px 16px 72px; }
  .b-grid { grid-template-columns: 1fr; gap: 44px; }
  .b-card.big h2, .b-card.half h2, .b-card h2 { font-size: 24px; }
  .app-pop { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; padding: 18px 18px 16px; }
  .b-foot-in { flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px 16px; }
  .b-foot nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; width: 100%; }
  .app-pop-title { font-size: 18px; }
  .b-body .b-cta { flex-wrap: wrap; gap: 14px 16px; padding: 20px; }
  .b-cta-icon { width: 52px; height: 52px; border-radius: 12px; }
  .b-body .b-cta-title { font-size: 19px; }
  .b-body .b-cta-text { font-size: 15px; }
  .b-body .b-cta-btn { width: 100%; text-align: center; }
  .b-more-in { padding: 40px 0 72px; }
  .b-more h2 { font-size: 24px; margin-bottom: 24px; }
  .b-more-grid { grid-template-columns: 1fr; gap: 40px; }
  .b-more-grid .b-card h3 { font-size: 22px; }
}
