.read-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 40; background: transparent; }
.read-progress-bar { height: 3px; width: 0; background: #1875f3; }

.post-masthead {
  width: min(var(--frame), calc(100% - 44px));
  margin: 18px auto 0;
  padding: 36px 40px 40px;
  border-radius: 36px;
  background:
    radial-gradient(360px 180px at 100% 0%, rgba(215, 243, 236, 0.9), transparent 68%),
    radial-gradient(240px 160px at 0% 100%, rgba(246, 234, 211, 0.7), transparent 72%),
    linear-gradient(155deg, #d4eaf8 0%, #e8f4fb 60%, #f6fafc 100%);
}
.post-breadcrumb { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.post-breadcrumb a { color: inherit; text-decoration: none; }
.post-breadcrumb a:hover { color: var(--ink); }
.post-meta-top { margin-top: 22px; color: var(--muted); font-size: 14px; letter-spacing: 0.06em; }
.post-masthead h1 { margin-top: 12px; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.2; font-weight: 500; overflow-wrap: anywhere; }
.post-lead { margin-top: 16px; color: var(--muted); max-width: min(36em, 100%); line-height: 1.7; overflow-wrap: anywhere; }

.post-body-section {
  width: min(var(--frame), calc(100% - 44px));
  margin: 0 auto;
  padding: 40px 40px 8px;
}
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 28px;
  align-items: start;
  min-width: 0;
}
.article-content { min-width: 0; overflow-wrap: anywhere; }
.article-content p { margin-top: 16px; line-height: 1.85; }
.article-content h2 { margin-top: 48px; font-size: 26px; font-weight: 500; }
.article-content h2:first-child { margin-top: 0; }
.post-aside { position: sticky; top: 88px; }
.toc-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.toc-link { display: block; text-decoration: none; color: var(--muted); font-size: 14px; line-height: 1.45; }
.toc-link:hover,
.toc-link.is-on { color: var(--ink); }

body[data-root="../../"] #lang-pick { display: none; }
.sidebar-cta {
  margin-top: 22px;
  padding: 16px 14px 14px;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(140px 70px at 100% 0%, rgba(215, 243, 236, 0.95), transparent 72%),
    linear-gradient(165deg, #d7eef8 0%, #eef7fb 100%);
  box-shadow: none;
}
.sidebar-cta p {
  margin: 0 0 12px;
  color: var(--price);
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.sidebar-cta .btn {
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #4c9af6 0%, #1875f3 55%, #1468dc 100%);
  box-shadow: none;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
.sidebar-cta .btn:hover { color: #fff; filter: brightness(1.05); }

.cta-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 64px;
  padding: 28px 32px;
  border-radius: 28px;
  border-top: 0;
  background:
    radial-gradient(280px 120px at 0% 100%, rgba(246, 234, 211, 0.8), transparent 70%),
    linear-gradient(155deg, #d4eaf8 0%, #eef6fb 100%);
}
.cta-band h2 { margin: 0; font-size: 28px; }
.cta-price, .sidebar-cta p, .floating-cta p { color: var(--price); }
.cta-price { margin-top: 6px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.related-notes {
  width: min(var(--frame), calc(100% - 44px));
  margin: 36px auto 80px;
  padding: 0 40px;
}
.related-notes h2 { margin: 0 0 22px; font-size: 28px; font-weight: 500; }
.related-card {
  display: grid;
  gap: 8px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.related-card small { color: var(--muted); }
.related-card strong { font-size: clamp(22px, 2vw, 28px); font-weight: 500; overflow-wrap: anywhere; }
.related-card span { color: var(--muted); max-width: 38em; line-height: 1.7; }
.related-card:hover strong { color: #0f62d6; }

.floating-cta {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: max-content;
  max-width: calc(100vw - 36px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.fc-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(22, 50, 74, 0.1);
  box-shadow: 0 10px 28px rgba(22, 50, 74, 0.08);
  backdrop-filter: blur(16px);
}
.floating-cta p {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(180deg, #4c9af6 0%, #1875f3 55%, #1468dc 100%);
}
#floatingCtaClose {
  margin: 0 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.post-meta-bar { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.article-content h3 { margin-top: 28px; font-size: 18px; font-weight: 500; }
.article-content pre {
  margin-top: 16px;
  max-width: 100%;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.article-content a,
.article-content code { overflow-wrap: anywhere; }
.article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-content p code,
.article-content li code { font-size: 0.92em; }
.data-table-wrap { margin-top: 16px; max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.data-table th,
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.data-table th { font-weight: 500; color: var(--ink); }
.callout, .tip, .warning {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.7;
}
.callout { background: rgba(255, 255, 255, 0.55); }
.tip { background: rgba(215, 243, 236, 0.55); }
.warning { background: rgba(246, 234, 211, 0.72); }
.step-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.step-item { padding-left: 2px; line-height: 1.7; }
.step-item strong { font-weight: 500; }

@media (max-width: 900px) {
  .post-masthead,
  .post-body-section,
  .related-notes { min-width: 0; }
  .post-masthead { margin: 12px auto 0; padding: 28px 18px 32px; }
  .post-body-section { padding: 28px 18px 8px; }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .post-aside { position: static; min-width: 0; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 24px 18px; min-width: 0; }
  .related-notes { margin: 28px auto 56px; padding: 0 18px; }
  .floating-cta {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
  }
  .fc-bar { max-width: 100%; flex-wrap: wrap; }
  .floating-cta p { white-space: normal; }
}
