/* ============================================================================
   Smart Dollar Place — "The Receipt" (sdp-theme 1.0.0, 2026-10-30)
   Loads after theme-variables.css and main.css. All site styling lives here.
   Stitch direction B (user pick): a calm, numerate money guide. A large lead
   photo beside a till receipt that itemises the newest guides, the saving
   from each headline right-aligned in Space Mono; topic tabs over an
   image-top grid. White ground, receipt paper (#FAF8F2) with torn edges for
   the slips, ONE deep teal for everything interactive, Schibsted Grotesk for
   the wordmark/headlines/UI, Be Vietnam Pro for reading text, Space Mono
   only on the receipts and counts. 8px corners. Photos sit in a frame —
   never text on them.
   ========================================================================= */

/* --- Base ------------------------------------------------------------------- */

html { overflow-x: clip; background: var(--sd-ground); }
body {
    background: var(--sd-ground);
    color: var(--sd-text);
    font-family: var(--sd-body);
    font-size: var(--sd-size-body);
    line-height: var(--sd-lh-body);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--sd-display); color: var(--sd-ink); line-height: var(--sd-lh-head); font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--sd-brand); }
a:hover { color: var(--sd-brand-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--sd-brand); outline-offset: 2px; }
button, input, select, textarea { font-family: var(--sd-ui); }
::selection { background: var(--sd-brand-tint); color: var(--sd-ink); }

/* main.css styles .search-results (padding + white) and WP puts that class on <body> on search pages. */
body.search-results { padding: 0; background: var(--sd-ground); }
.site-container { max-width: none; margin: 0; padding: 0; }
.site-main { padding-top: 0; padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.sdp-front-body, .sdp-lead-row, .sdp-archive-inner, .sdp-archive-body, .sdp-single-main, .sdp-page-wrap, .sdp-empty-wrap {
    max-width: var(--sd-page-max); margin-left: auto; margin-right: auto; padding-left: var(--sd-gutter); padding-right: var(--sd-gutter);
}

.sdp-skip-link { position: absolute; left: -9999px; top: 0; background: var(--sd-brand); color: #fff; padding: 0.75rem 1rem; z-index: 2000; font-weight: 700; border-radius: var(--sd-radius); }
.sdp-skip-link:focus { left: 1rem; top: 1rem; }

/* UI text: Schibsted Grotesk. */
.sdp-breadcrumb, .sdp-meta, .sdp-article-meta, .sdp-more, .sdp-fhead, .sdp-flist, .sdp-shead-aside, .sdp-tabs,
.sdp-archive-count, .sdp-deptlist, .sdp-toc-count, .sdp-caption, .sdp-pager, .sdp-label, .sdp-kicker, .sdp-disclosure, .sdp-tagline {
    font-family: var(--sd-ui);
}
.sdp-label { margin: 0; font-size: var(--sd-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-meta { margin: 0; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-meta a { color: inherit; text-decoration: none; }
.sdp-dot { color: var(--sd-meta); padding: 0 0.25em; }
.sdp-kicker { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.4; }
.sdp-kicker a { color: var(--sd-brand); text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.sdp-kicker a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
/* Counts are figures: Space Mono. */
.sdp-count, .sdp-fcount { font-family: var(--sd-mono); font-size: 0.8125rem; font-weight: 400; color: var(--sd-meta); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* Framed photo: a hairline frame, 8px corners, its own block. */
.sdp-frame { display: block; overflow: hidden; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-deep); }
.sdp-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
a.sdp-frame:hover img { transform: scale(1.03); }
.sdp-frame--wide img, .sdp-frame--hero img { aspect-ratio: 16 / 9; height: auto; }
.sdp-frame--photo img { aspect-ratio: 3 / 2; }
.sdp-frame--square img { aspect-ratio: 1 / 1; }

.sdp-more { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-size: 0.9375rem; font-weight: 700; color: var(--sd-brand); text-decoration: none; white-space: nowrap; }
.sdp-more:hover { color: var(--sd-brand-dark); text-decoration: underline; text-underline-offset: 0.2em; }

/* --- Masthead: wordmark left, six topics in one row right ------------------- */

.sdp-masthead { position: relative; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: var(--sd-page-max); margin: 0 auto; padding: 0 var(--sd-gutter); background: var(--sd-ground); }
.sdp-masthead::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; transform: translateX(-50%); border-bottom: 1px solid var(--sd-rule); pointer-events: none; }
.sdp-mast-brand { flex: none; padding: 1.1rem 0 1rem; min-width: 0; }
.sdp-brand-name { margin: 0; font-size: inherit; line-height: 1; font-weight: inherit; letter-spacing: inherit; }
.sdp-wordmark, .sdp-wordmark:hover, .sdp-wordmark:focus, .sdp-footer-word, .sdp-footer-word:hover { text-decoration: none !important; }
.sdp-wordmark { display: inline-flex; align-items: center; min-height: 44px; }
.sdp-logo { display: block; width: auto; height: 62px; }   /* 1.0.3: traced N-W3 lockup (2724x840) */
.sdp-wordmark:hover .sdp-logo { opacity: 0.88; }
.sdp-tagline { margin: 0.3rem 0 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--sd-meta); }

.sdp-mast-nav { position: relative; display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.sdp-drawer-clip { display: contents; }
.sdp-mast-nav .main-navigation { min-width: 0; display: flex; }
.sdp-mast-nav .primary-menu { display: flex; align-items: stretch; flex-wrap: nowrap; gap: 0 1.5rem; list-style: none; margin: 0; padding: 0; }
.sdp-mast-nav .main-navigation li { margin: 0; }
.sdp-mast-nav .main-navigation a {
    display: inline-flex; align-items: center; min-height: 76px; position: relative; white-space: nowrap;
    font-family: var(--sd-ui); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; color: var(--sd-ink); text-decoration: none;
}
.sdp-mast-nav .main-navigation a:hover { color: var(--sd-brand); }
.sdp-mast-nav .main-navigation a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--sd-brand); opacity: 0; transition: opacity 0.2s; }
.sdp-mast-nav .main-navigation a:hover::after, .sdp-mast-nav .main-navigation .current-cat > a::after { opacity: 1; }
.sdp-mast-nav .main-navigation .current-cat > a { color: var(--sd-brand); }
.sdp-mast-nav .main-navigation .sdp-drawer-label, .sdp-mast-nav .main-navigation .sdp-drawer-sub { display: none; }

.sdp-nav-tools { display: flex; align-items: center; gap: 0.25rem; margin-left: 0.75rem; }
.sdp-masthead .sdp-search-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: var(--sd-radius); color: var(--sd-ink) !important; cursor: pointer; transition: color 0.2s, background 0.2s; }
.sdp-masthead .sdp-search-toggle:hover, .sdp-masthead .sdp-search-toggle[aria-expanded="true"] { color: var(--sd-brand) !important; background: var(--sd-brand-tint); }
.sdp-masthead .mobile-menu-toggle { display: none; }
/* Search opens as a row under the masthead (main.css made it a fixed overlay). */
.sdp-masthead { flex-wrap: wrap; }
.sdp-masthead .mobile-search-form { position: static; transform: none; box-shadow: none; z-index: auto; flex: 0 0 100%; padding: 0 0 1rem; background: transparent; }
.sdp-masthead .mobile-search-form form { max-width: 760px; margin: 0 0 0 auto; }
.sdp-masthead .search-field { font-size: 1.0625rem; min-height: 50px; border-radius: var(--sd-radius); border: 1px solid var(--sd-rule); background: var(--sd-white); color: var(--sd-ink); }
.sdp-masthead .mobile-search-form button[type="submit"] { min-height: 50px; border-radius: var(--sd-radius); font-weight: 700; background: var(--sd-brand); color: #fff; border: 0; }
.sdp-masthead .mobile-search-close { background: transparent !important; color: var(--sd-ink) !important; min-width: 44px; min-height: 44px; }

/* --- Breadcrumb -------------------------------------------------------------------- */

.sdp-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; margin: 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-breadcrumb a { display: inline-flex; align-items: center; min-height: 36px; color: var(--sd-meta); text-decoration: none; }
.sdp-breadcrumb a:hover { color: var(--sd-brand); text-decoration: underline; }
.sdp-breadcrumb [aria-current], .sdp-breadcrumb a:last-of-type:not(:first-child) { color: var(--sd-brand); font-weight: 700; }
.sdp-breadcrumb .sep { color: var(--sd-leader); }

/* --- Section head: Schibsted Grotesk over a hairline, an aside link at the right ------- */

.sdp-shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; margin: 0 0 clamp(1.25rem, 2.4vw, 1.75rem); padding-bottom: 0.75rem; border-bottom: 1px solid var(--sd-rule); }
.sdp-shead-title { margin: 0; font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem); font-weight: 700; line-height: 1.1; }
.sdp-shead-aside { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 44px; font-size: 0.9375rem; font-weight: 700; color: var(--sd-meta); text-decoration: none; }
a.sdp-shead-aside { color: var(--sd-brand); }
a.sdp-shead-aside:hover { color: var(--sd-brand-dark); text-decoration: underline; text-underline-offset: 0.2em; }

/* --- The receipt: paper slip, torn top and bottom edges, mono lines ---------------- */

.sdp-slip { position: relative; background: var(--sd-paper); border-left: 1px solid var(--sd-rule); border-right: 1px solid var(--sd-rule); }
.sdp-slip::before, .sdp-slip::after { content: ""; position: absolute; left: -1px; right: -1px; height: 10px; background: var(--sd-paper); -webkit-mask: var(--sd-tear); mask: var(--sd-tear); }
.sdp-slip::before { top: -9px; }
.sdp-slip::after { bottom: -9px; transform: scaleY(-1); }
.sdp-receipt { margin: 10px 0; padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.6vw, 2rem); font-family: var(--sd-mono); color: var(--sd-ink); }
.sdp-receipt-label { margin: 0; text-align: center; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-receipt-title { margin: 0.45rem 0 0; text-align: center; font-family: var(--sd-display); font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem); font-weight: 700; letter-spacing: -0.008em; line-height: 1.1; color: var(--sd-ink); }
.sdp-receipt-lines { list-style: none; margin: 1.25rem 0 0; padding: 0.6rem 0; border-top: 1px dashed var(--sd-leader); border-bottom: 1px dashed var(--sd-leader); }
.sdp-receipt-lines li { margin: 0; }
.sdp-receipt-lines a { display: flex; align-items: baseline; gap: 0.5rem; min-height: 44px; padding: 0.55rem 0; color: var(--sd-ink); text-decoration: none; font-size: 0.875rem; line-height: 1.45; }
.sdp-receipt-no { flex: none; color: var(--sd-meta); }
.sdp-receipt-name { min-width: 0; }
.sdp-receipt-lines a:hover .sdp-receipt-name { color: var(--sd-brand); text-decoration: underline; text-underline-offset: 0.2em; }
.sdp-receipt-dots { flex: 1 1 1.5rem; min-width: 1.5rem; border-bottom: 2px dotted var(--sd-leader); transform: translateY(-0.3em); }
.sdp-receipt-fig { flex: none; font-weight: 700; color: var(--sd-ink); white-space: nowrap; }
.sdp-receipt-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1rem 0 0; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-receipt-sum { font-family: var(--sd-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--sd-brand); text-align: right; }

/* --- Topic tabs ---------------------------------------------------------------------- */

.sdp-tabs { margin: 0 0 clamp(1.75rem, 3.5vw, 2.5rem); border-bottom: 1px solid var(--sd-rule); overflow-x: auto; scrollbar-width: none; }
.sdp-tabs::-webkit-scrollbar { display: none; }
.sdp-tabs ul { display: flex; gap: 0 clamp(1rem, 2.2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.sdp-tabs li { margin: 0; flex: none; }
.sdp-tabs a { position: relative; display: inline-flex; align-items: baseline; gap: 0.45rem; min-height: 56px; padding: 1.05rem 0 0; color: var(--sd-ink); font-size: 1rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sdp-tabs a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sd-brand); opacity: 0; transition: opacity 0.2s; }
.sdp-tabs a:hover { color: var(--sd-brand); }
.sdp-tabs a:hover::after { opacity: 0.35; }
.sdp-tabs a.is-current { color: var(--sd-brand); font-weight: 700; }
.sdp-tabs a.is-current::after { opacity: 1; }
.sdp-tabs .sdp-count { font-size: 0.75rem; }

/* --- Grid of image-top cards ------------------------------------------------------- */

.sdp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 3.5vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem); align-items: start; margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem); }
.sdp-card { min-width: 0; display: flex; flex-direction: column; }
.sdp-card-body { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 1rem; min-width: 0; }
.sdp-card-title { margin: 0; font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem); font-weight: 700; line-height: 1.22; letter-spacing: -0.015em; text-wrap: balance; }
.sdp-card-title a { color: var(--sd-ink); text-decoration: none; }
.sdp-card-title a:hover { color: var(--sd-brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.sdp-card-dek { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--sd-meta); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sdp-card .sdp-meta { margin-top: 0.15rem; }
.sdp-card--text .sdp-card-body { padding-top: 0; }

/* --- Front: lead + receipt, tabs, grid, topic rows ---------------------------------- */

.sdp-lead-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(2rem, 3.5vw, 3rem); align-items: start; padding-top: clamp(1.75rem, 3.5vw, 2.75rem); padding-bottom: clamp(2.25rem, 4.5vw, 3.25rem); }
.sdp-lead { min-width: 0; }
.sdp-lead-body { padding-top: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.sdp-lead-title { margin: 0; font-size: clamp(1.875rem, 1.35rem + 2vw, 2.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.sdp-lead-title a { color: var(--sd-ink); text-decoration: none; }
.sdp-lead-title a:hover { color: var(--sd-brand); }
.sdp-lead-dek { margin: 0; max-width: 40em; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; color: var(--sd-meta); }
.sdp-lead-row .sdp-receipt { margin-top: 10px; }
.sdp-front-body { }
.sdp-topic-row { margin-top: clamp(0.5rem, 1.5vw, 1rem); }

/* --- Ad frames: labelled, reserved; nothing for readers when unfilled ----------------- */

.sdp-ad { text-align: center; background: var(--sd-white); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); padding: 0.75rem 0.5rem 1rem; min-height: 290px; }
.sdp-ad::before { content: "Advertisement"; display: block; font-family: var(--sd-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sd-meta); margin-bottom: 0.6rem; }
.sdp-ad--wide { max-width: 970px; margin: 0 auto clamp(2.25rem, 4.5vw, 3.25rem); min-height: 130px; }
.sdp-ad:has(ins[data-ad-status="unfill-optimized"]), .sdp-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.sdp-ad-placeholder { border: 1px dashed var(--sd-leader); border-radius: var(--sd-radius); padding: 2rem 1rem; color: var(--sd-meta); font-size: 0.875rem; margin: 0 0.5rem; }

/* --- Archive ------------------------------------------------------------------------ */

.sdp-archive-head .sdp-archive-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem clamp(2rem, 4vw, 3.5rem); align-items: center; padding-top: clamp(1.5rem, 3vw, 2.25rem); padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.sdp-archive-head--slip .sdp-archive-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
.sdp-archive-text { min-width: 0; }
.sdp-archive-title { margin: 0.5rem 0 0; font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.sdp-archive-line { margin: 1rem 0 0; max-width: 40em; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; color: var(--sd-meta); }
.sdp-archive-count { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--sd-rule); font-family: var(--sd-mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-archive-head .sdp-receipt { margin: 10px 0; }
.sdp-archive-head--search .search-form { display: flex; gap: 0.5rem; max-width: 560px; margin: 1.25rem 0 0; }
.sdp-archive-head--search .search-field, .sdp-empty .search-field { flex: 1 1 auto; min-width: 0; min-height: 50px; padding: 0 1rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); color: var(--sd-ink); font-size: 1.0625rem; }
.sdp-archive-head--search .search-submit, .sdp-empty .search-submit { min-height: 50px; padding: 0 1.25rem; border: 0; border-radius: var(--sd-radius); background: var(--sd-brand); color: #fff; font-weight: 700; cursor: pointer; }
.sdp-archive-body { padding-top: 0.25rem; }
.sdp-archive-head--search + .sdp-archive-body, .sdp-archive:not(:has(.sdp-tabs)) .sdp-archive-body { padding-top: clamp(1.5rem, 3vw, 2.25rem); }

/* Pager: square 48px boxes, the current page teal. */
.sdp-pager { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin: 0.5rem 0 0; }
.sdp-pager .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.sdp-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 0.6rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); color: var(--sd-ink); font-family: var(--sd-mono); font-size: 1rem; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.sdp-pager a.page-numbers:hover { border-color: var(--sd-brand); color: var(--sd-brand); }
.sdp-pager .page-numbers.current { background: var(--sd-brand); border-color: var(--sd-brand); color: #fff; }
.sdp-pager .page-numbers.dots { border: 0; background: transparent; min-width: 24px; }
.sdp-pager-count { margin: 0; font-size: 0.75rem; }

/* --- Single ------------------------------------------------------------------------ */

.sdp-single-main { padding-top: 0; }
.sdp-article-head { max-width: 1000px; margin: 0; padding: clamp(1.25rem, 2.5vw, 2rem) 0 clamp(1.5rem, 3vw, 2rem); border: 0; text-align: left; }
.sdp-title { margin: 0.6rem 0 0; font-size: var(--sd-title); font-weight: 700; line-height: 1.06; letter-spacing: -0.015em; text-wrap: balance; }
.sdp-standfirst { margin: 1rem 0 0; max-width: 42em; font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem); line-height: 1.55; color: var(--sd-meta); }
.sdp-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.4rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--sd-rule); max-width: 1000px; font-size: 0.8125rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-mg { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 0 0.4rem; }
.sdp-byline a { color: var(--sd-brand); font-weight: 600; text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.sdp-byline a:hover { text-decoration: underline; }
/* The hero: the featured photo at the top of the reading column, in its frame. */
.sdp-hero { margin: 0 0 clamp(1.75rem, 3.5vw, 2.5rem); }
.sdp-caption { font-size: 0.8125rem; line-height: 1.5; color: var(--sd-meta); padding: 0.6rem 0.1rem 0; }

/* Reading column + sidebar. */
.sdp-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--sd-sidebar); gap: 2.5rem clamp(2rem, 3.5vw, 3rem); align-items: start; }
.sdp-layout-main { min-width: 0; }
.sdp-disclosure { margin: 0 0 1.5rem; padding: 0.85rem 1.1rem; background: var(--sd-paper); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); font-size: 0.875rem; line-height: 1.55; color: var(--sd-meta); }
.sdp-disclosure a { color: var(--sd-brand); font-weight: 600; white-space: nowrap; }

.sdp-article { min-width: 0; }
.sdp-article .entry-content { font-size: var(--sd-size-body); line-height: var(--sd-lh-body); color: var(--sd-text); }
.sdp-article .entry-content > * { max-width: 100%; }
.sdp-article .entry-content p { text-wrap: pretty; }
.sdp-article .entry-content > :first-child { margin-top: 0; }
.sdp-article .entry-content h2 { font-size: var(--sd-h2); font-weight: 700; line-height: 1.15; margin: 3rem 0 1rem; padding: 0; border: 0; color: var(--sd-ink); scroll-margin-top: 1.5rem; text-wrap: balance; }
.sdp-article .entry-content h3 { font-size: var(--sd-h3); font-weight: 700; line-height: 1.22; margin: 2.25rem 0 0.75rem; scroll-margin-top: 1.5rem; text-wrap: balance; }
.sdp-article .entry-content > h2:first-child { margin-top: 0.5rem; }
.sdp-h2-num { display: inline-block; margin-right: 0.35em; color: var(--sd-brand); }
.sdp-item-no { display: inline-block; margin-right: 0.3em; color: var(--sd-brand); font-weight: 700; }
.sdp-article .entry-content h4 { font-family: var(--sd-display); font-weight: 700; font-size: 1.125rem; }
.sdp-article .entry-content a { color: var(--sd-brand); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.sdp-article .entry-content a:hover { color: var(--sd-brand-dark); text-decoration-thickness: 2px; }
.sdp-article .entry-content strong { font-weight: 600; color: var(--sd-ink); }
.sdp-article .entry-content figure { margin: 2.25rem 0; }
.sdp-article .entry-content figure img, .sdp-article .entry-content p > img { display: block; height: auto; padding: 4px; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); box-shadow: none; }
.sdp-article .entry-content figcaption { text-align: left; font-family: var(--sd-ui); font-style: normal; font-size: 0.8125rem; line-height: 1.5; color: var(--sd-meta); padding-top: 0.6rem; }
.sdp-article .entry-content ol, .sdp-article .entry-content ul { padding-left: 1.5rem; }
.sdp-article .entry-content li { margin-bottom: 0.6rem; }
.sdp-article .entry-content ul li::marker { color: var(--sd-brand); }
.sdp-article .entry-content ol li::marker { color: var(--sd-brand); font-family: var(--sd-display); font-weight: 700; }
.sdp-article .entry-content blockquote { border: 0; border-left: 4px solid var(--sd-brand); background: var(--sd-paper); border-radius: 0 var(--sd-radius) var(--sd-radius) 0; margin: 2rem 0; padding: 1.1rem 1.4rem; font-size: 1.0625rem; line-height: 1.65; color: var(--sd-text); }
.sdp-article .entry-content blockquote p { margin: 0; }
.sdp-article .entry-content blockquote p + p { margin-top: 0.75rem; }
.sdp-article .entry-content hr { border: 0; border-top: 1px solid var(--sd-rule); }
.table-scroll { overflow-x: auto; margin: 2rem 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius);
    /* scroll cue: a soft shadow on the right edge while more columns are hidden (the white cover scrolls with the content and hides it at the end) */
    background: linear-gradient(to left, var(--sd-white) 40%, rgba(255, 255, 255, 0)) right center / 48px 100% no-repeat local,
                radial-gradient(farthest-side at 100% 50%, rgba(27, 35, 38, 0.18), rgba(27, 35, 38, 0)) right center / 16px 100% no-repeat scroll,
                var(--sd-white); }
.table-scroll table { min-width: 560px; margin: 0; }
.sdp-article .entry-content table { border-collapse: collapse; width: 100%; font-size: 0.875em; line-height: 1.5; background: transparent; }
.sdp-article .entry-content th { font-family: var(--sd-ui); background: var(--sd-paper); color: var(--sd-ink); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; border-bottom: 2px solid var(--sd-brand); }
.sdp-article .entry-content td, .sdp-article .entry-content th { border-bottom: 1px solid var(--sd-rule); padding: 0.75rem 0.85rem; vertical-align: top; min-width: 7.25rem; }
.sdp-article .entry-content tr:last-child td { border-bottom: 0; }
.sdp-article .entry-content td:first-child, .sdp-article .entry-content th:first-child { position: sticky; left: 0; z-index: 1; }
.sdp-article .entry-content td:first-child { background: var(--sd-white); font-weight: 600; color: var(--sd-ink); }

/* "In this guide" (the article's own contents block, sdp_toc_panel). */
.sdp-toc { margin: 0 0 2.25rem; background: var(--sd-paper); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); }
.sdp-toc summary { display: flex; align-items: center; gap: 1rem; min-height: 58px; padding: 0.6rem 1.25rem; cursor: pointer; list-style: none; }
.sdp-toc summary::-webkit-details-marker { display: none; }
.sdp-toc summary::after { content: "+"; font-family: var(--sd-display); font-size: 1.375rem; font-weight: 700; color: var(--sd-brand); margin-left: 0.25rem; }
.sdp-toc[open] summary::after { content: "−"; }
.sdp-toc-title { font-family: var(--sd-display); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sd-ink); }
.sdp-toc-count { margin-left: auto; font-size: 0.75rem; color: var(--sd-meta); }
.sdp-article .entry-content .sdp-toc-list { list-style: none; margin: 0; padding: 0 1.25rem 1rem; counter-reset: sdptoc; }
.sdp-article .entry-content .sdp-toc-list li { margin: 0; padding: 0; counter-increment: sdptoc; border-top: 1px solid var(--sd-rule); }
.sdp-article .entry-content .sdp-toc-list li::marker { content: none; }
.sdp-article .entry-content .sdp-toc-list a { display: flex; gap: 0.9rem; align-items: baseline; min-height: 46px; padding: 0.65rem 0; color: var(--sd-ink); text-decoration: none; font-family: var(--sd-ui); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.sdp-article .entry-content .sdp-toc-list a::before { content: counter(sdptoc, decimal-leading-zero); flex: none; font-family: var(--sd-mono); font-size: 0.8125rem; font-weight: 700; color: var(--sd-brand); font-variant-numeric: tabular-nums; }
.sdp-article .entry-content .sdp-toc-list a:hover { color: var(--sd-brand); }

/* Article pager (posts split with <!--nextpage-->): numbers only. */
.sdp-page-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 2.25rem 0 0.5rem; }
.entry-content .sdp-page-links .post-page-numbers {
    display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 0.75rem;
    border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); color: var(--sd-ink);
    font-family: var(--sd-display); font-size: 1rem; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums;
}
.entry-content .sdp-page-links a.post-page-numbers:hover { border-color: var(--sd-brand); color: var(--sd-brand); }
.entry-content .sdp-page-links .post-page-numbers.current { background: var(--sd-brand); border-color: var(--sd-brand); color: #fff; }

.sdp-team { margin: 2.75rem 0 0; padding: 1.25rem 1.5rem; background: var(--sd-paper); border: 1px solid var(--sd-rule); border-left: 4px solid var(--sd-brand); border-radius: 0 var(--sd-radius) var(--sd-radius) 0; }
.sdp-team-title { margin: 0 0 0.5rem; font-family: var(--sd-display); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sd-ink); }
.sdp-team p { margin: 0; font-size: 0.9375rem; line-height: 1.65; color: var(--sd-text); }
.sdp-team .sdp-team-more { margin-top: 0.5rem; }
.sdp-team-more a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; }

.sdp-related { margin: clamp(3rem, 6vw, 4.5rem) 0 0; }

/* main.css sets content-visibility:auto (500px placeholder) on the comments; the form is taller,
   so it painted late and shifted the page (visual QA 2026-10-08 on the fork). */
.comments-area { margin-top: 2rem; padding-top: 0; border-top: 0; content-visibility: visible; contain-intrinsic-size: none; }
.comments-area .comments-title, .comments-area .comment-reply-title { font-size: var(--sd-h3); }
.comments-area .comment-list { list-style: none; padding: 0; }
.comments-area .comment-respond { margin: 0; background: var(--sd-paper); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); }
.comments-area label, .comments-area .comment-notes, .comments-area .logged-in-as { color: var(--sd-meta); }
.comments-area input:not([type="checkbox"]):not([type="submit"]), .comments-area textarea { border-radius: var(--sd-radius); border: 1px solid var(--sd-rule); background: var(--sd-white); color: var(--sd-ink); }
.comments-area input:focus, .comments-area textarea:focus { border-color: var(--sd-brand); outline: none; }
.comments-area .submit, .comments-area #submit { background: var(--sd-brand) !important; border: none; border-radius: var(--sd-radius) !important; color: #fff !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; min-height: 48px; padding: 0 1.5rem; cursor: pointer; }
.comments-area .submit:hover, .comments-area #submit:hover { background: var(--sd-brand-dark) !important; }
.comments-area .comment-body { background: transparent; border: 0; border-bottom: 1px solid var(--sd-rule); border-radius: 0; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; }
.comment-form-cookies-consent input { flex: 0 0 auto; margin: 0.3rem 0 0; }
.comment-form-cookies-consent label { margin: 0; }

/* --- Sidebar ------------------------------------------------------------------------ */

.sdp-sidebar { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
.sdp-widget { min-width: 0; }
.sdp-widget:not(.sdp-ad):not(.sdp-widget-news) { padding: 1.25rem 1.4rem 0.75rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); }
.sdp-widget-title { margin: 0 0 0.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--sd-rule); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.2; }

/* Most read: mono numerals 01–05, the topic over the headline. */
.sdp-contents { list-style: none; margin: 0; padding: 0; }
.sdp-contents li { display: flex; gap: 0.8rem; align-items: baseline; margin: 0; padding: 0.85rem 0; border-bottom: 1px solid var(--sd-rule); }
.sdp-contents li:last-child { border-bottom: 0; }
.sdp-contents-num { flex: none; min-width: 1.6rem; font-family: var(--sd-mono); font-size: 0.875rem; font-weight: 700; color: var(--sd-brand); }
.sdp-contents-num::before { content: "0"; }
.sdp-contents-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.sdp-contents-cat { font-family: var(--sd-ui); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-contents-title { font-family: var(--sd-display); font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--sd-ink); text-decoration: none; }
.sdp-contents-title:hover { color: var(--sd-brand); text-decoration: underline; text-underline-offset: 0.18em; }
.sdp-contents li.is-current .sdp-contents-title { color: var(--sd-brand); }

.sdp-deptlist { list-style: none; margin: 0; padding: 0; }
.sdp-deptlist li { margin: 0; border-bottom: 1px solid var(--sd-rule); }
.sdp-deptlist li:last-child { border-bottom: 0; }
.sdp-deptlist a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; color: var(--sd-ink); text-decoration: none; font-size: 1rem; font-weight: 600; }
.sdp-deptlist a:hover, .sdp-deptlist a.is-current { color: var(--sd-brand); }
.sdp-deptlist a.is-current { font-weight: 700; }
.sdp-deptlist a.is-current .sdp-count { color: var(--sd-brand); }

/* The newsletter slip in the sidebar: receipt paper, torn edges. */
.sdp-widget-news { margin: 10px 0; padding: 1.75rem 1.5rem; text-align: center; }
.sdp-newsletter-label { margin: 0 0 0.45rem; font-family: var(--sd-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-widget-news-title { margin: 0; font-size: 1.375rem; font-weight: 700; line-height: 1.15; text-wrap: balance; }
.sdp-widget-news .sdp-newsletter-note { margin: 0.6rem 0 1rem; font-family: var(--sd-body); font-size: 0.9375rem; line-height: 1.55; letter-spacing: 0; text-transform: none; color: var(--sd-meta); }
.sdp-widget-news .newsletter-form { display: flex; flex-direction: column; gap: 0.6rem; }
.sdp-widget-news input[type="email"], .sdp-newsletter input[type="email"], .sdp-inline-news input[type="email"] {
    min-height: 50px; padding: 0 1rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); color: var(--sd-ink); font-family: var(--sd-body); font-size: 1rem;
}
.sdp-widget-news input[type="email"]:focus, .sdp-newsletter input[type="email"]:focus, .sdp-inline-news input[type="email"]:focus { outline: 2px solid var(--sd-brand); outline-offset: 1px; border-color: var(--sd-brand); }
.sdp-widget-news button, .sdp-newsletter button, .sdp-inline-news button {
    min-height: 50px; padding: 0 1.5rem; border: 0; border-radius: var(--sd-radius); background: var(--sd-brand); color: #fff;
    font-family: var(--sd-ui); font-weight: 700; font-size: 1rem; cursor: pointer; transition: background 0.2s;
}
.sdp-widget-news button:hover, .sdp-newsletter button:hover, .sdp-inline-news button:hover { background: var(--sd-brand-dark); }
.sdp-sidebar .sdp-ad { min-height: 290px; }
.newsletter-message { margin-top: 0.75rem; font-weight: 600; }

/* --- Newsletter slip (every template, above the footer) ------------------------------- */

.sdp-newsletter { padding: 0 var(--sd-gutter) clamp(2.75rem, 5.5vw, 4.25rem); background: var(--sd-white); }   /* 1.0.2: no top padding, the main's bottom padding is the gap (user: too much space above) */
.sdp-newsletter-inner { max-width: 820px; margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.5rem); text-align: center; display: flex; flex-direction: column; align-items: center; }
.sdp-newsletter h2 { margin: 0 0 0.75rem; font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.625rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.sdp-newsletter-dek { margin: 0 0 1.5rem; max-width: 34em; font-size: 1.125rem; line-height: 1.6; color: var(--sd-meta); }
.sdp-newsletter .newsletter-form { display: flex; flex-direction: row; gap: 0.6rem; width: 100%; max-width: 520px; }
.sdp-newsletter input[type="email"] { flex: 1 1 auto; min-width: 0; min-height: 54px; }
.sdp-newsletter button { min-height: 54px; white-space: nowrap; flex: none; }
.sdp-newsletter-note { margin: 1rem 0 0; font-family: var(--sd-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sd-meta); }

/* --- Footer: warm grey under a hairline ---------------------------------------------- */

.sdp-footer { background: var(--sd-deep); color: var(--sd-text); border-top: 1px solid var(--sd-rule); }
.sdp-footer-inner { max-width: var(--sd-page-max); margin: 0 auto; padding: clamp(2.75rem, 5vw, 4rem) var(--sd-gutter) 2rem; }
.sdp-footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--sd-rule); }
.sdp-footer-grid > * { min-width: 0; }
.sdp-footer-word { display: inline-flex; }
.sdp-logo--footer { height: 52px; }
.sdp-footer-about { margin: 0.9rem 0 0; max-width: 22rem; font-size: 0.9375rem; line-height: 1.6; color: var(--sd-meta); }
.sdp-footer-owner-line { margin: 0.9rem 0 0; font-family: var(--sd-ui); font-size: 0.875rem; font-weight: 600; color: var(--sd-text); }
.sdp-footer-mail { margin: 0.1rem 0 0; font-family: var(--sd-ui); font-size: 0.875rem; overflow-wrap: anywhere; }
.sdp-footer-mail a, .sdp-social a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sd-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.sdp-social { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0; padding: 0; }
.sdp-fhead { margin: 0 0 0.5rem; font-family: var(--sd-mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sd-ink); }
.sdp-flist { list-style: none; margin: 0; padding: 0; }
.sdp-flist:empty { display: none; }
.sdp-flist li { margin: 0; }
.sdp-flist a { display: inline-flex; align-items: center; min-height: 40px; color: var(--sd-text); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.sdp-flist a:hover { color: var(--sd-brand); text-decoration: underline; text-underline-offset: 0.25em; }
.sdp-flist--topics li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.sdp-footer-small { padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sdp-footer-owner, .sdp-colophon { margin: 0; max-width: 64rem; font-family: var(--sd-body); font-size: 0.8125rem; font-weight: 400; line-height: 1.6; color: var(--sd-meta); }
.sdp-footer-owner { color: var(--sd-text); }
.sdp-footer .sdp-footer-note { color: var(--sd-meta); }

/* --- Static pages, empty states ------------------------------------------------------ */

.sdp-page { max-width: 820px; margin: clamp(1.75rem, 3.5vw, 2.75rem) auto 0.5rem; padding: 0 var(--sd-gutter); }
.sdp-empty { max-width: 680px; margin: clamp(2rem, 4vw, 3rem) auto 2rem; padding: 2.5rem 1.5rem; text-align: center; background: var(--sd-paper); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); }
.sdp-empty h1, .sdp-empty h2 { font-size: var(--sd-title); font-weight: 700; margin: 0.5rem 0 0.75rem; }
.sdp-empty .search-form { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.25rem; }
.sdp-deptlist--chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.sdp-deptlist--chips li { border-bottom: 0; }
.sdp-deptlist--chips a { padding: 0 1rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); }
.sdp-deptlist--chips a:hover { border-color: var(--sd-brand); color: var(--sd-brand); }

.sdp-page-head { position: relative; text-align: left; margin: 0 0 2rem; padding: 0 0 1.5rem; border-bottom: 1px solid var(--sd-rule); }
.sdp-page-kicker { margin: 0 0 .75rem; }
.sdp-page-kicker { display: block; font-family: var(--sd-ui); font-size: 0.75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-brand); }
.sdp-page-head .sdp-page-title { margin: 0; font-family: var(--sd-display); font-size: var(--sd-title); font-weight: 700; line-height: 1.06; letter-spacing: -0.015em; color: var(--sd-ink); text-wrap: balance; }
.sdp-page-standfirst { margin: .85rem 0 0; font-size: 1.125rem; line-height: 1.6; color: var(--sd-meta); max-width: 40rem; }
.sdp-page-updated { margin: .9rem 0 0; font-family: var(--sd-ui); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sd-meta); }
.sdp-page .entry-content { font-size: var(--sd-size-body); line-height: var(--sd-lh-body); }
.sdp-page .entry-content h2 { font-family: var(--sd-display); font-size: clamp(1.5rem, 1.3rem + .6vw, 1.8125rem); font-weight: 700; line-height: 1.15; margin: 2.5rem 0 .75rem; scroll-margin-top: 1.5rem; }
.sdp-page .entry-content h2:first-child { margin-top: 0; }
.sdp-page .entry-content a { color: var(--sd-brand); }
.sdp-onpage { margin: 0 0 2rem; padding: 1.1rem 1.4rem; background: var(--sd-white); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); }
.sdp-onpage-title { margin: 0 0 .5rem; font-family: var(--sd-display); font-size: 0.875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-ink); }
.sdp-page .entry-content .sdp-onpage ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.sdp-page .entry-content .sdp-onpage li { margin: 0; padding: 0; break-inside: avoid; }
.sdp-page .entry-content .sdp-onpage li::marker { content: none; }
.sdp-page .entry-content .sdp-onpage a { display: flex; gap: .6rem; align-items: baseline; min-height: 44px; padding: .45rem 0; color: var(--sd-ink); text-decoration: none; font-family: var(--sd-ui); font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.sdp-page .entry-content .sdp-onpage a:hover span:last-child { text-decoration: underline; color: var(--sd-brand); }
.sdp-onpage-num { flex: none; font-family: var(--sd-mono); font-weight: 700; color: var(--sd-brand); }
.sdp-page-ask { margin: 2.25rem 0 0; padding: 1.25rem 1.5rem; background: var(--sd-white); border: 1px solid var(--sd-rule); border-left: 4px solid var(--sd-brand); border-radius: 0 var(--sd-radius) var(--sd-radius) 0; }
.sdp-page-ask-title { margin: 0 0 .25rem; font-family: var(--sd-display); font-weight: 700; font-size: 1.125rem; }
.sdp-page-ask p { margin: 0; }
.sdp-page-ask a, .sdp-contact-email a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sd-brand); font-weight: 600; }
.sdp-contact-intro { margin: 0 0 1.5rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--sd-rule); }
.sdp-contact-intro p { margin: 0 0 .5rem; }
.sdp-contact-email { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Theme contact form (inc/contact-form.php; added to the Contact page unless it already carries a form). */
.sdp-contact-form { margin: 1.75rem 0 2rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--sd-white); border: 1px solid var(--sd-rule); border-top: 4px solid var(--sd-brand); border-radius: var(--sd-radius); }
.sdp-contact-form-title { margin: 0 0 1.25rem; font-family: var(--sd-display); font-weight: 700; font-size: 1.5rem; line-height: var(--sd-lh-head); color: var(--sd-ink); }
.sdp-contact-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .sdp-contact-row { grid-template-columns: 1fr 1fr; } }
.sdp-page .inedit-form-group { margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.sdp-page .inedit-form-group label { font-weight: 600; font-size: .9375rem; color: var(--sd-ink); }
.sdp-page .inedit-form-group input, .sdp-page .inedit-form-group select, .sdp-page .inedit-form-group textarea { width: 100%; box-sizing: border-box; font-size: 1.0625rem; min-height: 50px; padding: .6rem .85rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); color: var(--sd-ink); }
.sdp-page .sdp-contact-form textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.sdp-page .sdp-contact-form input:focus, .sdp-page .sdp-contact-form select:focus, .sdp-page .sdp-contact-form textarea:focus { outline: 2px solid var(--sd-brand); outline-offset: 1px; border-color: var(--sd-brand); }
.sdp-optional { font-weight: 400; color: var(--sd-meta); }
.sdp-contact-hint { margin: .1rem 0 0; font-size: .9375rem; color: var(--sd-meta); }
.sdp-contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .5rem; }
.sdp-page .inedit-contact-submit { min-height: 50px; padding: 0 1.5rem; border: 0; border-radius: var(--sd-radius); background: var(--sd-brand); color: #fff; font-weight: 600; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.sdp-page .inedit-contact-submit:hover { background: var(--sd-brand-dark); }
.sdp-page .inedit-contact-submit:disabled { opacity: .7; cursor: wait; }
.sdp-contact-privacy { margin: 0; font-size: .9375rem; color: var(--sd-meta); }
.sdp-contact-privacy a { color: var(--sd-brand); }
.sdp-contact-status { margin-top: 1rem; }
.sdp-contact-status:empty { display: none; }
.sdp-contact-status.is-ok, .sdp-contact-status.is-error { padding: .85rem 1rem; border-radius: var(--sd-radius); font-weight: 600; }
.sdp-contact-status.is-ok { background: #EAF1E8; color: #1E4D2B; border: 1px solid #B9D2B3; }
.sdp-contact-status.is-error { background: #F8EAE7; color: #7A2617; border: 1px solid #E3BDB4; }
.sdp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Contact Form 7 on the Contact page: match the theme. */
.sdp-page .wpcf7 input:not([type="submit"]):not([type="checkbox"]), .sdp-page .wpcf7 textarea { width: 100%; box-sizing: border-box; min-height: 50px; padding: .6rem .85rem; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-white); color: var(--sd-ink); font-family: var(--sd-body); font-size: 1.0625rem; }
.sdp-page .wpcf7 input[type="submit"] { min-height: 50px; padding: 0 1.5rem; border: 0; border-radius: var(--sd-radius); background: var(--sd-brand); color: #fff; font-family: var(--sd-ui); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.sdp-page .wpcf7 input[type="submit"]:hover { background: var(--sd-brand-dark); }

/* Inline newsletter card inside long numbered lists (sdp_inline_newsletter). */
.sdp-inline-news { margin: 2.25rem 0; padding: 1.25rem 1.4rem; background: var(--sd-paper); border: 1px dashed var(--sd-leader); border-radius: var(--sd-radius); }
.sdp-inline-news .sdp-newsletter-label { margin: 0 0 0.25rem; }
.sdp-inline-news-title { margin: 0 0 0.85rem !important; font-family: var(--sd-display); font-weight: 700; font-size: 1.3125rem; line-height: 1.15; color: var(--sd-ink); }
.sdp-inline-news .newsletter-form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 0.5rem; }
.sdp-inline-news input[type=email] { flex: 1 1 220px; width: auto; min-width: 0; }
.sdp-inline-news button { flex: 0 0 auto; }

/* --- Responsive ------------------------------------------------------------------------ */

@media (max-width: 1240px) {
    .sdp-mast-nav .primary-menu { gap: 0 1.1rem; }
    .sdp-mast-nav .main-navigation a { font-size: 0.875rem; }
    .sdp-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sdp-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
    /* Masthead: wordmark left; search + menu right; topics in the drawer. */
    .sdp-mast-brand { padding: 0.85rem 0; }
    .sdp-tagline { display: none; }
    .sdp-mast-nav { position: static; }
    .sdp-nav-tools { margin-left: 0; }
    .sdp-masthead .mobile-search-form { margin: 0; }
    .sdp-masthead .mobile-menu-toggle { display: inline-flex !important; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; background: transparent; border: 0; }
    .sdp-masthead .hamburger-line { background: var(--sd-ink); }
    .sdp-masthead .mobile-menu-toggle.active .hamburger-line { background: var(--sd-ink); }
    .sdp-drawer-clip { display: block; position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1000; }
    .sdp-drawer-clip .main-navigation { position: absolute; pointer-events: auto; background: var(--sd-ground); overflow-y: auto; padding: 0; max-width: none; display: block; }
    .sdp-mast-nav .primary-menu, .sdp-mast-nav .main-navigation ul.primary-menu { display: block; text-align: left; margin: 0; }
    .sdp-mast-nav .main-navigation .primary-menu li { border-bottom: 1px solid var(--sd-rule); }
    .sdp-mast-nav .main-navigation a { min-height: 58px; width: 100%; padding: 0 1.5rem; font-family: var(--sd-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--sd-ink); }
    .sdp-mast-nav .main-navigation a::after { display: none; }
    .sdp-mast-nav .main-navigation .current-cat > a { background: var(--sd-brand-tint); color: var(--sd-brand); }
    .sdp-mast-nav .main-navigation .sdp-drawer-label { display: block; margin: 1.25rem 1.5rem 0.75rem; font-family: var(--sd-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sd-meta); }
    .sdp-mast-nav .main-navigation .sdp-drawer-sub { display: flex; align-items: center; justify-content: center; width: auto; margin: 1.5rem; min-height: 52px; padding: 0 1rem; font-family: var(--sd-ui); font-size: 1rem; font-weight: 700; background: var(--sd-brand); color: #fff; border-radius: var(--sd-radius); text-decoration: none; }
    .sdp-masthead .mobile-menu-toggle.active { position: fixed; top: 0.75rem; left: auto; right: 0.75rem; z-index: 1002; }

    .sdp-lead-row { grid-template-columns: minmax(0, 1fr); }
    .sdp-lead-row .sdp-receipt { max-width: 640px; }
    .sdp-archive-head--slip .sdp-archive-inner { grid-template-columns: minmax(0, 1fr); }
    .sdp-archive-head .sdp-receipt { max-width: 520px; }
    .sdp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* 1.0.7: topic rows carry 3 cards; in the 2-column band the third sat alone on a row */
    .sdp-topic-row .sdp-grid > :nth-child(3) { display: none; }
    .sdp-layout { grid-template-columns: minmax(0, 1fr); }
    .sdp-layout > .sdp-sidebar { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: start; }
    .sdp-sidebar .sdp-widget-news { display: none; }
}

@media (max-width: 720px) {
    .sdp-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .sdp-topic-row .sdp-grid > :nth-child(3) { display: flex; }
    .sdp-layout > .sdp-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sdp-newsletter .newsletter-form { flex-direction: column; }
    .sdp-page .entry-content .sdp-onpage ol { columns: 1; }
    .sdp-dot--wrap { display: none; }
    .sdp-byline { flex-basis: 100%; }
    .sdp-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sdp-footer-grid > nav:first-of-type { grid-column: 1 / -1; }
    .sdp-receipt-lines a { font-size: 0.8125rem; }
}

@media (max-width: 400px) {
    .sdp-footer-grid { grid-template-columns: minmax(0, 1fr); }
    .sdp-logo { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    a.sdp-frame:hover img { transform: none; }
}

/* The 404 / empty card sits inside an unpadded container: keep the gutter on phones. */
.site-main > .sdp-empty { width: calc(100% - 2 * var(--sd-gutter)); }

/* "About the editor" under a post (named editors). */
.sdp-editor + .sdp-team { margin-top: 1rem; }
.sdp-editor-name { margin: 0 0 0.35rem !important; font-family: var(--sd-display); font-weight: 700; font-size: 1.125rem; }
.sdp-editor-name a { color: var(--sd-brand); text-decoration: none; }
.sdp-editor-name a:hover { text-decoration: underline; }

/* Editor pages (1.0.6): role kicker, profile link, the managing editor's desk list */
.sdp-archive-role { margin: 0 0 0.5rem; font-family: var(--sd-mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sd-brand); }
.sdp-archive-profile { margin: 0.9rem 0 0; font-size: 1rem; }
.sdp-archive-profile a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.sdp-desk { max-width: 40rem; }
.sdp-desk-title { margin: 0 0 1rem; font-size: 1.375rem; }
.sdp-desk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sd-rule); }
.sdp-desk-list li { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px dotted var(--sd-rule); }
.sdp-desk-list a { font-weight: 600; }
.sdp-desk-list span { font-family: var(--sd-mono); font-size: 0.8125rem; color: var(--sd-meta); }
