/* ==========================================================================
   Human Design — Chart-Rechner, Bodygraph, Cross-Reading
   ========================================================================== */

/* Der Chart-Rechner und der Hinweis-Block waren ueber die volle
   Seitenbreite (1425px), waehrend die Text-Boxen (.deck-intro) auf
   800px begrenzt sind. Der Rechner soll dieselbe Breite haben wie
   die Boxen — sonst wirkt er wie ein fremdes Element auf der Seite.
   .deck-intro hat max-width 800px + padding 1rem; der Rechner bekommt
   dieselbe Box, damit Datum, Ort und Button auf einer Linie mit den
   Textboxen starten und enden. */
.hd-chart-section {
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 var(--spacing);
}

.hd-chart {
    margin-top: 1.25rem;
}

/* --- Formular ------------------------------------------------------------ */

.hd-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    align-items: end;
    background: var(--color-bg-card);
    border: 1px solid rgba(212, 169, 68, 0.22);
    border-radius: 10px;
    padding: 1.5rem;
}

.hd-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
}

.hd-field label {
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.hd-opt {
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text-muted);
    font-size: 0.72rem;
}

.hd-field input {
    background: var(--color-bg-light);
    border: 1px solid rgba(212, 169, 68, 0.28);
    border-radius: 6px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6rem 0.7rem;
    width: 100%;
}

.hd-field input:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 1px;
}

.hd-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: 1px solid var(--color-gold);
    border-radius: 6px;
    color: var(--color-gold-light);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.2rem;
    transition: box-shadow 0.2s, transform 0.1s;
}

.hd-btn:hover {
    box-shadow: var(--glow-gold);
}

.hd-btn:active {
    transform: translateY(1px);
}

.hd-hint {
    color: var(--color-text-muted);
    font-size: 0.86rem;
    margin: 0.8rem 0 0;
    max-width: 60ch;
}

.hd-error {
    background: rgba(197, 90, 74, 0.14);
    border-left: 3px solid #c25a4a;
    border-radius: 4px;
    color: var(--color-text);
    padding: 0.8rem 1rem;
}

/* --- Orts-Autocomplete ---------------------------------------------------- */

/* --- Ergebnis ------------------------------------------------------------- */

.hd-result {
    margin-top: 2rem;
}

.hd-result-head {
    border-bottom: 1px solid rgba(212, 169, 68, 0.25);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.hd-result-head h2 {
    color: var(--color-gold-light);
    font-family: var(--font-heading);
    font-size: 1.9rem;
    margin: 0 0 0.35rem;
}

.hd-result-sub {
    color: var(--color-text-muted);
    margin: 0.15rem 0;
}

.hd-result-body {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 860px) {
    .hd-result-body {
        grid-template-columns: 1fr;
    }
}

.hd-graph-col {
    background: var(--color-bg-card);
    border: 1px solid rgba(212, 169, 68, 0.2);
    border-radius: 10px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

@media (max-width: 860px) {
    .hd-graph-col {
        position: static;
    }
}

.hd-bodygraph {
    display: block;
    height: auto;
    width: 100%;
}

/* --- Bodygraph-Formen ----------------------------------------------------- */

.hd-shape {
    fill: rgba(155, 77, 202, 0.10);
    stroke: rgba(212, 169, 68, 0.45);
    stroke-width: 1.4;
}

.hd-shape--defined {
    fill: rgba(155, 77, 202, 0.24);
    stroke: var(--color-gold);
    stroke-width: 2;
}

.hd-center-label {
    fill: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.04em;
    pointer-events: none;
}

.hd-shape--defined + .hd-center-label {
    fill: var(--color-gold-light);
}

.hd-channel {
    stroke: rgba(212, 169, 68, 0.35);
    stroke-width: 1.6;
}

.hd-channel--active {
    stroke: var(--color-gold);
    stroke-width: 3;
    stroke-linecap: round;
}

.hd-gate circle {
    fill: var(--color-bg-light);
    stroke: rgba(212, 169, 68, 0.4);
    stroke-width: 1;
}

.hd-gate--active circle {
    stroke-width: 1.8;
}

/* Personality = Gold, Design = Violett, beides = Gold-Violett */
.hd-gate--personality circle {
    fill: rgba(212, 169, 68, 0.32);
    stroke: var(--color-gold);
}

.hd-gate--design circle {
    fill: rgba(155, 77, 202, 0.38);
    stroke: #b47fe0;
}

.hd-gate--personality.hd-gate--design circle {
    fill: rgba(196, 128, 224, 0.45);
    stroke: var(--color-gold-light);
}

.hd-gate-num {
    fill: var(--color-text);
    font-family: var(--font-body);
    font-size: 9px;
    pointer-events: none;
}

.hd-legend {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    margin: 0.8rem 0 0;
    text-align: center;
}

.hd-key {
    border-radius: 50%;
    display: inline-block;
    height: 11px;
    margin: 0 0.3rem 0 0.8rem;
    vertical-align: middle;
    width: 11px;
}

.hd-key--p { background: rgba(212, 169, 68, 0.32); border: 1px solid var(--color-gold); }
.hd-key--d { background: rgba(155, 77, 202, 0.38); border: 1px solid #b47fe0; }
.hd-key--b { background: rgba(196, 128, 224, 0.45); border: 1px solid var(--color-gold-light); }

/* --- Infoblöcke ----------------------------------------------------------- */

.hd-info-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hd-block {
    background: var(--color-bg-card);
    border: 1px solid rgba(212, 169, 68, 0.18);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
}

.hd-block h3 {
    color: var(--color-gold);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    margin: 0 0 0.8rem;
    text-transform: uppercase;
}

.hd-block p {
    margin: 0.35rem 0;
}

.hd-big {
    color: var(--color-gold-light);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0 0 0.6rem !important;
}

.hd-block--split {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hd-table {
    border-collapse: collapse;
    font-size: 0.92rem;
    width: 100%;
}

.hd-table caption {
    color: var(--color-gold);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    padding-bottom: 0.5rem;
    text-align: left;
    text-transform: uppercase;
}

.hd-table th,
.hd-table td {
    border-bottom: 1px solid rgba(212, 169, 68, 0.12);
    padding: 0.32rem 0.4rem;
    text-align: left;
}

.hd-table thead th {
    color: var(--color-text-muted);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hd-table tbody tr.is-defined th {
    color: var(--color-gold-light);
}

.hd-channel-list {
    display: grid;
    gap: 0.3rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.hd-channel-list li {
    border-left: 2px solid var(--color-gold);
    font-size: 0.94rem;
    padding-left: 0.6rem;
}

.hd-ch-centers {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* --- Cross-Reading --------------------------------------------------------- */

.hd-cross {
    background: var(--color-bg-card);
    border: 1px solid rgba(212, 169, 68, 0.25);
    border-radius: 10px;
    margin-top: 2rem;
    padding: 1.5rem 1.6rem;
}

.hd-cross h3 {
    color: var(--color-gold);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0 0 0.7rem;
}

.hd-cross-intro {
    max-width: 70ch;
}

.hd-cross-loading,
.hd-cross-note {
    color: var(--color-text-muted);
}

.hd-hex h4 {
    color: var(--color-gold-light);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin: 0 0 0.8rem;
}

.hd-hex-binary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1rem;
    max-width: 120px;
}

.hd-hex-line {
    display: flex;
    gap: 8px;
    height: 9px;
}

.hd-hex-line--yang {
    background: var(--color-gold);
    border-radius: 1px;
}

.hd-hex-line--yin i {
    background: var(--color-gold);
    border-radius: 1px;
    flex: 1;
}

.hd-hex-urteil {
    font-size: 0.95rem;
    white-space: normal;
}

.hd-gate-name {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    font-style: italic;
}

.hd-hex-gate {
    color: var(--color-gold);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    margin: 0 0 0.2rem !important;
    text-transform: uppercase;
}

.hd-ai {
    margin-top: 1.6rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(15, 58, 74, 0.14);
}

.hd-ai h4 {
    color: var(--color-gold);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    margin: 0 0 0.4rem;
}

.hd-ai-intro {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 0.9rem;
}

.hd-ai-label {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.hd-ai-optional {
    color: var(--color-text-muted);
    font-weight: normal;
    text-transform: none;
}

.hd-ai-question {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0.6rem 0.7rem;
    resize: vertical;
    width: 100%;
}

.hd-ai-question:focus {
    border-color: var(--color-gold);
    outline: none;
}

.hd-ai-btn {
    background: var(--color-gold);
    border: none;
    border-radius: 6px;
    color: var(--color-bg);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    margin-top: 0.7rem;
    padding: 0.65rem 1.4rem;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.hd-ai-btn:disabled {
    cursor: wait;
    opacity: 0.6;
}

.hd-ai-hint {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    margin: 0.5rem 0 0;
}

.hd-ai-loading,
.hd-ai-error {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 1rem 0 0;
}

.hd-ai-error a {
    color: var(--color-gold);
    text-decoration: underline;
}

.hd-ai-reading {
    margin-top: 1.2rem;
}

.hd-ai-headline {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 1.18rem;
    line-height: 1.4;
    margin: 0 0 1rem;
}

.hd-ai-block {
    margin-bottom: 1rem;
}

.hd-ai-block h5 {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    margin: 0 0 0.3rem;
    text-transform: uppercase;
}

.hd-ai-block p {
    line-height: 1.65;
    margin: 0;
}

.hd-ai-voice {
    border-left: 2px solid var(--color-gold);
    margin-bottom: 0.8rem;
    padding-left: 0.8rem;
}

.hd-ai-gate {
    color: var(--color-gold);
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hd-ai-block--advice {
    background: rgba(212, 175, 55, 0.08);
    border-radius: 6px;
    padding: 0.8rem 1rem;
}

.hd-ai-block--closing p {
    color: var(--color-text-muted);
    font-style: italic;
}

.hd-hex-line-detail {
    margin-top: 1rem;
}

.hd-hex-line-detail h5 {
    color: var(--color-gold);
    font-family: var(--font-heading);
    margin: 0 0 0.3rem;
}

.hd-hex-comment {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.hd-hex-link {
    color: var(--color-gold);
    display: inline-block;
    margin-top: 1rem;
}

.hd-disclaimer {
    border-left: 3px solid rgba(212, 169, 68, 0.4);
    color: var(--color-text-muted);
    font-size: 0.86rem;
    margin-top: 2rem;
    padding-left: 0.9rem;
}

/* --- Konto-Hinweis (Chart gespeichert / Login noetig) ------------------ */

.hd-account-hint {
    margin: 1rem 0 0;
    padding: 0.7rem 0.95rem;
    border-left: 2px solid rgba(212, 169, 68, 0.45);
    background: rgba(212, 169, 68, 0.06);
    border-radius: 0 8px 8px 0;
    color: #d8cfb8;
    font-size: 0.92rem;
    line-height: 1.6;
}
.hd-account-hint a {
    color: #d4a944;
    text-decoration: underline;
}

.hd-notes {
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 var(--spacing);
}

.hd-notes ul {
    color: var(--color-text-muted);
    max-width: 75ch;
}

.hd-notes li {
    margin: 0.45rem 0;
}
