/* Astronomy calculator styles extracted from the reference application. */
.calculator-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: clamp(3.25rem, 7vw, 5.6rem) 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(101, 136, 255, 0.34), transparent 28rem),
        radial-gradient(circle at 84% 72%, rgba(37, 211, 187, 0.20), transparent 30rem),
        linear-gradient(135deg, #081226 0%, #142d5a 58%, #0b3a46 100%);
}

.calculator-hero::before,
.calculator-hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.calculator-hero::before {
    inset: 0;
    opacity: 0.55;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.3px),
        radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.2px);
    background-position: 0 0, 24px 31px;
    background-size: 82px 82px, 113px 113px;
}

.calculator-hero::after {
    width: 260px;
    height: 260px;
    right: 8%;
    top: 50%;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow:
        0 0 0 45px rgba(255,255,255,.025),
        0 0 0 92px rgba(255,255,255,.018);
}

.calculator-hero .container {
    position: relative;
    z-index: 1;
}

.calculator-hero-content {
    max-width: 780px;
}

.tool-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    padding: .42rem .78rem;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #dce7ff;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.tool-kicker i {
    color: #ffd073;
}

.calculator-hero h1 {
    margin-bottom: .8rem;
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(2.35rem, 5vw, 4.4rem);
    letter-spacing: -.045em;
}

.calculator-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(232, 239, 255, .82);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.calculator-section {
    background:
        radial-gradient(circle at 6% 20%, rgba(59,130,246,.075), transparent 24rem),
        radial-gradient(circle at 94% 80%, rgba(15,118,110,.06), transparent 25rem),
        #f6f8fc;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
    gap: 1.5rem;
    align-items: start;
}

.calculator-main {
    display: grid;
    gap: 1.25rem;
}

.tool-card,
.results-panel {
    border: 1px solid rgba(203, 213, 225, .88);
    border-radius: 1.2rem;
    background: rgba(255,255,255,.91);
    box-shadow: 0 18px 45px rgba(15, 31, 65, .07);
}

.tool-card {
    padding: clamp(1.15rem, 3vw, 1.65rem);
}

.tool-card-heading,
.tool-heading-copy,
.results-heading {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.tool-card-heading {
    margin-bottom: 1.35rem;
}

.tool-card-heading-action {
    justify-content: space-between;
    align-items: center;
}

.tool-heading-copy {
    min-width: 0;
}

.tool-card-icon,
.results-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: .85rem;
    background: linear-gradient(145deg, rgba(59,130,246,.14), rgba(30,64,175,.08));
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.13);
}

.tool-card-heading h2,
.results-heading h2 {
    margin: 0 0 .22rem;
    font-size: 1.25rem;
}

.tool-card-heading p,
.results-heading p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .9rem;
}

.calculator-fields {
    display: grid;
    gap: 1rem;
}

.calculator-fields-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculator-fields label,
.optical-factor-row label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .45rem;
    color: #24334f;
    font-size: .88rem;
    font-weight: 700;
}

.field-unit {
    padding: .1rem .42rem;
    border-radius: .42rem;
    background: #eef3fb;
    color: #62708a;
    font-size: .72rem;
    font-weight: 700;
}

.calculator-input,
.eyepiece-input-row .form-control,
.eyepiece-input-row .input-group-text {
    min-height: 46px;
    border-color: #cfd9e9;
}

.calculator-input:focus,
.eyepiece-input-row .form-control:focus {
    border-color: #7090fb;
    box-shadow: 0 0 0 3px rgba(79, 112, 232, .13);
}

.form-text {
    color: #77849a;
    font-size: .76rem;
}

.calculator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.15rem;
}

.formula-note {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: 1rem;
    padding: .78rem .9rem;
    border: 1px solid #cfe1ff;
    border-radius: .8rem;
    background: #f2f7ff;
    color: #36517e;
    font-size: .85rem;
}

.formula-note i {
    margin-top: .18rem;
    color: #4b78df;
}

.formula-note-error {
    border-color: #fecaca;
    background: #fff5f5;
    color: #9b2c2c;
}

.formula-note-error i {
    color: #dc2626;
}

.optical-factor-row {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(190px, .8fr);
    gap: 1rem;
    align-items: end;
}

.effective-focal-length {
    display: flex;
    min-height: 74px;
    flex-direction: column;
    justify-content: center;
    padding: .75rem 1rem;
    border: 1px solid #dbe4f2;
    border-radius: .85rem;
    background: linear-gradient(145deg, #f7faff, #eef4fc);
}

.effective-focal-length span {
    color: var(--color-text-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.effective-focal-length strong {
    color: var(--color-primary-dark);
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.42rem;
}

.eyepiece-editor {
    display: grid;
    gap: .7rem;
}

.eyepiece-editor-head,
.eyepiece-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) 42px;
    gap: .75rem;
    align-items: center;
}

.eyepiece-editor-head {
    padding: 0 .15rem;
    color: #596880;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.eyepiece-input-row {
    padding: .75rem;
    border: 1px solid #e0e7f1;
    border-radius: .9rem;
    background: #fafcff;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.eyepiece-input-row:focus-within {
    border-color: #afc1f5;
    box-shadow: 0 7px 20px rgba(41, 71, 150, .07);
}

.eyepiece-input-row .input-group-text {
    min-width: 44px;
    justify-content: center;
    background: #eef3fa;
    color: #64748b;
    font-weight: 700;
}

.btn-remove-eyepiece {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e3e8f0;
    border-radius: .72rem;
    background: #fff;
    color: #9b5360;
    transition: all var(--transition-fast);
}

.btn-remove-eyepiece:hover:not(:disabled) {
    border-color: #fecaca;
    background: #fff1f2;
    color: #dc2626;
}

.btn-remove-eyepiece:disabled {
    cursor: not-allowed;
    opacity: .36;
}

.eyepiece-help {
    display: flex;
    gap: .55rem;
    margin: 1rem 0 0;
    color: #718097;
    font-size: .8rem;
}

.eyepiece-help i {
    margin-top: .2rem;
    color: #5e83da;
}

.calculator-results {
    position: sticky;
    top: 86px;
}

.results-panel {
    overflow: hidden;
}

.results-heading {
    padding: 1.25rem;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(108, 231, 213, .17), transparent 15rem),
        linear-gradient(135deg, #0b1832, #17366d);
}

.results-heading h2 {
    color: #fff;
}

.results-heading p {
    color: rgba(229,237,255,.67);
}

.results-icon {
    background: rgba(255,255,255,.1);
    color: #8cebdc;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.result-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    padding: 1rem;
}

.result-summary-card {
    min-width: 0;
    padding: .8rem;
    border: 1px solid #e0e8f3;
    border-radius: .82rem;
    background: linear-gradient(145deg, #fbfdff, #f1f6fc);
}

.result-summary-card span {
    display: block;
    overflow: hidden;
    color: #718097;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.result-summary-card strong {
    display: block;
    margin-top: .15rem;
    color: #193d89;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.18rem;
}

.results-table-wrap {
    overflow-x: auto;
    border-top: 1px solid #e8edf4;
    border-bottom: 1px solid #e8edf4;
}

.results-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: .8rem .75rem;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    vertical-align: top;
}

.results-table th {
    background: #f5f8fc;
    color: #67758b;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.results-table td {
    color: #263750;
    font-size: .82rem;
}

.results-table tbody tr:last-child td {
    border-bottom: 0;
}

.results-table td strong,
.results-table td small {
    display: block;
}

.results-table td small {
    margin-top: .08rem;
    color: #8793a5;
    font-size: .7rem;
}

.results-empty {
    padding: 1.5rem !important;
    color: var(--color-text-muted) !important;
    text-align: center !important;
}

.result-status {
    display: inline-flex;
    margin-top: .25rem;
    padding: .12rem .42rem;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 800;
    line-height: 1.4;
}

.result-status-good {
    background: #dcfce7;
    color: #16713a;
}

.result-status-warning {
    background: #fff1c7;
    color: #8a5900;
}

.result-status-high {
    background: #ffe0e3;
    color: #a51d32;
}

.result-status-neutral {
    background: #e9eef7;
    color: #53647e;
}

.calculator-guidance {
    display: grid;
    gap: .65rem;
    padding: 1rem;
}

.guidance-item {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .72rem .78rem;
    border-radius: .72rem;
    background: #f4f7fb;
    color: #53647c;
    font-size: .76rem;
}

.guidance-item i {
    margin-top: .16rem;
    color: #4774d7;
}

.results-panel > .btn {
    width: calc(100% - 2rem) !important;
    margin: 0 1rem 1rem;
}

.calculator-explainer {
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.calculator-explainer .section-title {
    max-width: 780px;
    margin-left: 0;
    margin-right: 0;
}

.explainer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.explainer-grid article {
    padding: 1.25rem;
    border: 1px solid #dfe7f2;
    border-radius: 1rem;
    background: rgba(255,255,255,.84);
    box-shadow: 0 10px 28px rgba(21, 42, 82, .05);
}

.explainer-grid article > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .8rem;
    border-radius: .75rem;
    background: #eaf1ff;
    color: #2e5ac7;
}

.explainer-grid h3 {
    margin-bottom: .45rem;
    font-size: 1rem;
}

.explainer-grid p {
    margin-bottom: 0;
    color: #66758b;
    font-size: .82rem;
}

.calculator-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #f6d796;
    border-radius: .95rem;
    background: #fffaf0;
    color: #725429;
}

.calculator-disclaimer i {
    margin-top: .2rem;
    color: #d18b0b;
}

.calculator-disclaimer p {
    margin: 0;
    font-size: .84rem;
}

@media (max-width: 1199px) {
    .calculator-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
    }

    .calculator-fields-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calculator-fields-three .form-group:last-child {
        grid-column: 1 / -1;
    }

    .explainer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-results {
        position: static;
    }
}

@media (max-width: 767px) {
    .calculator-hero {
        padding-block: 3.2rem;
    }

    .calculator-hero::after {
        right: -140px;
    }

    .calculator-fields-three,
    .optical-factor-row,
    .explainer-grid {
        grid-template-columns: 1fr;
    }

    .calculator-fields-three .form-group:last-child {
        grid-column: auto;
    }

    .tool-card-heading-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .eyepiece-editor-head {
        display: none;
    }

    .eyepiece-input-row {
        grid-template-columns: 1fr 1fr 42px;
    }
}

@media (max-width: 520px) {
    .tool-card {
        padding: 1rem;
        border-radius: 1rem;
    }

    .calculator-actions .btn {
        width: 100%;
    }

    .eyepiece-input-row {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .eyepiece-input-row .input-group:nth-of-type(2) {
        grid-column: 1 / 2;
    }

    .eyepiece-input-row .btn-remove-eyepiece {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .result-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.calculator-explainer .section-title {
    text-align: left;
}

.calculator-explainer .section-title::before {
    margin-left: 0;
}

.calculator-explainer .section-title p {
    margin-left: 0;
}

/* ============================================
   ASTRONOMY TOOLS HUB
   ============================================ */
.tools-hub-hero,
.clear-sky-hero,
.moon-planner-hero,
.fov-hero,
.dew-risk-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 18%, rgba(94, 131, 218, .32), transparent 20rem),
        radial-gradient(circle at 82% 54%, rgba(35, 196, 177, .18), transparent 24rem),
        linear-gradient(135deg, #09152d 0%, #122b59 54%, #0b4a59 100%);
}

.tools-hub-hero::before,
.clear-sky-hero::before,
.moon-planner-hero::before,
.fov-hero::before,
.dew-risk-hero::before {
    position: absolute;
    inset: 0;
    content: '';
    opacity: .55;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(166,208,255,.7) 0 1px, transparent 1.5px);
    background-position: 0 0, 42px 31px;
    background-size: 82px 82px, 117px 117px;
    pointer-events: none;
}

.tools-hub-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.tools-hub-hero h1,
.clear-sky-hero h1,
.moon-planner-hero h1,
.fov-hero h1,
.dew-risk-hero h1 {
    margin-bottom: .8rem;
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(2.5rem, 6vw, 4.4rem);
    letter-spacing: -.045em;
}

.tools-hub-hero p,
.clear-sky-hero p,
.moon-planner-hero p,
.fov-hero p,
.dew-risk-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(232,240,255,.78);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.tools-hub-section,
.clear-sky-section,
.moon-planner-section,
.fov-section,
.dew-risk-section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
    background:
        radial-gradient(circle at 5% 7%, rgba(83,123,221,.08), transparent 22rem),
        linear-gradient(180deg, #f7faff 0%, #f3f7fc 100%);
}

.tools-hub-title {
    max-width: 760px;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.tools-hub-title::before,
.sky-section-heading::before {
    margin-left: 0;
}

.tools-hub-title p,
.sky-section-heading p {
    margin-left: 0;
}

.tools-coming-title {
    margin-top: clamp(3.5rem, 7vw, 5rem);
}

.tools-grid {
    display: grid;
    gap: 1.25rem;
}

.tools-grid-live {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tools-grid-coming {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.astronomy-tool-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
    border: 1px solid #dfe8f4;
    border-radius: 1.2rem;
    background: rgba(255,255,255,.9);
    box-shadow: 0 16px 40px rgba(21, 42, 82, .07);
}

.astronomy-tool-card::after {
    position: absolute;
    right: -45px;
    bottom: -58px;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(88,119,190,.11);
    border-radius: 50%;
    content: '';
    box-shadow: 0 0 0 24px rgba(88,119,190,.045), 0 0 0 48px rgba(88,119,190,.025);
    pointer-events: none;
}

.tool-card-live {
    min-height: 320px;
    padding: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-text);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tool-card-live:hover {
    color: var(--color-text);
    text-decoration: none;
    transform: translateY(-5px);
    border-color: #a9bfe9;
    box-shadow: 0 22px 50px rgba(20, 48, 104, .13);
}

.tool-card-live h2,
.tool-card-coming h3 {
    position: relative;
    z-index: 1;
    margin-top: 1.35rem;
    margin-bottom: .75rem;
    font-family: 'Space Grotesk', var(--font-main);
    letter-spacing: -.025em;
}

.tool-card-live h2 {
    max-width: 500px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.tool-card-live p,
.tool-card-coming p {
    position: relative;
    z-index: 1;
    max-width: 590px;
    color: #66758b;
}

.astronomy-tool-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: .95rem;
    color: #fff;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #4e75df, #244aab);
    box-shadow: 0 12px 26px rgba(43,82,173,.22);
}

.tool-card-clear-sky .astronomy-tool-icon {
    background: linear-gradient(135deg, #1f9d96, #17617d);
    box-shadow: 0 12px 26px rgba(24,115,121,.2);
}

.tool-card-moon-planner .astronomy-tool-icon {
    color: #162341;
    background: linear-gradient(135deg, #f9e9a9, #d4b75a);
    box-shadow: 0 12px 26px rgba(178,145,49,.2);
}

.tool-card-dew-risk .astronomy-tool-icon {
    background: linear-gradient(135deg, #2c9fc4, #2d58a8);
    box-shadow: 0 12px 26px rgba(40, 112, 174, .22);
}

.tool-card-status {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .62rem;
    border-radius: 999px;
    color: #1e6b45;
    background: #dcf7e8;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.tool-card-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: auto;
    color: #2854be;
    font-weight: 800;
}

.tool-card-action i {
    transition: transform .2s ease;
}

.tool-card-live:hover .tool-card-action i {
    transform: translateX(4px);
}

.tool-card-coming {
    min-height: 250px;
    opacity: .88;
}

.tool-card-coming .astronomy-tool-icon {
    width: 2.8rem;
    height: 2.8rem;
    color: #3f5f9e;
    background: #eaf0fb;
    box-shadow: none;
}

.tool-card-coming .tool-card-status {
    color: #6b7280;
    background: #eef1f5;
}

/* ============================================
   CLEAR SKY INDICATOR
   ============================================ */
.clear-sky-hero .container {
    position: relative;
    z-index: 1;
}

.tools-back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.4rem;
    color: rgba(228,238,255,.72);
    font-size: .82rem;
    font-weight: 700;
}

.tools-back-link:hover {
    color: #fff;
    text-decoration: none;
}

.clear-sky-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: center;
    min-height: 410px;
    padding: 2.5rem 0 4rem;
}

.clear-sky-hero-grid > div:first-child {
    max-width: 800px;
}

.clear-sky-hero-orbit {
    position: relative;
    width: 220px;
    height: 220px;
    justify-self: end;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255,255,255,.035), 0 0 0 72px rgba(255,255,255,.018);
}

.orbit-moon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: #10234c;
    background: linear-gradient(145deg, #fff8d8, #d8e7f8);
    box-shadow: 0 0 48px rgba(229,239,255,.38);
    font-size: 2rem;
    transform: translate(-50%, -50%);
}

.orbit-star {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffca60;
    box-shadow: 0 0 14px rgba(255,202,96,.7);
}

.orbit-star-one { top: 15px; left: 105px; }
.orbit-star-two { right: 18px; bottom: 57px; width: 5px; height: 5px; }
.orbit-star-three { left: 9px; bottom: 74px; width: 4px; height: 4px; background: #8fe8df; }

.clear-sky-app {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
    max-width: 100%;
}

/*
 * Forecast rows are deliberately wider than the viewport and scroll inside
 * their own panels. Grid items default to min-width:auto, which lets a wide
 * flex row enlarge the entire document instead of the local scroll area.
 */
.clear-sky-app > *,
#sky-results,
.sky-overview,
.night-forecast-section,
.hourly-forecast-section,
.sky-how-it-works {
    min-width: 0;
    max-width: 100%;
}

.sky-controls-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    gap: 1rem;
}

.sky-control-block,
.sky-overview,
.night-forecast-section,
.hourly-forecast-section,
.sky-how-it-works,
.sky-state-card {
    border: 1px solid #dfe8f4;
    border-radius: 1.1rem;
    background: rgba(255,255,255,.92);
    box-shadow: 0 14px 36px rgba(21,42,82,.065);
}

.sky-control-block {
    padding: 1.35rem;
}

.sky-control-heading {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1.1rem;
}

.sky-control-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: .78rem;
    color: #315ec6;
    background: #eaf1ff;
}

.sky-control-heading h2 {
    margin-bottom: .18rem;
    font-size: 1rem;
}

.sky-control-heading p {
    margin-bottom: 0;
    color: #718097;
    font-size: .78rem;
}

.sky-location-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: .75rem;
}

.sky-control-block .form-group {
    margin-bottom: 0;
}

.sky-control-block label {
    display: block;
    margin-bottom: .35rem;
    color: #34445e;
    font-size: .75rem;
    font-weight: 800;
}

.sky-control-block label span {
    color: #8794a7;
    font-weight: 500;
}

.sky-location-button {
    min-height: 42px;
    white-space: nowrap;
}

.sky-custom-location {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr .75fr auto;
    align-items: end;
    gap: .65rem;
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid #e7edf5;
}

.sky-custom-location[hidden] {
    display: none;
}

.observing-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.observing-mode-option {
    margin: 0 !important;
    cursor: pointer;
}

.observing-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.observing-mode-option span {
    display: grid;
    grid-template-columns: 1.9rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: .55rem;
    min-height: 64px;
    padding: .68rem .72rem;
    border: 1px solid #dce5f1;
    border-radius: .78rem;
    color: #55657b;
    background: #fbfdff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.observing-mode-option span > i {
    grid-row: 1 / span 2;
    color: #6683c8;
    text-align: center;
}

.observing-mode-option strong,
.observing-mode-option small {
    display: block;
}

.observing-mode-option strong {
    color: #263750;
    font-size: .76rem;
}

.observing-mode-option small {
    color: #8692a4;
    font-size: .64rem;
}

.observing-mode-option input:checked + span {
    border-color: #5d7fd5;
    background: #edf3ff;
    box-shadow: inset 0 0 0 1px rgba(70,105,195,.15);
}

.sky-state-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem;
}

.sky-state-card[hidden] {
    display: none;
}

.sky-state-card strong {
    display: block;
    color: #263750;
}

.sky-state-card p {
    margin: .15rem 0 0;
    color: #718097;
    font-size: .82rem;
}

.sky-loader {
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 auto;
    border: 3px solid #dce5f4;
    border-top-color: #3d6ed2;
    border-radius: 50%;
    animation: sky-spin .8s linear infinite;
}

@keyframes sky-spin {
    to { transform: rotate(360deg); }
}

.sky-error {
    color: #9a2636;
    border-color: #f0c8ce;
    background: #fff8f8;
}

.sky-error > i {
    font-size: 1.45rem;
}

.sky-overview {
    overflow: hidden;
}

.sky-overview-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.35rem, 3vw, 2rem);
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(100,226,210,.18), transparent 17rem),
        linear-gradient(135deg, #0b1832, #17366d 58%, #115366);
}

.sky-overview-copy h2 {
    margin-bottom: .45rem;
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.sky-overview-copy p {
    max-width: 740px;
    margin-bottom: 0;
    color: rgba(230,239,255,.72);
}

.sky-overview-kicker {
    display: inline-flex;
    margin-bottom: .45rem;
    color: #8cebdc;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sky-score-display {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.sky-score-ring {
    --score-angle: 0deg;
    position: relative;
    display: inline-flex;
    width: 108px;
    height: 108px;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: conic-gradient(#86e6d8 var(--score-angle), rgba(255,255,255,.13) 0);
}

.sky-score-ring::before {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    content: '';
    background: #10254c;
}

.sky-score-ring strong,
.sky-score-ring small {
    position: relative;
    z-index: 1;
}

.sky-score-ring strong {
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 2rem;
    line-height: 1;
}

.sky-score-ring small {
    color: rgba(255,255,255,.56);
    font-size: .65rem;
}

.sky-rating-badge,
.night-card-rating,
.hourly-rating,
.sky-rating-legend span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.sky-rating-badge {
    min-width: 82px;
    padding: .42rem .7rem;
    font-size: .7rem;
}

.rating-excellent { color: #0c684f; background-color: #d4f7eb; }
.rating-good { color: #1f5e9e; background-color: #dcecff; }
.rating-fair { color: #815a09; background-color: #fff0c2; }
.rating-poor { color: #9d2e3d; background-color: #ffe0e5; }
.rating-twilight { color: #65558e; background-color: #ece6fb; }
.rating-neutral { color: #5b677a; background-color: #e8edf4; }

.sky-overview-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid #e6ecf4;
}

.sky-overview-stats article {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: .05rem .55rem;
    min-width: 0;
    padding: 1rem 1.15rem;
    border-right: 1px solid #e6ecf4;
}

.sky-overview-stats article:last-child {
    border-right: 0;
}

.sky-overview-stats i {
    grid-row: 1 / span 2;
    color: #4b72cb;
    text-align: center;
}

.sky-overview-stats span {
    overflow: hidden;
    color: #8390a3;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.sky-overview-stats strong {
    overflow: hidden;
    color: #243650;
    font-size: .88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sky-forecast-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .72rem 1.15rem;
    color: #7b899d;
    background: #fafcff;
    font-size: .68rem;
}

.sky-forecast-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.night-forecast-section,
.hourly-forecast-section,
.sky-how-it-works {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.sky-section-heading {
    margin-bottom: 1.25rem;
}

.night-cards {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    gap: .7rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .2rem .1rem .6rem;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.night-card {
    display: flex;
    min-width: 145px;
    flex-direction: column;
    align-items: stretch;
    padding: .95rem;
    border: 1px solid #dfe7f1;
    border-radius: .9rem;
    color: #263750;
    background: #fbfdff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.night-card:hover,
.night-card.active {
    border-color: #6685d1;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(39,74,145,.11);
}

.night-card.active {
    background: #f1f5ff;
    box-shadow: inset 0 0 0 1px rgba(64,101,190,.12), 0 10px 24px rgba(39,74,145,.1);
}

.night-card-date {
    min-height: 2.1em;
    color: #53637a;
    font-size: .7rem;
    font-weight: 800;
}

.night-card-rating {
    align-self: flex-start;
    margin-top: .55rem;
    padding: .24rem .52rem;
    font-size: .6rem;
}

.night-card-score {
    margin-top: .7rem;
    color: #173a86;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.65rem;
    line-height: 1;
}

.night-card-score small {
    color: #96a0b0;
    font-family: var(--font-main);
    font-size: .58rem;
}

.night-score-bar {
    height: 5px;
    margin: .55rem 0 .75rem;
    overflow: hidden;
    border-radius: 99px;
    background: #e4eaf2;
}

.night-score-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4a74d8, #1db6a5);
}

.night-card-meta,
.night-card-best {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: #77869a;
    font-size: .64rem;
}

.night-card-meta + .night-card-meta {
    margin-top: .22rem;
}

.night-card-best {
    margin-top: .6rem;
    padding-top: .55rem;
    border-top: 1px solid #e6ebf2;
    color: #4d6282;
    font-weight: 700;
}

.hourly-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.sky-rating-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
    margin-bottom: 1.25rem;
}

.sky-rating-legend span {
    padding: .22rem .48rem;
    font-size: .58rem;
}

.hourly-forecast-scroll {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .2rem .1rem .8rem;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.hourly-forecast {
    display: flex;
    gap: .75rem;
    min-width: max-content;
}

.hourly-card {
    width: 230px;
    flex: 0 0 230px;
    overflow: hidden;
    border: 1px solid #dee6f1;
    border-top: 4px solid #a5b2c4;
    border-radius: .95rem;
    color: #263750;
    background: #fff;
    box-shadow: 0 8px 22px rgba(28,48,86,.05);
}

.hourly-card.rating-excellent { border-top-color: #2fba8d; }
.hourly-card.rating-good { border-top-color: #4a82d7; }
.hourly-card.rating-fair { border-top-color: #e2a82d; }
.hourly-card.rating-poor { border-top-color: #df6372; }
.hourly-card.rating-twilight { border-top-color: #8b72c6; }

.hourly-card-head,
.hourly-rating-row,
.hourly-cloud,
.hourly-metrics,
.hourly-warning,
.hourly-note {
    margin-left: .9rem;
    margin-right: .9rem;
}

.hourly-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 0 .65rem;
}

.hourly-card-head strong,
.hourly-card-head span {
    display: block;
}

.hourly-card-head strong {
    color: #173a86;
    font-size: 1.15rem;
}

.hourly-card-head span {
    color: #8793a4;
    font-size: .63rem;
}

.hourly-card-head > i {
    color: #597dd0;
    font-size: 1.25rem;
}

.hourly-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: .7rem;
    border-bottom: 1px solid #ebeff5;
}

.hourly-rating {
    padding: .22rem .48rem;
    font-size: .58rem;
}

.hourly-rating-row > strong {
    color: #274c9e;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.25rem;
}

.hourly-rating-row small {
    color: #9aa4b3;
    font-family: var(--font-main);
    font-size: .55rem;
}

.hourly-cloud {
    padding: .75rem 0;
    border-bottom: 1px solid #ebeff5;
}

.hourly-cloud > div:first-child {
    display: flex;
    justify-content: space-between;
    color: #64748a;
    font-size: .67rem;
}

.hourly-cloud > div:first-child strong {
    color: #2a3d5a;
}

.cloud-cover-bar {
    display: block;
    height: 6px;
    margin: .4rem 0;
    overflow: hidden;
    border-radius: 99px;
    background: #e7ecf2;
}

.cloud-cover-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7ca6e7, #60799b);
}

.cloud-layer-row {
    display: flex;
    justify-content: space-between;
    gap: .3rem;
    color: #8793a4;
    font-size: .58rem;
}

.hourly-metrics {
    margin-top: 0;
    margin-bottom: 0;
    padding: .65rem 0 .75rem;
}

.hourly-metrics div {
    display: flex;
    justify-content: space-between;
    gap: .65rem;
    padding: .25rem 0;
    font-size: .65rem;
}

.hourly-metrics dt {
    color: #78869a;
    font-weight: 600;
}

.hourly-metrics dt i {
    width: 1rem;
    color: #6683c8;
    text-align: center;
}

.hourly-metrics dd {
    margin: 0;
    color: #34465f;
    font-weight: 800;
    text-align: right;
}

.hourly-warning,
.hourly-note {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: 0;
    margin-bottom: .85rem;
    padding: .5rem .55rem;
    border-radius: .55rem;
    font-size: .6rem;
}

.hourly-warning {
    color: #805a12;
    background: #fff3cf;
}

.hourly-note {
    color: #66568b;
    background: #f1ecfb;
}

.forecast-resolution-note {
    margin: .25rem 0 0;
    color: #8290a3;
    font-size: .69rem;
}

.sky-factor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
}

.sky-factor-grid article {
    padding: 1rem;
    border: 1px solid #e0e7f1;
    border-radius: .85rem;
    background: #fbfdff;
}

.sky-factor-grid article > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    margin-bottom: .65rem;
    border-radius: .65rem;
    color: #3c65c2;
    background: #eaf1ff;
}

.sky-factor-grid h3 {
    margin-bottom: .35rem;
    font-size: .88rem;
}

.sky-factor-grid p {
    margin-bottom: 0;
    color: #6f7e92;
    font-size: .72rem;
}

.weather-attribution {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin-top: 1rem;
    padding: .85rem 1rem;
    border: 1px solid #dce5f1;
    border-radius: .75rem;
    color: #66758a;
    background: #f7faff;
}

.weather-attribution i {
    margin-top: .18rem;
    color: #4a72c9;
}

.weather-attribution p {
    margin: 0;
    font-size: .7rem;
}

@media (max-width: 1199px) {
    .tools-grid-live,
    .tools-grid-coming {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sky-controls-panel {
        grid-template-columns: 1fr;
    }

    .sky-custom-location {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sky-custom-location .btn {
        grid-column: 1 / -1;
    }

    .sky-factor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .clear-sky-hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .clear-sky-hero-orbit {
        display: none;
    }

    .sky-overview-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sky-overview-stats article:nth-child(2) {
        border-right: 0;
    }

    .sky-overview-stats article:nth-child(-n+2) {
        border-bottom: 1px solid #e6ecf4;
    }
}

@media (max-width: 767px) {
    .tools-grid-live,
    .tools-grid-coming {
        grid-template-columns: 1fr;
    }

    .tool-card-live {
        min-height: 290px;
    }

    .clear-sky-hero-grid {
        padding-top: 2rem;
        padding-bottom: 3.2rem;
    }

    .sky-location-row,
    .sky-custom-location,
    .observing-mode-options {
        grid-template-columns: 1fr;
    }

    .sky-location-button,
    .sky-custom-location .btn {
        width: 100%;
    }

    .sky-overview-main {
        grid-template-columns: 1fr;
    }

    .sky-score-display {
        justify-content: flex-start;
    }

    .sky-forecast-meta,
    .hourly-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sky-rating-legend {
        justify-content: flex-start;
        margin-top: -.6rem;
    }
}

@media (max-width: 520px) {
    .tool-card-status {
        position: static;
        align-self: flex-start;
        margin-top: .75rem;
        order: 2;
    }

    .tool-card-live h2,
    .tool-card-coming h3 {
        margin-top: 1rem;
    }

    .sky-control-block,
    .night-forecast-section,
    .hourly-forecast-section,
    .sky-how-it-works {
        padding: 1rem;
        border-radius: 1rem;
    }

    .sky-overview-stats {
        grid-template-columns: 1fr;
    }

    .sky-overview-stats article,
    .sky-overview-stats article:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #e6ecf4;
    }

    .sky-overview-stats article:last-child {
        border-bottom: 0;
    }

    .sky-factor-grid {
        grid-template-columns: 1fr;
    }
}

.calculator-hero .tools-back-link {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

@media (max-width: 1199px) and (min-width: 769px) {
    .site-header .container {
        padding-inline: .75rem;
    }

    .header-search {
        max-width: 300px;
        margin-inline: .75rem;
    }

    .nav-links {
        gap: .2rem;
    }

    .nav-link {
        padding-inline: .55rem;
        font-size: .82rem;
    }

    .btn-post-ad {
        padding-inline: .9rem;
        font-size: .84rem;
    }
}

/* ============================================
   MOON & DARKNESS PLANNER
   ============================================ */
.moon-planner-hero .container {
    position: relative;
    z-index: 1;
}

.moon-planner-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 2rem;
    min-height: 390px;
    padding: 2.4rem 0 3.8rem;
}

.moon-planner-hero-grid > div:first-child {
    min-width: 0;
}

.moon-planner-orbit {
    position: relative;
    width: 260px;
    height: 260px;
    justify-self: end;
}

.moon-planner-orbit-disc {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 32%, rgba(255,255,255,.95), rgba(226,235,252,.88) 38%, rgba(149,170,208,.9) 100%);
    box-shadow: 0 0 40px rgba(218,232,255,.34), inset -22px -8px 28px rgba(32,51,87,.36);
    transform: translate(-50%, -50%);
}

.moon-planner-orbit-disc::before,
.moon-planner-orbit-disc::after {
    position: absolute;
    border-radius: 50%;
    content: '';
    background: rgba(101,123,163,.2);
}

.moon-planner-orbit-disc::before {
    top: 24px;
    left: 22px;
    width: 18px;
    height: 18px;
    box-shadow: 47px 34px 0 5px rgba(101,123,163,.16), 15px 55px 0 2px rgba(101,123,163,.15);
}

.moon-planner-orbit-disc::after {
    top: 63px;
    left: 56px;
    width: 10px;
    height: 10px;
}

.moon-planner-orbit-ring {
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(192,215,255,.3);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(179,204,255,.04), 0 0 0 56px rgba(179,204,255,.025);
}

.moon-planner-app,
.moon-planner-app > * {
    min-width: 0;
    max-width: 100%;
}

.moon-planner-app {
    display: grid;
    gap: 1.25rem;
}

.moon-controls-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-radius: 1.2rem;
    background: rgba(255,255,255,.92);
    box-shadow: 0 16px 42px rgba(29,55,103,.08);
}

.moon-control-block {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 1.8rem);
}

.moon-control-block + .moon-control-block {
    border-left: 1px solid #e3eaf3;
    background: #fbfdff;
}

.moon-date-fields {
    display: grid;
    grid-template-columns: minmax(145px, 1fr) minmax(125px, .8fr);
    align-items: end;
    gap: .8rem;
}

.moon-date-fields .btn {
    grid-column: 1 / -1;
    min-height: 46px;
}

.moon-overview,
.moon-night-section,
.moon-detail-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-radius: 1.2rem;
    background: #fff;
    box-shadow: 0 14px 36px rgba(28,51,92,.06);
}

.moon-overview-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(245,222,145,.15), transparent 15rem),
        linear-gradient(135deg, #0b1730, #173b72 64%, #294f70);
}

.moon-overview-main h2 {
    margin: .25rem 0 .6rem;
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(1.6rem, 4vw, 2.45rem);
    letter-spacing: -.035em;
}

.moon-overview-main p {
    max-width: 760px;
    margin: 0;
    color: rgba(232,239,252,.75);
}

.moon-best-score {
    display: grid;
    min-width: 135px;
    justify-items: center;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 1rem;
    background: rgba(7,18,41,.28);
    backdrop-filter: blur(8px);
}

.moon-best-score > span {
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
}

.moon-best-score > small {
    margin-top: -.35rem;
    margin-left: 3.5rem;
    color: rgba(255,255,255,.55);
    font-size: .68rem;
}

.moon-best-score > strong {
    margin-top: .55rem;
    padding: .26rem .6rem;
    border-radius: 99px;
    font-size: .7rem;
}

.moon-overview-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.moon-overview-stats article {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: .05rem .65rem;
    padding: 1rem 1.25rem;
    border-right: 1px solid #e5ebf3;
}

.moon-overview-stats article:last-child {
    border-right: 0;
}

.moon-overview-stats i {
    grid-row: 1 / 3;
    align-self: center;
    color: #5577ca;
}

.moon-overview-stats span {
    color: #8290a4;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.moon-overview-stats strong {
    overflow: hidden;
    color: #293b56;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moon-night-section,
.moon-detail-section {
    padding: clamp(1.25rem, 3vw, 1.8rem);
}

.moon-night-cards-scroll,
.moon-timeline-scroll {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .2rem .1rem .75rem;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.moon-night-cards {
    display: flex;
    gap: .8rem;
    min-width: max-content;
}

.moon-night-card {
    display: flex;
    width: 184px;
    min-height: 282px;
    flex: 0 0 184px;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #dfe6ef;
    border-top: 4px solid #8897ad;
    border-radius: .95rem;
    color: #2d3e58;
    background: #fbfdff;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.moon-night-card:hover,
.moon-night-card.active {
    transform: translateY(-3px);
    border-color: #6988d0;
    box-shadow: 0 12px 28px rgba(36,67,128,.12);
}

.moon-night-card.active {
    background: #f1f5ff;
    box-shadow: inset 0 0 0 1px rgba(73,107,187,.13), 0 12px 28px rgba(36,67,128,.12);
}

.moon-night-card.rating-excellent { border-top-color: #31ae86; }
.moon-night-card.rating-good { border-top-color: #4e7ed1; }
.moon-night-card.rating-fair { border-top-color: #d8a43b; }
.moon-night-card.rating-poor { border-top-color: #c96b7c; }

.moon-night-date {
    color: #52627a;
    font-size: .7rem;
    font-weight: 800;
}

.moon-card-phase {
    align-self: center;
    margin: .65rem 0 .35rem;
    filter: drop-shadow(0 7px 9px rgba(27,43,72,.24));
}

.moon-night-phase {
    width: 100%;
    color: #213451;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: .9rem;
    text-align: center;
}

.moon-night-illumination {
    width: 100%;
    margin-top: .15rem;
    color: #7e8ba0;
    font-size: .64rem;
    text-align: center;
}

.moon-card-rating {
    align-self: center;
    margin: .65rem 0 .55rem;
    padding: .24rem .52rem;
    border-radius: 99px;
    color: #36558e;
    font-size: .61rem;
    font-weight: 800;
    background: #e8effd;
}

.moon-card-stat {
    display: flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    padding-top: .42rem;
    border-top: 1px solid #e8edf3;
    color: #68788d;
    font-size: .63rem;
}

.moon-card-stat + .moon-card-stat {
    margin-top: .4rem;
}

.moon-card-stat i {
    width: .8rem;
    color: #6682c4;
    text-align: center;
}

.moon-detail-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.moon-detail-rating,
.moon-best-score > strong {
    color: #45536a;
    background: #e9edf3;
}

.moon-detail-rating {
    flex: 0 0 auto;
    margin-bottom: 1.25rem;
    padding: .42rem .72rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 800;
}

.rating-excellent { color: #12694f !important; background: #d6f5e9 !important; }
.rating-good { color: #245aa0 !important; background: #dfeaff !important; }
.rating-fair { color: #815b0b !important; background: #fff0c7 !important; }
.rating-poor { color: #8e3346 !important; background: #fde0e6 !important; }

.moon-detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr);
    gap: 1rem;
}

.moon-phase-panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 1.2rem;
    border: 1px solid #dfe7f1;
    border-radius: 1rem;
    color: #fff;
    background:
        radial-gradient(circle at 25% 45%, rgba(103,137,206,.25), transparent 12rem),
        linear-gradient(145deg, #0c1730, #183763);
}

.moon-phase-panel canvas {
    width: 150px;
    height: 150px;
    max-width: 100%;
    filter: drop-shadow(0 14px 18px rgba(0,0,0,.35));
}

.moon-phase-label {
    color: #9fb4da;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.moon-phase-panel h3 {
    margin: .25rem 0 .3rem;
    color: #fff;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.moon-phase-panel strong {
    color: #f5dda1;
    font-size: .84rem;
}

.moon-phase-panel p {
    margin: .55rem 0 0;
    color: rgba(226,236,253,.65);
    font-size: .68rem;
}

.moon-event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    min-width: 0;
}

.moon-event-grid article {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-content: center;
    min-width: 0;
    padding: .85rem;
    border: 1px solid #e0e7f1;
    border-radius: .85rem;
    background: #fbfdff;
}

.moon-event-grid i {
    grid-row: 1 / 3;
    align-self: center;
    color: #5a78c1;
}

.moon-event-grid span {
    color: #8491a3;
    font-size: .61rem;
}

.moon-event-grid strong {
    overflow: hidden;
    color: #2b3d58;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moon-dark-window {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid #d7e4ef;
    border-radius: .9rem;
    background: linear-gradient(90deg, #f0f7ff, #f8fbff);
}

.moon-dark-window-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    flex: 0 0 2.7rem;
    border-radius: .75rem;
    color: #fff;
    background: linear-gradient(135deg, #3d64bc, #1a8e92);
}

.moon-dark-window span:not(.moon-dark-window-icon) {
    display: block;
    color: #77869a;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.moon-dark-window strong {
    display: block;
    margin: .1rem 0;
    color: #203d72;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.05rem;
}

.moon-dark-window p {
    margin: 0;
    color: #6f7e91;
    font-size: .69rem;
}

.moon-timeline {
    min-width: 760px;
    padding: 1rem 1.1rem 1.35rem;
    border: 1px solid #dfe6ef;
    border-radius: .9rem;
    background: #f9fbfe;
}

.moon-timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 78px;
    color: #718096;
    font-size: .65rem;
}

.moon-timeline-head strong {
    color: #344863;
    font-size: .7rem;
}

.moon-timeline-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: .75rem;
}

.moon-timeline-label {
    color: #64748b;
    font-size: .67rem;
    font-weight: 800;
}

.moon-timeline-track {
    position: relative;
    height: 28px;
    overflow: hidden;
    border-radius: .45rem;
    background: #e9edf4;
}

.moon-timeline-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 2px;
}

.timeline-civil { background: #eaa861; }
.timeline-nautical { background: #718ec4; }
.timeline-astro { background: #3f5486; }
.timeline-dark { background: #101a34; }
.timeline-moon {
    top: 5px;
    bottom: 5px;
    border-radius: 99px;
    background: linear-gradient(90deg, #e4c76b, #fff0af);
    box-shadow: 0 0 10px rgba(232,205,112,.45);
}

.moon-track {
    background: #16213b;
}

.moon-track-empty {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #91a0b6;
    font-size: .6rem;
}

.moon-timeline-axis {
    position: relative;
    height: 22px;
    margin: .4rem 0 0 78px;
    color: #8995a6;
    font-size: .58rem;
}

.moon-timeline-axis span {
    position: absolute;
    transform: translateX(-50%);
}

.moon-timeline-axis span:first-child { transform: none; }
.moon-timeline-axis span:last-child { transform: translateX(-100%); }

.moon-timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    margin-top: .7rem;
    color: #718096;
    font-size: .62rem;
}

.moon-timeline-legend span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.moon-timeline-legend i {
    width: .7rem;
    height: .7rem;
    border-radius: .2rem;
}

.legend-civil { background: #eaa861; }
.legend-nautical { background: #718ec4; }
.legend-astro { background: #3f5486; }
.legend-dark { background: #101a34; }
.legend-moon { background: #e4c76b; }

.moon-how-it-works {
    min-width: 0;
}

.moon-calculation-note a {
    font-weight: 700;
}

@media (max-width: 1199px) {
    .moon-controls-panel {
        grid-template-columns: 1fr;
    }

    .moon-control-block + .moon-control-block {
        border-top: 1px solid #e3eaf3;
        border-left: 0;
    }

    .moon-date-fields {
        grid-template-columns: minmax(160px, 1fr) minmax(140px, .8fr) auto;
    }

    .moon-date-fields .btn {
        grid-column: auto;
    }

    .moon-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .moon-planner-hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .moon-planner-orbit {
        display: none;
    }

    .moon-overview-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .moon-overview-stats article:nth-child(2) {
        border-right: 0;
    }

    .moon-overview-stats article:nth-child(-n+2) {
        border-bottom: 1px solid #e5ebf3;
    }

    .moon-event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .moon-planner-hero-grid {
        padding-top: 2rem;
        padding-bottom: 3.2rem;
    }

    .moon-date-fields {
        grid-template-columns: 1fr;
    }

    .moon-overview-main {
        grid-template-columns: 1fr;
    }

    .moon-best-score {
        justify-self: start;
    }

    .moon-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .moon-detail-rating {
        margin-top: -.75rem;
    }

    .moon-phase-panel {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .moon-phase-panel canvas {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 520px) {
    .moon-control-block,
    .moon-night-section,
    .moon-detail-section {
        padding: 1rem;
        border-radius: 1rem;
    }

    .moon-overview-stats {
        grid-template-columns: 1fr;
    }

    .moon-overview-stats article,
    .moon-overview-stats article:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #e5ebf3;
    }

    .moon-overview-stats article:last-child {
        border-bottom: 0;
    }

    .moon-event-grid {
        grid-template-columns: 1fr;
    }

    .moon-phase-panel {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .moon-dark-window {
        align-items: flex-start;
    }
}

/* ============================================
   ASTROPHOTOGRAPHY FIELD-OF-VIEW CALCULATOR
   ============================================ */
.tool-card-fov .astronomy-tool-icon {
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #4f46b8);
    box-shadow: 0 12px 26px rgba(93, 69, 190, .22);
}

.fov-hero .container {
    position: relative;
    z-index: 1;
}

.fov-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 2.5rem;
    min-height: 400px;
    padding: 2.4rem 0 3.8rem;
}

.fov-hero-grid > div:first-child {
    min-width: 0;
    max-width: 860px;
}

.fov-hero-visual {
    position: relative;
    width: 275px;
    height: 230px;
    justify-self: end;
    perspective: 700px;
}

.fov-hero-sensor {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 126px;
    border: 2px solid rgba(218, 229, 255, .75);
    border-radius: 1rem;
    color: rgba(237, 243, 255, .92);
    background: linear-gradient(145deg, rgba(87, 93, 187, .32), rgba(25, 43, 86, .68));
    box-shadow: 0 22px 48px rgba(3, 12, 33, .35), inset 0 0 38px rgba(123, 143, 255, .16);
    font-size: 2.1rem;
    transform: translate(-50%, -50%) rotateY(-12deg) rotateX(5deg);
}

.fov-hero-sensor::before,
.fov-hero-sensor::after {
    position: absolute;
    content: '';
    pointer-events: none;
}

.fov-hero-sensor::before {
    inset: 13px;
    border: 1px dashed rgba(177, 203, 255, .48);
    border-radius: .65rem;
}

.fov-hero-sensor::after {
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(118, 226, 213, .58);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(83, 208, 197, .06), 0 0 32px rgba(83, 208, 197, .25);
    transform: translate(-50%, -50%);
}

.fov-hero-target {
    position: absolute;
    top: 16px;
    right: 4px;
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 208, 113, .86);
    border-radius: 50%;
    box-shadow: 0 0 28px rgba(255, 192, 76, .36);
}

.fov-hero-target::before,
.fov-hero-target::after {
    position: absolute;
    top: 50%;
    left: 50%;
    content: '';
    background: rgba(255, 219, 148, .75);
    transform: translate(-50%, -50%);
}

.fov-hero-target::before { width: 68px; height: 1px; }
.fov-hero-target::after { width: 1px; height: 68px; }

.fov-hero-ray {
    position: absolute;
    left: 9px;
    width: 98px;
    height: 1px;
    opacity: .68;
    background: linear-gradient(90deg, transparent, rgba(117, 230, 213, .85));
    transform-origin: right center;
}

.fov-hero-ray.ray-one { top: 86px; transform: rotate(15deg); }
.fov-hero-ray.ray-two { bottom: 76px; transform: rotate(-14deg); }

.fov-section {
    overflow-x: clip;
}

.fov-app,
.fov-app > * {
    min-width: 0;
}

.fov-app {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    gap: 1.5rem;
    align-items: start;
}

.fov-input-column,
.fov-results-column {
    display: grid;
    min-width: 0;
    gap: 1.25rem;
}

.fov-results-column {
    position: sticky;
    top: 1rem;
}

.fov-input-card {
    overflow: hidden;
}

.fov-camera-icon {
    color: #6d47c5;
    background: linear-gradient(145deg, rgba(139,92,246,.16), rgba(79,70,184,.08));
    box-shadow: inset 0 0 0 1px rgba(120,83,215,.14);
}

.fov-target-icon {
    color: #137b72;
    background: linear-gradient(145deg, rgba(45,212,191,.15), rgba(15,118,110,.08));
    box-shadow: inset 0 0 0 1px rgba(36,174,156,.14);
}

.fov-fields {
    display: grid;
    gap: 1rem;
}

.fov-fields-optics,
.fov-camera-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fov-target-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fov-target-select-group {
    grid-column: 1 / -1;
}

.fov-fields label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .45rem;
    color: #24334f;
    font-size: .86rem;
    font-weight: 700;
}

.fov-input.form-control,
.fov-input.form-select {
    min-height: 46px;
    border-color: #cfd9e9;
}

.fov-input.form-control:focus,
.fov-input.form-select:focus {
    border-color: #7b78e7;
    box-shadow: 0 0 0 3px rgba(104, 93, 214, .13);
}

.fov-input[readonly] {
    color: #5f6f87;
    background: #f5f7fb;
}

.fov-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin: 0 0 1.2rem;
    padding: 0;
    border: 0;
}

.fov-mode-switch label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.fov-mode-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fov-mode-switch span {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem .8rem;
    border: 1px solid #d7e0ee;
    border-radius: .8rem;
    color: #5c6b82;
    background: #f8fafd;
    font-size: .82rem;
    font-weight: 750;
    text-align: center;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.fov-mode-switch input:checked + span {
    border-color: #9386ed;
    color: #4937a3;
    background: #f0edff;
    box-shadow: inset 0 0 0 1px rgba(117, 96, 220, .12);
}

.fov-mode-switch input:focus-visible + span {
    outline: 3px solid rgba(92, 107, 230, .22);
    outline-offset: 2px;
}

.fov-solar-warning {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border: 1px solid #f5c46f;
    border-radius: .85rem;
    color: #75420f;
    background: #fff8e8;
}

.fov-solar-warning[hidden] {
    display: none;
}

.fov-solar-warning i {
    margin-top: .18rem;
    color: #d98b19;
}

.fov-solar-warning p {
    margin: 0;
    font-size: .82rem;
}

.fov-summary-card,
.fov-preview-card,
.fov-sampling-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce4f0;
    border-radius: 1.2rem;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 45px rgba(15,31,65,.075);
}

.fov-summary-card {
    padding: 1.35rem;
    color: #fff;
    border-color: rgba(57, 67, 142, .55);
    background:
        radial-gradient(circle at 88% 10%, rgba(118, 101, 231, .34), transparent 12rem),
        linear-gradient(145deg, #0d1834, #1b3262 58%, #263877);
    box-shadow: 0 22px 48px rgba(18, 32, 78, .2);
}

.fov-summary-heading,
.fov-preview-heading,
.fov-sampling-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.fov-summary-kicker {
    display: block;
    margin-bottom: .28rem;
    color: #6b7b94;
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fov-summary-card .fov-summary-kicker {
    color: rgba(201, 217, 255, .66);
}

.fov-summary-heading h2,
.fov-preview-heading h2,
.fov-sampling-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.18rem;
    letter-spacing: -.025em;
}

.fov-icon-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    padding: 0;
    border: 1px solid rgba(213,225,255,.22);
    border-radius: .72rem;
    color: rgba(239,244,255,.85);
    background: rgba(255,255,255,.08);
    transition: transform .18s ease, background-color .18s ease;
}

.fov-icon-button:hover,
.fov-icon-button.copied {
    color: #fff;
    background: rgba(255,255,255,.16);
    transform: translateY(-1px);
}

.fov-primary-result {
    display: flex;
    flex-direction: column;
    margin: 1.3rem 0 1.15rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(222,231,255,.17);
}

.fov-primary-result > span {
    color: rgba(214,225,251,.72);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fov-primary-result strong {
    margin: .2rem 0 .1rem;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -.055em;
    line-height: 1.05;
}

.fov-primary-result small {
    color: rgba(207,219,247,.7);
    font-size: .78rem;
}

.fov-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.fov-result-grid article {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    align-items: center;
    gap: .15rem .45rem;
    min-width: 0;
    padding: .75rem;
    border: 1px solid rgba(215,226,255,.13);
    border-radius: .8rem;
    background: rgba(255,255,255,.055);
}

.fov-result-grid i {
    grid-row: 1 / span 2;
    color: #8bbcff;
    text-align: center;
}

.fov-result-grid span {
    overflow: hidden;
    color: rgba(212,224,248,.66);
    font-size: .63rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fov-result-grid strong {
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fov-preview-card,
.fov-sampling-card {
    padding: 1.25rem;
}

.fov-orientation-label {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    color: #52627a;
    background: #edf2f8;
    font-size: .64rem;
    font-weight: 800;
    white-space: nowrap;
}

.fov-canvas-wrap {
    position: relative;
    margin-top: 1rem;
    padding: 1.35rem 1.55rem 1.75rem 1.2rem;
    border-radius: 1rem;
    background: #071329;
    box-shadow: inset 0 0 0 1px rgba(154,190,235,.22);
}

#fov-preview-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 48 / 31;
    border-radius: .45rem;
}

.fov-canvas-label {
    position: absolute;
    z-index: 2;
    color: rgba(223,235,255,.76);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.fov-canvas-horizontal {
    right: 1.55rem;
    bottom: .48rem;
    left: 1.2rem;
    text-align: center;
}

.fov-canvas-vertical {
    top: 50%;
    right: .22rem;
    transform: rotate(-90deg) translateX(50%);
    transform-origin: right center;
}

.fov-target-verdict {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-top: 1rem;
    padding: .85rem .9rem;
    border: 1px solid #d8e3ef;
    border-radius: .85rem;
    color: #35465f;
    background: #f7fafd;
}

.fov-verdict-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .65rem;
    color: #4d67a5;
    background: #e9effa;
}

.fov-target-verdict strong {
    display: block;
    margin-bottom: .15rem;
    font-size: .84rem;
}

.fov-target-verdict p {
    margin: 0;
    color: #68778d;
    font-size: .72rem;
    line-height: 1.5;
}

.fov-target-verdict.verdict-good,
.fov-target-verdict.verdict-comfortable {
    border-color: #bae7d5;
    background: #f1fbf7;
}

.fov-target-verdict.verdict-good .fov-verdict-icon,
.fov-target-verdict.verdict-comfortable .fov-verdict-icon {
    color: #177554;
    background: #d8f4e8;
}

.fov-target-verdict.verdict-tight {
    border-color: #f1d795;
    background: #fffaf0;
}

.fov-target-verdict.verdict-tight .fov-verdict-icon {
    color: #9a6816;
    background: #fbecc7;
}

.fov-target-verdict.verdict-mosaic {
    border-color: #c9c2f1;
    background: #f6f4ff;
}

.fov-target-verdict.verdict-mosaic .fov-verdict-icon {
    color: #674db9;
    background: #e8e3fb;
}

.fov-target-verdict.verdict-small .fov-verdict-icon {
    color: #336da6;
    background: #e1effb;
}

.fov-target-verdict.verdict-warning {
    border-color: #f4caca;
    background: #fff5f5;
}

.fov-target-verdict.verdict-warning .fov-verdict-icon {
    color: #b53a45;
    background: #fbe1e4;
}

.fov-preview-note {
    margin: .75rem 0 0;
    color: #7a8799;
    font-size: .65rem;
    line-height: 1.5;
}

.fov-sampling-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 1.9rem;
    padding: .3rem .62rem;
    border-radius: 999px;
    color: #5f6c7d;
    background: #edf1f5;
    font-size: .66rem;
    font-weight: 850;
    white-space: nowrap;
}

.fov-sampling-badge.sampling-under { color: #3c64a2; background: #e5effc; }
.fov-sampling-badge.sampling-balanced { color: #177554; background: #dff5eb; }
.fov-sampling-badge.sampling-fine { color: #775314; background: #faefcf; }
.fov-sampling-badge.sampling-over,
.fov-sampling-badge.sampling-warning { color: #9b3543; background: #f8e1e5; }

.fov-sampling-meter {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1.5fr;
    height: 2.15rem;
    margin: 1rem 0 .8rem;
    overflow: visible;
    border-radius: .65rem;
}

.fov-sampling-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(24,35,55,.7);
    font-size: .56rem;
    font-weight: 850;
    text-transform: uppercase;
}

.zone-under { border-radius: .65rem 0 0 .65rem; background: #dceaf9; }
.zone-balanced { background: #d6f1e6; }
.zone-fine { background: #f8e9bc; }
.zone-over { border-radius: 0 .65rem .65rem 0; background: #f3d9df; }

.fov-sampling-meter i {
    position: absolute;
    top: -.35rem;
    bottom: -.35rem;
    width: 3px;
    border-radius: 999px;
    background: #182947;
    box-shadow: 0 0 0 3px rgba(255,255,255,.86), 0 3px 8px rgba(16,29,55,.22);
    transform: translateX(-50%);
    transition: left .22s ease;
}

.fov-sampling-card > p {
    margin-bottom: 0;
    color: #65748a;
    font-size: .75rem;
    line-height: 1.55;
}

.fov-formula-note {
    margin-top: .85rem;
    font-size: .72rem;
}

.fov-explainer {
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.fov-guide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1199px) {
    .tools-grid-live {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fov-app {
        grid-template-columns: minmax(0, 1fr) minmax(350px, .85fr);
    }

    .fov-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .fov-hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .fov-hero-visual {
        display: none;
    }

    .fov-app {
        grid-template-columns: 1fr;
    }

    .fov-results-column {
        position: static;
    }
}

@media (max-width: 767px) {
    .fov-hero-grid {
        padding-top: 2rem;
        padding-bottom: 3.2rem;
    }

    .fov-fields-optics,
    .fov-camera-fields,
    .fov-target-fields,
    .fov-mode-switch,
    .fov-result-grid,
    .fov-guide-grid {
        grid-template-columns: 1fr;
    }

    .fov-target-select-group {
        grid-column: auto;
    }

    .fov-primary-result strong {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }
}

@media (max-width: 520px) {
    .fov-summary-card,
    .fov-preview-card,
    .fov-sampling-card,
    .fov-input-card {
        padding: 1rem;
        border-radius: 1rem;
    }

    .fov-summary-heading,
    .fov-preview-heading,
    .fov-sampling-header {
        align-items: flex-start;
    }

    .fov-orientation-label {
        display: none;
    }

    .fov-canvas-wrap {
        padding: 1rem 1.25rem 1.55rem .9rem;
    }

    .fov-target-verdict {
        padding: .75rem;
    }
}

/* ============================================
   DEW RISK CALCULATOR
   ============================================ */
.dew-risk-hero .container {
    position: relative;
    z-index: 1;
}

.dew-risk-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: center;
    gap: 2.5rem;
    min-height: 390px;
    padding: 2.4rem 0 3.8rem;
}

.dew-risk-hero-grid > div:first-child {
    min-width: 0;
    max-width: 860px;
}

.dew-risk-hero-visual {
    position: relative;
    width: 270px;
    height: 230px;
    justify-self: end;
}

.dew-risk-optic {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 172px;
    height: 172px;
    border: 2px solid rgba(205, 231, 255, .68);
    border-radius: 50%;
    color: rgba(224, 241, 255, .86);
    background:
        radial-gradient(circle at 38% 34%, rgba(111, 218, 239, .36), transparent 23%),
        radial-gradient(circle at center, rgba(42, 92, 158, .72), rgba(8, 23, 53, .9) 68%);
    box-shadow: 0 24px 52px rgba(2, 12, 35, .38), inset 0 0 32px rgba(117, 214, 239, .2);
    font-size: 3rem;
    transform: translate(-50%, -50%);
}

.dew-risk-optic::before,
.dew-risk-optic::after {
    position: absolute;
    border: 1px solid rgba(157, 221, 243, .26);
    border-radius: 50%;
    content: '';
}

.dew-risk-optic::before { inset: 16px; }
.dew-risk-optic::after { inset: 34px; }

.dew-risk-drop {
    position: absolute;
    width: 19px;
    height: 25px;
    border-radius: 60% 40% 58% 42% / 68% 44% 56% 32%;
    background: linear-gradient(145deg, rgba(205, 244, 255, .96), rgba(73, 169, 226, .56));
    box-shadow: 0 0 20px rgba(110, 218, 248, .38);
    transform: rotate(42deg);
}

.dew-risk-drop::after {
    position: absolute;
    top: 4px;
    left: 5px;
    width: 5px;
    height: 8px;
    border-radius: 50%;
    content: '';
    background: rgba(255,255,255,.7);
}

.dew-risk-drop.drop-one { top: 20px; right: 42px; }
.dew-risk-drop.drop-two { right: 4px; bottom: 54px; width: 14px; height: 19px; }
.dew-risk-drop.drop-three { bottom: 16px; left: 38px; width: 12px; height: 17px; }

.dew-risk-wave {
    position: absolute;
    left: 50%;
    border: 1px solid rgba(117, 222, 236, .25);
    border-radius: 50%;
    transform: translateX(-50%);
}

.dew-risk-wave.wave-one { bottom: 4px; width: 235px; height: 42px; }
.dew-risk-wave.wave-two { bottom: 14px; width: 182px; height: 28px; }

.dew-risk-section {
    overflow-x: clip;
}

.dew-risk-app,
.dew-risk-app > * {
    min-width: 0;
}

.dew-risk-app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, .92fr);
    align-items: start;
    gap: 1.5rem;
}

.dew-risk-input-column,
.dew-risk-results-column {
    display: grid;
    min-width: 0;
    gap: 1.25rem;
}

.dew-risk-results-column {
    position: sticky;
    top: 1rem;
}

.dew-risk-input-card {
    overflow: hidden;
}

.dew-environment-icon {
    color: #2f6aa8;
    background: linear-gradient(145deg, rgba(74, 144, 226, .16), rgba(42, 88, 163, .08));
    box-shadow: inset 0 0 0 1px rgba(65, 120, 194, .14);
}

.dew-equipment-icon {
    color: #168276;
    background: linear-gradient(145deg, rgba(45, 212, 191, .15), rgba(15, 118, 110, .08));
    box-shadow: inset 0 0 0 1px rgba(36, 174, 156, .14);
}

.dew-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dew-field-wide {
    grid-column: 1 / -1;
}

.dew-clear-sky-link {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
    padding: .85rem .95rem;
    border: 1px solid #cfe1ef;
    border-radius: .9rem;
    color: #28537c;
    background: linear-gradient(135deg, #f1f8fd, #f8fbff);
    font-size: .75rem;
    line-height: 1.45;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.dew-clear-sky-link:hover {
    color: #20486f;
    text-decoration: none;
    border-color: #9fc9e1;
    box-shadow: 0 10px 24px rgba(44, 96, 144, .08);
    transform: translateY(-2px);
}

.dew-clear-sky-link > i:first-child {
    color: #317fa8;
    font-size: 1.1rem;
    text-align: center;
}

.dew-assumption-note {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-top: 1rem;
    padding: .85rem .9rem;
    border: 1px solid #e1e7ef;
    border-radius: .85rem;
    color: #65748a;
    background: #f8fafc;
}

.dew-assumption-note i {
    flex: 0 0 auto;
    margin-top: .15rem;
    color: #4d70ad;
}

.dew-assumption-note p {
    margin: 0;
    font-size: .72rem;
    line-height: 1.55;
}

.dew-action-row {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

.dew-risk-summary-card,
.dew-margin-card,
.dew-guidance-card {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid #dce5f0;
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 16px 38px rgba(20, 45, 86, .075);
}

.dew-risk-summary-card {
    color: #fff;
    border-color: rgba(152, 186, 230, .18);
    background:
        radial-gradient(circle at 90% 12%, rgba(72, 186, 214, .24), transparent 14rem),
        linear-gradient(145deg, #0b1832, #173b6c 68%, #176b77);
    box-shadow: 0 22px 48px rgba(8, 27, 62, .18);
}

.dew-summary-heading,
.dew-card-heading-inline,
.dew-guidance-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dew-summary-heading h2,
.dew-card-heading-inline h2,
.dew-guidance-header h2 {
    margin: .18rem 0 0;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.15rem;
    letter-spacing: -.025em;
}

.dew-summary-heading h2 { color: #fff; }

.dew-summary-kicker {
    display: block;
    color: #718097;
    font-size: .64rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dew-risk-summary-card .dew-summary-kicker {
    color: rgba(205, 223, 250, .67);
}

.dew-risk-badge,
.dew-margin-label {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 1.9rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 850;
    white-space: nowrap;
}

.dew-risk-badge { color: #174d3c; background: #d9f5e8; }
.dew-risk-badge.risk-forming,
.dew-risk-badge.risk-critical,
.dew-risk-badge.risk-error { color: #9a2d3c; background: #f9dce1; }
.dew-risk-badge.risk-high { color: #9a5715; background: #fae8c9; }
.dew-risk-badge.risk-moderate { color: #765c15; background: #f6ecc8; }
.dew-risk-badge.risk-low { color: #2c648f; background: #dcecf8; }
.dew-risk-badge.risk-very-low { color: #17694c; background: #d9f4e7; }

.dew-primary-result {
    display: flex;
    flex-direction: column;
    margin: 1.3rem 0 1.15rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(222, 231, 255, .17);
}

.dew-primary-result > span {
    color: rgba(214, 225, 251, .72);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.dew-primary-result strong {
    margin: .2rem 0 .1rem;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: clamp(2.2rem, 6vw, 3.35rem);
    letter-spacing: -.055em;
    line-height: 1;
}

.dew-primary-result small {
    color: rgba(207, 219, 247, .72);
    font-size: .76rem;
    line-height: 1.45;
}

.dew-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.dew-result-grid article {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    align-items: center;
    gap: .15rem .45rem;
    min-width: 0;
    padding: .75rem;
    border: 1px solid rgba(215, 226, 255, .13);
    border-radius: .8rem;
    background: rgba(255,255,255,.055);
}

.dew-result-grid i {
    grid-row: 1 / span 2;
    color: #84d7e8;
    text-align: center;
}

.dew-result-grid span {
    overflow: hidden;
    color: rgba(212, 224, 248, .65);
    font-size: .62rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dew-result-grid strong {
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dew-margin-label {
    color: #465b79;
    background: #edf2f8;
}

.dew-margin-scale {
    position: relative;
    display: grid;
    grid-template-columns: 20% 20% 20% 20% 20%;
    height: 2.25rem;
    margin: 1.1rem 0 .35rem;
    overflow: visible;
    border-radius: .65rem;
}

.dew-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(25, 39, 62, .72);
    font-size: .55rem;
    font-weight: 850;
    text-transform: uppercase;
}

.dew-zone.zone-condensation { border-radius: .65rem 0 0 .65rem; background: #f2d6dc; }
.dew-zone.zone-critical { background: #f6dfc7; }
.dew-zone.zone-high { background: #f8e8bd; }
.dew-zone.zone-watch { background: #dcebf6; }
.dew-zone.zone-low { border-radius: 0 .65rem .65rem 0; background: #d8f1e6; }

.dew-margin-scale i {
    position: absolute;
    top: -.38rem;
    bottom: -.38rem;
    width: 3px;
    border-radius: 999px;
    background: #172a4b;
    box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 3px 9px rgba(15,33,62,.24);
    transform: translateX(-50%);
    transition: left .22s ease;
}

.dew-margin-axis {
    display: flex;
    justify-content: space-between;
    color: #8793a3;
    font-size: .55rem;
}

.dew-scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.dew-scenario-grid article {
    min-width: 0;
    padding: .85rem;
    border: 1px solid #e0e7ef;
    border-radius: .85rem;
    background: #f8fafc;
}

.dew-scenario-grid span {
    display: block;
    color: #77869a;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dew-scenario-grid strong {
    display: block;
    margin: .2rem 0;
    color: #173d70;
    font-family: 'Space Grotesk', var(--font-main);
    font-size: 1.35rem;
}

.dew-scenario-grid small {
    display: block;
    color: #6e7c90;
    font-size: .65rem;
    line-height: 1.45;
}

.dew-guidance-header {
    justify-content: flex-start;
}

.dew-guidance-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    color: #2e6598;
    background: #e5f0fa;
}

.dew-guidance-icon.guidance-forming,
.dew-guidance-icon.guidance-critical { color: #a53242; background: #f9e1e5; }
.dew-guidance-icon.guidance-high { color: #a26317; background: #faebd2; }
.dew-guidance-icon.guidance-moderate { color: #806515; background: #f8efcf; }
.dew-guidance-icon.guidance-low { color: #326e9b; background: #e2eef8; }
.dew-guidance-icon.guidance-very-low { color: #1e7657; background: #def3e9; }

.dew-guidance-card > h3 {
    margin: 1rem 0 .35rem;
    color: #1b355d;
    font-size: 1.05rem;
}

.dew-guidance-card > p {
    margin-bottom: .8rem;
    color: #66758a;
    font-size: .76rem;
    line-height: 1.55;
}

.dew-guidance-card ul {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dew-guidance-card li {
    position: relative;
    padding-left: 1.2rem;
    color: #4e5f77;
    font-size: .72rem;
    line-height: 1.5;
}

.dew-guidance-card li::before {
    position: absolute;
    top: .55em;
    left: .1rem;
    width: .38rem;
    height: .38rem;
    border-radius: 50%;
    content: '';
    background: #3b79b3;
}

.dew-risk-explainer {
    margin-top: clamp(2.8rem, 6vw, 4.8rem);
}

.dew-risk-explainer-title {
    max-width: 760px;
    margin-left: 0;
    text-align: left;
}

.dew-risk-explainer-title::before { margin-left: 0; }
.dew-risk-explainer-title p { margin-left: 0; }

.dew-guide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dew-formula-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid #dce6f1;
    border-radius: 1rem;
    background: rgba(255,255,255,.86);
    box-shadow: 0 14px 34px rgba(23,49,91,.055);
}

.dew-formula-panel h3 {
    margin: 0 0 .3rem;
    color: #213e69;
    font-size: 1rem;
}

.dew-formula-panel h3 i { margin-right: .35rem; color: #377caf; }

.dew-formula-panel p {
    margin: 0;
    color: #6b798d;
    font-size: .72rem;
    line-height: 1.5;
}

#dew-formula-output {
    padding: .7rem .85rem;
    border-radius: .75rem;
    color: #244f78;
    background: #eaf3f9;
    font-weight: 750;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .dew-risk-app {
        grid-template-columns: minmax(0, 1fr) minmax(350px, .86fr);
    }

    .dew-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .dew-risk-hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .dew-risk-hero-visual {
        display: none;
    }

    .dew-risk-app {
        grid-template-columns: 1fr;
    }

    .dew-risk-results-column {
        position: static;
    }
}

@media (max-width: 767px) {
    .dew-risk-hero-grid {
        padding-top: 2rem;
        padding-bottom: 3.2rem;
    }

    .dew-fields,
    .dew-result-grid,
    .dew-scenario-grid,
    .dew-guide-grid,
    .dew-formula-panel {
        grid-template-columns: 1fr;
    }

    .dew-field-wide { grid-column: auto; }

    .dew-action-row {
        flex-direction: column-reverse;
    }

    .dew-action-row .btn { width: 100%; }

    #dew-formula-output { white-space: normal; }
}

@media (max-width: 520px) {
    .dew-risk-summary-card,
    .dew-margin-card,
    .dew-guidance-card,
    .dew-risk-input-card {
        padding: 1rem;
        border-radius: 1rem;
    }

    .dew-summary-heading,
    .dew-card-heading-inline {
        align-items: flex-start;
    }

    .dew-margin-label {
        display: none;
    }

    .dew-zone {
        font-size: 0;
    }

    .dew-zone::after {
        font-size: .5rem;
    }

    .dew-zone.zone-condensation::after { content: 'Dew'; }
    .dew-zone.zone-critical::after { content: '!'; }
    .dew-zone.zone-high::after { content: 'High'; }
    .dew-zone.zone-watch::after { content: 'Watch'; }
    .dew-zone.zone-low::after { content: 'Low'; }
}

/* ================================================================
   What Can I See Tonight? observing planner
   ================================================================ */
.tonight-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 77% 24%, rgba(75, 205, 220, 0.2), transparent 22rem),
        radial-gradient(circle at 18% 10%, rgba(94, 120, 255, 0.24), transparent 25rem),
        linear-gradient(125deg, #0a1739 0%, #12275b 55%, #0c4350 100%);
    padding: clamp(2rem, 4vw, 4.2rem) 0 clamp(2.6rem, 5vw, 5rem);
}
.tonight-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .72;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.92) 0 1px, transparent 1.3px),
        radial-gradient(circle, rgba(160,227,255,.65) 0 1px, transparent 1.4px);
    background-position: 0 0, 31px 22px;
    background-size: 86px 86px, 127px 127px;
}
.tonight-hero .container { position: relative; z-index: 1; }
.tonight-hero .tools-back-link { color: rgba(255,255,255,.72); }
.tonight-hero .tools-back-link:hover { color: #fff; }
.tonight-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin-top: 1.6rem;
}
.tonight-hero h1 {
    margin: .65rem 0 1rem;
    max-width: 760px;
    color: #fff;
    font-family: var(--font-heading, "Space Grotesk", sans-serif);
    font-size: clamp(2.35rem, 5vw, 4.75rem);
    line-height: .98;
    letter-spacing: -.045em;
}
.tonight-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(235,243,255,.82);
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.7;
}
.tonight-catalog-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.45rem;
}
.tonight-catalog-pills span {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: .55rem .85rem;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(8px);
    font-size: .84rem;
}
.tonight-catalog-pills strong { color: #fff; font-size: 1rem; }
.tonight-hero-visual {
    position: relative;
    min-height: 245px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 32px;
    background:
        radial-gradient(circle at 68% 24%, rgba(255,194,83,.82) 0 3px, transparent 4px),
        radial-gradient(circle at 35% 35%, rgba(255,255,255,.9) 0 2px, transparent 3px),
        linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 30px 70px rgba(0,0,0,.22);
    overflow: hidden;
}
.tonight-horizon {
    position: absolute;
    left: -10%; right: -10%; bottom: -22%;
    height: 56%;
    border-radius: 50% 50% 0 0;
    background: linear-gradient(180deg, #153457, #08162e);
    box-shadow: 0 -2px 35px rgba(59,196,210,.25);
}
.tonight-scope {
    position: absolute;
    left: 50%; bottom: 21%;
    transform: translateX(-50%) rotate(-18deg);
    color: #fff;
    font-size: 5rem;
    filter: drop-shadow(0 12px 12px rgba(0,0,0,.35));
}
.tonight-star { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; }
.tonight-star.star-a { top: 18%; left: 18%; }
.tonight-star.star-b { top: 30%; right: 18%; width: 3px; height: 3px; }
.tonight-star.star-c { top: 52%; left: 31%; width: 3px; height: 3px; }
.tonight-star.star-d { top: 14%; right: 38%; width: 2px; height: 2px; }

.tonight-section {
    overflow-x: clip;
    background:
        radial-gradient(circle at 0 0, rgba(84,118,235,.07), transparent 31rem),
        linear-gradient(#f7f9fd, #f1f5fb);
}
.tonight-app, .tonight-app > *, .tonight-results-toolbar, .tonight-object-grid { min-width: 0; }
.tonight-controls {
    margin-top: -3.7rem;
    position: relative;
    z-index: 2;
    padding: clamp(1.2rem, 2.5vw, 2rem);
    border: 1px solid #dce5f3;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 24px 65px rgba(24,48,91,.14);
}
.tonight-controls-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e8eef7;
}
.tonight-controls-heading h2 { margin: .25rem 0 .25rem; font-size: clamp(1.45rem, 2.5vw, 2rem); }
.tonight-controls-heading p { margin: 0; color: var(--color-text-muted); }
.tonight-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}
.tonight-control-group { min-width: 0; }
.tonight-control-group > label {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .45rem;
    color: #15233f;
    font-size: .88rem;
    font-weight: 700;
}
.tonight-control-group > label i { color: #5576e9; }
.tonight-location-control { grid-column: span 2; }
.tonight-location-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.tonight-location-row .btn { white-space: nowrap; }
.tonight-custom-location {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, .7fr)) auto;
    gap: .8rem;
    align-items: end;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed #bfd0e9;
    border-radius: 16px;
    background: #f7faff;
}
.tonight-custom-location[hidden] { display: none; }
.tonight-custom-location .form-group { min-width: 0; }
.tonight-custom-location label { margin-bottom: .35rem; font-size: .82rem; font-weight: 700; }
.tonight-custom-location label span { font-weight: 400; color: var(--color-text-muted); }
.tonight-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8eef7;
}
.tonight-filter-label { display: block; margin-bottom: .55rem; color: #15233f; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.tonight-chip-set { display: flex; flex-wrap: wrap; gap: .45rem; }
.tonight-filter-chip {
    appearance: none;
    border: 1px solid #ccd8ea;
    border-radius: 999px;
    padding: .48rem .78rem;
    color: #41516e;
    background: #fff;
    font-size: .82rem;
    font-weight: 700;
    transition: .18s ease;
}
.tonight-filter-chip:hover { border-color: #6d87e7; color: #2949b8; }
.tonight-filter-chip.active { border-color: #496ae4; color: #fff; background: linear-gradient(135deg, #607ff0, #385bda); box-shadow: 0 6px 16px rgba(62,91,210,.2); }
.tonight-control-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}
.tonight-control-actions p { margin: 0; color: #6a7890; font-size: .84rem; }
.tonight-control-actions p i { color: #5676e4; margin-right: .3rem; }
.tonight-control-actions .btn { white-space: nowrap; }

.tonight-loading { margin-top: 1.4rem; }
.tonight-spinner { width: 32px; height: 32px; border: 3px solid #dce5fa; border-top-color: #4f70e6; border-radius: 50%; animation: tonight-spin .8s linear infinite; flex: 0 0 auto; }
@keyframes tonight-spin { to { transform: rotate(360deg); } }

.tonight-overview {
    margin-top: 1.5rem;
    overflow: hidden;
    border: 1px solid #cfdaeb;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(33,55,96,.1);
}
.tonight-overview-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.4rem, 3vw, 2.35rem);
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(102,207,222,.24), transparent 22rem),
        linear-gradient(120deg, #0c1a3b, #183775 65%, #0c4b59);
}
.tonight-overview-main h2 { margin: .25rem 0 .35rem; color: #fff; font-size: clamp(1.65rem, 3vw, 2.5rem); }
.tonight-overview-main p { max-width: 850px; margin: 0; color: rgba(233,241,255,.78); line-height: 1.6; }
.tonight-overview-score {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 0 .65rem;
    min-width: 160px;
    padding: .9rem 1.1rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 18px;
    background: rgba(255,255,255,.08);
}
.tonight-overview-score i { grid-row: span 2; color: #ffc058; font-size: 1.8rem; }
.tonight-overview-score strong { font-size: 2rem; line-height: 1; }
.tonight-overview-score span { color: rgba(255,255,255,.7); font-size: .72rem; }
.tonight-overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.tonight-overview-stats article { min-width: 0; padding: 1rem 1.2rem; border-right: 1px solid #e3eaf4; display: grid; grid-template-columns: auto 1fr; gap: .1rem .65rem; align-items: center; }
.tonight-overview-stats article:last-child { border-right: 0; }
.tonight-overview-stats i { grid-row: span 2; color: #5677e4; font-size: 1.05rem; }
.tonight-overview-stats span { color: #7a879d; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.tonight-overview-stats strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #17243f; font-size: .92rem; }

.tonight-solar-section, .tonight-deep-sky-section, .tonight-method-card {
    margin-top: 1.5rem;
    padding: clamp(1.2rem, 2.5vw, 1.7rem);
    border: 1px solid #dce5f1;
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 14px 34px rgba(32,52,89,.07);
}
.tonight-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tonight-section-title::before { margin-left: 0; }
.tonight-section-title p { margin-left: 0; }
.tonight-result-count { flex: 0 0 auto; border-radius: 999px; padding: .45rem .75rem; color: #3855b5; background: #e8edff; font-size: .78rem; font-weight: 800; }
.tonight-solar-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .85rem; }
.tonight-solar-card {
    position: relative;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #dfe7f3;
    border-radius: 16px;
    background: linear-gradient(160deg, #fff, #f6f8fd);
}
.tonight-solar-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: .7rem; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#516fde,#1f4d91); box-shadow: 0 8px 20px rgba(50,82,175,.2); }
.tonight-solar-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.tonight-solar-heading h3 { margin: 0; font-size: 1.05rem; }
.tonight-solar-heading span { color: #5570bb; font-size: .73rem; font-weight: 700; }
.tonight-solar-stats { display: grid; gap: .32rem; margin: .65rem 0; color: #53617a; font-size: .78rem; }
.tonight-solar-stats i { width: 16px; color: #6682dc; }
.tonight-solar-card p { margin: 0; color: #6b7890; font-size: .78rem; line-height: 1.5; }
.tonight-solar-empty { grid-column: 1/-1; padding: 1rem; border-radius: 14px; color: #596881; background: #f1f5fb; }

.tonight-results-toolbar { min-width: 0; }
.tonight-toolbar-controls { display: grid; grid-template-columns: minmax(200px,1fr) minmax(155px,.35fr) auto auto; gap: .65rem; align-items: center; margin-bottom: 1rem; }
.tonight-search-wrap { position: relative; min-width: 0; }
.tonight-search-wrap i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #8490a5; pointer-events: none; }
.tonight-search-wrap input { padding-left: 2.35rem; }
.tonight-toolbar-controls .btn { white-space: nowrap; }
.tonight-object-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.tonight-object-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-top: 4px solid #7790c9;
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 10px 25px rgba(36,57,93,.06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tonight-object-card:hover { transform: translateY(-2px); box-shadow: 0 17px 32px rgba(36,57,93,.11); }
.tonight-object-card.rating-excellent { border-top-color: #2cb67d; }
.tonight-object-card.rating-good { border-top-color: #3c82e6; }
.tonight-object-card.rating-fair { border-top-color: #d7a528; }
.tonight-object-card.rating-challenge { border-top-color: #d2676f; }
.tonight-object-topline { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.tonight-rank { color: #7d8aa0; font-size: .72rem; font-weight: 800; }
.tonight-rating { margin-right: auto; border-radius: 999px; padding: .25rem .5rem; color: #345d9d; background: #edf3fb; font-size: .68rem; font-weight: 800; }
.rating-excellent .tonight-rating { color: #14704d; background: #ddf5eb; }
.rating-good .tonight-rating { color: #245da6; background: #e0edff; }
.rating-fair .tonight-rating { color: #85630a; background: #fff1c7; }
.rating-challenge .tonight-rating { color: #943e4a; background: #fae0e4; }
.tonight-catalog-tag { flex: 0 0 auto; border-radius: 7px; padding: .26rem .43rem; font-size: .68rem; font-weight: 900; }
.catalog-messier { color: #fff; background: #526fda; }
.catalog-caldwell { color: #235583; background: #dceeff; }
.catalog-southern { color: #76530a; background: #fff0bd; }
.tonight-object-heading { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .75rem; align-items: center; margin: .9rem 0 .8rem; }
.tonight-object-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; color: #fff; background: linear-gradient(135deg,#607bec,#314fae); }
.tonight-object-heading h3 { margin: 0; overflow-wrap: anywhere; font-size: 1.04rem; line-height: 1.25; }
.tonight-object-heading p { margin: .18rem 0 0; color: #718097; font-size: .75rem; }
.tonight-object-primary-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; }
.tonight-object-primary-stats article { min-width: 0; padding: .55rem .45rem; border-radius: 10px; text-align: center; background: #f5f8fc; }
.tonight-object-primary-stats span { display: block; color: #8190a6; font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; }
.tonight-object-primary-stats strong { display: block; margin-top: .12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1c2c4a; font-size: .76rem; }
.tonight-altitude-chart { width: 100%; height: 52px; margin: .55rem 0 .25rem; overflow: visible; }
.tonight-chart-threshold { stroke: #d6deec; stroke-width: 1; stroke-dasharray: 4 3; }
.tonight-chart-line { fill: none; stroke: #4e70db; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tonight-object-meta { display: flex; flex-wrap: wrap; gap: .35rem .65rem; padding-top: .55rem; border-top: 1px solid #edf1f6; color: #66748b; font-size: .71rem; }
.tonight-object-meta i { color: #6681db; }
.tonight-object-note { margin: .7rem 0 0; padding: .55rem .65rem; border-radius: 10px; color: #5e6a7d; background: #f6f8fb; font-size: .72rem; line-height: 1.45; }
.tonight-object-note i { color: #5574dc; margin-right: .25rem; }
.tonight-object-details { margin-top: .55rem; border-top: 1px solid #e9eef5; }
.tonight-object-details summary { display: flex; align-items: center; justify-content: space-between; padding-top: .6rem; color: #4762b8; cursor: pointer; font-size: .75rem; font-weight: 800; list-style: none; }
.tonight-object-details summary::-webkit-details-marker { display: none; }
.tonight-object-details[open] summary i { transform: rotate(180deg); }
.tonight-object-details > div { padding: .6rem .1rem .05rem; color: #66738a; font-size: .73rem; line-height: 1.5; }
.tonight-object-details p { margin: 0 0 .35rem; }
.tonight-empty { padding: 3rem 1rem; text-align: center; color: #64728a; }
.tonight-empty i { color: #7190e4; font-size: 2.4rem; }
.tonight-empty h3 { margin: .7rem 0 .3rem; color: #1b2944; }
.tonight-empty p { max-width: 600px; margin: 0 auto; }

.tonight-method-card { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1.6fr); gap: 1.5rem; align-items: start; }
.tonight-method-card h2 { margin: .35rem 0 0; font-size: 1.35rem; }
.tonight-method-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
.tonight-method-grid p { margin: 0; padding: .85rem; border-radius: 12px; color: #637188; background: #f5f8fc; font-size: .78rem; line-height: 1.5; }
.tonight-method-grid strong { color: #263958; }
.tonight-method-links { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: .65rem; }
.tonight-method-links a { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .52rem .8rem; color: #3857b5; background: #e9efff; font-size: .78rem; font-weight: 800; text-decoration: none; }
.tonight-method-card > small { grid-column: 1/-1; color: #8490a3; }

@media (max-width: 1199px) {
    .tonight-control-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tonight-location-control { grid-column: span 2; }
    .tonight-custom-location { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tonight-custom-location .btn { align-self: end; }
    .tonight-solar-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .tonight-object-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tonight-method-card { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
    .tonight-hero-grid { grid-template-columns: 1fr; }
    .tonight-hero-visual { display: none; }
    .tonight-overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tonight-overview-stats article:nth-child(2) { border-right: 0; }
    .tonight-overview-stats article:nth-child(-n+2) { border-bottom: 1px solid #e3eaf4; }
    .tonight-solar-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tonight-toolbar-controls { grid-template-columns: minmax(0,1fr) minmax(150px,.45fr); }
    .tonight-method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .tonight-hero { padding-top: 1.5rem; }
    .tonight-controls { margin-top: -2rem; border-radius: 18px; }
    .tonight-controls-heading, .tonight-control-actions, .tonight-overview-main, .tonight-section-title { align-items: stretch; flex-direction: column; }
    .tonight-control-grid { grid-template-columns: 1fr; }
    .tonight-location-control { grid-column: auto; }
    .tonight-location-row { grid-template-columns: 1fr; }
    .tonight-location-row .btn { width: 100%; }
    .tonight-custom-location { grid-template-columns: 1fr; }
    .tonight-filter-row { grid-template-columns: 1fr; }
    .tonight-control-actions .btn { width: 100%; }
    .tonight-overview-score { width: 100%; }
    .tonight-object-grid, .tonight-solar-cards { grid-template-columns: 1fr; }
    .tonight-toolbar-controls { grid-template-columns: 1fr; }
    .tonight-toolbar-controls .btn { width: 100%; }
    .tonight-method-links { flex-direction: column; }
    .tonight-method-links a { justify-content: center; }
}
@media (max-width: 520px) {
    .tonight-catalog-pills { display: grid; grid-template-columns: 1fr; }
    .tonight-overview-stats { grid-template-columns: 1fr; }
    .tonight-overview-stats article { border-right: 0; border-bottom: 1px solid #e3eaf4; }
    .tonight-overview-stats article:last-child { border-bottom: 0; }
    .tonight-object-primary-stats { grid-template-columns: 1fr; }
    .tonight-object-primary-stats article { display: flex; justify-content: space-between; text-align: left; }
    .tonight-object-primary-stats strong { margin-top: 0; }
}
@media print {
    .site-header, .site-footer, .tonight-hero, .tonight-controls, .tonight-solar-section, .tonight-method-card,
    .tonight-toolbar-controls, .tonight-object-details, .tonight-loading, .sky-error { display: none !important; }
    .tonight-section { background: #fff; padding: 0; }
    .tonight-overview, .tonight-deep-sky-section, .tonight-object-card { box-shadow: none; }
    .tonight-object-grid { grid-template-columns: repeat(2,1fr); }
    .tonight-object-card { break-inside: avoid; }
}

