/* ==========================================================================
   TRAC Vastu — same palette as the numerology page: dark text, plain forms,
   one scrolling page. The 3 x 3 grid shows the house with North at the top.
   ========================================================================== */

.tv {
    --ink: #000000;
    --ink-2: #141414;
    --ink-3: #333B47;
    --paper: #FFFFFF;
    --rule: #CBD2DC;
    --rule-2: #E6E9EE;
    --brass: #7E5416;
    --brass-lt: #C89B4E;
    --deep: #16233D;
    --flag: #93323C;
    --good: #1F6B3A;
    --fair: #8A5A00;
    --radius: 3px;
    color: var(--ink-2);
    background: var(--paper);
    font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
}
.tv *, .tv *::before, .tv *::after { box-sizing: border-box; }
body { margin: 0; background: #FFFFFF; }

.tv-wrap { max-width: 1060px; margin: 0 auto; padding: 0 1rem; }
.tv-top { background: var(--deep); color: #fff; padding: 0.85rem 0; }
.tv-top .tv-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.tv-brand { font-family: "IBM Plex Serif", Georgia, serif; font-size: 1.08rem; font-weight: 500; color: #fff; text-decoration: none; }
.tv-brand span { color: var(--brass-lt); }
.tv-top nav a { color: #C7CFDF; text-decoration: none; font-size: 0.88rem; margin-left: 1.3rem; }
.tv-top nav a:hover { color: #fff; }

.tv-body { padding: 1.6rem 1rem 4rem; }
.tv-lead { color: var(--ink); margin: 0 0 1.2rem; }
.tv h2 { font-family: "IBM Plex Serif", Georgia, serif; font-size: 1.2rem; font-weight: 500; color: var(--ink); margin: 1.6rem 0 .8rem; }
.tv-hint { color: var(--ink-3); font-size: .85rem; margin: .3rem 0 0; }

.tv-form { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem 1.2rem; background: #fff; }
.tv-row { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.tv-row.three { grid-template-columns: repeat(3, 1fr); }
.tv-row.four { grid-template-columns: repeat(4, 1fr); }
.tv-rooms { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tv-field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .4rem; }
.tv-field label, .tv-checks legend { font-size: .85rem; font-weight: 600; color: var(--ink); }
.tv-field input, .tv-field select {
    font: inherit; color: var(--ink); background: #fff;
    border: 1px solid var(--rule); border-radius: var(--radius); padding: .45rem .55rem; width: 100%;
}
.tv-field input:focus, .tv-field select:focus { outline: 2px solid var(--brass-lt); outline-offset: 0; }
.tv-field .num { font-family: "IBM Plex Mono", monospace; }
.tv-end { justify-content: flex-end; }

.tv-checks { display: grid; align-items: start; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: .6rem; }
.tv-checks fieldset { border: 1px solid var(--rule-2); border-radius: var(--radius); padding: .5rem .7rem; margin: 0; }
.tv-checks label { display: inline-flex; align-items: center; gap: .3rem; margin: .15rem .8rem .15rem 0; color: var(--ink); font-size: .9rem; }

.tv-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.tv-btn {
    font: inherit; font-weight: 600; color: #fff; background: var(--deep);
    border: 1px solid var(--deep); border-radius: var(--radius); padding: .5rem 1.1rem; cursor: pointer;
}
.tv-btn:hover { background: #22345A; }
.tv-btn.ghost { color: var(--deep); background: #fff; }
.tv-btn.ghost:hover { background: var(--rule-2); }

.tv-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--deep); max-width: 560px; }
.tv-cell { border: 1px solid var(--rule); min-height: 96px; padding: .45rem .55rem; }
.tv-cell[data-cell="C"] { background: #FAF7F0; }
.tv-cell b { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.tv-cell ul { list-style: none; margin: .25rem 0 0; padding: 0; font-size: .85rem; }
.tv-cell li { color: var(--ink); padding-left: .9rem; position: relative; }
.tv-cell li::before { content: ""; position: absolute; left: 0; top: .5em; width: .5rem; height: .5rem; border-radius: 50%; }
.tv-cell li.good::before { background: var(--good); }
.tv-cell li.fair::before { background: var(--fair); }
.tv-cell li.weak::before { background: var(--flag); }

.tv-answer { margin-top: 1rem; border-left: 3px solid var(--brass); padding: .4rem 0 .4rem 1rem; color: var(--ink); }
.tv-answer h3, .tv-answer h4 { font-size: 1rem; color: var(--ink); margin: 1rem 0 .4rem; }
.tv-answer table { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
.tv-answer th, .tv-answer td { border: 1px solid var(--rule); padding: .3rem .5rem; text-align: left; }
.tv-headline { font-size: 1.05rem; }

@media (max-width: 720px) {
    .tv-row, .tv-row.three, .tv-row.four { grid-template-columns: 1fr; }
    .tv-top nav a { margin-left: .8rem; }
}
