/* Harmonia Wisdom — Feature Pages Styling (Look A · Refined)
   CONTRACT §21.4–§21.7 & TOKENS-A. Loads only on generated pages.
   All visual tokens come from style.css (:root and @media (width > 900px)). */

/* ── ground & selection (§21.4.1) ────────────────────── */
body {
    background-color: var(--c-ground);
    background-image: linear-gradient(180deg, var(--c-ground-top) 0, var(--c-ground) var(--l-ground-fade));
    background-repeat: no-repeat;
}

#main {
    color: var(--c-text);
    font-family: var(--f-sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
}

.glow {
    display: none;
}

main ::selection {
    background: var(--c-link);
    color: var(--c-ground);
}

/* ── column & section rhythm (§21.4.2) ──────────────── */
.hero {
    display: flow-root;
    margin: 0;
    padding: 0;
}

.hero .hero-inner,
.practice,
.app-invite {
    width: min(var(--l-col), calc(100% - 2 * var(--l-gutter)));
    max-width: var(--l-col);
    margin-inline: auto;
}

.hero .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: var(--l-section-top);
    margin-bottom: 0;
    padding: 0;
    text-align: start;
}

.hero .hero-copy {
    min-width: 0;
    text-align: start;
}

.practice {
    display: flow-root;
    margin-top: var(--l-section-gap);
    margin-bottom: 0;
    padding: 0;
    text-align: start;
}

#thinkers-list.practice {
    margin-top: var(--s-s6);
}

/* ── daily & thinkers-index hero (§21.4.3, §21.4.4) ─── */
.hw-hero-img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--r-art);
    border: var(--e-card-border);
    display: block;
    margin: 0 0 var(--s-s6);
}

.hero-copy .eyebrow {
    font-family: var(--f-sans);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-gold);
    text-align: center;
    margin: 0 0 var(--s-s3);
}

.hero-copy h1 {
    font-family: var(--f-serif);
    font-size: 40px;
    line-height: 1.1;
    font-weight: 600;
    font-style: normal;
    letter-spacing: -0.015em;
    text-transform: none;
    color: var(--c-text);
    text-align: center;
    margin: 0 0 var(--s-s6);
}

.hero-copy:has(.section-lede):not(:has(.hw-thinker-header)) h1 {
    margin-bottom: var(--s-s4);
}

.hero-copy:not(:has(.hw-thinker-header)) .section-lede {
    font-family: var(--f-serif);
    font-size: 21px;
    line-height: 1.4;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: center;
    max-width: none;
    margin: 0;
}

/* ── thinker top (§21.4.5) ──────────────────────────── */
.hero-inner:has(.hw-thinker-header) {
    grid-template-columns: minmax(0, 1fr);
    text-align: start;
}

.hero-copy:has(.hw-thinker-header) {
    width: 100%;
    text-align: start;
}

.hw-thinker-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0 0 var(--s-s5);
    text-align: center;
}

.hw-thinker-portrait {
    width: var(--l-portrait);
    height: var(--l-portrait);
    min-width: var(--l-portrait);
    border-radius: var(--r-portrait);
    border: var(--e-card-border);
    object-fit: cover;
    display: block;
    margin: 0 auto var(--s-s5);
}

.hw-thinker-intro {
    width: 100%;
    min-width: 0;
    text-align: center;
}

.hw-thinker-intro .eyebrow {
    margin: 0 0 var(--s-s3);
}

.hw-thinker-intro h1 {
    margin: 0 0 var(--s-s3);
}

.hw-thinker-intro .lede {
    font-family: var(--f-serif);
    font-size: 21px;
    line-height: 1.4;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: center;
    max-width: none;
    margin: 0 auto;
}

.hero-copy:has(.hw-thinker-header) .section-lede {
    font-family: var(--f-sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text);
    text-align: start;
    max-width: none;
    margin: 0 0 var(--s-s4);
}

.hero-copy:has(.hw-thinker-header) .fineprint {
    font-family: var(--f-sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: start;
    max-width: none;
    margin: 0;
}

/* ── section headings (§21.4.6) ─────────────────────── */
.practice h2,
.app-invite h2 {
    font-family: var(--f-serif);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    font-style: normal;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--c-text);
    text-align: start;
    margin: 0 0 var(--s-s5);
}

/* ── quote card (§21.5) ─────────────────────────────── */
.hw-quote-card::before,
.hw-thinker-item::before,
.hw-lineage-list > li::before {
    display: none;
}

.card.hw-quote-card {
    background: var(--c-surface);
    border: var(--e-card-border);
    box-shadow: var(--e-card-shadow);
    border-radius: var(--r-card);
    padding: var(--l-card-pad);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin: 0;
    text-align: start;
}

.hw-quote-card > blockquote {
    font-family: var(--f-serif);
    font-size: 24px;
    line-height: 1.45;
    font-weight: 400;
    font-style: normal;
    letter-spacing: -0.005em;
    text-transform: none;
    color: var(--c-text);
    text-align: start;
    margin: 0 0 20px;
    overflow-wrap: break-word;
}

.hw-quote-card .hw-citation {
    font-family: var(--f-sans);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: start;
    margin: 0;
}

.hw-quote-card .hw-citation a {
    color: var(--c-link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hw-original-text {
    border-top: var(--l-hairline) solid var(--c-rule);
    padding: 20px 0 0;
    margin: var(--s-s5) 0 0;
    text-align: start;
}

.hw-quote-card .hw-original-label {
    font-family: var(--f-sans);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-text-3);
    margin: 0;
}

.hw-original-text blockquote {
    font-family: var(--f-serif);
    font-size: 17px;
    line-height: 1.55;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    margin: var(--s-s2) 0 0;
    overflow-wrap: break-word;
}

/* ── daily nav & share buttons (§21.5.3–21.5.5, §21.7) ── */
.hw-daily-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-s2);
    margin: var(--s-s5) 0 0;
}

.hw-daily-nav:not(:has(> :not([hidden]))) {
    display: none;
}

.hw-share-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-s2);
    margin: var(--s-s5) 0 0;
}

.hw-quote-card:has(.hw-daily-nav > :not([hidden])) .hw-share-buttons {
    margin-top: var(--s-s4);
}

.hw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-s2);
    min-width: var(--l-btn-h);
    min-height: var(--l-btn-h);
    height: var(--l-btn-h);
    padding: 0 var(--s-s4);
    font-family: var(--f-sans);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text);
    background: var(--c-surface-2);
    border: var(--e-btn-border);
    border-radius: var(--r-btn);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.hw-share-buttons .hw-btn {
    flex-direction: column;
    width: 100%;
    height: var(--l-tile-h);
    min-height: var(--l-tile-h);
    padding: 0 var(--l-btn-px);
    border-radius: var(--r-tile);
    gap: var(--s-s1);
}

.hw-btn[data-hw-action="copy-link"] {
    background: var(--c-violet);
    color: var(--c-on-violet);
    border: 0;
}

.hw-btn[hidden],
.hw-daily-nav .hw-btn[hidden],
.hw-share-buttons .hw-btn[hidden] {
    display: none;
}

.hw-btn[data-hw-action="share-square"]::before,
.hw-btn[data-hw-action="share-story"]::before,
.hw-btn[data-hw-action="copy-link"]::before,
.hw-btn[data-hw-action="share-sheet"]::before {
    content: "";
    flex: 0 0 auto;
    width: var(--l-icon);
    height: var(--l-icon);
    background-color: currentColor;
}

.hw-btn[data-hw-action="share-square"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='M4 16l4.5-4.5L13 16l2.5-2.5L20 18'/%3E%3Ccircle cx='15.5' cy='8.5' r='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='M4 16l4.5-4.5L13 16l2.5-2.5L20 18'/%3E%3Ccircle cx='15.5' cy='8.5' r='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hw-btn[data-hw-action="share-story"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2'/%3E%3Cpath d='M7 16l3-3 3 3 4-4'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2'/%3E%3Cpath d='M7 16l3-3 3 3 4-4'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hw-btn[data-hw-action="copy-link"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hw-btn[data-hw-action="share-sheet"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M8 7l4-4 4 4M7 11H6a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-8a1 1 0 0 0-1-1h-1'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M8 7l4-4 4 4M7 11H6a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-8a1 1 0 0 0-1-1h-1'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hw-status {
    font-family: var(--f-sans);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: start;
    margin: var(--s-s3) 0 0;
}

.hw-status:empty {
    margin: 0;
    height: 0;
    overflow: hidden;
}

/* ── single-column lists (§21.5.1, §21.6.1–21.6.3) ─── */
.hw-quotes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-s5);
    margin: 0;
    padding: 0;
}

.hw-thinker-list,
.hw-lineage-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-s3);
    margin: 0;
    padding: 0;
}

/* ── thinkers directory (§21.6.3) ───────────────────── */
.card.hw-thinker-item {
    display: flex;
    align-items: center;
    gap: var(--s-s4);
    background: var(--c-surface);
    border: var(--e-card-border);
    box-shadow: none;
    border-radius: var(--r-row);
    padding: var(--l-row-pad);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--c-text);
    text-align: start;
}

.hw-thinker-thumb {
    width: 96px;
    height: 96px;
    min-width: 96px;
    border-radius: var(--s-s3);
    border: var(--e-card-border);
    object-fit: cover;
    display: block;
}

.hw-thinker-item-body {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

.hw-thinker-item .tag {
    display: block;
    margin: 0 0 var(--s-s2);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--f-sans);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-link);
}

.hw-thinker-item-body h3 {
    font-family: var(--f-serif);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text);
    margin: 0;
}

.hw-thinker-item-body h3 a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--c-text);
    text-decoration: none;
}

.hw-thinker-item-body p:not(.tag) {
    font-family: var(--f-sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    margin: var(--s-s2) 0 0;
}

/* ── divider (§21.4.2, §21.6.4) ─────────────────────── */
.hw-divider {
    display: flow-root;
    width: var(--l-divider-w);
    max-width: var(--l-divider-w);
    margin: var(--s-s7) auto 0;
    padding: 0;
    text-align: center;
}

.hw-divider-img {
    width: 100%;
    max-width: var(--l-divider-w);
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: var(--r-art);
    border: var(--e-card-border);
}

/* ── lineage section (§21.6.1, §21.6.2) ─────────────── */
.hw-lineage-section.practice {
    margin-top: var(--s-s7);
}

.hw-lineage-img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--r-art);
    border: var(--e-card-border);
    display: block;
    margin: 0 0 var(--s-s6);
}

.hw-lineage-section h2 {
    margin: 0 0 var(--s-s3);
}

.hw-lineage-section .section-lede {
    font-family: var(--f-serif);
    font-size: 21px;
    line-height: 1.4;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: start;
    max-width: none;
    margin: 0 0 var(--s-s5);
}

.hw-lineage-list > li.card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--c-surface);
    border: var(--e-card-border);
    box-shadow: none;
    border-radius: var(--r-row);
    padding: var(--l-row-pad);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: start;
}

.hw-lineage-list .tag[data-hw-lineage-role] {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--f-sans);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-link);
}

.hw-lineage-list .tag[data-hw-lineage-role]:not(:first-of-type)::before {
    content: "";
    flex: 0 0 auto;
    width: var(--s-s1);
    height: var(--s-s1);
    margin-inline: var(--s-s2);
    border-radius: 50%;
    background: var(--c-text-3);
}

.hw-lineage-list h3 {
    flex: 1 0 100%;
    min-width: 0;
    margin: var(--s-s2) 0 0;
    font-family: var(--f-serif);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text);
}

.hw-lineage-list h3 a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--c-text);
    text-decoration: underline;
    text-decoration-color: var(--c-link);
    text-underline-offset: 3px;
}

.hw-lineage-list [data-hw-lineage-story] {
    flex: 1 0 100%;
    min-width: 0;
    margin: var(--s-s2) 0 0;
    font-family: var(--f-sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
}

.hw-lineage-actions {
    margin: var(--s-s5) 0 0;
}

/* ── app invite (§21.6.5) ───────────────────────────── */
.app-invite {
    margin-top: var(--l-section-gap);
    margin-bottom: var(--s-s8);
    padding: var(--l-card-pad);
    background: var(--c-surface);
    border: var(--e-card-border);
    box-shadow: var(--e-card-shadow);
    border-radius: var(--r-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: start;
}

.app-invite .eyebrow {
    font-family: var(--f-sans);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-gold);
    text-align: start;
    margin: 0 0 var(--s-s3);
}

.app-invite h2 {
    margin: 0 0 var(--s-s4);
}

.app-invite .section-lede {
    font-family: var(--f-sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-2);
    text-align: start;
    max-width: none;
    margin: 0 0 var(--s-s4);
}

.app-invite .fineprint {
    font-family: var(--f-sans);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text-3);
    text-align: start;
    max-width: none;
    margin: var(--s-s2) 0 0;
}

/* ── focus & interaction ────────────────────────────── */
.hw-btn:focus:not(:focus-visible),
.hw-citation a:focus:not(:focus-visible),
.hw-thinker-item-body a:focus:not(:focus-visible),
.hw-lineage-list a:focus:not(:focus-visible),
.app-invite a:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.hw-btn:focus-visible,
.hw-citation a:focus-visible,
.hw-thinker-item-body a:focus-visible,
.hw-lineage-list a:focus-visible,
.app-invite a:focus-visible {
    outline: var(--e-focus);
    outline-offset: var(--l-focus-offset);
}

@media (hover: hover) {
    .hw-btn:hover {
        background: var(--c-surface-2-hover);
        color: var(--c-text);
    }

    .hw-btn[data-hw-action="copy-link"]:hover {
        background: var(--c-violet-hover);
        color: var(--c-on-violet);
    }

    .hw-thinker-item-body h3 a:hover {
        text-decoration: underline;
        text-decoration-color: var(--c-link);
        text-underline-offset: 3px;
    }
}

/* ── desktop scale (width > 900px) ──────────────────── */
@media (width > 900px) {
    #main {
        font-size: 18px;
        line-height: 1.65;
    }

    .hero-copy h1 {
        font-size: 60px;
        line-height: 1.05;
    }

    .hero-copy:not(:has(.hw-thinker-header)) .section-lede,
    .hw-thinker-intro .lede,
    .hw-lineage-section .section-lede {
        font-size: 24px;
        line-height: 1.4;
    }

    .hero-copy:has(.hw-thinker-header) .section-lede,
    .hero-copy:has(.hw-thinker-header) .fineprint,
    .hw-thinker-item-body p:not(.tag),
    .hw-lineage-list [data-hw-lineage-story],
    .app-invite .section-lede {
        font-size: 18px;
        line-height: 1.65;
    }

    .practice h2,
    .app-invite h2 {
        font-size: 36px;
        line-height: 1.15;
    }

    .hw-quote-card > blockquote {
        font-size: 30px;
        line-height: 1.42;
    }

    .hw-original-text blockquote {
        font-size: 18px;
        line-height: 1.55;
    }

    .hw-btn {
        font-size: 15px;
        line-height: 1.2;
    }

    .hw-share-buttons {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .hw-share-buttons .hw-btn {
        flex-direction: row;
        width: auto;
        border-radius: var(--r-btn);
        gap: var(--s-s2);
    }

    .hw-share-buttons .hw-btn[hidden] {
        display: none;
    }

    .hw-thinker-item-body h3,
    .hw-lineage-list h3 {
        font-size: 22px;
        line-height: 1.3;
    }

    .hw-divider {
        margin-top: var(--s-s8);
    }

    .hw-lineage-section.practice {
        margin-top: var(--s-s8);
    }
}

/* ── reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hw-btn {
        transition: none;
    }
}

/* ── Job 11: Ask, Memento mori, Quiz ────────────────── */
.hw-btn-primary {
    background: var(--c-violet);
    color: var(--c-on-violet);
    border: 0;
}

.hw-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.hw-ask-hint {
    margin: var(--s-s4) 0 0;
    color: var(--c-text-3);
    font-size: 14px;
    line-height: 1.5;
}

.hw-ask-filters-label {
    margin: 0 0 var(--s-s3);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-3);
}

.hw-ask-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-s2);
    margin: 0 0 var(--s-s6);
}

.hw-ask-chip {
    min-height: var(--l-btn-h);
    padding: var(--s-s2) var(--s-s4);
    border-radius: var(--r-btn);
    border: var(--e-btn-border);
    background: var(--c-surface-2);
    color: var(--c-text);
    font-family: var(--f-sans);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.hw-ask-chip[aria-pressed="true"] {
    background: var(--c-violet);
    color: var(--c-on-violet);
    border-color: var(--c-violet);
}

.hw-ask-section {
    margin: 0 0 var(--s-s7);
}

.hw-ask-section[hidden],
.hw-ask-empty[hidden] {
    display: none;
}

.hw-ask-count {
    margin: 0 0 var(--s-s4);
    font-size: 14px;
    color: var(--c-text-3);
}

.hw-ask-cards {
    display: flex;
    flex-direction: column;
    gap: var(--s-s5);
}

.hw-ask-thinker-link {
    margin: var(--s-s4) 0 0;
    font-size: 15px;
    line-height: 1.5;
}

.hw-ask-thinker-link a {
    color: var(--c-link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hw-ask-empty {
    margin: var(--s-s5) 0;
    color: var(--c-text-2);
}

.hw-memento-form {
    background: var(--c-surface);
    border: var(--e-card-border);
    border-radius: var(--r-card);
    padding: var(--l-card-pad);
    margin: 0 0 var(--s-s5);
}

.hw-memento-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-s4);
    margin: 0 0 var(--s-s4);
}

.hw-memento-field {
    display: flex;
    flex-direction: column;
    gap: var(--s-s2);
}

.hw-memento-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-2);
}

.hw-memento-field select {
    min-height: var(--l-btn-h);
    padding: 0 var(--s-s3);
    border-radius: var(--r-btn);
    border: var(--e-btn-border);
    background: var(--c-surface-2);
    color: var(--c-text);
    font-family: var(--f-sans);
    font-size: 16px;
}

.hw-memento-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-s3);
    align-items: center;
}

.hw-memento-actions .hw-btn[hidden] {
    display: none;
}

.hw-memento-privacy {
    margin: var(--s-s3) 0 0;
    font-size: 14px;
    color: var(--c-text-3);
}

.hw-memento-result {
    min-height: 1.6em;
    margin: 0 0 var(--s-s4);
    font-size: 16px;
    line-height: 1.55;
    color: var(--c-text);
}

.hw-memento-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-s5);
    margin: 0 0 var(--s-s3);
    font-size: 14px;
    color: var(--c-text-2);
}

.hw-legend-item {
    display: inline-flex;
    align-items: center;
    gap: var(--s-s2);
}

.hw-legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: var(--e-card-border);
    background: var(--c-surface-2);
}

.hw-legend-box-lived {
    background: var(--c-gold);
    border-color: var(--c-gold);
}

.hw-memento-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--s-s3);
    background: var(--c-surface);
    border: var(--e-card-border);
    border-radius: var(--r-card);
}

.hw-week-row {
    display: grid;
    grid-template-columns: repeat(52, minmax(0, 1fr));
    gap: 2px;
}

.hw-week {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 1px;
    background: var(--c-surface-2);
}

.hw-week.is-lived {
    background: var(--c-gold);
}

.hw-memento-quotes {
    margin-top: var(--s-s7);
}

.hw-memento-cards {
    display: flex;
    flex-direction: column;
    gap: var(--s-s5);
}

.hw-memento-closing {
    margin: var(--s-s6) 0 0;
    font-size: 16px;
    color: var(--c-text-2);
}

.hw-quiz-privacy {
    margin: var(--s-s4) 0 0;
    font-size: 14px;
    color: var(--c-text-3);
}

.hw-quiz-start {
    margin: var(--s-s5) 0 0;
}

.hw-quiz-start .hw-btn[hidden] {
    display: none;
}

.hw-quiz-noscript {
    margin: var(--s-s4) 0 0;
    color: var(--c-text-2);
}

.hw-quiz-noscript a {
    color: var(--c-link);
}

.hw-quiz-panel {
    background: var(--c-surface);
    border: var(--e-card-border);
    border-radius: var(--r-card);
    padding: var(--l-card-pad);
}

.hw-quiz-panel[hidden] {
    display: none;
}

.hw-quiz-progress {
    margin: 0 0 var(--s-s3);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.hw-quiz-question {
    margin: 0 0 var(--s-s5);
    font-family: var(--f-serif);
    font-size: 24px;
    line-height: 1.3;
    color: var(--c-text);
}

.hw-quiz-choices {
    display: flex;
    flex-direction: column;
    gap: var(--s-s3);
    margin: 0 0 var(--s-s5);
}

.hw-quiz-choice {
    min-height: var(--l-btn-h);
    padding: var(--s-s3) var(--s-s4);
    border-radius: var(--r-btn);
    border: var(--e-btn-border);
    background: var(--c-surface-2);
    color: var(--c-text);
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.45;
    text-align: start;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.hw-quiz-choice[aria-pressed="true"] {
    background: var(--c-violet);
    color: var(--c-on-violet);
    border-color: var(--c-violet);
}

.hw-quiz-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--s-s3);
}

.hw-quiz-actions .hw-btn[hidden] {
    display: none;
}

.hw-result-kicker {
    margin: 0 0 var(--s-s2);
    font-size: 15px;
    color: var(--c-text-2);
}

.hw-result-blurb {
    margin: var(--s-s4) 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--c-text);
}

.hw-result-note {
    margin: var(--s-s5) 0 0;
    font-size: 14px;
    color: var(--c-text-3);
}

.hw-quiz-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-s3);
    margin: var(--s-s5) 0 0;
}

.hw-ask-chip:focus-visible,
.hw-quiz-choice:focus-visible,
.hw-memento-field select:focus-visible,
.hw-ask-thinker-link a:focus-visible {
    outline: var(--e-focus);
    outline-offset: var(--l-focus-offset);
}

@media (hover: hover) {
    .hw-btn-primary:hover {
        background: var(--c-violet-hover);
        color: var(--c-on-violet);
    }

    .hw-ask-chip:hover,
    .hw-quiz-choice:hover {
        background: var(--c-surface-2-hover);
        color: var(--c-text);
    }

    .hw-ask-chip[aria-pressed="true"]:hover,
    .hw-quiz-choice[aria-pressed="true"]:hover {
        background: var(--c-violet-hover);
        color: var(--c-on-violet);
    }
}

@media (width > 900px) {
    .hw-memento-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hw-quiz-question {
        font-size: 28px;
        line-height: 1.25;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hw-ask-chip,
    .hw-quiz-choice {
        transition: none;
    }
}

/* ── Job 12-fix: Quiz result centring, Memento lines, Ask cards ── */
.hw-result-kicker,
.hw-result-blurb,
.hw-result-note {
    text-align: center;
}

.hw-quiz-result-actions {
    justify-content: center;
}

.hw-memento-result > p {
    margin: 0 0 var(--s-s2);
}

.hw-memento-result > p:last-child {
    margin-bottom: 0;
}

.practice.hw-ask-section {
    margin-top: var(--l-section-gap);
    margin-bottom: 0;
    margin-inline: auto;
}

.hw-ask-cards .hw-quote-card[hidden] {
    display: none;
}
