/* Blog article detail — structure matches Mac article pages; tokens match this site. */

.read-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    z-index: 1001;
    width: 0;
    background: linear-gradient(90deg, var(--orange), #ffc36b);
    transition: width 0.1s linear;
}

.post-wrap {
    width: min(1100px, calc(100% - 48px));
    margin-inline: auto;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.revealed { opacity: 1; transform: none; }

.post-masthead {
    padding: 36px 0 40px;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 176, 92, 0.22), transparent 58%),
        linear-gradient(180deg, var(--cream) 0%, var(--page) 88%);
    border-bottom: 1px solid var(--line);
}

.post-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--muted);
}
.post-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}
.post-breadcrumb a:hover { color: var(--ink); }
.post-breadcrumb .bc-current { color: var(--ink); font-weight: 550; }

.post-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 10px;
    border-radius: var(--pill);
    background: var(--orange-soft);
    color: #9a5b12;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.post-date-inline {
    font-size: 13px;
    color: var(--muted);
}

.post-masthead h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.18;
    text-wrap: balance;
}

.post-lead {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}
.post-meta-bar .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.post-meta-bar svg { flex-shrink: 0; opacity: 0.7; }

.tag-pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: var(--pill);
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.post-body-section { padding: 48px 0 72px; }

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

@media (min-width: 1080px) {
    .post-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 48px;
    }
}

.article-content {
    min-width: 0;
    color: #3c4048;
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: break-word;
}

.article-content h2 {
    margin: 40px 0 14px;
    padding-left: 12px;
    border-left: 3px solid var(--orange);
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.35;
}

.article-content h3 {
    margin: 28px 0 10px;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 700;
}

.article-content p { margin: 0 0 16px; }
.article-content strong { color: var(--ink); font-weight: 650; }
.article-content a {
    color: #b65a00;
    text-underline-offset: 3px;
}
.article-content a:hover { color: var(--ink); }

.article-content code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--soft);
    border: 1px solid var(--line);
    font-family: "SF Mono", "Fira Code", Consolas, monospace;
    font-size: 0.9em;
}

.article-content pre {
    margin: 20px 0;
    padding: 18px 20px;
    overflow-x: auto;
    border-radius: 16px;
    background: #1b1d22;
}
.article-content pre code {
    padding: 0;
    border: 0;
    background: none;
    color: #ece8e1;
    font-size: 0.86rem;
    line-height: 1.7;
}

.article-content ul,
.article-content ol {
    margin: 12px 0 20px;
    padding-left: 1.4em;
}
.article-content li { margin-bottom: 6px; }

.callout {
    margin: 24px 0;
    padding: 16px 18px;
    border-radius: 0 16px 16px 0;
    border-left: 3px solid var(--orange);
    background: var(--orange-soft);
}
.callout.tip {
    border-left-color: var(--green);
    background: var(--green-soft);
}
.callout.warning {
    border-left-color: var(--red);
    background: var(--red-soft);
}
.callout-title {
    margin-bottom: 6px;
    color: #9a5b12;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.callout.tip .callout-title { color: var(--green); }
.callout.warning .callout-title { color: var(--red); }
.callout p { margin: 0; font-size: 0.94rem; }

.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.metric-card {
    padding: 18px 14px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}
.metric-val,
.metric-card .m-value {
    display: block;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.metric-label,
.metric-card .m-label {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    padding: 0;
}
.step-item {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.step-num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.step-body { min-width: 0; }
.step-body strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}
.step-body p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.data-table-wrap {
    margin: 24px 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.data-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table thead tr { background: var(--ink); }
.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--line); }
.data-table tbody tr:last-child { border-bottom: 0; }
.data-table tbody tr:nth-child(even) { background: var(--soft); }
.data-table tbody td {
    padding: 12px 16px;
    color: #444;
    vertical-align: top;
    line-height: 1.55;
}
.data-table .highlight-val {
    color: var(--ink);
    font-weight: 700;
}

.post-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 1080px) {
    .post-aside { position: sticky; top: 88px; }
}

.panel-card {
    padding: 20px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.toc-title {
    margin-bottom: 12px;
    color: #8a6a3d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.toc-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    text-decoration: none;
}
.toc-link:hover { background: var(--soft); color: var(--ink); }
.toc-link.active {
    background: var(--orange-soft);
    color: var(--ink);
    font-weight: 650;
}
.toc-num {
    flex-shrink: 0;
    min-width: 20px;
    color: #c47a20;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-cta {
    overflow: hidden;
    background: var(--ink);
    border-radius: 18px;
}
.sidebar-cta-inner { padding: 22px 20px; }
.sidebar-cta-badge {
    display: inline-flex;
    margin-bottom: 10px;
    color: #ffc36b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sidebar-cta h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.4;
}
.sidebar-cta p {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    line-height: 1.65;
}
.sidebar-cta .feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
}
.sidebar-cta .feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}
.feature-check {
    position: relative;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 137, 28, 0.35);
}
.feature-check::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 4px;
    width: 4px;
    height: 7px;
    border: solid #ffc36b;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 14px;
}
.price-val {
    color: #fff;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.price-unit {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}
.btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--orange);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}
.btn-cta:hover { background: var(--orange-hover); color: #fff; }

.article-cta-section {
    position: relative;
    margin-top: 48px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 80% at 20% 0%, rgba(255, 137, 28, 0.28), transparent 55%),
        var(--ink);
    border-radius: 22px;
}
.article-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    padding: 36px 32px;
}
.article-cta-inner > div:first-child { flex: 1; min-width: 240px; }

.article-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #ffc36b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.article-cta-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.25); }
}

.article-cta-inner h2 {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    color: #fff;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    line-height: 1.3;
}
.article-cta-inner > div:first-child > p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.94rem;
    line-height: 1.75;
}
.cta-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
}
.cta-price-val {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.cta-price-unit {
    color: rgba(255, 255, 255, 0.42);
    font-size: 14px;
}
.cta-btn-group { display: flex; flex-wrap: wrap; gap: 10px; }

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--orange);
    color: #fff !important;
    font-size: 15px;
    font-weight: 650;
    text-decoration: none !important;
}
.btn-cta-primary:hover { background: var(--orange-hover); color: #fff !important; }

.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    text-decoration: none;
}
.btn-cta-secondary:hover { background: rgba(255, 255, 255, 0.06); }

.cta-spec-card {
    min-width: 220px;
    padding: 20px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cta-spec-card .spec-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}
.cta-spec-card .spec-row:last-child { border-bottom: 0; }
.cta-spec-card .spec-label { color: rgba(255, 255, 255, 0.45); }
.cta-spec-card .spec-val { color: #fff; font-weight: 650; }
.cta-spec-card .spec-val.highlight { color: #ffc36b; }

.floating-cta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    width: 260px;
    overflow: hidden;
    background: var(--ink);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.floating-cta.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.floating-cta-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    cursor: pointer;
}
.floating-cta-inner { padding: 20px 18px; }
.floating-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: #ffc36b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: pulse-dot 2s ease-in-out infinite;
}
.floating-cta h4 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.4;
}
.fc-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 12px;
}
.fc-price-val {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
}
.fc-price-unit {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}
.fc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--orange);
    color: #fff !important;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none !important;
}
.fc-btn:hover { background: var(--orange-hover); color: #fff !important; }
.fc-features { display: flex; flex-wrap: wrap; gap: 5px; }
.fc-feature-tag {
    padding: 3px 8px;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-weight: 650;
}

.related-section {
    padding: 56px 0 80px;
    background: var(--cream);
    border-top: 1px solid var(--line);
}
.section-head {
    max-width: 560px;
    margin: 0 auto 32px;
    text-align: center;
}
.section-head .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #9a5b12;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.section-head .eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
}
.section-head h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.55rem;
    letter-spacing: -0.03em;
}
.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .related-grid { grid-template-columns: repeat(3, 1fr); }
}

.clean-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.clean-card:hover { box-shadow: var(--shadow-hover); }

.related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.related-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}
.related-card-body .cat-chip {
    align-self: flex-start;
    margin-bottom: 10px;
}
.related-card h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.4;
}
.related-card p {
    flex: 1;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

@media (max-width: 767px) {
    .post-wrap { width: min(1100px, calc(100% - 32px)); }
    .post-masthead { padding-top: 28px; }
    .article-cta-inner { padding: 28px 22px; }
    .cta-spec-card { width: 100%; min-width: 0; }
    .floating-cta {
        right: 16px;
        bottom: 16px;
        width: calc(100vw - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .pulse-dot, .article-cta-eyebrow .dot { animation: none; }
}
