/* Interior pages pair moonlit opening images with an easy-to-read paper surface. */
#main:has(.tnw-inner, .tnw-angel-reading), main.tnw-result-saved {
    --paper: #faf6ee;
    --chalk: #fffcf5;
    --ink: #382c35;
    --muted: #60545b;
    --line: #d6cbbd;
    --accent: #75542c;
    --copper: #d5b486;
    --pine: #342a36;
    --pine-deep: #201b2a;
    background: var(--paper);
    color: var(--ink);
}
.tnw-inner { padding-bottom: clamp(3.5rem, 8vw, 7rem); }
.tnw-crumbs { padding-block: 1.1rem; color: var(--muted); font-size: .83rem; }
.tnw-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .58rem; margin: 0; padding: 0; list-style: none; }
.tnw-crumbs li + li::before { margin-inline-end: .58rem; content: "/"; opacity: .58; }
.tnw-crumbs a { color: inherit; text-decoration-color: currentColor; text-underline-offset: .25rem; }
.tnw-page-intro { padding-block: clamp(2rem, 5.4vw, 4.8rem) clamp(2rem, 4vw, 3.6rem); }
.tnw-page-intro h1, .tnw-editorial h1, .tnw-result-saved h1 {
    max-width: 17ch; margin: 0; color: var(--ink);
    font-size: clamp(2.65rem, 6.1vw, 6.8rem); font-weight: 460;
    letter-spacing: -.058em; line-height: 1.01; text-wrap: balance;
}
.tnw-page-intro .tnw-lead, .tnw-editorial .tnw-lead { max-width: 51ch; margin: 1rem 0 0; color: var(--muted); line-height: 1.58; }
.tnw-lunar-art, .tnw-lunar-art img { position: absolute; display: block; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tnw-lunar-art { z-index: -2; }
.tnw-lunar-art img { object-fit: cover; object-position: 72% 49%; }
.tnw-directory-head, .tnw-angel-hero, .tnw-calculator-intro, .tnw-editorial-moon {
    position: relative; isolation: isolate; overflow: hidden;
    background: #171621; color: #fff7eb;
}
.tnw-directory-head::before, .tnw-angel-hero::before, .tnw-calculator-intro::before {
    position: absolute; z-index: -1; inset: 0; content: ""; pointer-events: none;
    background: linear-gradient(90deg, #18141dec 0%, #1a1621bc 33%, #1d192745 62%, #16141f0d);
}
.tnw-directory-head .tnw-crumbs, .tnw-angel-hero .tnw-crumbs { color: #f1e6db; }
.tnw-directory-head .tnw-page-intro { max-width: 53%; padding-block: clamp(2.5rem, 4.5vw, 5.2rem) clamp(3rem, 5.6vw, 6.3rem); }
.tnw-directory-head h1, .tnw-calculator-intro h1 { color: #fff8ed; }
.tnw-directory-head .tnw-lead, .tnw-calculator-intro .tnw-lead { color: #f1e7df; max-width: 43ch; font-size: clamp(1rem, 1.25vw, 1.2rem); }
.tnw-directory .tnw-search { margin-top: 1.5rem; width: min(100%, 32rem); background: var(--chalk); border: 1px solid var(--line); }
.tnw-directory .tnw-search input { color: var(--ink); }
.tnw-directory .tnw-search input::placeholder { color: var(--muted); }
.tnw-directory .tnw-search .tnw-button { color: #fff9ed; background: #382c35; border-color: #382c35; }
.tnw-directory .tnw-search input:focus-visible { outline-offset: -3px; outline-color: #79582d; }
.tnw-directory .tnw-search .tnw-button:focus-visible { outline-offset: -4px; }
.tnw-pattern-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(1rem,3vw,3rem); margin-block: clamp(2rem,4.5vw,4rem); }
.tnw-pattern-links a {
    display: grid; grid-template-columns: 1fr auto; align-content: center; align-items: start; gap: .25rem .65rem;
    padding: 1.32rem .25rem 1.45rem 0; color: var(--ink); border-block: 1px solid var(--line); text-decoration: none;
}
.tnw-pattern-links a span { font: 480 clamp(1.58rem,2.8vw,2.6rem)/1.1 var(--serif); letter-spacing: -.035em; }
.tnw-pattern-links a small { grid-row: 2; font-size: .95rem; color: var(--muted); }
.tnw-pattern-links i { grid-column: 2; grid-row: 1/3; align-self: center; color: var(--accent); font-style: normal; }
.tnw-pattern-links a:hover span, .tnw-number-card:hover .tnw-card-number { color: var(--accent); }
.tnw-topic-heading { margin: 0 0 1rem; color: var(--ink); font-size: clamp(1.7rem,3.8vw,3.4rem); font-weight: 460; }
.tnw-number-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 clamp(1rem,3vw,3.5rem); }
.tnw-number-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem .6rem; min-width: 0; padding: 1rem 0 1.2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tnw-card-number { font: 450 clamp(2.7rem,4.8vw,4.5rem)/1 var(--serif); letter-spacing: -.06em; }
.tnw-card-legend { grid-row: 2; font-size: .91rem; line-height: 1.4; color: var(--muted); }
.tnw-card-arrow { grid-column: 2; grid-row: 1/3; color: var(--accent); }
.tnw-inline-next, .tnw-directory-profile { margin-top: clamp(2rem,4.5vw,3.9rem); }
.tnw-angel-opening { display: grid; align-content: center; min-height: clamp(24rem,38vw,37rem); padding-block: 1.9rem clamp(2.8rem,5.9vw,5.6rem); }
.tnw-angel-opening h1 { margin: 0; color: #fff4de; font-weight: 450; }
.tnw-hero-number { display: block; margin-left: -.035em; font-size: clamp(5.1rem,10.8vw,11rem); letter-spacing: -.07em; line-height: .92; }
.tnw-hero-label { display: block; margin-top: .96rem; font: 600 clamp(.68rem,.84vw,.83rem)/1.45 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #efe0cd; }
.tnw-angel-summary { max-width: min(57%,43rem); }
.tnw-angel-keywords { margin: 1.25rem 0 .65rem; color: #ffe7c6; font: italic 450 clamp(1.35rem,2.4vw,2.25rem)/1.18 var(--serif); letter-spacing: -.023em; }
.tnw-angel-summary .tnw-meaning-lead { max-width: 47ch; margin: 0; color: #f9f0e9; font-size: clamp(1.03rem,1.45vw,1.3rem); line-height: 1.52; }
.tnw-angel-body { display: grid; grid-template-columns: minmax(8rem, .72fr) minmax(0, 46.5rem) minmax(0,.45fr); align-items: start; gap: clamp(1.6rem,4.7vw,5.2rem); padding-block: clamp(2.9rem,6vw,5.7rem); }
.tnw-reading-nav { position: sticky; top: 4rem; display: grid; align-items: start; justify-content: start; gap: .2rem; border-left: 1px solid var(--line); padding-left: 1.15rem; }
.tnw-reading-nav a { display: inline-flex; align-items: center; min-height: 39px; color: var(--muted); font-size: .92rem; text-decoration-color: #c1af9e; }
.tnw-reading-nav a:hover { color: var(--accent); }
.tnw-angel-body .tnw-reading { width: 100%; min-width: 0; }
.tnw-reading-section { padding-block: clamp(1.7rem,3.2vw,2.9rem); border-bottom: 1px solid var(--line); }
.tnw-reading-section:first-child { padding-top: 0; }
.tnw-reading-section h2, .tnw-editorial h2 { color: var(--ink); font-size: clamp(1.85rem,3.4vw,3.1rem); font-weight: 470; line-height: 1.07; margin: 0 0 .85rem; scroll-margin-top: 2rem; }
.tnw-reading-section p, .tnw-editorial p { max-width: 66ch; margin: 0 0 1.05rem; color: var(--muted); font-size: clamp(1.01rem,1.12vw,1.14rem); line-height: 1.72; }
.tnw-reading-section p:last-child { margin-bottom: 0; }
.tnw-reflection { margin: 1.55rem 0 .2rem; padding: clamp(1.1rem,3vw,2.1rem); background: #e6eadd; border-left: 2px solid #899171; }
.tnw-reflection h3 { margin: 0 0 .8rem; color: #4f5847; font: 630 .74rem / 1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.tnw-reading-section .tnw-reflection p { margin: 0; color: #374336; font: italic 470 clamp(1.39rem,2.2vw,2.1rem)/1.3 var(--serif); letter-spacing: -.03em; }
.tnw-sources { margin: .95rem 0 2.4rem; font-size: .95rem; color: var(--muted); }
.tnw-sources summary { min-height: 44px; padding-block: .65rem; cursor: pointer; }
.tnw-feature-band, .tnw-next-card { padding: clamp(1.5rem,4vw,3.5rem); background: #ebe4d7; color: #3d3133; }
.tnw-feature-band { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.tnw-feature-band h2, .tnw-next-card h2 { max-width: 23ch; margin: 0; color: inherit; font-size: clamp(1.8rem,3.2vw,3rem); font-weight: 470; }
.tnw-feature-band p, .tnw-next-card p { margin: .7rem 0 0; color: #5c5050; }
.tnw-next-card .tnw-button { margin-top: 1.15rem; }
.tnw-inner .tnw-button, .tnw-angel-body .tnw-button { color: #fff9ef; background: #382c35; border: 1px solid #382c35; }
.tnw-inner :is(.tnw-button-outline,.tnw-button-secondary) { color: var(--ink); background: transparent; border-color: #9e8c7c; }
.tnw-inner .tnw-button:hover, .tnw-angel-body .tnw-button:hover { color: white; background: #57424b; border-color: #57424b; }

.tnw-worktable { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,1fr); align-items: start; gap: 0 clamp(1.4rem,4vw,4.4rem); margin-top: .8rem; }
.tnw-worktable > [data-tnw-calculator] { width: 100%; min-width: 0; }
.tnw-calculator-intro { display: flex; flex-direction: column; align-items: start; justify-content: flex-end; min-height: clamp(24rem,36vw,35rem); padding: clamp(1.5rem,3.7vw,3.4rem); }
.tnw-calculator-intro::before { background: linear-gradient(12deg,#18141df5 4%,#1a1621c2 44%,#20192355 67%,transparent); }
.tnw-calculator-intro .tnw-lunar-art img { object-position: 65% 48%; }
.tnw-calculator-intro h1 { max-width: 15ch; color: #fff8ee; font-size: clamp(2.45rem,4.2vw,5.4rem); }
.tnw-calculator-intro .tnw-calc-see { margin: .6rem 0 0; color: #f3e5d7; }
.tnw-calculator-intro .tnw-calc-see a { color: #ffe3ab; }
.tnw-worktable .tnw-method { grid-column: 2; max-width: 48rem; margin-top: clamp(2rem,4vw,3.5rem); }
.tnw-tool-hero { min-height: clamp(20rem,31vw,30rem); margin: .8rem 0 clamp(2rem,4.2vw,3.7rem); }
.tnw-tool-hero::before { background: linear-gradient(90deg,#18141de8,#201a2594 48%,transparent 85%); }
.tnw-tool-hero .tnw-lunar-art img { object-position: 70% 51%; }
.tnw-tool-directory .tnw-tool-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 clamp(2rem,6vw,5.25rem); }
.tnw-tool-directory .tnw-tool-card { display: grid; grid-template-columns: 1fr auto; align-content: center; gap: .4rem .75rem; min-height: 9.5rem; padding: 1.25rem 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tnw-tool-directory .tnw-tool-card h2 { margin: 0; color: inherit; font-size: clamp(1.63rem,2.5vw,2.4rem); font-weight: 470; }
.tnw-tool-directory .tnw-tool-card p { max-width: 42ch; margin: 0; color: var(--muted); line-height: 1.43; }
.tnw-tool-directory .tnw-tool-card > span { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--accent); }
.tnw-tool-directory .tnw-tool-card:hover h2 { color: var(--accent); }
.tnw-result-detail { border-block: 1px solid var(--line); }
.tnw-result-detail + .tnw-result-detail { border-top: 0; }
.tnw-result-detail summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-block: .7rem; cursor: pointer; list-style: none; }
.tnw-result-detail summary::-webkit-details-marker { display: none; }
.tnw-result-detail summary::after { content: "+"; }
.tnw-result-detail[open] summary::after { content: "−"; }
.tnw-result-detail p { padding-bottom: .75rem; }
.tnw-calculator-form,
.tnw-contact-form,
.tnw-result-email,
.tnw-result-share {
    padding: clamp(1rem, 4.5vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: .12rem;
    background: var(--chalk);
    color: var(--ink);
    color-scheme: light;
}

.tnw-form-fields,
.tnw-birth-date {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.tnw-form-fields {
    display: grid;
    justify-items: start;
    gap: 1.1rem;
}

.tnw-form-fields > label,
.tnw-birth-date {
    width: 100%;
}

.tnw-birth-date legend {
    margin-bottom: .75rem;
    padding: 0;
    font-weight: 720;
}

.tnw-date-grid {
    display: grid;
    grid-template-columns: minmax(3rem, .82fr) minmax(6.25rem, 1.5fr) minmax(3.75rem, 1fr);
    gap: clamp(.38rem, 1.35vw, .85rem);
}

.tnw-calculator-form label,
.tnw-result-email label {
    display: grid;
    min-width: 0;
    gap: .34rem;
}

.tnw-calculator-form label,
.tnw-result-email label,
.tnw-contact-form label {
    color: var(--ink);
    font-size: .94rem;
    font-weight: 670;
}

.tnw-calculator-form input,
.tnw-calculator-form select,
.tnw-result-email input,
.tnw-contact-form input,
.tnw-contact-form textarea {
    width: 100%;
    min-width: 0;
    min-height: 3.15rem;
    padding: .56rem .66rem;
    border: 1px solid #ac9c8c;
    border-radius: 0;
    background: #fffdf8;
    color: var(--ink);
    font: 480 1rem / 1.35 var(--sans);
}

.tnw-calculator-form input::placeholder,
.tnw-contact-form input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.tnw-calculator-form :is(input, select, button):disabled {
    opacity: .58;
}

.tnw-field-note {
    margin: 0;
    color: var(--muted);
    font-size: .91rem;
}

.tnw-form-feedback,
.tnw-notice {
    margin: .8rem 0;
    padding: .63rem .8rem;
    border-inline-start: 2px solid var(--accent);
    background: #f5e5dc;
    color: #652e1b;
}

.tnw-contact-form {
    display: grid;
    gap: .8rem;
    margin-top: 1.55rem;
}

.tnw-contact-form :is(label, button) {
    justify-self: start;
}

.tnw-contact-form label span {
    color: var(--muted);
    font-weight: 450;
}

.tnw-method {
    margin-top: clamp(2.25rem, 5.5vw, 4rem);
    border-block-start: 1px solid var(--line);
    border-block-end: 0;
}

.tnw-calculator-result {
    --line: #655971;
    margin-top: 1rem;
    padding: clamp(1.35rem, 5vw, 3.15rem);
    border-block-start: 1px solid var(--copper);
    background:
        radial-gradient(ellipse at 96% -12%, #46394e, transparent 63%),
        var(--pine-deep);
    color: var(--chalk);
    overflow-wrap: anywhere;
}

.tnw-result-heading {
    margin-block: 0 .55rem;
    color: inherit;
    font-size: clamp(2rem, 4vw, 3.55rem);
    line-height: 1;
}

.tnw-result-value {
    display: inline-block;
    margin-block: .1em;
    color: #f2d8a6;
    font: 540 clamp(2.35rem, 8.5vw, 5.65rem) / .94 var(--serif);
    letter-spacing: -.042em;
}

.tnw-result-name {
    margin-block: .55rem .7rem;
    color: var(--chalk);
}

.tnw-calculator-result p:not(.tnw-result-value),
.tnw-calculator-result li {
    color: #ece2e4;
}

.tnw-calculator-result a,
.tnw-calculator-result summary::after {
    color: #f2d8a6;
}

.tnw-calculator-result .tnw-button {
    border-color: var(--copper);
    background: var(--chalk);
    color: var(--pine-deep);
}

.tnw-calculator-result .tnw-button:hover {
    background: #f2e6cf;
}

.tnw-result-actions {
    margin-block: 1.15rem;
}

.tnw-result-email,
.tnw-result-share {
    margin-top: .9rem;
}

.tnw-result-email h2 {
    margin-block: 0 .55rem;
    font-size: clamp(1.85rem, 3.5vw, 2.7rem);
}

.tnw-result-email form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .7rem;
}

.tnw-result-email label {
    flex: 1 1 13rem;
}

.tnw-result-share .tnw-button {
    margin: .22rem .28rem .22rem 0;
}

.tnw-result-links {
    margin-top: 1rem;
}

[data-tnw-share-links] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-block-start: .65rem;
}

[data-tnw-share-links] :is(button, a) {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: .43rem .8rem;
    border: 1px solid #ac9c8c;
    background: var(--chalk);
    color: var(--ink);
    font: 620 .9rem / 1.2 var(--sans);
    text-decoration: none;
}

[data-tnw-share-links] :is(button, a):hover {
    background: #eee7db;
}

[data-tnw-share-status]:empty,
[data-tnw-email-status]:empty {
    display: none;
}

[data-tnw-share-status],
[data-tnw-email-status] {
    margin-block: .65rem 0;
}

.tnw-result-row,
.tnw-result-saved-list > div {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: baseline;
    gap: .33rem .9rem;
    padding-block: .72rem;
    border-block-start: 1px solid var(--line);
}

.tnw-result-row dd,
.tnw-result-saved-list dd {
    margin: 0;
    font-weight: 690;
    overflow-wrap: anywhere;
}

.tnw-result-row dd {
    color: #f2d8a6;
}

.tnw-result-saved-list dd {
    color: var(--accent);
}

.tnw-result-saved-list dd p {
    margin-block: .3rem 0;
    color: var(--ink);
    font-weight: 450;
}

.tnw-result-saved {
    width: min(100% - 3rem, 47rem);
    min-height: 55vh;
    padding-block: clamp(3rem, 8vw, 6.5rem);
}

.tnw-result-saved h1 {
    margin-bottom: 1.35rem;
}


.tnw-worktable .tnw-calculator-form { padding: clamp(1.1rem,3.1vw,2.65rem); background: var(--chalk); border-color: var(--line); border-top: 2px solid #ac9265; }
.tnw-birth-date legend { font: 490 clamp(1.5rem,2.1vw,2rem)/1.2 var(--serif); }
.tnw-calculator-result .tnw-button { color: var(--pine-deep); background: #fff4df; }
.tnw-form-fields > .tnw-button { margin-top: .25rem; }
.tnw-editorial { width: min(100%,45rem); padding-top: clamp(1.6rem,4vw,3.25rem); }
.tnw-editorial h1, .tnw-result-saved h1 { margin-bottom: 1.25rem; }
.tnw-editorial h2 { margin-top: clamp(1.6rem,3.4vw,2.65rem); }
.tnw-editorial .tnw-lead { max-width: 55ch; margin: 0 0 1.6rem; padding-bottom: 1.55rem; border-bottom: 1px solid var(--line); color: var(--ink); font-size: clamp(1.14rem,1.6vw,1.4rem); }
.tnw-editorial-moon { aspect-ratio: 2.55; margin: 1.7rem 0 2rem; }
.tnw-editorial-moon .tnw-lunar-art img { object-position: center 42%; }
.tnw-result-saved { margin-inline: auto; }
.tnw-result-saved-list strong { font: 500 clamp(1.6rem,3.2vw,2.55rem)/1.1 var(--serif); }
.tnw-inner :focus-visible, .tnw-angel-reading :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tnw-directory-head :focus-visible, .tnw-angel-hero :focus-visible, .tnw-calculator-intro :focus-visible, .tnw-calculator-result :focus-visible { outline-color: #ffe8bc; }
@media (max-width: 1000px) {
    .tnw-angel-body { grid-template-columns: minmax(7.5rem,.55fr) minmax(0,2.7fr); }
}
@media (max-width: 800px) {
    .tnw-worktable { display: block; max-width: 43rem; margin-inline: auto; }
    .tnw-worktable .tnw-calculator-intro { min-height: 18rem; margin-bottom: 1rem; }
    .tnw-directory-head .tnw-page-intro { max-width: 68%; }
    .tnw-number-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tnw-feature-band { flex-wrap: wrap; }
}
@media (max-width: 660px) {
    .tnw-crumbs { padding-block: .8rem; }
    .tnw-directory-head .tnw-page-intro { max-width: none; padding-block: 5.5rem 2.25rem; }
    .tnw-directory-head h1 { max-width: 13ch; }
    .tnw-directory-head .tnw-lead { max-width: 38ch; }
    .tnw-directory-head::before, .tnw-angel-hero::before { background: linear-gradient(7deg,#18141df7 1%,#1c1823cf 39%,#201a2530 79%,#17131c66); }
    .tnw-lunar-art img { object-position: 65% 39%; }
    .tnw-angel-opening { min-height: 0; padding-block: 5.4rem 2.3rem; }
    .tnw-hero-number { font-size: clamp(5rem,19vw,7.8rem); }
    .tnw-angel-summary { max-width: 100%; }
    .tnw-angel-keywords { margin-top: 1rem; }
    .tnw-angel-body { display: block; padding-block: .6rem 3rem; }
    .tnw-reading-nav { display: flex; position: static; flex-wrap: wrap; gap: 0 .95rem; margin-bottom: 1.5rem; padding: .3rem 0 .55rem; border: 0; border-bottom: 1px solid var(--line); }
    .tnw-reading-nav a { min-height: 40px; font-size: .86rem; }
    .tnw-pattern-links { grid-template-columns: 1fr; gap: 0; }
    .tnw-pattern-links a { padding-block: 1rem; }
    .tnw-pattern-links a + a { border-top: 0; }
    .tnw-card-number { font-size: clamp(2.9rem,10vw,4rem); }
    .tnw-card-legend { font-size: .84rem; }
    .tnw-tool-directory .tnw-tool-grid { grid-template-columns: 1fr; }
    .tnw-tool-directory .tnw-tool-card { min-height: 7.7rem; }
    .tnw-calculator-intro h1 { font-size: clamp(2.35rem,9vw,3.8rem); }
    .tnw-calculator-intro { padding: 1.25rem; }
    .tnw-tool-hero { min-height: 16rem; }
    .tnw-worktable .tnw-calculator-form { padding: 1.15rem; }
}
@media (max-width: 400px) {
    .tnw-directory .tnw-search { display: grid; grid-template-columns: minmax(0,1fr); }
    .tnw-worktable .tnw-calculator-form { padding-inline: .85rem; }
    .tnw-date-grid :is(input, select) { padding-inline: .3rem; }
}
