/* The blog: /blog/ (blog/index.php) and its posts (blog/<slug>/index.php). On top of account.css and pages.css
   (--tpa-accent teal, --tpa-card, --tpa-line, .tpa-card, .tpp-crumbs). Type as on the changelog: Schibsted Grotesk
   for words, Martian Mono (self-hosted) for dates and labels. Teal for the interface; no orange. */
.tpb {
    --b-text: #edece6;
    --b-text-2: #cacdc6;
    --b-muted: #9da59f;
    --b-title: #f6f2e8;
    --b-surface: #151917;
    --b-line: rgba(255, 255, 255, 0.09);
    --b-line-2: rgba(255, 255, 255, 0.16);
    --b-mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    color: var(--b-text);
}
.tpb-col { max-width: 960px; margin: 0 auto; min-width: 0; }
/* Links in the text: teal and underlined. !important because account.css greys every link on content pages
   (.tpa-page a:not(.btn):not(…) …, a stronger selector than any of these). */
.tpb-lede a, .tpb-fig a, .tpb-place a, .tpb-try p a:not(.btn) {
    color: #5cc4b6 !important; text-decoration: underline !important; text-decoration-color: rgba(92, 196, 182, 0.45) !important; text-underline-offset: 3px;
}
.tpb-lede a:hover, .tpb-fig a:hover, .tpb-place a:hover, .tpb-try p a:not(.btn):hover { color: #fff !important; text-decoration-color: #5cc4b6 !important; }

/* ---- Title block ---- */
.tpb-hero { padding: 8px 0 4px; }
.tpb-eyebrow {
    display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px;
    color: var(--tpa-accent); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.tpb-eyebrow .bx { font-size: 1.05rem; }
.tpb-meta { margin: 0 0 12px; font: 400 0.74rem/1.5 var(--b-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--b-muted); }
.tpb-title {
    margin: 0 0 18px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance;
    font-size: clamp(2rem, 5.2vw, 3.3rem); color: var(--b-title);
}
.tpb-lede { max-width: 66ch; }
.tpb-lede p { color: var(--b-text-2); font-size: 1.1rem; line-height: 1.6; margin: 0 0 14px; }
.tpb-lede p:first-child { color: var(--b-text); }
.tpb-lede .tpb-how { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 0.92rem; color: var(--b-muted); }
.tpb-how .bx { font-size: 1.15rem; color: var(--tpa-accent); }

/* ---- One mountain (or one subject) per section ---- */
.tpb-peak { margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--b-line); }
.tpb-peak-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.tpb-peak-head h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--b-title); }
.tpb-where { font: 400 0.72rem/1.4 var(--b-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--b-muted); }
.tpb .tpb-build {
    margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(47, 165, 150, 0.55);
    color: #fff !important; font-size: 0.9rem; font-weight: 600; text-decoration: none;
}
.tpb .tpb-build:hover { background: rgba(47, 165, 150, 0.18); }
.tpb .tpb-build:focus-visible { outline: 2px solid var(--tpa-accent); outline-offset: 2px; }
.tpb-build .bx { font-size: 1.1rem; color: var(--tpa-accent); }
@media (max-width: 560px) { .tpb .tpb-build { margin-left: 0; } }
.tpb-fig { margin: 0 0 22px; }
.tpb-fig figcaption { margin-top: 10px; max-width: 70ch; color: var(--b-text-2); font-size: 1rem; line-height: 1.55; }
.tpb-view { margin-right: 6px; font: 500 0.7rem/1 var(--b-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tpa-accent); white-space: nowrap; }
.tpb-place { margin: 0; font-size: 0.86rem; color: var(--b-muted); }

/* ---- Before/after slider (blog/compare.js; markup from tpb_compare in blog/lib.php) ----
   "Now" fills the frame; "Before" lies on top, cut off at the line (--x). The range input is invisible but
   focusable: it does the keyboard and screen-reader part, and its focus shows on the frame and the knob. */
.tpb-cmp {
    --x: 50%;
    position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
    border-radius: 14px; border: 1px solid var(--b-line); background: #111a2c;
    touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.tpb-cmp.is-live { cursor: ew-resize; }
.tpb-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; object-fit: cover; display: block; pointer-events: none; }
.tpb-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.tpb-line {
    position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px;
    background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); pointer-events: none;
}
.tpb-knob {
    position: absolute; top: 50%; left: var(--x); width: 44px; height: 44px; margin: -22px 0 0 -22px;
    display: grid; place-items: center; border-radius: 50%; background: #fff; color: #101010;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); pointer-events: none; transition: transform 0.15s;
}
.tpb-cmp.is-dragging .tpb-knob { transform: scale(1.08); }
.tpb-tag {
    position: absolute; top: 12px; padding: 7px 9px; border-radius: 6px; pointer-events: none;
    font: 500 0.7rem/1 var(--b-mono); letter-spacing: 0.06em; text-transform: uppercase;
    background: rgba(10, 14, 13, 0.78); color: var(--b-text);
}
.tpb-tag-before { left: 12px; }
.tpb-tag-now { right: 12px; color: #6fd6c7; }
.tpb-range {
    position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; margin: 0;
    opacity: 0; pointer-events: none; appearance: none; -webkit-appearance: none; background: none;
}
.tpb-cmp:has(.tpb-range:focus-visible) { outline: 3px solid var(--tpa-accent); outline-offset: 3px; }
.tpb-range:focus-visible ~ .tpb-knob { box-shadow: 0 0 0 4px var(--tpa-accent), 0 2px 10px rgba(0, 0, 0, 0.4); }
@media (max-width: 600px) {
    .tpb-cmp { border-radius: 10px; }
    .tpb-tag { top: 8px; padding: 6px 7px; font-size: 0.64rem; }
    .tpb-tag-before { left: 8px; }
    .tpb-tag-now { right: 8px; }
    .tpb-knob { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}
@media (forced-colors: active) {
    .tpb-line { background: CanvasText; }
    .tpb-knob { border: 2px solid CanvasText; }
}

/* ---- Try it ---- */
.tpb-try { margin: 48px 0 0; padding: 24px 24px 20px; }
.tpb-try h2 { margin: 0 0 8px; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.015em; color: var(--b-title); }
.tpb-try p { max-width: 66ch; color: var(--b-text-2); }
.tpb-try-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 12px; }
.tpb-try .btn .bx { margin-right: 6px; }
.tpb-try strong { color: var(--b-text); font-weight: 600; }
@media (max-width: 600px) { .tpb-try { padding: 18px 16px 16px; } }
.tpb-note { margin: 0; font-size: 0.86rem; color: var(--b-muted) !important; }
.tpb-back { margin: 32px 0 0; font-size: 0.95rem; }
.tpb-back a { color: var(--tpa-accent) !important; }
.tpb-back a:hover { color: #5cc4b6 !important; }
.tpb-back .bx { vertical-align: -2px; }

/* ---- /blog/: the list of posts ---- */
.tpb-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; }
.tpb-card {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch;
    background: var(--b-surface); border: 1px solid var(--b-line); border-radius: 16px; overflow: hidden; transition: border-color 0.15s;
}
.tpb-card:hover, .tpb-card:focus-within { border-color: rgba(47, 165, 150, 0.45); }
.tpb-card-img { display: block; background: #111a2c; }
.tpb-card-img img { display: block; width: 100%; height: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.tpb-card-body { padding: 22px 24px 22px; display: flex; flex-direction: column; min-width: 0; }
.tpb-card-body .tpb-meta { margin-bottom: 8px; }
.tpb-card h2 { margin: 0 0 10px; font-size: clamp(1.3rem, 2.6vw, 1.65rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.tpb .tpb-card h2 a { color: var(--b-title) !important; }
.tpb .tpb-card h2 a:hover { color: #fff !important; text-decoration: underline !important; text-decoration-color: var(--tpa-accent) !important; }
.tpb-card-body > p { color: var(--b-text-2); margin: 0 0 14px; }
.tpb .tpb-read { margin-top: auto; font-weight: 600; color: var(--tpa-accent) !important; }
.tpb .tpb-card:hover .tpb-read { color: #5cc4b6 !important; }
.tpb-read .bx { vertical-align: -2px; }
@media (max-width: 760px) {
    .tpb-card { grid-template-columns: 1fr; }
    .tpb-card-img img { height: auto; }
    .tpb-card-body { padding: 16px 18px 18px; }
}
