/* --- knowledge hub -------------------------------------------------------- */
/* No sidebar, deliberately: reading happens mobile-first and a rail of links
   beside long text is desktop decoration that steals reading width. The
   pillar order, the journey rail and the end-of-article next step do the
   navigating instead. */

.k-pillars {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 1px; background: var(--line);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    border: 1px solid var(--line);
}
.k-pillar-card { background: var(--bg); }
.k-pillar-card a { display: block; padding: clamp(1.25rem, 3vw, 2rem); height: 100%; }
.k-pillar-card a:hover h2 { text-decoration: underline; text-underline-offset: 0.2em; }
.k-pillar-card__step { font-size: var(--step--1); color: var(--ink-faint); letter-spacing: 0.08em; }
.k-pillar-card h2 { font-size: var(--step-1); margin: 0.5rem 0 0.35rem; }
.k-pillar-card p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.5; }
.k-pillar-card__count { display: inline-block; margin-top: 0.75rem; font-size: var(--step--1); color: var(--ink-faint); }

.k-tools { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.k-tool-card {
    position: relative; display: block;
    border: 1px solid var(--ink); padding: clamp(1.25rem, 3vw, 1.75rem);
}
.k-tool-card h2, .k-tool-card h3 { font-size: var(--step-1); margin: 0 0 0.4rem; }
.k-tool-card p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.5; max-width: 34ch; }
.k-tool-card__go { position: absolute; right: 1.25rem; bottom: 1rem; font-size: var(--step-1); transition: transform 0.2s; }
.k-tool-card:hover .k-tool-card__go { transform: translateX(4px); }

/* Image placeholders: the photo brief living in the layout. Swapping in the
   real photograph later shifts nothing — the ratio already holds the space. */
.ph {
    margin: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--bg-sunk); border: 1px dashed var(--line);
    color: var(--ink-faint); width: 100%; overflow: hidden;
}
.ph svg { width: 28px; height: 28px; }
.ph figcaption { font-size: var(--step--1); text-align: center; padding-inline: 1rem; }
.ph figcaption span { display: block; letter-spacing: 0.08em; font-size: 0.7rem; margin-top: 0.15rem; }
.ph--wide { grid-column: 1 / -1; }

/* A real photograph in an article body — what a .ph becomes once shot. */
.k-photo { margin: 1.75rem 0; }
.k-photo img { width: 100%; height: auto; display: block; border-radius: 2px; }

/* Data tables: the extractable, snippet-able answer format. Wide ones scroll
   inside their wrapper — the page itself must never scroll sideways. */
.k-table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.k-table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.k-table th, .k-table td { text-align: left; padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.k-table th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.k-table td:first-child, .k-table th:first-child { padding-left: 0; }

/* The cluster's cross-links, appended to every article body by the seeder. */
.k-readmore { margin-top: 2.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: var(--step-0); line-height: 1.7; }

.k-tool-step { margin-block: clamp(2rem, 4vw, 3rem); }
.k-tool-step h2 { display: flex; align-items: center; gap: 0.7rem; font-size: var(--step-1); margin-bottom: 0.75rem; }
.k-step-n {
    flex: 0 0 1.9rem; height: 1.9rem; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ink); border-radius: 50%; font-size: var(--step--1);
}
.k-cal-stage, .k-ring-stage, .k-stone-stage {
    display: flex; align-items: center; justify-content: center;
    min-height: 250px; margin-block: 1.25rem;
    background: var(--bg-sunk); overflow: hidden;
}
.k-card-outline {
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0.6rem;
    border: 2px solid var(--ink); border-radius: 10px; background: var(--bg);
    color: var(--ink-faint); font-size: var(--step--1); text-align: center;
}
.k-ring-circle { border: 2px solid var(--ink); border-radius: 50%; background: var(--bg); }
.k-slider input[type="range"] { width: 100%; accent-color: #111; }
.k-fine { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.k-fine .btn { min-height: 2.6rem; padding: 0.55rem 1.1rem; }

.k-result { display: flex; gap: clamp(1.5rem, 5vw, 3rem); justify-content: center; margin-top: 1.5rem; text-align: center; }
.k-result-num { display: block; font-size: var(--step-2); }
.k-result-num--main { font-size: clamp(2.2rem, 6vw, 3rem); }
.k-result-label { font-size: var(--step--1); color: var(--ink-soft); }

.k-stone-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.k-stone-picker .btn.is-active { background: #1c1a17; color: #fff; }
.k-stone-stage { gap: clamp(2rem, 6vw, 4rem); }
.k-stone-item { text-align: center; font-size: var(--step--1); color: var(--ink-soft); }
.k-stone { border-radius: 50%; margin-inline: auto;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e9e6e0 45%, #c9c4bb 100%);
    box-shadow: inset 0 0 6px rgba(28,26,23,0.25); }
.k-coin { border-radius: 50%; margin-inline: auto;
    background: radial-gradient(circle at 35% 30%, #e9cba0 0%, #caa066 70%, #a97f45 100%); }

.k-planner-form { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.k-planner-form input[type="date"] {
    padding: 0.7rem 0.9rem; border: 1px solid var(--ink); background: var(--bg);
    font: inherit; font-size: var(--step-0);
}
.k-check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--step--1); color: var(--ink-soft); }

.k-timeline { list-style: none; margin: 1rem 0 0; padding: 0; }
.k-timeline li { position: relative; padding: 0 0 1.1rem 1.4rem; border-left: 1px solid var(--line); margin-left: 0.4rem; }
.k-timeline li::before {
    content: ""; position: absolute; left: -0.31rem; top: 0.35rem;
    width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #1c1a17;
}
.k-timeline small { color: var(--ink-soft); }
.k-verdict { margin-top: 1rem; padding: 1rem 1.2rem; font-size: var(--step-0); line-height: 1.5; }
.k-verdict--ok { background: #f2f6f0; }
.k-verdict--tight { background: #faf5ec; }
.k-verdict--late { background: #f9f0ee; }

.k-journey { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.k-journey__step { font-size: var(--step-0); max-width: 45%; }
.k-journey__step span { display: block; font-size: var(--step--1); color: var(--ink-faint); margin-bottom: 0.2rem; }
.k-journey__step--next { text-align: right; margin-left: auto; }

.k-author { display: flex; gap: 1rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: clamp(2rem, 4vw, 3rem); }
.k-author picture { display: contents; }
.k-author p { margin: 0; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.5; }
.k-author p strong { color: var(--ink); }
.k-author--intro { border-top: 0; padding-top: 0; margin-top: 0; }

.k-faq { border-top: 1px solid var(--line); margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.5rem; }
.k-faq h2 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.k-faq details { border-bottom: 1px solid var(--line); }
.k-faq summary { cursor: pointer; padding: 0.9rem 0; font-size: var(--step-0); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.k-faq summary::after { content: "+"; color: var(--ink-faint); }
.k-faq details[open] summary::after { content: "−"; }
.k-faq details p { margin: 0 0 1rem; color: var(--ink-soft); line-height: 1.6; }

.k-carat-table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: var(--step--1); }
.k-carat-table th, .k-carat-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.k-carat-table th { font-weight: normal; color: var(--ink-faint); letter-spacing: 0.06em; }

@media (max-width: 40rem) {
    .k-result { flex-wrap: wrap; }
    .k-journey { flex-direction: column; }
    .k-journey__step { max-width: none; }
    .k-journey__step--next { text-align: left; margin-left: 0; }
}

/* --- about page ----------------------------------------------------------- */
.about-person { display: flex; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: flex-start; }
/* x-pic wraps in <picture>; inside flex the wrapper becomes the item and
   squashes the img — display:contents promotes the img itself. Same fix as
   .k-author picture above. Never use it inside a grid: the <source> is
   promoted too and occupies a cell, pushing every img into column two. */
.about-person picture { display: contents; }
.about-photos picture { display: block; }
.about-person--flip { flex-direction: row-reverse; }
.about-person h2 { margin: 0 0 0.2rem; }
.about-person > div { flex: 1 1 16rem; }
.about-person p { line-height: 1.6; }
.about-creed { margin: 1.25rem 0 0; padding-left: 1.1rem; border-left: 2px solid var(--ink); }
.about-creed p { margin: 0 0 0.35rem; font-style: italic; }
.about-creed cite { font-style: normal; font-size: var(--step--1); color: var(--ink-soft); }
.about-photos { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1.5rem; }
.about-photos img { width: 100%; height: auto; display: block; }
.about-promises { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.about-promises li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.about-promises li::before { content: "— "; color: var(--ink-faint); }

@media (max-width: 40rem) {
    .about-person, .about-person--flip { flex-direction: column; }
    .about-photos { grid-template-columns: 1fr; }
}
