/* WakeUp 2day — blog, guides and 404 pages. Sits on top of styles.css (theme tokens, nav, buttons)
   and bottom.css (morning footer, back-to-top). Reading width, typographic rhythm, cards. */

.blog-body { --read: 720px; --ink: rgba(var(--text-rgb), 0.84); }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 2000;
    background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 12px;
    font-weight: 600; font-size: 14px; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
.nav-links a[aria-current="page"] { color: var(--text); }

/* ---------- shells ---------- */
.post-wrap, .index-wrap { padding: 112px 24px 96px; margin: 0 auto; }
.post-wrap { max-width: calc(var(--read) + 48px); }
.index-wrap { max-width: 1128px; }

.crumbs {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: 13px; color: var(--text3); margin-bottom: 28px;
}
.crumbs a { color: var(--text2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.post-kicker {
    font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 14px;
}

/* ---------- article header ---------- */
.post-header h1 {
    font-size: clamp(32px, 5.4vw, 46px); line-height: 1.12; font-weight: 800;
    letter-spacing: -0.03em; text-wrap: balance; margin-bottom: 18px;
}
.post-meta { font-size: 14px; color: var(--text3); margin-bottom: 36px; }

/* ---------- article body ---------- */
.post-body { font-size: 17.5px; line-height: 1.75; color: var(--ink); }
.post-body > * + * { margin-top: 1.15em; }
.post-body .lede { font-size: 20px; line-height: 1.6; color: var(--text); font-weight: 450; }
.post-body h2 {
    font-size: clamp(23px, 3.4vw, 28px); line-height: 1.25; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text); margin-top: 2.1em; scroll-margin-top: 92px; text-wrap: balance;
}
.post-body h3 {
    font-size: 19px; line-height: 1.35; font-weight: 700; color: var(--text);
    margin-top: 1.7em; scroll-margin-top: 92px;
}
.post-body h2 + *, .post-body h3 + * { margin-top: 0.6em; }
.post-body a {
    color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px;
    text-underline-offset: 3px; text-decoration-color: rgba(var(--accent-rgb), 0.45);
}
.post-body a:hover { text-decoration-color: currentColor; }
.post-body strong { color: var(--text); font-weight: 650; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: 0.45em; }
.post-body li::marker { color: var(--accent); font-weight: 700; }
.post-body blockquote {
    border-left: 3px solid var(--border-strong); padding: 2px 0 2px 20px; color: var(--text2); font-style: italic;
}

/* key takeaways + contents */
.takeaways, .toc {
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 18px; padding: 22px 26px;
}
.takeaways { border-left: 3px solid var(--accent); }
.post-body .takeaways h2, .post-body .toc h2 {
    font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
    color: var(--text2); margin: 0 0 12px;
}
.takeaways ul { padding-left: 1.2em; }
.takeaways li { font-size: 16px; line-height: 1.6; color: var(--text); }
.toc { background: transparent; }
.toc ol { padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { font-size: 15px; line-height: 1.5; break-inside: avoid; }
.toc li + li { margin-top: 0.4em; }
.post-body .toc a { color: var(--text2); text-decoration: none; }
.post-body .toc a:hover { color: var(--accent); }

/* app tip + note */
.app-tip, .note { border-radius: 16px; padding: 18px 22px; font-size: 16px; line-height: 1.65; }
.app-tip {
    background: rgba(var(--accent-rgb), 0.09); border: 1px solid rgba(var(--accent-rgb), 0.22);
    color: var(--text);
}
.app-tip strong { color: var(--accent); }
.note { background: var(--glass-bg-strong); border: 1px solid var(--border-strong); color: var(--text2); }
.app-tip p + p, .note p + p { margin-top: 0.7em; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-strong); border-radius: 14px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; min-width: 440px; }
.post-body th, .post-body td { text-align: left; padding: 12px 16px; vertical-align: top; }
.post-body thead th { background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; }
.post-body tbody tr + tr td, .post-body tbody tr + tr th { border-top: 1px solid var(--border); }
.post-body tbody th { color: var(--text); font-weight: 600; }

/* screenshots */
.shot { margin: 2em auto; text-align: center; }
.shot img {
    display: block; margin: 0 auto; height: auto; max-width: 100%;
    border-radius: 28px; border: 1px solid var(--border-strong);
    box-shadow: 0 24px 60px rgba(var(--shadow-color), 0.35);
}
.shot-phone img { width: 270px; }
.shot-watch img { width: 200px; border-radius: 36px; }
.shot figcaption { margin-top: 14px; font-size: 14px; color: var(--text3); }

/* citations, sources, faq, disclaimer */
.cite { font-size: 0.7em; line-height: 0; margin-left: 1px; }
.post-body .cite a { text-decoration: none; font-weight: 700; padding: 0 2px; }
.faq-item { padding: 18px 0; border-top: 1px solid var(--border-strong); margin-top: 0; }
.post-body .faq-item h3 { margin-top: 0; font-size: 18px; }
.faq-item p { color: var(--ink); margin-top: 0.45em; }
.post-body .faq h2 { margin-bottom: 0.7em; }
.sources ol { padding-left: 1.4em; }
.sources li { font-size: 14.5px; line-height: 1.6; color: var(--text2); scroll-margin-top: 92px; }
.post-body .sources a { word-break: break-word; }
.sources li:target { color: var(--text); }
.disclaimer {
    font-size: 14px; line-height: 1.6; color: var(--text3);
    border-top: 1px solid var(--border-strong); padding-top: 20px; margin-top: 2.4em;
}

/* ---------- download call-to-action ---------- */
.post-cta {
    display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
    margin-top: 56px; padding: 28px; border-radius: 24px;
    background:
        radial-gradient(120% 140% at 100% 100%, rgba(var(--accent-rgb), 0.22), transparent 60%),
        var(--surface);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}
.post-cta img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 10px 30px rgba(var(--shadow-color), 0.35); }
.post-cta h2 { font-size: 21px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.post-cta p { font-size: 15px; line-height: 1.55; color: var(--text2); }
.post-cta .btn { white-space: nowrap; }

/* ---------- cards ---------- */
.related { margin-top: 72px; }
.related > h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-wrap .post-grid { grid-template-columns: 1fr; }
.post-card {
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px;
    transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}
.post-card:hover {
    transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 16px 40px rgba(var(--shadow-color), 0.22);
}
.post-card-link { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px; text-decoration: none; color: inherit; }
.post-card-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-card-title { font-size: 19px; line-height: 1.3; font-weight: 750; letter-spacing: -0.015em; color: var(--text); text-wrap: balance; }
.post-card-excerpt { font-size: 15px; line-height: 1.55; color: var(--text2); flex: 1; }
.post-card-meta { font-size: 13px; color: var(--text3); }
.post-card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 20px; }

/* ---------- index pages ---------- */
.index-header { max-width: 760px; margin-bottom: 56px; }
.index-header h1 {
    font-size: clamp(36px, 6vw, 56px); line-height: 1.06; font-weight: 800; letter-spacing: -0.035em;
    text-wrap: balance; margin-bottom: 16px;
}
.index-sub { font-size: 19px; line-height: 1.6; color: var(--text2); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cat-chips a {
    font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none;
    padding: 9px 16px; border-radius: 999px; background: var(--glass-bg-strong); border: 1px solid var(--border-strong);
    transition: border-color 0.2s, color 0.2s;
}
.cat-chips a:hover { border-color: var(--accent); color: var(--accent); }
.index-section { margin-bottom: 64px; }
.index-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 22px; }
.index-section-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; scroll-margin-top: 92px; }
.index-section-head p { font-size: 15px; color: var(--text2); }
.index-section-head a { color: var(--accent); text-decoration: none; font-weight: 600; }
.index-section-head a:hover { text-decoration: underline; }
.index-wrap .post-cta { max-width: 860px; margin-left: auto; margin-right: auto; }
.notfound { min-height: 62vh; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .post-wrap, .index-wrap { padding: 96px 20px 72px; }
    .post-body { font-size: 17px; }
    .post-body .lede { font-size: 18.5px; }
    .toc ol { columns: 1; }
    .post-grid { grid-template-columns: 1fr; }
    .post-cta { grid-template-columns: auto 1fr; padding: 22px; }
    .post-cta .btn { grid-column: 1 / -1; justify-content: center; }
    .post-cta img { width: 56px; height: 56px; border-radius: 13px; }
    .takeaways, .toc { padding: 18px 20px; }
    .shot-phone img { width: 230px; }
}
@media (prefers-reduced-motion: reduce) {
    .post-card, .skip-link { transition: none; }
    .post-card:hover { transform: none; }
}
@media print {
    .nav, .site-footer, .to-top, .post-cta, .related, .toc, .skip-link { display: none !important; }
    .post-wrap { padding: 0; max-width: none; }
    .blog-body { background: #fff; color: #000; }
}
.shot-wide img { width: 100%; max-width: 640px; border-radius: 20px; }
