/* ==========================================================================
   Public site
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 244, 238, .86);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgba(222, 214, 200, .7);
    transition: box-shadow .25s ease, background .25s ease;
}

.site-header.is-scrolled {
    background: rgba(247, 244, 238, .96);
    box-shadow: 0 12px 40px rgba(25, 28, 31, .06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand__mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    color: var(--ink);
}

.brand__mark svg {
    width: 100%;
    height: 100%;
}

.brand__text {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1;
}

.brand__logo {
    height: 36px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: 8px;
}

.site-nav__link {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 6px 0;
    white-space: nowrap;
    transition: color .2s ease;
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--accent);
    transition: right .25s ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--ink);
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
    right: 0;
}

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

.header-cta {
    border-radius: 999px;
    padding: 8px 16px;
}

.text-link {
    font-size: 14px;
}

.header-actions > .text-link {
    border: 0;
    padding: 6px 2px;
    color: var(--ink-soft);
    border-bottom: 1px solid transparent;
}

.header-actions > .text-link:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.user-menu {
    position: relative;
}

.user-menu__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    border-radius: 50%;
}

.user-menu__summary::-webkit-details-marker {
    display: none;
}

.user-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: 230px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 120;
}

.user-menu__panel::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: var(--white);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: rotate(45deg);
}

.user-menu__head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu__head strong {
    font-size: 14px;
}

.user-menu__head span {
    font-size: 11px;
    color: var(--muted-2);
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu__panel > a,
.user-menu__panel form button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    color: var(--ink-soft);
}

.user-menu__panel > a:hover,
.user-menu__panel form button:hover {
    background: var(--paper-2);
    color: var(--ink);
}

.user-menu__panel .user-menu__admin {
    color: var(--accent-dark);
    font-weight: 600;
}

.user-menu__panel form {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 6px;
}

.user-menu__panel form button {
    color: var(--muted);
}

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    padding: 0;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 9px;
    width: 20px;
    height: 1.5px;
    background: var(--ink);
    transition: transform .2s ease, top .2s ease;
}

.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 22px; }

body.nav-open .nav-toggle span:first-child {
    top: 18px;
    transform: rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
    top: 18px;
    transform: rotate(-45deg);
}

.search-panel {
    border-top: 1px solid var(--line);
    background: var(--white);
    padding: 22px 0;
    animation: panelIn .2s ease both;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-panel__form {
    display: flex;
    gap: 10px;
}

.search-panel__form input {
    flex: 1;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    background: transparent;
    font-family: var(--serif);
    font-size: 24px;
    padding: 8px 0;
    border-radius: 0;
}

.search-panel__form input:focus {
    outline: none;
    border-color: var(--ink);
}

.search-panel__hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted-2);
}

.search-panel__hint a {
    color: var(--ink);
    border-bottom: 1px solid var(--line-strong);
}

/* Hero ------------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 88px;
    border-bottom: 1px solid var(--line);
}

.hero__texture {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(180, 85, 45, .10), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(47, 93, 80, .10), transparent 34%),
        linear-gradient(rgba(25, 28, 31, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(25, 28, 31, .035) 1px, transparent 1px);
    background-size: auto, auto, 44px 44px, 44px 44px;
    mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 64px;
    align-items: center;
}

.hero__copy {
    padding: 24px 0;
    max-width: 620px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero__eyebrow span {
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.hero__title {
    font-family: var(--serif);
    font-size: clamp(44px, 5.6vw, 72px);
    line-height: 1.12;
    letter-spacing: -.02em;
    font-weight: 600;
    margin: 26px 0 24px;
    max-width: 12em;
    text-wrap: balance;
}

.hero__intro {
    font-size: 17px;
    line-height: 1.85;
    color: var(--muted);
    max-width: 30em;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.hero__stats {
    display: flex;
    gap: 44px;
    margin-top: 50px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    max-width: 420px;
}

.hero__stats div {
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
}

.hero__stats dd {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
}

.hero__stats dt {
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero__visual {
    position: relative;
    padding: 16px 0 28px 14px;
}

.hero__side-note {
    position: absolute;
    right: -28px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
    font-size: 9px;
    letter-spacing: .32em;
    color: var(--muted-2);
    white-space: nowrap;
}

.feature-card {
    position: relative;
    display: block;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(25, 28, 31, .12);
    transition: transform .35s ease, box-shadow .35s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 38px 80px rgba(25, 28, 31, .16);
}

.feature-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--paper-2);
}

.feature-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.feature-card:hover .feature-card__media img {
    transform: scale(1.04);
}

.feature-card__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.feature-card__fallback > span {
    font-family: var(--serif);
    font-size: 88px;
    color: rgba(255, 255, 255, .8);
}

.feature-card__label {
    position: absolute;
    left: 18px;
    top: 18px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(20, 24, 28, .82);
    color: #fff;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.feature-card__body {
    position: relative;
    padding: 26px 28px 28px;
    background: var(--white);
}

.feature-card__body h2 {
    font-family: var(--serif);
    font-size: clamp(24px, 2.4vw, 30px);
    line-height: 1.35;
    margin: 12px 0 10px;
    font-weight: 600;
}

.feature-card__body p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 380px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 249, .6);
    text-align: center;
    padding: 40px;
}

.hero__empty-mark {
    font-family: var(--serif);
    font-size: 52px;
    color: var(--line-strong);
}

.hero__empty p {
    color: var(--muted);
}

/* Home sections ---------------------------------------------------------- */

.home-section {
    padding: 96px 0;
}

.home-section--tint {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.home-section--compact {
    padding: 64px 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.section-head h2 {
    font-family: var(--serif);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    margin-top: 10px;
    letter-spacing: -.01em;
}

.section-head .eyebrow {
    display: block;
}

.picks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

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

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

.story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.story-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: var(--paper-2);
}

.story-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.story-card:hover .story-card__cover img {
    transform: scale(1.04);
}

.story-card__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.story-card__fallback span {
    font-family: var(--serif);
    font-size: 54px;
    color: rgba(255, 255, 255, .78);
}

.story-card__pin {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(20, 24, 28, .8);
    color: #fff;
    font-size: 10px;
    letter-spacing: .08em;
}

.story-card__body {
    padding: 18px 2px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.story-card__meta {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: .03em;
}

.story-card__meta .eyebrow {
    font-size: 10px;
}

.story-card__title {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.4;
    font-weight: 600;
    margin: 10px 0 8px;
    letter-spacing: -.01em;
}

.story-card__title a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .3s ease;
}

.story-card:hover .story-card__title a {
    background-size: 100% 1px;
}

.story-card__excerpt {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    font-size: 11px;
    color: var(--muted-2);
}

.story-card__author {
    letter-spacing: .03em;
}

.story-card--wide .story-card__cover {
    aspect-ratio: 16 / 9;
}

.story-card--wide .story-card__title {
    font-size: 27px;
}

.story-card--wide .story-card__excerpt {
    -webkit-line-clamp: 3;
}

.stories-grid--latest {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.stories-grid--latest .story-card__title {
    font-size: 19px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.topic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 26px 24px 22px;
    background: var(--paper);
    transition: background .25s ease;
}

.topic-card:hover {
    background: var(--white);
}

.topic-card__index {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: .1em;
}

.topic-card__name {
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 600;
    margin: 18px 0 8px;
}

.topic-card__desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-card__count {
    margin-top: 18px;
    font-size: 11px;
    color: var(--muted-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.tag-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    align-items: start;
}

.tag-row h2 {
    font-family: var(--serif);
    font-size: 28px;
    margin-top: 8px;
}

.home-cta {
    position: relative;
    background: var(--dark);
    color: var(--paper);
    overflow: hidden;
}

.home-cta::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -160px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 85, 45, .34), transparent 65%);
    pointer-events: none;
}

.home-cta__inner {
    position: relative;
    z-index: 1;
    padding: 90px 32px;
    max-width: 1000px;
}

.home-cta .eyebrow {
    color: #ce9a7b;
}

.home-cta h2 {
    font-family: var(--serif);
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.35;
    font-weight: 500;
    margin: 18px 0 32px;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.home-cta__actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

/* Cover tones ------------------------------------------------------------ */

.tone-1 { background: linear-gradient(135deg, #2f5d50 0%, #6c907c 55%, #c7d1bd 100%); }
.tone-2 { background: linear-gradient(135deg, #7c3b22 0%, #b4552d 52%, #e3b18e 100%); }
.tone-3 { background: linear-gradient(135deg, #2f3b4f 0%, #5f718b 60%, #c3cad4 100%); }
.tone-4 { background: linear-gradient(135deg, #5b4529 0%, #9a7a4e 58%, #dcc9a7 100%); }
.tone-5 { background: linear-gradient(135deg, #4a2f3c 0%, #86596b 58%, #d4b8c1 100%); }
.tone-6 { background: linear-gradient(135deg, #34452f 0%, #6d8259 58%, #c8d2b5 100%); }

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

.archive-hero {
    padding: 66px 0 48px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(239, 234, 225, .55), transparent);
}

.archive-hero__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.archive-hero h1 {
    font-family: var(--serif);
    font-size: clamp(40px, 5vw, 58px);
    line-height: 1.15;
    font-weight: 600;
    margin: 14px 0 12px;
    letter-spacing: -.02em;
}

.archive-hero__desc {
    color: var(--muted);
    max-width: 38em;
    font-size: 15px;
}

.archive-hero__count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-bottom: 8px;
    color: var(--muted-2);
    white-space: nowrap;
}

.archive-hero__count strong {
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.archive-hero__count span {
    font-size: 12px;
    letter-spacing: .1em;
}

.archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    padding-top: 40px;
    padding-bottom: 90px;
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.filter-chip span {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-2);
}

.filter-chip:hover {
    background: var(--paper-2);
    color: var(--ink);
}

.filter-chip.is-active {
    background: var(--ink);
    color: var(--paper);
}

.filter-chip.is-active span {
    color: rgba(255, 255, 255, .55);
}

.archive-aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: calc(var(--header-h) + 28px);
    align-self: start;
}

.aside-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 249, .65);
}

.aside-card h3 {
    font-family: var(--serif);
    font-size: 20px;
    margin: 8px 0 10px;
}

.aside-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.75;
}

.aside-card .text-link {
    display: inline-block;
    margin-top: 14px;
}

.aside-card--search h3 {
    font-size: 18px;
}

.aside-search {
    display: flex;
    margin-top: 14px;
    border-bottom: 1px solid var(--line-strong);
}

.aside-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 8px 0;
    font-size: 13px;
    min-width: 0;
}

.aside-search input:focus {
    outline: none;
}

.aside-search button {
    border: 0;
    background: transparent;
    padding: 0 4px;
    font-size: 16px;
    color: var(--accent);
}

.empty-state {
    margin-top: 12px;
}

/* Search ----------------------------------------------------------------- */

.search-hero {
    padding: 72px 0 40px;
    border-bottom: 1px solid var(--line);
}

.search-hero h1 {
    font-family: var(--serif);
    font-size: clamp(38px, 5vw, 54px);
    font-weight: 600;
    margin: 12px 0 26px;
    letter-spacing: -.02em;
}

.search-hero__form {
    display: flex;
    gap: 10px;
    max-width: 720px;
}

.search-hero__form input {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 15px;
}

.search-hero__form input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(25, 28, 31, .06);
}

.search-hero__summary {
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}

.search-results {
    padding-top: 42px;
    padding-bottom: 96px;
    max-width: 900px;
}

.search-suggest p {
    color: var(--muted);
    margin-bottom: 16px;
}

.search-list {
    display: flex;
    flex-direction: column;
}

.search-item {
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}

.search-item:first-child {
    padding-top: 0;
}

.search-item__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--muted-2);
}

.search-item h2 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0 8px;
}

.search-item h2 a:hover {
    color: var(--accent-dark);
}

.search-item p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.search-item__foot {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    font-size: 11px;
    color: var(--muted-2);
}

/* Article ---------------------------------------------------------------- */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 26px 0 0;
    font-size: 12px;
    color: var(--muted-2);
    flex-wrap: wrap;
}

.breadcrumb a:hover {
    color: var(--ink);
}

.breadcrumb__current {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60vw;
}

.article__header {
    max-width: 840px;
    margin: 44px auto 42px;
    text-align: center;
}

.article__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted-2);
    flex-wrap: wrap;
}

.article__title {
    font-family: var(--serif);
    font-size: clamp(36px, 5.2vw, 58px);
    line-height: 1.25;
    letter-spacing: -.02em;
    font-weight: 600;
    margin: 20px 0 18px;
}

.article__dek {
    font-size: 17px;
    line-height: 1.8;
    color: var(--muted);
    max-width: 40em;
    margin: 0 auto;
}

.article__byline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 26px;
    font-size: 12px;
    color: var(--muted);
}

.article__author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-weight: 600;
}

.article__views {
    color: var(--muted-2);
}

.article__cover {
    padding: 0;
    margin: 0 0 54px;
}

.article__cover .container {
    max-width: 1040px;
}

.article__cover img {
    width: 100%;
    aspect-ratio: 16 / 8.6;
    object-fit: cover;
    border-radius: var(--radius);
}

.article__layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 260px;
    justify-content: center;
    gap: 64px;
    padding-bottom: 40px;
}

.article__main {
    min-width: 0;
}

.article__main .prose {
    font-size: 18.5px;
    line-height: 2;
}

.article__main .prose > p:first-of-type::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: .82;
    padding: 8px 10px 0 0;
    font-family: var(--serif);
    color: var(--accent);
}

.article__tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.article__tags-label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-right: 4px;
}

.article__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.favorite-form {
    display: inline-flex;
}

.favorite-button,
.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    color: var(--ink-soft);
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.favorite-button svg,
.share-button svg {
    width: 17px;
    height: 17px;
}

.favorite-button:hover,
.share-button:hover {
    border-color: var(--ink);
    background: var(--white);
}

.favorite-button.is-active {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.favorite-button__count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-2);
    padding-left: 6px;
    border-left: 1px solid currentColor;
    opacity: .7;
}

.article__side {
    min-width: 0;
}

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

.side-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 249, .55);
}

.side-meta {
    margin-top: 12px;
}

.side-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 12px;
}

.side-meta > div:last-child {
    border-bottom: 0;
}

.side-meta dt {
    color: var(--muted-2);
}

.side-meta dd {
    color: var(--ink-soft);
    font-weight: 500;
}

.side-card .tag-cloud {
    margin-top: 12px;
}

.side-card--cta {
    background: var(--paper-2);
    border-color: var(--paper-3);
}

.side-card--cta h3 {
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.4;
    margin: 8px 0 8px;
}

.side-card--cta p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.author-box__body h2 {
    font-family: var(--serif);
    font-size: 22px;
    margin: 4px 0 6px;
}

.author-box__body p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.75;
}

.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 34px;
}

.article-nav--single {
    grid-template-columns: 1fr;
}

.article-nav__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    transition: background .2s ease, border-color .2s ease;
}

.article-nav__item:hover {
    background: var(--white);
    border-color: var(--line-strong);
}

.article-nav__item span {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.article-nav__item strong {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
}

.article-nav__item--next {
    text-align: right;
}

.related {
    padding: 80px 0;
    border-top: 1px solid var(--line);
    background: var(--paper-2);
}

/* Comments --------------------------------------------------------------- */

.comments {
    padding: 70px 0 90px;
    border-top: 1px solid var(--line);
}

.comments__inner {
    max-width: 820px;
}

.comments__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.comments__head h2 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 600;
    margin-top: 6px;
}

.comments__head h2 span {
    font-size: 16px;
    color: var(--muted-2);
    font-family: var(--sans);
    font-weight: 400;
    margin-left: 4px;
}

.comments__note {
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: .06em;
}

.comment-form {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    margin-bottom: 34px;
}

.comment-form__head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

.comment-form__head strong {
    color: var(--ink);
}

.comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--paper);
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    min-height: 110px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--ink);
    background: #fff;
}

.comment-form__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.comment-form__hint {
    font-size: 11.5px;
    color: var(--muted-2);
}

.comment-form__hint span {
    font-family: var(--mono);
    color: var(--muted);
}

.comment-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    margin-bottom: 34px;
    flex-wrap: wrap;
}

.comment-login p {
    color: var(--muted);
    font-size: 14px;
}

.comment-login > div {
    display: flex;
    gap: 10px;
}

.comments__closed {
    padding: 22px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment {
    display: flex;
    gap: 14px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.comment-list__empty {
    color: var(--muted-2);
    font-size: 13px;
    padding: 20px 0;
}

.comment__body {
    min-width: 0;
}

.comment__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.comment__head strong {
    font-size: 13.5px;
}

.comment__head time {
    font-size: 11px;
    color: var(--muted-2);
}

.comment__body > p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.75;
    word-break: break-word;
}

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

.single-page {
    padding-bottom: 90px;
}

.single-page__header {
    max-width: 760px;
    padding: 54px 0 36px;
}

.single-page__header h1 {
    font-family: var(--serif);
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.2;
    margin: 14px 0 12px;
    letter-spacing: -.02em;
}

.single-page__dek {
    color: var(--muted);
    font-size: 16px;
}

.single-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 280px;
    gap: 64px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.single-page__aside {
    padding-top: 30px;
}

.single-page__updated {
    margin-top: 16px;
    font-size: 11px;
    color: var(--muted-2);
}

/* Authentication --------------------------------------------------------- */

.auth {
    padding: 56px 0 80px;
}

.auth__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.auth__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px;
    background:
        radial-gradient(circle at 80% 12%, rgba(180, 85, 45, .35), transparent 45%),
        linear-gradient(145deg, #172019, #1d2a27 45%, #2f5d50 100%);
    color: var(--paper);
    overflow: hidden;
}

.auth__aside::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .04), 0 0 0 80px rgba(255, 255, 255, .03);
    pointer-events: none;
}

.auth__aside--register {
    background:
        radial-gradient(circle at 20% 85%, rgba(180, 85, 45, .32), transparent 46%),
        linear-gradient(145deg, #1b1d25, #262b33 50%, #3b4653 100%);
}

.auth__aside .eyebrow {
    color: #d4a184;
}

.auth__aside h1 {
    font-family: var(--serif);
    font-size: clamp(38px, 4.4vw, 56px);
    line-height: 1.25;
    font-weight: 500;
    margin: 24px 0;
    letter-spacing: -.01em;
}

.auth__quote {
    position: relative;
    z-index: 1;
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.9;
    color: rgba(247, 244, 238, .72);
    max-width: 30em;
    border-left: 1px solid rgba(255, 255, 255, .25);
    padding-left: 18px;
}

.auth__aside-foot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(247, 244, 238, .5);
}

.auth__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px;
    background: var(--paper);
}

.auth__panel > * {
    width: 100%;
    max-width: 380px;
}

.auth__panel-head {
    margin-bottom: 28px;
}

.auth__panel-head h2 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 600;
    margin: 8px 0 8px;
}

.auth__panel-head p {
    font-size: 13.5px;
    color: var(--muted);
}

.auth__switch {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.auth__switch p {
    margin-bottom: 8px;
}


/* ==========================================================================
   Member center
   ========================================================================== */

.account {
    display: grid;
    grid-template-columns: 266px minmax(0, 1fr);
    gap: 48px;
    padding-top: 44px;
    padding-bottom: 96px;
    align-items: start;
}

.account__sidebar {
    position: sticky;
    top: calc(var(--header-h) + 26px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-card {
    padding: 26px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
}

.account-card .avatar {
    margin: 0 auto 14px;
}

.account-card h2 {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.3;
}

.account-card__handle {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-2);
    margin: 3px 0 10px;
}

.account-card__joined {
    font-size: 11px;
    color: var(--muted-2);
    margin-bottom: 12px;
}

.account-nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 249, .6);
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 13.5px;
    color: var(--muted);
    transition: background .2s ease, color .2s ease;
}

.account-nav a:hover {
    background: var(--paper-2);
    color: var(--ink);
}

.account-nav a.is-active {
    background: var(--ink);
    color: var(--paper);
}

.account-nav__icon {
    width: 18px;
    text-align: center;
    font-size: 11px;
    opacity: .75;
}

.account__sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-logout {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
}

.account-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.account__main {
    min-width: 0;
}

.account-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.account-head h1 {
    font-family: var(--serif);
    font-size: clamp(30px, 3.6vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    margin: 8px 0 6px;
    letter-spacing: -.01em;
}

.account-head p {
    font-size: 13.5px;
    color: var(--muted);
}

.account-head__count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted-2);
    white-space: nowrap;
    padding-bottom: 6px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.stat-card__label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.stat-card strong {
    font-family: var(--serif);
    font-size: 42px;
    line-height: 1.1;
    font-weight: 500;
    margin: 6px 0 2px;
}

.stat-card__text {
    font-size: 28px !important;
}

.stat-card__hint {
    font-size: 11.5px;
    color: var(--muted-2);
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.account-panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.account-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.account-panel__head h2 {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    margin-top: 6px;
}

.account-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.quick-links {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.quick-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
    color: var(--ink-soft);
}

.quick-links a:last-child {
    border-bottom: 0;
}

.quick-links a:hover {
    color: var(--accent);
}

.account-empty {
    padding: 28px 0;
    color: var(--muted);
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.comment-mini-list {
    display: flex;
    flex-direction: column;
}

.comment-mini {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.comment-mini:first-child {
    border-top: 0;
    padding-top: 0;
}

.comment-mini__head {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 5px;
}

.comment-mini__head a {
    font-size: 13px;
    font-weight: 600;
}

.comment-mini__head a:hover {
    color: var(--accent);
}

.comment-mini p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.65;
}

.comment-mini time {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--muted-2);
}

.account-form__grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.profile-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
}

.profile-avatar-card .field__hint {
    text-align: center;
}

.profile-avatar-card__username {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 4px;
}

.account-form__fields {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.account-form__fields .field + .field {
    margin-top: 18px;
}

.my-comment-list {
    display: flex;
    flex-direction: column;
}

.my-comment {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.my-comment:first-child {
    border-top: 0;
    padding-top: 0;
}

.my-comment__head {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.my-comment__article {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
}

.my-comment__article:hover {
    color: var(--accent);
}

.my-comment__content {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
    background: var(--paper);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.my-comment__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted-2);
}

.favorite-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.favorite-item {
    display: flex;
    flex-direction: column;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.favorite-item__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted-2);
}

.plain-list {
    margin-top: 10px;
}

.plain-list li {
    position: relative;
    padding-left: 14px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.75;
}

.plain-list li + li {
    margin-top: 6px;
}

.plain-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .72em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
    background: var(--dark);
    color: rgba(247, 244, 238, .72);
    padding: 64px 0 28px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(247, 244, 238, .12);
}

.brand--footer {
    color: var(--paper);
    margin-bottom: 16px;
}

.site-footer__brand p {
    font-size: 13px;
    line-height: 1.8;
    max-width: 26em;
    color: rgba(247, 244, 238, .55);
}

.site-footer__social {
    display: flex;
    gap: 16px;
    margin-top: 18px;
}

.site-footer__social a {
    font-size: 11px;
    letter-spacing: .08em;
    color: rgba(247, 244, 238, .7);
    border-bottom: 1px solid rgba(247, 244, 238, .25);
    padding-bottom: 2px;
}

.site-footer__social a:hover {
    color: #fff;
    border-color: #fff;
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.site-footer__col h3 {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(247, 244, 238, .4);
    margin-bottom: 6px;
    font-weight: 600;
}

.site-footer__col a,
.site-footer__col p {
    font-size: 13px;
    color: rgba(247, 244, 238, .68);
    line-height: 1.7;
}

.site-footer__col a:hover {
    color: #fff;
}

.site-footer__col--note p {
    color: rgba(247, 244, 238, .5);
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 22px;
    font-size: 11px;
    color: rgba(247, 244, 238, .38);
    flex-wrap: wrap;
}

.site-footer__meta {
    display: flex;
    gap: 18px;
    align-items: center;
}

.site-footer__meta a {
    color: rgba(247, 244, 238, .6);
}

.site-footer__meta a:hover {
    color: #fff;
}

/* Error & setup pages ---------------------------------------------------- */

.page-error,
.page-install {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(180, 85, 45, .12), transparent 36%),
        radial-gradient(circle at 80% 80%, rgba(47, 93, 80, .12), transparent 38%),
        var(--paper);
}

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.error-page__inner {
    width: 100%;
    max-width: 620px;
    text-align: center;
}

.error-page .brand {
    justify-content: center;
    margin-bottom: 40px;
}

.error-page__code {
    font-family: var(--serif);
    font-size: clamp(96px, 18vw, 150px);
    line-height: .85;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    letter-spacing: -.04em;
    margin-bottom: 12px;
}

.error-page h1 {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 12px;
}

.error-page__message {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 28px;
}

.error-page__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.error-page__debug {
    margin-top: 30px;
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--white);
}

.error-page__debug summary {
    cursor: pointer;
    font-weight: 600;
}

.error-page__debug dl {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 4px 10px;
    margin: 12px 0;
}

.error-page__debug dt {
    color: var(--muted-2);
}

.error-page__debug pre {
    background: var(--dark);
    color: #d9d2c5;
    padding: 12px;
    border-radius: 6px;
    overflow: auto;
    font-size: 10px;
    max-height: 260px;
}

.error-page__foot {
    margin-top: 40px;
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: .08em;
}

.setup-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.setup-page__inner {
    width: 100%;
    max-width: 880px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}

.setup-page__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
    background: var(--accent-soft);
    padding: 5px 10px;
    border-radius: 999px;
}

.setup-page h1 {
    font-family: var(--serif);
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 600;
    margin: 20px 0 12px;
    letter-spacing: -.02em;
}

.setup-page__lead {
    color: var(--muted);
    font-size: 15px;
    max-width: 38em;
    line-height: 1.8;
}

.setup-page__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 36px 0;
}

.setup-page__steps > div {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
}

.setup-page__steps span {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
}

.setup-page__steps strong {
    display: block;
    margin: 8px 0 6px;
    font-family: var(--serif);
    font-size: 18px;
}

.setup-page__steps p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.7;
}

.setup-page__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.setup-page__actions p {
    font-size: 11.5px;
    color: var(--muted-2);
}

.setup-page__actions code {
    font-family: var(--mono);
    background: var(--paper-2);
    padding: 2px 5px;
    border-radius: 4px;
}

.setup-page__foot {
    margin-top: 30px;
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: .06em;
}

/* Reveal animation ------------------------------------------------------- */

/* Content is always visible; the reveal script only adds a class and must
   never be required for readability (progressive enhancement). */
[data-reveal] {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

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

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

    .hero__grid {
        gap: 40px;
    }

    .article__layout {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 40px;
    }

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

    .site-footer__grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .site-footer__col--note {
        display: none;
    }
}

@media (max-width: 960px) {
    .site-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    body.nav-open .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.nav-open .site-nav {
        display: flex;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-left: 0;
        padding: 24px 32px 40px;
        background: var(--paper);
        overflow-y: auto;
        animation: panelIn .2s ease both;
    }

    body.nav-open .site-nav__link {
        width: 100%;
        padding: 16px 0;
        font-family: var(--serif);
        font-size: 24px;
        border-bottom: 1px solid var(--line);
    }

    body.nav-open .site-nav__link::after {
        display: none;
    }

    .header-cta {
        display: none;
    }

    .hero {
        padding: 40px 0 64px;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero__copy {
        max-width: none;
    }

    .hero__visual {
        max-width: 620px;
        padding-left: 0;
    }

    .hero__side-note {
        display: none;
    }

    .hero__stats {
        margin-top: 34px;
        gap: 34px;
    }

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

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

    .archive-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .article__layout {
        grid-template-columns: 1fr;
    }

    .article__side {
        display: none;
    }

    .article__title {
        font-size: clamp(32px, 6vw, 46px);
    }

    .article__cover .container {
        padding: 0 20px;
    }

    .single-page__layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .auth__grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth__aside {
        min-height: 300px;
        padding: 38px;
    }

    .auth__aside h1 {
        font-size: 38px;
    }

    .auth__panel {
        padding: 38px;
    }

    .account {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .account__sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .account__sidebar-foot {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .account__sidebar-foot form {
        flex: 1;
    }

    .account__sidebar-foot .button {
        flex: 1;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

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

    .tag-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .stories-grid--latest {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        gap: 14px;
    }

    .brand__text {
        font-size: 20px;
    }

    .header-actions {
        gap: 4px;
    }

    .header-actions .icon-button {
        width: 34px;
        height: 34px;
    }

    .hero {
        padding: 28px 0 52px;
    }

    .hero__title {
        font-size: clamp(36px, 10vw, 48px);
        margin: 18px 0 16px;
    }

    .hero__intro {
        font-size: 15px;
    }

    .hero__stats {
        gap: 26px;
        padding-top: 18px;
    }

    .hero__stats dd {
        font-size: 22px;
    }

    .feature-card__body {
        padding: 20px;
    }

    .home-section {
        padding: 64px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 28px;
    }

    .picks-grid,
    .stories-grid,
    .stories-grid--archive {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .story-card--wide .story-card__title {
        font-size: 23px;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .topic-card {
        min-height: 0;
        padding: 22px;
    }

    .archive-hero {
        padding: 42px 0 30px;
    }

    .archive-hero__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .archive-hero h1 {
        font-size: 38px;
    }

    .archive-aside {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 14px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-chip {
        white-space: nowrap;
    }

    .search-hero {
        padding: 46px 0 30px;
    }

    .search-hero__form {
        flex-direction: column;
    }

    .search-results {
        padding-bottom: 64px;
    }

    .article__header {
        margin: 28px auto 30px;
    }

    .article__byline {
        flex-direction: column;
        gap: 8px;
    }

    .article__cover {
        margin-bottom: 34px;
    }

    .article__cover img {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .article__main .prose {
        font-size: 17px;
        line-height: 1.95;
    }

    .article__main .prose > p:first-of-type::first-letter {
        font-size: 3em;
    }

    .author-box {
        flex-direction: column;
        padding: 22px;
    }

    .article-nav {
        grid-template-columns: 1fr;
    }

    .article-nav__item--next {
        text-align: left;
    }

    .related {
        padding: 56px 0;
    }

    .comments {
        padding: 48px 0 64px;
    }

    .comments__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .single-page__header {
        padding: 36px 0 26px;
    }

    .auth {
        padding: 28px 0 48px;
    }

    .auth__grid {
        border-radius: var(--radius);
    }

    .auth__aside {
        min-height: 240px;
        padding: 28px;
    }

    .auth__aside h1 {
        font-size: 32px;
        margin: 16px 0;
    }

    .auth__quote {
        font-size: 13px;
    }

    .auth__panel {
        padding: 28px 22px 34px;
    }

    .account {
        padding-top: 28px;
        padding-bottom: 64px;
    }

    .account__sidebar {
        grid-template-columns: 1fr;
    }

    .account-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto auto;
        column-gap: 16px;
        text-align: left;
        padding: 20px;
    }

    .account-card .avatar {
        grid-row: 1 / 4;
        margin: 0;
    }

    .account-card h2 {
        font-size: 20px;
    }

    .account-card__handle,
    .account-card__joined {
        margin: 0;
    }

    .account-card .badge {
        grid-column: 2;
        justify-self: start;
        margin-top: 6px;
    }

    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .account-nav a {
        font-size: 12.5px;
        padding: 8px 10px;
    }

    .account-nav__icon {
        display: none;
    }

    .account__sidebar-foot {
        flex-direction: column;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px 12px;
        padding: 18px;
    }

    .stat-card strong {
        font-size: 30px;
        order: 2;
    }

    .stat-card__label {
        order: 1;
    }

    .stat-card__hint {
        order: 3;
        width: 100%;
    }

    .account-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .account-form__grid {
        grid-template-columns: 1fr;
    }

    .account-side {
        grid-template-columns: 1fr;
    }

    .favorite-grid {
        grid-template-columns: 1fr;
    }

    .my-comment__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .tag-row {
        gap: 14px;
    }

    .home-cta__inner {
        padding: 60px 20px;
    }

    .site-footer {
        padding-top: 48px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 34px;
    }

    .site-footer__col--note {
        display: flex;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .setup-page__inner {
        padding: 30px 22px;
    }

    .setup-page__steps {
        grid-template-columns: 1fr;
    }

    .error-page__actions {
        flex-direction: column;
    }
}


/* 首页 · 产品与技术能力 */
.home-hero__link {
    margin-left: 4px;
    font-size: 13px;
}

.home-hero__stats dd {
    font-variant-numeric: tabular-nums;
}

.home-section--capabilities {
    padding-bottom: 84px;
}

.home-cap-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-cap-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 270px;
    padding: 22px 20px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home-cap-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.home-cap-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 22px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.home-cap-card__icon svg {
    width: 20px;
    height: 20px;
}

.home-cap-card__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.home-cap-card h3 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.38;
    letter-spacing: -.01em;
    word-break: normal;
    overflow-wrap: break-word;
}

.home-cap-card h3 small {
    color: var(--accent);
    font-family: var(--sans);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: .04em;
}

.home-cap-card p {
    flex: 1;
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.home-cap-card__go {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 10px;
    transition: color .18s ease;
}

.home-cap-card:hover .home-cap-card__go {
    color: var(--accent);
}

.home-section--technologies {
    padding-top: 84px;
}

.home-cap-card--tech .home-cap-card__icon {
    background: var(--green-soft);
    color: var(--green);
}

.home-cap-card--tech .home-cap-card__eyebrow {
    color: var(--green);
}

.home-cap-card--tech:hover .home-cap-card__go {
    color: var(--green);
}

.home-cta--about .home-cta__inner {
    max-width: 1080px;
}

.home-cta__intro {
    max-width: 700px;
    margin: -18px 0 30px;
    color: rgba(247, 244, 238, .62);
    font-size: 14px;
    line-height: 1.85;
}

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

    .home-cap-card {
        min-height: 240px;
    }
}

@media (max-width: 640px) {
    .home-cap-grid {
        grid-template-columns: 1fr;
    }

    .home-cap-card {
        min-height: 0;
    }

    .home-hero__link {
        width: 100%;
        margin: 4px 0 0;
    }
}

/* ==========================================================================
   主站统一配色：与产品 / 技术页一致的冷白、浅蓝、深墨色体系
   ========================================================================== */
:root {
    --paper: #f7f9fc;
    --paper-2: #f1f5fb;
    --paper-3: #e5edf8;
    --white: #ffffff;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e9f3;
    --line-strong: #cbd8e8;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-soft: #eff5ff;
    --green: #067647;
    --green-soft: #ecfdf3;
    --amber: #b45309;
    --amber-soft: #fff7e8;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .045);
    --shadow: 0 22px 54px rgba(15, 23, 42, .1);
}

body {
    color: var(--ink);
    background: var(--paper);
}

.site-header {
    background: rgba(247, 249, 252, .88);
    border-bottom-color: rgba(226, 233, 243, .82);
}

.site-header.is-scrolled {
    background: rgba(247, 249, 252, .97);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .065);
}

.hero {
    background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
}

.hero__texture {
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, .105), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(14, 165, 233, .09), transparent 34%),
        linear-gradient(rgba(15, 23, 42, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .028) 1px, transparent 1px);
    background-size: auto, auto, 44px 44px, 44px 44px;
}

.home-cta::after {
    background: radial-gradient(circle, rgba(37, 99, 235, .34), transparent 65%);
}

.home-cta .eyebrow {
    color: #93c5fd;
}

.site-footer {
    color: rgba(241, 245, 249, .72);
}

.site-footer__grid {
    border-bottom-color: rgba(241, 245, 249, .14);
}

.site-footer__brand p {
    color: rgba(241, 245, 249, .54);
}

.site-footer__social a {
    color: rgba(241, 245, 249, .7);
    border-bottom-color: rgba(241, 245, 249, .24);
}

.site-footer__col h3 {
    color: rgba(241, 245, 249, .4);
}

.site-footer__col a,
.site-footer__col p {
    color: rgba(241, 245, 249, .68);
}

.site-footer__col--note p {
    color: rgba(241, 245, 249, .5);
}

.site-footer__bottom {
    color: rgba(241, 245, 249, .38);
}

.site-footer__meta a {
    color: rgba(241, 245, 249, .6);
}

.page-error,
.page-install {
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .1), transparent 36%),
        radial-gradient(circle at 80% 80%, rgba(14, 165, 233, .08), transparent 38%),
        var(--paper);
}

/* 主站细节色彩收口 */
.archive-hero {
    background: linear-gradient(180deg, rgba(37, 99, 235, .055), transparent);
}

.hero__empty,
.aside-card,
.side-card,
.account-nav {
    background: rgba(255, 255, 255, .72);
}

.home-cta__intro {
    color: rgba(241, 245, 249, .64);
}

.auth__aside {
    background:
        radial-gradient(circle at 80% 12%, rgba(37, 99, 235, .38), transparent 45%),
        linear-gradient(145deg, #0b1220, #101b2e 45%, #1e3a8a 100%);
}

.auth__aside--register {
    background:
        radial-gradient(circle at 20% 85%, rgba(14, 165, 233, .3), transparent 46%),
        linear-gradient(145deg, #0b1220, #111c31 50%, #1e293b 100%);
}

.auth__aside .eyebrow {
    color: #93c5fd;
}

/* 品牌文字 Logo */
.brand__text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .brand__text {
        max-width: 142px;
        font-size: 19px;
    }
}

/* 文字 Logo 图片 */
.brand__wordmark {
    display: block;
    width: auto;
    max-width: 210px;
    height: 28px;
    object-fit: contain;
}

@media (max-width: 640px) {
    .brand__wordmark {
        max-width: 142px;
        height: 24px;
    }
}

/* 页脚品牌：深色背景下的颜色自适应 */
.brand--footer .brand__logo,
.brand--footer .brand__wordmark {
    filter: brightness(0) invert(1);
    opacity: .92;
}

.brand--footer .brand__logo--footer {
    height: 32px;
    max-width: 180px;
    object-fit: contain;
}

.brand--footer .brand__wordmark--footer {
    height: 24px;
    max-width: 190px;
}

.brand--footer .brand__text {
    color: var(--paper);
}
