/* ==========================================================================
   Onda — Ghost 6 theme
   Wave-inspired, warm and friendly. No build step required.

   1.  Tokens
   2.  Dark mode
   3.  Base
   4.  Utilities
   5.  Buttons, pills, badges
   6.  Section titles & wave elements
   7.  Header & navigation
   8.  Mobile menu
   9.  Hero slider
   10. Layout & sidebar
   11. Post cards & mini posts
   12. Pagination
   13. Archive hero (tag / author)
   14. Article
   15. Content (Koenig)
   16. Share, author box, comments, related
   17. Newsletter
   18. Footer
   19. Error pages
   20. Motion
   21. Responsive
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */

:root {
    --onda-grad-a: #ff6b6b;
    --onda-grad-b: #ff9f43;
    --onda-soft-custom: #fff7ef;

    --accent: var(--ghost-accent-color, var(--onda-grad-a));
    --gradient: linear-gradient(110deg, var(--onda-grad-a) 0%, var(--onda-grad-b) 100%);

    --bg: #ffffff;
    --surface: #ffffff;
    --soft: var(--onda-soft-custom);
    --soft-border: color-mix(in srgb, var(--onda-grad-b) 18%, var(--onda-soft-custom));
    --ink: #1e1b3a;
    --text: #3a3856;
    --muted: #7a7891;
    --line: #ececf3;
    --input: #ffffff;

    --font-body: var(--gh-font-body, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --font-heading: var(--gh-font-heading, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --radius-lg: 26px;
    --radius: 18px;
    --radius-sm: 11px;
    --container: 1240px;
    --gutter: 24px;
    --header-h: 84px;

    --shadow-sm: 0 2px 6px -2px rgba(30, 27, 58, .12);
    --shadow: 0 14px 34px -16px rgba(30, 27, 58, .22);
    --shadow-lg: 0 28px 60px -24px rgba(30, 27, 58, .35);
    --ease: cubic-bezier(.22, .9, .32, 1);
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

    /* Wave shapes, used as masks and backgrounds */
    --wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 C 10.7 0 21.3 0 32 8 S 53.3 16 64 8 V16 H0Z' fill='%23000'/%3E%3C/svg%3E");
    --wave-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 C 4 0 8 0 12 4 S 20 8 24 4' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
}

body.font-serif {
    --font-heading: var(--gh-font-heading, "Fraunces", Georgia, "Times New Roman", serif);
}

body.font-rounded {
    --font-heading: var(--gh-font-heading, "Nunito", system-ui, sans-serif);
}

/* 2. Dark mode
   ========================================================================== */

html.theme-dark {
    --bg: #12111f;
    --surface: #1b1a2d;
    --soft: color-mix(in srgb, var(--onda-soft-custom) 7%, #18172a);
    --soft-border: #2a2842;
    --ink: #f4f2ff;
    --text: #cfcde3;
    --muted: #9997b3;
    --line: #2a2842;
    --input: #12111f;
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, .6);
    --shadow-lg: 0 28px 60px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html.theme-auto {
        --bg: #12111f;
        --surface: #1b1a2d;
        --soft: color-mix(in srgb, var(--onda-soft-custom) 7%, #18172a);
        --soft-border: #2a2842;
        --ink: #f4f2ff;
        --text: #cfcde3;
        --muted: #9997b3;
        --line: #2a2842;
        --input: #12111f;
        --shadow: 0 14px 34px -16px rgba(0, 0, 0, .6);
        --shadow-lg: 0 28px 60px -24px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}

/* 3. Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color .3s ease, color .3s ease;
}

img,
svg,
video {
    max-width: 100%;
}

img {
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .2s ease;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

body.font-serif h1,
body.font-serif h2,
body.font-serif h3 {
    font-weight: 700;
    letter-spacing: -.01em;
}

p {
    margin: 0 0 1.2em;
}

button {
    font: inherit;
    color: inherit;
}

::selection {
    background: color-mix(in srgb, var(--onda-grad-a) 28%, transparent);
    color: var(--ink);
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
    outline-offset: 3px;
    border-radius: 6px;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

.site-content {
    flex: 1 0 auto;
}

/* 4. Utilities
   ========================================================================== */

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding-top: 56px;
    padding-bottom: 80px;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--bg);
    font-weight: 700;
}

.skip-link:focus {
    top: 16px;
}

.icon {
    width: 20px;
    height: 20px;
    flex: none;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.text-link .icon {
    width: 16px;
    height: 16px;
    transition: transform .25s var(--ease);
}

.text-link:hover .icon {
    transform: translateX(4px);
}

/* 5. Buttons, pills, badges
   ========================================================================== */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 24px;
    border: 0;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    isolation: isolate;
    overflow: hidden;
    transition: transform .3s var(--ease-bounce), box-shadow .3s ease, color .2s ease, background-color .2s ease;
}

.btn .icon {
    width: 18px;
    height: 18px;
}

.btn-sm {
    min-height: 38px;
    padding: 7px 18px;
    font-size: .88rem;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

/* Signature button: gradient + a wave that rises on hover */
.btn-wave {
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--onda-grad-a) 90%, transparent);
}

.btn-wave::after {
    content: "";
    position: absolute;
    inset: auto -40px 0 -40px;
    z-index: -1;
    height: 210%;
    background: rgba(255, 255, 255, .2);
    -webkit-mask: var(--wave-mask) 0 0 / 64px 16px repeat-x, linear-gradient(#000 0 0) 0 15px / 100% 100% no-repeat;
    mask: var(--wave-mask) 0 0 / 64px 16px repeat-x, linear-gradient(#000 0 0) 0 15px / 100% 100% no-repeat;
    transform: translateY(100%);
    transition: transform .55s var(--ease);
}

.btn-wave:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -14px color-mix(in srgb, var(--onda-grad-a) 95%, transparent);
}

.btn-wave:hover::after {
    transform: translateY(50%);
    animation: onda-wave-x 1.6s linear infinite;
}

.btn-ghost {
    color: var(--ink);
    background: var(--soft);
    box-shadow: inset 0 0 0 1.5px var(--soft-border);
}

.btn-ghost:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .3s var(--ease-bounce);
}

.icon-btn:hover {
    color: var(--accent);
    background: var(--soft);
    transform: rotate(-8deg) scale(1.06);
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.5;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
}

a.tag-pill:hover {
    color: #fff;
    background: var(--accent);
}

.tag-pill.is-soft {
    color: var(--text);
    background: var(--soft);
    box-shadow: inset 0 0 0 1px var(--soft-border);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    font-size: .85rem;
}

.tag-pill.is-floating {
    position: absolute;
    left: 18px;
    top: 18px;
    color: #fff;
    background: rgba(18, 17, 31, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    font-weight: 700;
}

.badge .icon {
    width: 14px;
    height: 14px;
}

.badge-featured {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: var(--gradient);
    box-shadow: var(--shadow-sm);
}

.badge-lock {
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--soft);
}

/* 6. Section titles & wave elements
   ========================================================================== */

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    font-size: clamp(1.45rem, 1.1rem + 1vw, 1.85rem);
}

.section-title.is-small {
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.15rem;
}

.wave-mark {
    width: 34px;
    height: 20px;
    flex: none;
    color: var(--accent);
}

.section-title.is-small .wave-mark {
    width: 26px;
    height: 16px;
}

.wave-mark.is-large {
    width: 64px;
    height: 38px;
}

.wave-mark .w1,
.wave-mark .w2 {
    animation: onda-bob 3.2s ease-in-out infinite;
}

.wave-mark .w2 {
    animation-delay: -1.6s;
}

/* Full-width SVG wave dividers */
.wave-divider {
    position: relative;
    line-height: 0;
    pointer-events: none;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: clamp(40px, 6vw, 90px);
}

.wave-divider .wave-back {
    fill: var(--soft);
    opacity: .55;
}

.wave-divider .wave-front {
    fill: var(--soft);
}

/* Image with a wavy bottom edge */
.wavy-edge {
    -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 11px) no-repeat, var(--wave-mask) bottom left / 140px 16px repeat-x;
    mask: linear-gradient(#000 0 0) top / 100% calc(100% - 11px) no-repeat, var(--wave-mask) bottom left / 140px 16px repeat-x;
}

.soft-section {
    position: relative;
    background: var(--soft);
}

.soft-wave-top {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
}

.soft-wave-bottom {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    transform: scaleY(-1);
}

/* 7. Header & navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    transition: box-shadow .3s ease, background-color .3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(30, 27, 58, .35);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: var(--header-h);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: none;
    color: var(--ink);
}

.site-logo img {
    max-height: 44px;
    width: auto;
}

.site-logo-text {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.03em;
    background: linear-gradient(110deg, var(--ink) 30%, var(--onda-grad-a) 70%, var(--onda-grad-b));
    background-size: 220% 100%;
    background-position: 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: background-position .6s var(--ease);
}

.site-logo:hover .site-logo-text {
    background-position: 100% 0;
}

.site-nav {
    flex: 1;
    min-width: 0;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav a {
    position: relative;
    display: inline-block;
    padding: 8px 12px;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 700;
}

.site-nav .nav a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 8px;
    background: var(--gradient);
    -webkit-mask: var(--wave-line) 0 50% / 16px 6px repeat-x;
    mask: var(--wave-line) 0 50% / 16px 6px repeat-x;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}

.site-nav .nav a:hover,
.site-nav .nav .is-current a {
    color: var(--accent);
}

.site-nav .nav a:hover::after,
.site-nav .nav .is-current a::after {
    transform: scaleX(1);
    animation: onda-line-x 1.2s linear infinite;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.header-link {
    padding: 8px 12px;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 700;
}

.header-link:hover {
    color: var(--accent);
}

.header-burger {
    display: none;
}

.theme-toggle .icon-sun,
html.theme-dark .theme-toggle .icon-moon {
    display: none;
}

html.theme-dark .theme-toggle .icon-sun {
    display: block;
}

@media (prefers-color-scheme: dark) {
    html.theme-auto .theme-toggle .icon-moon { display: none; }
    html.theme-auto .theme-toggle .icon-sun { display: block; }
}

/* Logo centered layout */
.site-header.is-centered .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "nav logo actions";
}

.site-header.is-centered .site-logo { grid-area: logo; }
.site-header.is-centered .site-nav { grid-area: nav; }
.site-header.is-centered .header-actions { grid-area: actions; justify-content: flex-end; }

/* 8. Mobile menu
   ========================================================================== */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    pointer-events: none;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 17, 31, .5);
    opacity: 0;
    transition: opacity .35s ease;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: min(360px, 88vw);
    padding: 22px 24px 30px;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: var(--shadow-lg);
    transform: translateX(-102%);
    transition: transform .45s var(--ease);
}

.menu-open .mobile-menu {
    visibility: visible;
    pointer-events: auto;
}

.menu-open .mobile-menu-overlay {
    opacity: 1;
}

.menu-open .mobile-menu-panel {
    transform: none;
}

.menu-open {
    overflow: hidden;
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav .nav {
    flex-direction: column;
    gap: 2px;
}

.mobile-nav .nav a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.mobile-nav .nav a:hover,
.mobile-nav .nav .is-current a {
    color: var(--accent);
    background: var(--soft);
}

.mobile-nav-secondary {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

.mobile-nav-secondary .nav a {
    font-size: .95rem;
    color: var(--muted);
}

.mobile-menu-foot .member-actions {
    margin: 0;
    flex-wrap: wrap;
}

.mobile-menu-waves {
    width: 90px;
    height: 54px;
    margin-top: auto;
    color: var(--accent);
    opacity: .35;
}

/* 9. Hero slider
   ========================================================================== */

.hero {
    padding-top: 28px;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 36px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

.hero-media {
    position: relative;
    min-height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--soft);
}

.hero-track {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.06);
    transition: opacity .8s var(--ease), transform 1.4s var(--ease), visibility 0s linear .8s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .8s var(--ease), transform 1.4s var(--ease), visibility 0s;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 55% 0 0;
    background: linear-gradient(to top, rgba(18, 17, 31, .45), transparent);
}

.hero-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    color: rgba(255, 255, 255, .55);
}

.hero-placeholder svg {
    width: 30%;
    height: 30%;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(18, 17, 31, .35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transform: translateX(-50%);
}

.hero-arrow {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--gradient);
    cursor: pointer;
    transition: transform .3s var(--ease-bounce);
}

.hero-arrow:hover {
    transform: scale(1.12);
}

.hero-arrow .icon {
    width: 18px;
    height: 18px;
}

.hero-dots {
    display: flex;
    gap: 7px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: width .35s var(--ease), background-color .3s ease;
}

.hero-dot.is-active {
    width: 26px;
    background: #fff;
}

.hero-index {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 10px 18px 10px 0;
    list-style: none;
}

.hero-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.hero-item:last-child {
    border-bottom: 0;
}

.hero-count {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-top: 2px;
    border-radius: 50%;
    color: var(--bg);
    background: var(--ink);
    font-size: .82rem;
    font-weight: 800;
    transition: background-color .3s ease, transform .4s var(--ease-bounce);
}

.hero-item.is-active .hero-count {
    color: #fff;
    background: var(--gradient);
    transform: scale(1.12);
}

.hero-title {
    margin: 0;
    font-size: 1.16rem;
    line-height: 1.35;
}

.hero-title a {
    color: var(--ink);
}

.hero-title a:hover {
    color: var(--accent);
}

.hero-extra {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .5s var(--ease), opacity .4s ease;
}

.hero-extra-inner {
    min-height: 0;
    overflow: hidden;
}

.hero-extra p {
    margin: 12px 0 10px;
    color: var(--muted);
    font-size: .93rem;
    line-height: 1.65;
}

.hero-item.is-active .hero-extra {
    grid-template-rows: 1fr;
    opacity: 1;
}

.hero-progress {
    position: absolute;
    left: 50px;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
}

.hero.is-playing .hero-item.is-active .hero-progress {
    animation: onda-progress var(--slide-duration, 6500ms) linear forwards;
}

.hero.is-paused .hero-item.is-active .hero-progress {
    animation-play-state: paused;
}

/* 10. Layout & sidebar
   ========================================================================== */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
}

.layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.sidebar-sticky {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.widget {
    padding: 26px;
    border-radius: var(--radius);
    background: var(--soft);
    box-shadow: inset 0 0 0 1px var(--soft-border);
    font-size: .95rem;
}

.widget p {
    margin-bottom: 1em;
}

.widget-about-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.widget-about-image {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.widget-about-name {
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.widget-about-text {
    color: var(--text);
}

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

.tag-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-weight: 600;
    transition: background-color .2s ease, transform .3s var(--ease), color .2s ease;
}

.tag-list a:hover {
    color: var(--accent);
    background: var(--surface);
    transform: translateX(4px);
}

.tag-list-count {
    min-width: 28px;
    padding: 1px 8px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    font-size: .78rem;
    font-weight: 700;
    text-align: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease-bounce), color .2s ease, background-color .2s ease;
}

.social-links a:hover {
    color: #fff;
    background: var(--gradient);
    transform: translateY(-3px) rotate(-6deg);
}

.social-links .icon {
    width: 18px;
    height: 18px;
}

.social-links:not(:has(li)) {
    display: none;
}

.social-links.is-compact {
    gap: 6px;
    margin-top: 14px;
}

.social-links.is-compact a {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.social-links.is-compact .icon {
    width: 16px;
    height: 16px;
}

.writer-box .social-links.is-compact {
    margin: 0 0 14px;
}

/* 11. Post cards & mini posts
   ========================================================================== */

.post-feed {
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.post-card {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.post-card.no-image {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px;
    border-radius: var(--radius);
    background: var(--soft);
    box-shadow: inset 0 0 0 1px var(--soft-border);
}

.post-card-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--soft);
    box-shadow: var(--shadow);
    transform: translateZ(0);
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s var(--ease);
}

.post-card:hover .post-card-image {
    transform: scale(1.06) rotate(.6deg);
}

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

.post-card-title {
    margin-bottom: 12px;
    font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem);
    line-height: 1.25;
}

.post-card-title a,
.grid-card-title a,
.post-mini-title a {
    color: var(--ink);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .45s var(--ease), color .2s ease;
}

.post-card-title a:hover,
.grid-card-title a:hover,
.post-mini-title a:hover {
    color: var(--accent);
    background-size: 100% 2px;
}

.post-card-excerpt {
    margin: 16px 0 22px;
    color: var(--text);
    font-size: .98rem;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.post-card-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: .85rem;
}

.post-card-time .icon {
    width: 16px;
    height: 16px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--muted);
    font-size: .88rem;
}

.post-meta a {
    font-weight: 700;
}

.post-meta-avatars {
    display: inline-flex;
}

.post-meta-avatars .avatar + .avatar {
    margin-left: -8px;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--surface);
}

.avatar-empty {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    background: var(--gradient);
}

.avatar-empty svg {
    width: 60%;
    height: 60%;
}

.meta-sep {
    width: 18px;
    height: 8px;
    color: var(--accent);
}

.post-meta-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-meta-time .icon {
    width: 16px;
    height: 16px;
}

.mini-posts {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.post-mini {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px;
    align-items: center;
}

.post-mini-thumb {
    display: block;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--soft);
    box-shadow: var(--shadow-sm);
}

.post-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.post-mini:hover .post-mini-thumb img {
    transform: scale(1.1);
}

.post-mini-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    background: var(--gradient);
}

.post-mini-placeholder svg {
    width: 50%;
    height: 50%;
}

.post-mini-title {
    margin: 0 0 4px;
    font-size: .98rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-mini time {
    color: var(--muted);
    font-size: .8rem;
}

/* Grid cards (related posts) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.grid-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .45s var(--ease), box-shadow .45s ease;
}

.grid-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.grid-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.grid-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 24px 26px;
}

.grid-card-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

/* 12. Pagination
   ========================================================================== */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 2px dashed var(--line);
}

.pagination-info {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 600;
}

.pagination .pagination-next {
    margin-left: auto;
}

.pagination.is-loading .pagination-next {
    pointer-events: none;
    opacity: .8;
}

.pagination.is-loading .pagination-next::after {
    transform: translateY(50%);
    animation: onda-wave-x 1s linear infinite;
}

/* 13. Archive hero (tag / author)
   ========================================================================== */

.archive-hero {
    padding: 64px 0 40px;
    margin-bottom: 40px;
}

.archive-hero-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.archive-hero-image,
.archive-hero-icon {
    width: 132px;
    height: 132px;
    flex: none;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.archive-hero-icon {
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--gradient);
}

.archive-hero-icon svg {
    width: 54%;
    height: 54%;
}

.is-round {
    border-radius: 50%;
}

.archive-title {
    margin-bottom: 8px;
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
}

.archive-description {
    max-width: 640px;
    margin-bottom: 12px;
    font-size: 1.08rem;
}

.archive-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    color: var(--muted);
    font-size: .92rem;
}

.archive-meta span,
.archive-meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.archive-meta .icon {
    width: 17px;
    height: 17px;
}

.archive-count {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    font-size: .85rem;
    font-weight: 700;
}

/* 14. Article
   ========================================================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    height: 4px;
    pointer-events: none;
}

.reading-progress span {
    display: block;
    height: 100%;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
}

.article {
    min-width: 0;
}

.article-header {
    margin-bottom: 36px;
}

.article-header.is-centered {
    text-align: center;
}

.article-header.is-centered .wave-mark {
    margin: 8px auto 0;
}

.article-title {
    margin: 14px 0 16px;
    font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
    line-height: 1.14;
    letter-spacing: -.03em;
}

.article-excerpt {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 1.22rem;
    line-height: 1.6;
}

.article-image {
    margin: 0 0 44px;
}

.article-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.article-image figcaption {
    margin-top: 14px;
    color: var(--muted);
    font-size: .88rem;
    text-align: center;
}

.article-footer {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 48px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Cover template */
.article-cover {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(78vh, 720px);
    padding: 120px 0 calc(clamp(40px, 6vw, 90px) + 30px);
    color: #fff;
    background: var(--ink);
    overflow: hidden;
}

.article-cover.no-image {
    min-height: 0;
    background: var(--gradient);
}

.article-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(18, 17, 31, .82) 10%, rgba(18, 17, 31, .2) 70%);
}

.article-cover-inner {
    position: relative;
    z-index: 2;
    max-width: calc(900px + var(--gutter) * 2);
}

.article-cover .article-title,
.article-cover .article-excerpt,
.article-cover .post-meta,
.article-cover .post-meta a {
    color: #fff;
}

.article-cover .article-excerpt {
    opacity: .85;
}

.article-cover .tag-pill {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.article-cover .meta-sep {
    color: #fff;
}

.article-cover-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 2;
}

.article-cover-wave .wave-back,
.article-cover-wave .wave-front {
    fill: var(--bg);
}

/* Full width posts */
.layout:not(.has-sidebar) > .article {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.layout:not(.has-sidebar) .article-header,
.page-article .article-header {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.layout:not(.has-sidebar) .article-footer {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.page-layout .page-article {
    max-width: 1100px;
    margin: 0 auto;
}

/* 15. Content (Koenig)
   ========================================================================== */

.gh-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(0, 1fr)
        [wide-start] minmax(0, 150px)
        [main-start] min(780px, 100%) [main-end]
        minmax(0, 150px) [wide-end]
        minmax(0, 1fr) [full-end];
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.8;
    word-break: break-word;
}

.has-sidebar .gh-content {
    grid-template-columns: [full-start wide-start main-start] minmax(0, 1fr) [main-end wide-end full-end];
}

.gh-content > * {
    grid-column: main;
    margin-top: 0;
    margin-bottom: 0;
}

.gh-content > * + * {
    margin-top: 1.5em;
}

.gh-content > .kg-width-wide {
    grid-column: wide;
}

.gh-content > .kg-width-full {
    grid-column: full;
}

.has-sidebar .gh-content > .kg-width-full img {
    border-radius: var(--radius);
}

.layout:not(.has-sidebar) .gh-content > .kg-width-full,
.page-article .gh-content > .kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.gh-content > h2,
.gh-content > h3,
.gh-content > h4 {
    margin-top: 1.8em;
}

.gh-content > h2 + *,
.gh-content > h3 + *,
.gh-content > h4 + * {
    margin-top: .7em;
}

.gh-content h2 { font-size: 1.85rem; }
.gh-content h3 { font-size: 1.45rem; }
.gh-content h4 { font-size: 1.2rem; }

.gh-content a:not(.kg-btn):not(.kg-bookmark-container):not(.kg-product-card-button) {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: text-decoration-color .2s ease;
}

.gh-content a:not(.kg-btn):not(.kg-bookmark-container):not(.kg-product-card-button):hover {
    text-decoration-style: wavy;
    text-decoration-color: var(--accent);
}

.gh-content strong {
    color: var(--ink);
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.4em;
}

.gh-content li + li {
    margin-top: .5em;
}

.gh-content ul li::marker {
    color: var(--accent);
}

.gh-content ol li::marker {
    color: var(--accent);
    font-weight: 800;
}

.gh-content blockquote:not(.kg-blockquote-alt) {
    position: relative;
    margin-left: 0;
    margin-right: 0;
    padding: 22px 28px 22px 34px;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--soft);
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 500;
}

.gh-content blockquote:not(.kg-blockquote-alt)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--gradient);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 24'%3E%3Cpath d='M3 0 C 6 4 6 8 3 12 S 0 20 3 24 H6 V0Z' fill='%23000'/%3E%3C/svg%3E") 0 0 / 6px 24px repeat-y;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 24'%3E%3Cpath d='M3 0 C 6 4 6 8 3 12 S 0 20 3 24 H6 V0Z' fill='%23000'/%3E%3C/svg%3E") 0 0 / 6px 24px repeat-y;
}

.gh-content blockquote p:last-child {
    margin-bottom: 0;
}

.gh-content .kg-blockquote-alt {
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.gh-content hr {
    width: 100%;
    height: 14px;
    margin: 3em 0;
    border: 0;
    background: var(--accent);
    -webkit-mask: var(--wave-line) center / 24px 8px repeat-x;
    mask: var(--wave-line) center / 24px 8px repeat-x;
    -webkit-mask-size: 24px 8px;
    max-width: 180px;
    justify-self: center;
    opacity: .7;
}

.gh-content code {
    padding: .15em .45em;
    border-radius: 6px;
    background: var(--soft);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: .88em;
}

.gh-content pre {
    padding: 22px 24px;
    border-radius: var(--radius);
    background: #17162a;
    color: #e9e7ff;
    font-size: .9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.gh-content pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.gh-content table:not(.gist table) {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: .95rem;
}

.gh-content th,
.gh-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.gh-content th {
    color: var(--ink);
    background: var(--soft);
}

.gh-content figure {
    margin-left: 0;
    margin-right: 0;
}

.gh-content figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.5;
    text-align: center;
}

.gh-content .kg-image-card img,
.gh-content .kg-gallery-image img {
    border-radius: var(--radius);
}

.gh-content .kg-width-full.kg-image-card img {
    border-radius: 0;
}

.has-sidebar .gh-content .kg-width-full.kg-image-card img {
    border-radius: var(--radius);
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

.gh-content .kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gh-content .kg-embed-card iframe {
    border-radius: var(--radius);
}

.gh-content .kg-callout-card {
    border-radius: var(--radius);
}

.gh-content .kg-bookmark-card .kg-bookmark-container {
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
}

.gh-content .kg-btn,
.gh-content .kg-header-card-button,
.gh-content .kg-cta-button {
    border-radius: 12px !important;
    font-weight: 700;
}

.gh-content .kg-toggle-card,
.gh-content .kg-product-card-container,
.gh-content .kg-file-card-container,
.gh-content .kg-audio-card {
    border-radius: var(--radius);
}

/* Ghost's members paywall CTA */
.gh-content .gh-post-upgrade-cta-content {
    border-radius: var(--radius-lg);
    background: var(--gradient) !important;
}

.gh-content .gh-post-upgrade-cta a.gh-btn {
    border-radius: 12px;
}

/* 16. Share, author box, comments, related
   ========================================================================== */

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: var(--soft);
    box-shadow: inset 0 0 0 1px var(--soft-border);
}

.share-label {
    margin-right: auto;
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 800;
}

.share-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .3s var(--ease-bounce), color .2s ease, background-color .2s ease;
}

.share-btn:hover {
    color: #fff;
    background: var(--gradient);
    transform: translateY(-3px);
}

.share-btn .icon {
    width: 18px;
    height: 18px;
}

.share-btn.is-copied {
    color: #fff;
    background: #20b486;
}

.share-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    padding: 4px 10px;
    border-radius: 8px;
    color: var(--bg);
    background: var(--ink);
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
}

.writer-box {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 24px;
    align-items: start;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

.writer-box-image img,
.writer-box-image .avatar-empty {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.writer-box-name {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.writer-box-name a {
    color: var(--ink);
}

.writer-box-body p {
    margin-bottom: 12px;
    font-size: .96rem;
}

.article-comments {
    margin-top: 56px;
}

.related {
    margin-top: 80px;
    margin-bottom: calc(clamp(40px, 6vw, 90px) + 30px);
    padding: 40px 0 70px;
}

.related .wave-divider .wave-back,
.related .wave-divider .wave-front,
.archive-hero .wave-divider .wave-back,
.archive-hero .wave-divider .wave-front {
    fill: var(--soft);
}

/* 17. Newsletter
   ========================================================================== */

.newsletter-band {
    padding: 20px 0 90px;
}

.newsletter-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: clamp(32px, 5vw, 60px);
    border-radius: var(--radius-lg);
    color: #fff;
    background: var(--gradient);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    isolation: isolate;
}

.newsletter-card::before,
.newsletter-card::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    z-index: -1;
    height: 120px;
    background: rgba(255, 255, 255, .1);
    -webkit-mask: var(--wave-mask) 0 0 / 220px 40px repeat-x, linear-gradient(#000 0 0) 0 39px / 100% 100% no-repeat;
    mask: var(--wave-mask) 0 0 / 220px 40px repeat-x, linear-gradient(#000 0 0) 0 39px / 100% 100% no-repeat;
    animation: onda-wave-x-lg 14s linear infinite;
}

.newsletter-card::before {
    bottom: -40px;
}

.newsletter-card::after {
    bottom: -70px;
    animation-duration: 9s;
    animation-direction: reverse;
}

.newsletter-waves {
    position: absolute;
    top: 26px;
    right: 30px;
    width: 70px;
    height: 42px;
    color: rgba(255, 255, 255, .45);
}

.newsletter-copy .eyebrow {
    color: rgba(255, 255, 255, .85);
}

.newsletter-title {
    margin-bottom: 12px;
    color: #fff;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
}

.newsletter-copy p {
    margin: 0;
    opacity: .9;
}

.subscribe-field {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.subscribe-field input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 1rem;
    outline: none;
}

.subscribe-field input::placeholder {
    color: var(--muted);
}

.subscribe-form.is-compact .subscribe-field {
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.subscribe-form.is-compact input {
    padding: 13px 16px;
    background: var(--input);
    box-shadow: inset 0 0 0 1.5px var(--line);
}

.subscribe-form.is-compact input:focus {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: onda-spin .8s linear infinite;
}

.subscribe-form.loading .btn-label {
    opacity: .7;
}

.subscribe-form.loading .btn-spinner {
    display: inline-block;
}

.form-message {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    font-size: .92rem;
    font-weight: 600;
}

.subscribe-form.success .form-success,
.subscribe-form.error .form-error {
    display: flex;
}

.subscribe-form.success .subscribe-field {
    display: none;
}

.form-success .icon {
    width: 18px;
    height: 18px;
}

.footer-col .form-error {
    color: #e5484d;
}

/* 18. Footer
   ========================================================================== */

.site-footer {
    margin-top: auto;
}

.site-footer-wave {
    margin-bottom: -1px;
}

.site-footer-body {
    padding: 40px 0 26px;
    background: var(--soft);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.3fr 1.3fr;
    gap: 48px;
    padding-bottom: 46px;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text);
    font-size: .95rem;
}

.footer-col .nav {
    flex-direction: column;
    gap: 2px;
}

.footer-col .nav a {
    padding: 4px 0;
    color: var(--text);
    font-weight: 600;
    transition: color .2s ease, transform .3s var(--ease);
}

.footer-col .nav a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 22px;
    border-top: 1px solid var(--soft-border);
    color: var(--muted);
    font-size: .86rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: var(--ink);
    font-weight: 700;
}

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--gradient);
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(.8);
    transition: opacity .3s ease, transform .4s var(--ease-bounce), visibility 0s linear .3s;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s ease, transform .4s var(--ease-bounce), visibility 0s;
}

.to-top:hover {
    transform: translateY(-4px);
}

/* 19. Error pages
   ========================================================================== */

.error-page {
    text-align: center;
}

.error-card {
    max-width: 640px;
    margin: 0 auto 70px;
    padding: 56px 32px;
    border-radius: var(--radius-lg);
    background: var(--soft);
}

.error-card .wave-mark {
    margin: 0 auto;
}

.error-code {
    margin: 6px 0 0;
    font-family: var(--font-heading);
    font-size: clamp(5rem, 3rem + 8vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.05em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-title {
    font-size: 1.9rem;
}

.error-text {
    color: var(--muted);
    margin-bottom: 28px;
}

.error-latest {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.mini-posts.is-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.error-details {
    margin-top: 32px;
    text-align: left;
    font-size: .9rem;
}

/* 20. Motion
   ========================================================================== */

@keyframes onda-wave-x {
    from { -webkit-mask-position: 0 0, 0 15px; mask-position: 0 0, 0 15px; }
    to { -webkit-mask-position: 64px 0, 0 15px; mask-position: 64px 0, 0 15px; }
}

@keyframes onda-wave-x-lg {
    from { -webkit-mask-position: 0 0, 0 39px; mask-position: 0 0, 0 39px; }
    to { -webkit-mask-position: 220px 0, 0 39px; mask-position: 220px 0, 0 39px; }
}

@keyframes onda-line-x {
    from { -webkit-mask-position: 0 50%; mask-position: 0 50%; }
    to { -webkit-mask-position: 16px 50%; mask-position: 16px 50%; }
}

@keyframes onda-bob {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(2px); }
}

@keyframes onda-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes onda-spin {
    to { transform: rotate(360deg); }
}

/* Reveal on scroll (only when JS is running) */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* 21. Responsive
   ========================================================================== */

@media (max-width: 1180px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .layout.has-sidebar {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 40px;
    }

    .post-card {
        grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
        gap: 26px;
    }
}

@media (max-width: 991px) {
    :root {
        --header-h: 70px;
    }

    .site-nav,
    .header-actions .member-actions {
        display: none;
    }

    .header-burger {
        display: inline-grid;
        margin-left: -10px;
    }

    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
    }

    .header-inner .site-logo {
        justify-self: center;
    }

    .site-header.is-centered .header-inner {
        grid-template-areas: none;
    }

    .site-header.is-centered .site-logo,
    .site-header.is-centered .header-actions {
        grid-area: auto;
    }

    .site-logo img {
        max-height: 36px;
    }

    .site-logo-text {
        font-size: 1.3rem;
    }

    .hero-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .hero-media {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .hero-index {
        padding: 0 8px;
    }

    .layout.has-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar-sticky {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .newsletter-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }
}

@media (max-width: 760px) {
    :root {
        --gutter: 18px;
    }

    body {
        font-size: 1rem;
    }

    .section {
        padding-top: 36px;
        padding-bottom: 56px;
    }

    .post-feed {
        gap: 48px;
    }

    .post-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .post-card-media {
        aspect-ratio: 16 / 11;
    }

    .hero-item {
        padding: 16px 0;
    }

    .hero-title {
        font-size: 1.05rem;
    }

    .hero-controls {
        bottom: 12px;
    }

    .sidebar-sticky,
    .card-grid,
    .mini-posts.is-row,
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-grid {
        gap: 36px;
    }

    .archive-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .archive-hero-image,
    .archive-hero-icon {
        width: 96px;
        height: 96px;
    }

    .writer-box {
        grid-template-columns: minmax(0, 1fr);
        text-align: left;
    }

    .share-label {
        width: 100%;
    }

    .subscribe-field {
        flex-direction: column;
    }

    .gh-content {
        font-size: 1.03rem;
    }

    .to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}
