:root {
    color-scheme: light;
    --bg: #f1efe8;
    --surface: rgba(255, 255, 255, 0.68);
    --surface-solid: #fbfaf6;
    --surface-soft: rgba(249, 247, 240, 0.76);
    --text: #1c221f;
    --muted: #66706b;
    --line: rgba(43, 56, 49, 0.14);
    --line-strong: rgba(194, 149, 48, 0.44);
    --gold: #bd9130;
    --gold-bright: #d8ad4b;
    --gold-soft: #f1dfac;
    --green: #234a3d;
    --green-soft: #dfe9e3;
    --rose: #b95272;
    --steel: #597d8b;
    --overlay: rgba(19, 24, 21, 0.48);
    --shadow: 0 22px 58px rgba(38, 43, 39, 0.12);
    --shadow-soft: 0 10px 28px rgba(38, 43, 39, 0.075);
    --toolbar-height: 70px;
}

body[data-theme="dark"] {
    color-scheme: dark;
    --bg: #100f0c;
    --surface: rgba(29, 28, 24, 0.72);
    --surface-solid: #1c1b17;
    --surface-soft: rgba(35, 33, 27, 0.78);
    --text: #f3efe4;
    --muted: #b8b1a3;
    --line: rgba(242, 234, 214, 0.13);
    --line-strong: rgba(220, 176, 74, 0.48);
    --gold: #d4a94b;
    --gold-bright: #e3bb60;
    --gold-soft: rgba(212, 169, 75, 0.16);
    --green: #9fc7b5;
    --green-soft: rgba(97, 139, 119, 0.16);
    --rose: #e17b9a;
    --steel: #91b5c0;
    --overlay: rgba(0, 0, 0, 0.7);
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.26);
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    padding: calc(var(--toolbar-height) + 24px) 0 64px;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(78, 71, 55, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 71, 55, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    transition: color 180ms ease, background-color 180ms ease;
}

body[data-theme="dark"] {
    background-image:
        linear-gradient(rgba(224, 187, 96, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 187, 96, 0.028) 1px, transparent 1px);
}

body.has-overlay {
    overflow: hidden;
}

.utility-page {
    width: min(100% - 32px, 620px);
    min-height: calc(100vh - var(--toolbar-height) - 88px);
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.utility-page__panel {
    width: 100%;
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid var(--line);
    border-top-color: var(--line-strong);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px) saturate(120%);
}

.utility-page__panel h1 {
    margin: 8px 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 8vw, 3.7rem);
    font-weight: 500;
    line-height: 1.02;
}

.utility-page__panel p:not(.modal-kicker) {
    margin: 0;
    color: var(--muted);
}

.utility-page__panel a {
    display: inline-flex;
    margin-top: 24px;
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

.utility-page__panel a:hover {
    color: var(--gold);
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.utility-shell {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    padding: 10px 16px;
    pointer-events: none;
}

.utility-bar {
    width: min(1120px, 100%);
    min-height: var(--toolbar-height);
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, 76px);
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px) saturate(140%);
    pointer-events: auto;
}

.search-trigger,
.tool-button {
    min-height: 54px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.search-trigger:hover,
.tool-button:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--gold) 7%, transparent);
}

.search-trigger {
    gap: 11px;
    padding: 0 15px;
    border-color: var(--line);
    background: color-mix(in srgb, var(--surface-solid) 58%, transparent);
    text-align: left;
}

.search-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-trigger .tool-label {
    display: none;
}

.tool-button {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px;
    font-size: 0.68rem;
    font-weight: 600;
}

.icon-sun,
body[data-theme="dark"] .icon-moon {
    display: none;
}

body[data-theme="dark"] .icon-sun,
.icon-moon {
    display: block;
}

.feed-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.feed-heading {
    min-height: 68px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding: 0 2px 14px;
    border-bottom: 1px solid var(--line);
}

.feed-heading p {
    margin: 0 0 2px;
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feed-heading h1 {
    margin: 0;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.15;
}

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

.guide-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px) saturate(125%);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.guide-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.guide-card.is-hidden {
    display: none;
}

.card-main {
    width: 100%;
    display: block;
    flex: 1;
    padding: 10px 10px 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    overflow: hidden;
    border-radius: 7px;
    background: var(--surface-solid);
}

.card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 260ms ease;
}

.guide-card:hover .card-media img {
    transform: scale(1.022);
}

.intro-media {
    background: #f5f0e2;
}

.intro-media img {
    object-fit: contain;
    mix-blend-mode: multiply;
}

.intro-media .theme-art-dark {
    display: none;
}

body[data-theme="dark"] .intro-media .theme-art-light {
    display: none;
}

body[data-theme="dark"] .intro-media .theme-art-dark {
    display: block;
    mix-blend-mode: normal;
}

body[data-theme="dark"] .intro-media {
    background: #000;
}

.access-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    color: #fffaf0;
    background: rgba(23, 25, 22, 0.72);
    font-size: 0.62rem;
    font-weight: 650;
    backdrop-filter: blur(10px);
}

.intro-card .access-badge {
    color: #241f13;
    border-color: rgba(122, 89, 22, 0.18);
    background: rgba(222, 180, 79, 0.82);
}

.card-copy {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    padding: 14px 3px 12px;
}

.card-category {
    margin-bottom: 7px;
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-copy strong {
    margin-bottom: 7px;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.16rem;
    font-weight: 500;
    line-height: 1.18;
}

.card-copy > span:last-child {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.card-actions {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--line);
}

.card-actions button,
.card-actions a {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 0.7rem;
    text-decoration: none;
}

.card-actions button:hover,
.card-actions a:hover,
.card-actions button[aria-pressed="true"] {
    color: var(--gold);
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.card-actions button:first-child:hover,
.card-actions button:first-child[aria-pressed="true"] {
    color: var(--rose);
    border-color: color-mix(in srgb, var(--rose) 45%, var(--line));
    background: color-mix(in srgb, var(--rose) 8%, transparent);
}

.card-actions .discussion-link:hover {
    color: var(--steel);
    border-color: color-mix(in srgb, var(--steel) 45%, var(--line));
    background: color-mix(in srgb, var(--steel) 8%, transparent);
}

.card-actions .open-button {
    min-width: auto;
    margin-left: auto;
    padding: 0 9px;
    color: var(--text);
    border-color: transparent;
    font-weight: 650;
}

.open-button .icon {
    width: 15px;
    height: 15px;
}

.empty-feed {
    min-height: 42vh;
    place-content: center;
    justify-items: center;
    padding: 40px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    text-align: center;
}

.empty-feed:not([hidden]) {
    display: grid;
}

.empty-feed h2 {
    margin: 0 0 6px;
}

.empty-feed p {
    margin: 0 0 20px;
    color: var(--muted);
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    padding: 16px;
    background: var(--overlay);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.overlay[hidden] {
    display: none;
}

.overlay.is-opening,
.overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-panel {
    position: relative;
    width: min(1080px, 100%);
    max-height: calc(100vh - 32px);
    margin: 0 auto;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-solid);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.32);
    transform: translateY(calc(-100% - 28px));
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.overlay.is-open .modal-panel {
    transform: translateY(0);
}

.modal-close {
    position: sticky;
    top: 12px;
    z-index: 8;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    float: right;
    margin: 12px 12px -54px 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    backdrop-filter: blur(16px);
}

.modal-close:hover {
    color: var(--gold);
    border-color: var(--line-strong);
}

.utility-modal {
    width: min(660px, 100%);
    padding: 34px;
}

.utility-modal h2 {
    margin: 0 54px 24px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
}

.modal-kicker {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modal-search {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.modal-search:focus-within {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 12%, transparent);
}

.modal-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.modal-search input::placeholder {
    color: var(--muted);
}

.search-results,
.library-list {
    display: grid;
    gap: 8px;
    margin: 18px 0 24px;
}

.result-item,
.library-item {
    min-height: 64px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.result-item {
    width: 100%;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
}

.result-item:hover,
.library-item:hover {
    border-color: var(--line-strong);
}

.result-item img,
.library-item img {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
}

.result-item strong,
.library-item strong {
    display: block;
    font-size: 0.85rem;
}

.result-item span,
.library-item span {
    color: var(--muted);
    font-size: 0.72rem;
}

.library-item button {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.account-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
}

.account-tabs button {
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.account-tabs button.is-active {
    color: var(--text);
    border-bottom-color: var(--gold);
}

.primary-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid var(--gold);
    border-radius: 8px;
    color: #211d14;
    background: var(--gold-bright);
    cursor: pointer;
    font-weight: 650;
    text-decoration: none;
}

.account-page {
    width: min(100% - 32px, 940px);
    grid-template-columns: minmax(0, 1fr);
    place-items: start center;
    padding: 34px 0 70px;
}

.account-page__panel { padding: clamp(24px, 5vw, 46px); }
.account-page__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.account-page__heading h1 { font-size: clamp(2rem, 7vw, 3.35rem); }
.account-page__panel .account-home-link { flex: none; margin-top: 4px; }
.account-notice { margin: 24px 0 0; padding: 13px 15px; border: 1px solid #c9b16c; border-radius: 8px; color: var(--text); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.account-notice.is-error { border-color: #c9827b; background: color-mix(in srgb, #c9827b 10%, var(--surface)); }
.account-identity { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface-soft); }
.account-identity > div { min-width: 0; display: grid; gap: 3px; }
.account-identity small { color: var(--muted); }
.account-identity strong { overflow-wrap: anywhere; }
.account-identity form { margin: 0; }
.account-secondary-button { min-height: 39px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--surface); cursor: pointer; }
.account-library { margin-top: 34px; }
.account-section-heading h2,
.account-login-panel h2 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 500; }
.account-guide-list { display: grid; gap: 14px; margin-top: 18px; }
.account-guide-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 18px; padding: 15px; border: 1px solid var(--line); border-top-color: var(--line-strong); background: var(--surface-soft); }
.account-guide-card > img { width: 116px; height: 116px; object-fit: cover; border-radius: 6px; }
.account-guide-copy { min-width: 0; }
.account-guide-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.account-guide-title h3 { margin: 0; font-size: 1.05rem; }
.account-guide-title span { flex: none; padding: 4px 7px; border-radius: 999px; color: #76520b; background: #fff3d3; font-size: .7rem; font-weight: 750; }
.account-guide-title span.is-active { color: #116246; background: #e4f4ed; }
.account-guide-title span.is-expired,
.account-guide-title span.is-revoked { color: #7f3430; background: #f8e5e3; }
.account-guide-card dl { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0 0; }
.account-guide-card dl div { display: grid; gap: 2px; }
.account-guide-card dt { color: var(--muted); font-size: .7rem; }
.account-guide-card dd { margin: 0; font-size: .82rem; font-weight: 650; }
.account-guide-actions { margin-top: 15px; }
.account-guide-actions p { margin: 0; color: var(--muted); font-size: .82rem; }
.account-guide-actions .primary-command { margin: 0; color: #211d14; }
.account-empty { margin-top: 24px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-soft); }
.account-empty strong { display: block; margin-bottom: 5px; }
.account-empty p { margin: 0; color: var(--muted); }
.account-login-panel { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.account-login-panel > p { margin: 10px 0 0; }
.account-login-panel form { display: grid; gap: 14px; margin-top: 22px; }
.account-login-panel label { display: grid; gap: 7px; font-size: .8rem; font-weight: 700; }
.account-login-panel input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--surface-solid); }
.account-login-panel .primary-command { justify-self: start; }

.menu-list {
    display: grid;
    gap: 7px;
}

.menu-list details {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.menu-list summary {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    border: 0;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    list-style: none;
    text-align: left;
}

.menu-list summary::-webkit-details-marker {
    display: none;
}

.menu-list details:hover,
.menu-list details[open] {
    border-color: var(--line-strong);
}

.menu-list summary:hover,
.menu-list details[open] summary {
    color: var(--gold);
}

.menu-list .icon {
    width: 16px;
    height: 16px;
    transition: transform 160ms ease;
}

.menu-list details[open] .icon {
    transform: rotate(90deg);
}

.menu-list details > div {
    padding: 0 13px 14px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.menu-list details p {
    margin: 0 0 10px;
}

.menu-list details p:last-child {
    margin-bottom: 0;
}

.account-message {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.account-message h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.account-message p {
    margin: 0;
    color: var(--muted);
}

.legal-copy {
    color: var(--muted);
    line-height: 1.75;
}

.legal-copy h3 {
    color: var(--text);
    font-size: 1rem;
}

.legal-copy p {
    margin: 0 0 16px;
}

.legal-document {
    display: grid;
    gap: 0;
    max-width: 72ch;
    color: var(--muted);
}

.legal-document .legal-version {
    margin-bottom: 20px;
    padding: 9px 11px;
    border-left: 3px solid var(--gold);
    color: var(--text);
    background: var(--surface-soft);
    font-size: .82rem;
    font-weight: 700;
}

.legal-document h3 {
    margin: 20px 0 7px;
    color: var(--text);
    font-size: 1rem;
}

.legal-document a {
    color: var(--gold-dark);
    overflow-wrap: anywhere;
}

.guide-modal-hero {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
    gap: 34px;
    padding: 28px;
}

.guide-modal-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f5f0e2;
}

.guide-modal-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.guide-modal-cover.is-intro img {
    object-fit: contain;
    mix-blend-mode: multiply;
}

.guide-modal-copy {
    align-self: center;
    padding-right: 48px;
}

.guide-modal-copy .modal-kicker {
    margin-bottom: 10px;
}

.guide-modal-copy h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1.08;
}

.guide-modal-copy .subtitle {
    margin: 0 0 18px;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.22rem;
    font-style: italic;
}

.guide-modal-copy .lead {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.guide-modal-body {
    padding: 0 28px 34px;
}

.intro-principles,
.guide-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.principle,
.free-section,
.question-section,
.discussion-preview,
.paywall {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.principle {
    padding: 18px;
}

.principle span {
    color: var(--gold);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.principle h3 {
    margin: 9px 0 7px;
    font-size: 1rem;
}

.principle p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.intro-access {
    margin-top: 12px;
    padding: 20px;
    border-left: 3px solid var(--gold);
    color: var(--muted);
    background: color-mix(in srgb, var(--gold) 7%, var(--surface-soft));
}

.intro-access strong {
    color: var(--text);
}

.free-section,
.question-section,
.discussion-preview,
.paywall {
    padding: 22px;
}

.free-section {
    grid-column: span 2;
}

.section-label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.guide-modal-body h3 {
    margin: 0 0 10px;
    color: var(--text);
}

.guide-modal-body p {
    color: var(--muted);
}

.question-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.question-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}

.question-item .icon {
    width: 16px;
    height: 16px;
    color: var(--gold);
}

.sample-prompt {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 3px solid var(--gold);
    border-radius: 0 7px 7px 0;
    background: color-mix(in srgb, var(--gold) 7%, var(--surface));
}

.sample-prompt strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 0.72rem;
}

.sample-prompt p {
    margin: 0;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 0.78rem;
    line-height: 1.6;
}

.paywall {
    grid-column: span 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--gold) 8%, var(--surface-soft));
}

.paywall p {
    margin: 0;
}

.paywall-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.76rem;
}

.demo-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: right;
}

.no-results {
    margin: 14px 0;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 180;
    max-width: min(340px, calc(100% - 36px));
    padding: 12px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1060px) {
    .guide-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .guide-modal-hero {
        grid-template-columns: 1fr;
    }

    .guide-modal-cover {
        max-height: 360px;
    }

    .guide-modal-copy {
        padding-right: 0;
    }

    .intro-principles,
    .guide-columns {
        grid-template-columns: 1fr;
    }

    .free-section,
    .paywall {
        grid-column: auto;
    }

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

@media (max-width: 600px) {
    :root {
        --toolbar-height: 72px;
    }

    body,
    body[data-theme="dark"] {
        background-image: none;
    }

    body {
        padding: 18px 0 calc(var(--toolbar-height) + 22px);
    }

    .utility-shell {
        top: auto;
        bottom: 0;
        padding: 7px;
    }

    .utility-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3px;
        padding: 5px;
        border-radius: 12px;
    }

    .search-trigger,
    .tool-button {
        min-height: 58px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 4px 2px;
        border-color: transparent;
        background: transparent;
        font-size: 0.62rem;
        font-weight: 600;
        text-align: center;
    }

    .search-placeholder {
        display: none;
    }

    .search-trigger .tool-label {
        display: block;
    }

    .feed-shell {
        width: min(100% - 20px, 34rem);
    }

    .feed-heading {
        min-height: 56px;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .feed-heading h1 {
        font-size: 1.22rem;
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-copy {
        min-height: 0;
    }

    .overlay {
        padding: 0;
    }

    .modal-panel {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: calc(100% - 12px);
        max-height: none;
        margin: 0;
        border-top: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 12px 0 0 12px;
        transform: translateX(105%);
    }

    .overlay.is-open .modal-panel {
        transform: translateX(0);
    }

    .utility-modal {
        padding: 24px 18px;
    }

    .utility-modal h2 {
        font-size: 1.7rem;
    }

    .guide-modal-hero {
        gap: 20px;
        padding: 16px;
    }

    .guide-modal-cover {
        max-height: none;
    }

    .guide-modal-copy h2 {
        padding-right: 42px;
        font-size: 2rem;
    }

    .guide-modal-body {
        padding: 0 16px 28px;
    }

    .modal-close {
        top: 8px;
        margin-top: 8px;
        margin-right: 8px;
    }

    .toast {
        right: 12px;
        bottom: calc(var(--toolbar-height) + 16px);
    }

    body:has(.account-page) { overflow-x: hidden; }
    .account-page { width: calc(100% - 20px); max-width: calc(100% - 20px); padding: 4px 0 calc(var(--toolbar-height) + 24px); }
    .account-page__panel { width: 100%; max-width: 100%; overflow: hidden; }
    .account-page__heading,
    .account-identity { display: grid; grid-template-columns: minmax(0, 1fr); }
    .account-page__heading > div { min-width: 0; }
    .account-page__heading p { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
    .account-page__panel .account-home-link { margin-top: 0; }
    .account-guide-list,
    .account-guide-card,
    .account-guide-copy { width: 100%; max-width: 100%; min-width: 0; }
    .account-guide-card { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; overflow: hidden; }
    .account-guide-card > img { width: 92px; height: 92px; }
    .account-guide-title { display: grid; grid-template-columns: minmax(0, 1fr); }
    .account-guide-title h3 { overflow-wrap: anywhere; }
    .account-guide-title span { justify-self: start; }
    .account-guide-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .account-guide-card dl div { min-width: 0; }
    .account-guide-card dd { overflow-wrap: anywhere; }
}

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