/* Peak Interval site styles, shared by the blog and the utility pages.
   Same tokens as the landing page (index.html): every colour comes from the
   app's timer screens. Green = work, coral = rest, yellow = round rest,
   navy = the app background. One committed dark look. */
:root {
  color-scheme: dark;
  --work: #7dd3a0;
  --rest: #f2918b;
  --round: #ffcb6b;
  --navy: #1a2240;
  --navy-2: #232c4f;
  --navy-3: #2b3560;
  --ink: #111830;
  --paper: #f3f5fa;
  --muted: #b4bbd0;
  --line: rgba(243, 245, 250, 0.14);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--navy); color: var(--paper); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--work); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 112%; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }

/* Header: a green strip, the "work" colour, same as the landing hero */
.site-top { background: var(--work); color: var(--ink); }
.site-top .in { max-width: 1160px; margin-inline: auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
@media (min-width: 760px) { .site-top .in { padding-inline: 40px; } }
.site-top .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.15rem/1 var(--display); font-stretch: 112%; letter-spacing: -0.01em; }
.site-top .brand img { width: 36px; height: 36px; border-radius: 10px; }
.site-top nav { display: flex; align-items: center; gap: 22px; }
.site-top nav a { color: var(--ink); font: 700 0.95rem/1 var(--display); text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.site-top nav a:hover, .site-top nav a.active { border-bottom-color: currentColor; }
.site-top nav a.get { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; border: 0; }
.site-top nav a.get:hover { background: #1d2747; }
.site-top .brand, .site-top nav a { white-space: nowrap; }
@media (max-width: 480px) { .site-top .in { padding-block: 14px; } .site-top nav { gap: 14px; } .site-top nav a.home { display: none; } .site-top nav a.get { padding: 9px 13px; } }
@media (max-width: 400px) { .site-top nav a[href="/contact"] { display: none; } .site-top .brand img { width: 32px; height: 32px; } }
@media (max-width: 350px) { .site-top .in { flex-wrap: wrap; row-gap: 10px; } .site-top .brand { font-size: 1rem; } }

/* Footer: same as the landing page */
.site-foot { margin-top: 96px; padding: 36px 0 44px; border-top: 1px solid rgba(243, 245, 250, 0.12); color: var(--muted); font-size: 0.9rem; }
.site-foot .in { max-width: 1160px; margin-inline: auto; padding-inline: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
@media (min-width: 760px) { .site-foot .in { padding-inline: 40px; } }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { color: var(--paper); }

/* Shared buttons */
a.cta-button, .btn, button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--work); color: var(--ink) !important; text-decoration: none !important; font: 700 1.02rem/1.1 var(--display); font-stretch: 105%; padding: 14px 22px; border: 0; border-radius: 14px; cursor: pointer; transition: transform .15s ease, background .15s ease; }
a.cta-button:hover, .btn:hover, button[type="submit"]:hover { transform: translateY(-2px); background: #8fdcb0; }

/* Page title block used by blog index, categories and posts */
.page-head { max-width: 1160px; margin-inline: auto; padding: 72px 20px 8px; }
@media (min-width: 760px) { .page-head { padding-inline: 40px; } }
.page-head .kicker { display: inline-block; font: 700 0.8rem/1 var(--display); font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--work); margin-bottom: 18px; text-decoration: none; }
.page-head h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 0.95; }
.page-head p { margin: 22px 0 0; max-width: 40em; color: var(--muted); font-size: 1.15rem; }

/* ---------- Blog index ---------- */
.blog-index { max-width: 1160px; margin-inline: auto; padding: 40px 20px 0; }
@media (min-width: 760px) { .blog-index { padding-inline: 40px; } }
.category-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 576px) { .category-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .category-cards { grid-template-columns: repeat(3, 1fr); } }
.category-card { border-radius: 22px; overflow: hidden; background: var(--navy-2); transition: transform .15s ease, background .15s ease; }
.category-card:hover { transform: translateY(-3px); background: var(--navy-3); }
.category-link { display: flex; flex-direction: column; height: 100%; color: var(--paper); text-decoration: none; }
.category-image, .category-card .placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.category-card .placeholder { background: linear-gradient(135deg, var(--navy-3), #34407a); display: flex; align-items: center; justify-content: center; font: 800 1.3rem/1.1 var(--display); }
.category-label { display: block; padding: 18px 20px 20px; font: 800 1.3rem/1.1 var(--display); font-stretch: 110%; letter-spacing: -0.015em; }
.category-label .count { display: block; margin-top: 6px; font: 500 0.85rem/1 var(--body); color: var(--work); letter-spacing: 0; }
.latest-posts, .all-articles { margin-top: 80px; }
.latest-posts h2, .all-articles h2 { margin: 0 0 8px; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1; }
.all-articles .intro { color: var(--muted); margin: 14px 0 12px; }
.all-articles h3 { margin: 44px 0 0; font-size: 1.35rem; }
.all-articles h3 a { color: var(--work); text-decoration: none; }
.all-articles h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.latest-posts ul, .all-articles ul, .related-posts ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr; column-gap: 48px; }
@media (min-width: 768px) { .latest-posts ul, .all-articles ul, .related-posts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.latest-posts li, .all-articles li, .related-posts li { border-top: 1px solid var(--line); }
.latest-posts li a, .all-articles li a, .related-posts li a { display: block; padding: 14px 0; color: var(--paper); text-decoration: none; font-weight: 600; line-height: 1.35; }
.latest-posts li a:hover, .all-articles li a:hover, .related-posts li a:hover { color: var(--work); }

/* ---------- Category page ---------- */
.category-page { max-width: 1160px; margin-inline: auto; padding: 32px 20px 0; }
@media (min-width: 760px) { .category-page { padding-inline: 40px; } }
.back-link, .back-to-blog-link, .back-button { display: inline-block; color: var(--work); text-decoration: none; font-weight: 600; margin-bottom: 24px; }
.back-link:hover, .back-to-blog-link:hover, .back-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.blog-posts { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 700px) { .blog-posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .blog-posts { grid-template-columns: repeat(3, 1fr); } }
.blog-post-card { background: var(--navy-2); border-radius: 22px; overflow: hidden; transition: transform .15s ease, background .15s ease; }
.blog-post-card:hover { transform: translateY(-3px); background: var(--navy-3); }
.post-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.post-thumbnail, .post-thumbnail-placeholder { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--navy-3); }
.post-details { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-title { margin: 0; font-size: 1.3rem; line-height: 1.15; font-stretch: 108%; }
.post-meta { color: var(--muted); font-size: 0.85rem; }
.post-excerpt { margin: 0; color: var(--muted); font-size: 0.97rem; line-height: 1.55; flex: 1; }
.read-more { color: var(--work); font-weight: 700; font-size: 0.95rem; margin-top: 6px; }

/* ---------- Post ---------- */
.blog-container { max-width: 760px; margin-inline: auto; padding: 48px 20px 0; }
.blog-post .blog-header { margin-bottom: 36px; }
.blog-post .blog-title { margin: 0 0 18px; font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 1.0; }
.blog-meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 28px; }
.featured-image { width: 100%; height: auto; display: block; border-radius: 22px; }
.blog-post .blog-content { font-size: 1.125rem; line-height: 1.75; color: #e3e7f1; }
.blog-post .blog-content h2 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); line-height: 1.08; margin: 56px 0 18px; color: var(--paper); }
.blog-post .blog-content h3 { font-size: 1.35rem; line-height: 1.2; margin: 36px 0 12px; color: var(--paper); }
.blog-post .blog-content h4 { font: 700 1.05rem/1.3 var(--body); margin: 28px 0 10px; }
.blog-post .blog-content p { margin: 0 0 22px; }
.blog-post .blog-content ul, .blog-post .blog-content ol { margin: 0 0 22px; padding-left: 24px; }
.blog-post .blog-content li { margin-bottom: 10px; }
.blog-post .blog-content li::marker { color: var(--work); }
.blog-post .blog-content a { color: var(--work); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.blog-post .blog-content strong { color: var(--paper); }
.blog-post .blog-content img { height: auto; border-radius: 16px; }
.blog-post .blog-content hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }
.blog-post .blog-content code { background: var(--navy-2); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }
.blog-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.97rem; display: block; overflow-x: auto; }
.blog-content th, .blog-content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.blog-content th { font: 700 0.8rem/1.2 var(--display); font-stretch: 115%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--work); border-bottom: 2px solid rgba(125, 211, 160, 0.5); }
.blog-content blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--round); color: var(--paper); font-size: 1.2rem; font-style: normal; }
.cta-box { background: var(--work); color: var(--ink); padding: 32px 28px; border-radius: 22px; margin: 48px 0; text-align: left; }
.blog-post .blog-content .cta-box h2, .blog-post .blog-content .cta-box h3, .cta-box h3 { margin: 0 0 10px; color: var(--ink); font-size: 1.6rem; line-height: 1.05; }
.blog-post .blog-content .cta-box p, .cta-box p { color: #1f2b45; margin: 0 0 6px; }
.blog-post .blog-content .cta-box a:not(.cta-button) { color: var(--ink); }
.cta-box a.cta-button { background: var(--ink); color: #fff !important; margin-top: 14px; }
.cta-box a.cta-button:hover { background: #1d2747; }
.related-posts { margin-top: 72px; padding-top: 8px; }
.related-posts h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; }
.related-posts .all-link { display: inline-block; margin-top: 24px; color: var(--work); font-weight: 700; text-decoration: none; }
.sticky-back-button { position: fixed; inset: 0 0 auto; background: rgba(26, 34, 64, 0.96); padding: 15px 20px; z-index: 1000; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); transform: translateY(-100%); transition: transform .3s ease; opacity: 0; pointer-events: none; }
.sticky-back-button a { color: var(--work); text-decoration: none; font-weight: 600; }
.sticky-back-button.visible { transform: translateY(0); opacity: 1; pointer-events: all; }

/* ---------- Legal pages (privacy, terms) and contact ---------- */
.doc { max-width: 760px; margin-inline: auto; padding: 56px 20px 0; }
.doc h1 { margin: 0 0 12px; font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 0.95; }
.doc .last-updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 40px; }
.doc .section { margin-bottom: 40px; }
.doc h2 { font-size: 1.6rem; line-height: 1.1; margin: 0 0 14px; }
.doc h3 { font-size: 1.15rem !important; margin: 24px 0 10px; color: var(--work) !important; }
.doc p { margin: 0 0 14px; color: #e3e7f1; }
.doc ul { padding-left: 22px; margin: 0 0 14px; color: #e3e7f1; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--work); }
.doc strong { color: var(--paper); }
.doc .footer-links { display: none; }

.form-container > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font: 700 0.8rem/1 var(--display); font-stretch: 120%; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; color: var(--muted); }
.form-group input, .form-group textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid rgba(243, 245, 250, 0.16); background: var(--navy-2); color: var(--paper); font: 400 1rem/1.4 var(--body); }
.form-group textarea { min-height: 160px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--work); }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.spinner { display: none; width: 18px; height: 18px; border: 3px solid rgba(17, 24, 48, 0.25); border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-message, .error-message { display: none; padding: 24px; border-radius: 18px; margin-top: 20px; }
.success-message { background: var(--work); color: var(--ink); }
.success-message a { color: var(--ink) !important; font-weight: 700; }
.error-message { background: var(--rest); color: var(--ink); }
.success-message h3, .error-message h3 { margin: 0 0 8px; color: var(--ink) !important; }
.success-message p, .error-message p { color: var(--ink); }
.error-message button { background: var(--ink) !important; color: #fff !important; }

/* ---------- Download and Get: one green screen, like the landing hero ---------- */
body.page-store { background: var(--work); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.page-store .container { max-width: 520px; width: 100%; text-align: left; }
.page-store .app-icon { width: 84px; height: 84px; border-radius: 20px; display: block; margin-bottom: 28px; box-shadow: 0 18px 30px -16px rgba(8, 12, 30, 0.6); }
.page-store h1 { margin: 0 0 18px; font-size: clamp(2.6rem, 10vw, 4rem); line-height: 0.95; font-stretch: 118%; }
.page-store .message { margin: 0 0 8px; color: #1f2b45; font-size: 1.1rem; }
.page-store .stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.page-store .app-store-button { display: inline-flex; align-items: center; margin-top: 20px; background: var(--ink); color: #fff; text-decoration: none; font: 700 1.05rem/1.1 var(--display); font-stretch: 105%; padding: 15px 22px; border-radius: 14px; transition: transform .15s ease; }
.page-store .stores .app-store-button { margin-top: 12px; }
.page-store .app-store-button:hover { transform: translateY(-2px); }
.page-store .footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 56px; font-size: 0.9rem; }
.page-store .footer-links a { color: #2c3a58; text-decoration: none; }
.page-store .footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* In-app blog (?app=true and the /blog/app-* pages): no site chrome */
body.in-app .site-top, body.in-app .site-foot { display: none; }
body.in-app .page-head .kicker { display: none; }
