/* drifty blog reader. Loaded with assets/blog-reader.js on exported blog
   articles only (next-site/src/lib/blog-reader.ts). Rules that change layout
   before the script runs are kept static so the article does not move. */
:root {
  --br-header: 64px;
  --br-olive: var(--olive, #778647);
  --br-olive-dark: var(--olive-dark, #465126);
  --br-olive-soft: var(--olive-soft, #eef2dc);
  --br-cta: var(--olive-cta, #5b6735);
  --br-line: var(--line, rgba(0, 0, 0, .09));
  --br-ink: var(--ink, rgba(0, 0, 0, .875));
  --br-muted: var(--muted, rgba(0, 0, 0, .608));
  --br-soft: var(--soft, rgba(0, 0, 0, .56));
  --br-panel: #f4f4f1;
  --br-font: "Pretendard Variable", Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.br-hidden { display: none !important; }

/* Contents toggle: reserve its space before the script inserts it. */
.article .article-inner > .prose { margin-top: 80px; }
.article .article-inner > .br-contents + .prose { margin-top: 0; }
.br-contents { margin: -16px 0 44px; border: 1px solid var(--br-line); border-radius: 14px; background: #fff; font-family: var(--br-font); }
.br-contents > summary { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 14px 16px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 600; line-height: 22px; color: var(--br-ink); }
.br-contents > summary::-webkit-details-marker { display: none; }
.br-contents > summary small { font-size: 13px; font-weight: 450; color: var(--br-soft); }
.br-contents > summary svg { margin-left: auto; color: var(--br-soft); transition: transform .18s ease; }
.br-contents[open] > summary svg { transform: rotate(180deg); }
.br-contents > summary:focus-visible { outline: 2px solid var(--br-olive); outline-offset: 2px; border-radius: 14px; }
.br-contents__list { margin: 0; padding: 2px 16px 14px; list-style: none; font-size: 14.5px; line-height: 1.45; }
.br-contents__list li { margin: 0; padding: 7px 0 7px 12px; border-left: 2px solid var(--br-line); }
.br-contents__list a { color: var(--br-ink); text-decoration: none; border: 0; }
.br-contents__list a:hover { color: var(--br-olive-dark); }
.br-contents__list a.is-active { color: var(--br-olive-dark); font-weight: 600; }

/* Section headings: larger, separated, with a number badge in reserved space. */
.article .prose > h2 { position: relative; margin: 72px 0 18px; padding-top: 58px; border-top: 1px solid var(--br-line); font-size: 27px; line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; scroll-margin-top: calc(var(--br-header) + 24px); }
.article .prose > h2[data-br-num]::before { content: attr(data-br-num); position: absolute; top: 30px; left: 0; font-family: var(--br-font); font-size: 12.5px; font-weight: 700; line-height: 1; letter-spacing: .02em; color: var(--br-olive); font-variant-numeric: tabular-nums; }
.article .prose > h2.br-h--faq, .article .prose > h2.br-h--utility, .article .prose > h2.br-h--related, .article .prose > h2.br-h--summary { font-size: 22px; }
.article .prose > h2.br-h--ranked { margin-top: 10px; padding-top: 0; border-top: 0; }
.article .prose > h3 { margin-top: 40px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.br-h__prefix { display: none; }

/* Comparison tables */
.article .prose .br-table { margin: 28px 0 40px; overflow: hidden; border: 1px solid var(--br-line); border-radius: 16px; background: #fff; }
.article .prose .br-table table { display: table; width: 100%; margin: 0; border: 0; border-radius: 0; border-collapse: collapse; background: transparent; font-size: 14.5px; line-height: 1.55; overflow: visible; }
.article .prose .br-table thead th, .article .prose .br-table tr.br-table__head > th { padding: 13px 16px; border: 0; border-bottom: 1px solid var(--br-line); background: var(--br-panel); text-align: left; vertical-align: bottom; font-family: var(--br-font); font-size: 12.5px; font-weight: 600; line-height: 1.4; letter-spacing: .01em; text-transform: none; color: var(--br-muted); }
.article .prose .br-table td, .article .prose .br-table tbody th { padding: 15px 16px; border: 0; border-bottom: 1px solid var(--br-line); text-align: left; vertical-align: top; font-size: 14.5px; line-height: 1.55; color: rgba(0, 0, 0, .72); }
.article .prose .br-table tbody tr:last-child > * { border-bottom: 0; }
.article .prose .br-table td p, .article .prose .br-table th p { margin: 0; }
.article .prose .br-table td p + p { margin-top: .5em; }
.article .prose .br-table td b, .article .prose .br-table td strong { display: inline; margin: 0; font-size: inherit; font-weight: 600; }
.article .prose .br-table td small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--br-soft); }
.article .prose .br-table .br-table__first { width: 21%; font-weight: 600; color: var(--br-ink); }
.article .prose .br-table th.br-table__ours { background: var(--br-olive-soft); color: var(--br-olive-dark); }
.article .prose .br-table td.br-table__ours, .article .prose .br-table tr.br-table__ours-row > td { background: rgba(238, 242, 220, .5); color: var(--br-ink); }
.article .prose .br-table tr.br-table__ours-row > td.br-table__first { color: var(--br-olive-dark); }
@media (max-width: 640px) {
  .article .prose .br-table table, .article .prose .br-table tbody, .article .prose .br-table tr, .article .prose .br-table td { display: block; width: auto; min-width: 0; }
  .article .prose .br-table thead, .article .prose .br-table tr.br-table__head { display: none; }
  .article .prose .br-table tr { padding: 16px; border-bottom: 1px solid var(--br-line); }
  .article .prose .br-table tbody tr:last-child { border-bottom: 0; }
  .article .prose .br-table td { padding: 0; border: 0; }
  .article .prose .br-table td.br-table__first { width: auto; margin-bottom: 8px; font-size: 15.5px; background: none; }
  .article .prose .br-table td:not(.br-table__first) { padding: 9px 11px; border-radius: 10px; background: #f6f6f4; }
  .article .prose .br-table td + td:not(.br-table__first) { margin-top: 6px; }
  .article .prose .br-table td.br-table__ours:not(.br-table__first), .article .prose .br-table tr.br-table__ours-row > td:not(.br-table__first) { background: #eef2dc; }
  .article .prose .br-table tr.br-table__ours-row { background: #f8f9f1; }
  .article .prose .br-table td[data-br-label]:not(.br-table__first)::before { content: attr(data-br-label); display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 650; color: var(--br-soft); }
  .article .prose .br-table td.br-table__ours::before { color: var(--br-olive-dark); }
}

/* Quick answer */
.article .prose .br-quick { display: block; margin: 36px 0 44px; padding: 22px 24px 20px; border: 1px solid rgba(119, 134, 71, .22); border-radius: 16px; background: #f3f5ea; box-shadow: none; }
.article .prose .br-quick--after { margin-top: 16px; }
.article .prose .br-quick__label, .article .prose .br-quick--native > .label, .article .prose .br-quick--native > strong:first-child { display: block; margin: 0; padding: 0; border: 0; background: none; font-family: var(--br-font); font-size: 12px; font-weight: 650; line-height: 1.5; letter-spacing: .06em; text-transform: uppercase; color: var(--br-olive-dark); }
.article .prose .br-quick p { margin: 10px 0 0; font-size: 17px; line-height: 1.65; color: var(--br-ink); }
.article .prose .br-quick a.br-quick__jump { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 0; border: 0; font-size: 14px; font-weight: 600; color: var(--br-olive-dark); }

/* FAQ accordion */
.br-faq { margin-top: 8px; border-top: 1px solid var(--br-line); }
.br-faq__item { border-bottom: 1px solid var(--br-line); }
.br-faq__item > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; list-style: none; cursor: pointer; }
.br-faq__item > summary::-webkit-details-marker { display: none; }
.br-faq__item > summary:focus-visible { outline: 2px solid var(--br-olive); outline-offset: 2px; border-radius: 6px; }
.article .prose .br-faq__item > summary h3 { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; }
.br-faq__item > summary svg { flex: none; color: var(--br-soft); transition: transform .18s ease; }
.br-faq__item[open] > summary svg { transform: rotate(180deg); }
.br-faq__answer { padding: 0 2px 20px; color: rgba(0, 0, 0, .72); }
.article .prose .br-faq__answer > * { margin: 0; }
.article .prose .br-faq__answer > * + * { margin-top: .8em; }

/* Reading progress */
.br-progress { position: fixed; z-index: 49; top: var(--br-header); left: 0; right: 0; height: 2px; background: rgba(0, 0, 0, .04); pointer-events: none; }
.br-progress i { display: block; height: 100%; background: var(--br-olive); transform: scaleX(0); transform-origin: 0 50%; }

/* Bottom contents bar and sheet for narrow screens */
.br-bar, .br-sheet { display: none; }
@media (max-width: 1239px) {
  .br-bar { display: flex; position: fixed; z-index: 45; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border: 1px solid var(--br-line); border-radius: 16px; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px rgba(0, 0, 0, .09); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); visibility: hidden; transform: translateY(calc(100% + 28px)); transition: transform .25s ease, visibility 0s linear .25s; font-family: var(--br-font); }
  html.br-in-body .br-bar { visibility: visible; transform: none; transition: transform .25s ease, visibility 0s; }
  .br-sheet { display: block; }
}
.br-bar__now { flex: 1; min-width: 0; }
.br-bar__now small { display: block; font-size: 11px; color: var(--br-soft); }
.br-bar__now b { display: block; overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: var(--br-ink); }
.br-bar__button { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 11px; background: #161616; color: #fff; font: 600 13.5px var(--br-font); cursor: pointer; }
.br-sheet { position: fixed; z-index: 70; inset: 0; visibility: hidden; background: rgba(0, 0, 0, .32); opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s; font-family: var(--br-font); }
.br-sheet.is-open { visibility: visible; opacity: 1; transition: opacity .2s ease, visibility 0s; }
.br-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 72vh; overflow: auto; padding: 0 20px 28px; border-radius: 20px 20px 0 0; background: #fff; transform: translateY(100%); transition: transform .25s ease; overscroll-behavior: contain; }
.br-sheet.is-open .br-sheet__panel { transform: none; }
.br-sheet__head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 0 10px; background: #fff; font-size: 16px; }
.br-sheet__close { display: inline-flex; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--br-soft); cursor: pointer; }
.br-sheet__list { margin: 0; padding: 0; list-style: none; }
.br-sheet__list li { border-bottom: 1px solid var(--br-line); }
.br-sheet__list a { display: block; padding: 12px 0; font-size: 15px; color: var(--br-ink); text-decoration: none; }
.br-sheet__list a.is-active { font-weight: 650; color: var(--br-olive-dark); }

/* Covers for next and related posts */
.br-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 12px; background: #eceee4; }
.br-cover img { position: absolute; left: 9%; top: 11%; width: 100%; max-width: none; height: auto; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 14px 34px rgba(40, 50, 20, .16); }

/* Read next */
.article .br-next { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: center; margin: 64px 0 0; padding: 16px; border: 1px solid var(--br-line); border-radius: 20px; background: #fff; color: var(--br-ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.article .br-next:hover { border-color: rgba(119, 134, 71, .42); box-shadow: 0 12px 32px rgba(0, 0, 0, .06); }
.article .br-next:focus-visible { outline: 2px solid var(--br-olive); outline-offset: 3px; }
.br-next__text { display: block; min-width: 0; }
.br-next__label { display: block; font-family: var(--br-font); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--br-olive-dark); }
.br-next__title { display: block; margin: 6px 0; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.br-next__desc { display: -webkit-box; margin: 0 0 12px; overflow: hidden; font-size: 14.5px; line-height: 1.55; color: var(--br-muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.br-next__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--br-soft); }
.br-next__go { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--br-olive-dark); }

/* Related posts */
.br-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.article .br-card { display: block; color: var(--br-ink); text-decoration: none; border: 0; }
.br-card .br-cover { margin-bottom: 12px; transition: transform .2s ease; }
.br-card:hover .br-cover { transform: translateY(-2px); }
.br-card small { display: block; margin-bottom: 4px; font-size: 12px; color: var(--br-soft); }
.br-card b { display: block; font-size: 15px; font-weight: 600; line-height: 1.38; letter-spacing: -0.01em; }
.br-card:focus-visible { outline: 2px solid var(--br-olive); outline-offset: 4px; border-radius: 12px; }
.br-related__more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--br-line); font-size: 13.5px; }
.br-related__more span { font-size: 12px; font-weight: 600; color: var(--br-soft); }
.br-related__more a { color: var(--br-olive-dark); font-weight: 560; text-decoration: none; border-bottom: 1px solid rgba(70, 81, 38, .28); }

@media (max-width: 720px) {
  .article .prose > h2 { margin-top: 60px; font-size: 23px; }
  .article .prose > h2.br-h--faq, .article .prose > h2.br-h--utility, .article .prose > h2.br-h--related, .article .prose > h2.br-h--summary { font-size: 20px; }
  .article .br-next { grid-template-columns: 1fr; gap: 16px; }
  .br-related__grid { grid-template-columns: 1fr; gap: 14px; }
  .article .br-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
  .br-card .br-cover { grid-row: span 2; margin: 0; }
  .br-card small { align-self: end; margin: 0; }
  .br-card b { align-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .br-bar, .br-sheet, .br-sheet__panel, .br-cover, .br-card .br-cover, .br-contents > summary svg, .br-faq__item > summary svg, .article .br-next { transition: none; }
}

@media print {
  .br-progress, .br-bar, .br-sheet, .br-contents, .br-next, .br-related { display: none !important; }
  .br-faq__answer { display: block !important; }
}

