:root {
    color-scheme: light;
    --bg: #edf6fb;
    --surface: #ffffff;
    --surface-soft: #f5faff;
    --ink: #0b1220;
    --muted: #607386;
    --line: #dbe8ef;
    --blue: #1677c9;
    --blue-dark: #0d4d85;
    --green: #218365;
    --amber: #d18416;
    --shadow: 0 18px 50px rgba(31, 58, 84, .12);
    --radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(140deg, rgba(142, 202, 255, .25), transparent 38%),
        linear-gradient(180deg, #f9fcff 0%, var(--bg) 100%);
    color: var(--ink);
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.simple-shell {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 14px 12px 28px;
}

.simple-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 2px 14px;
}

.simple-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.simple-brand .brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(160, 208, 239, .72);
    border-radius: 13px;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 209, 102, .55), transparent 26%),
        linear-gradient(145deg, #ffffff, #dff2ff);
    box-shadow: 0 14px 30px rgba(22, 119, 201, .22);
}

.simple-brand svg {
    width: 34px;
    height: 34px;
}

.mark-shield {
    fill: #fafdff;
    stroke: #0f7bd3;
    stroke-width: 2.2;
}

.mark-sun {
    fill: #ffd166;
}

.mark-cloud {
    fill: #fff;
    stroke: #0f7bd3;
    stroke-width: 1.5;
}

.mark-rain {
    fill: #1ba3ff;
}

.mark-check {
    fill: none;
    stroke: #42d394;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.simple-brand strong {
    display: block;
    min-width: 0;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
}

.simple-brand strong span {
    color: var(--blue);
}

.language-switcher {
    position: relative;
    flex: 0 0 auto;
}

.language-switcher::after {
    position: absolute;
    top: 50%;
    right: 11px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--blue-dark);
    border-bottom: 2px solid var(--blue-dark);
    content: "";
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
}

.language-switcher select {
    height: 38px;
    min-height: 38px;
    max-width: 148px;
    padding: 0 32px 0 10px;
    border: 1px solid rgba(198, 222, 236, .92);
    border-radius: var(--radius);
    appearance: none;
    color: var(--ink);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 10px 24px rgba(76, 117, 146, .14);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 38px;
}

.simple-card {
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid rgba(219, 232, 239, .96);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.simple-flash {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #bde7d7;
    border-radius: var(--radius);
    background: #effaf5;
    color: var(--green);
    font-size: 14px;
    font-weight: 750;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    white-space: nowrap;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
    color: var(--ink);
}

select {
    padding-right: 44px;
    appearance: none;
    background:
        #fbfdff
        url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m5.5 7.5 4.5 4.5 4.5-4.5' fill='none' stroke='%230d4d85' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 14px center / 13px 13px;
    cursor: pointer;
}

.address-row {
    display: grid;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 850;
    cursor: pointer;
}

.button.primary {
    width: 100%;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 14px 28px rgba(22, 119, 201, .22);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 4px 0 0;
    letter-spacing: 0;
}

h1 {
    font-size: 25px;
    line-height: 1.08;
}

h2 {
    font-size: 20px;
    line-height: 1.15;
}

.condition-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #e7f3ff;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.condition-chip.sunny {
    color: var(--green);
    background: #e9f6ef;
}

.forecast-current {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.forecast-current strong {
    font-size: clamp(56px, 18vw, 82px);
    line-height: .9;
}

.forecast-current span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.65;
    text-align: right;
}

.weather-risk {
    display: grid;
    gap: 7px;
    margin: -2px 0 15px;
}

.risk-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.risk-head strong {
    color: var(--risk-color);
    font-size: 13px;
}

.risk-meter {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2c9f63 0%, #efc84a 48%, #d9483f 100%);
    box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .08);
}

.risk-meter span {
    position: absolute;
    top: 50%;
    left: var(--risk);
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--risk-color);
    box-shadow: 0 7px 15px rgba(11, 18, 32, .2);
    transform: translate(-50%, -50%);
}

.weather-risk p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.risk-low {
    --risk-color: #218365;
}

.risk-moderate {
    --risk-color: #c98a12;
}

.risk-high {
    --risk-color: #c93f36;
}

.chart-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.chart-meta strong {
    color: var(--ink);
    font-size: 12px;
}

.chart-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.chart-meta span::before {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    content: "";
}

.temperature-key::before {
    background: linear-gradient(180deg, #ff7a33, #ffd166);
}

.rain-key::before {
    background: linear-gradient(180deg, #1784d8, #8ecaff);
}

.chart-scroll {
    margin: 0 -4px;
    padding: 0 4px 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-color: rgba(22, 119, 201, .4) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.chart-scroll::-webkit-scrollbar {
    height: 7px;
}

.chart-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.chart-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(22, 119, 201, .32);
}

.chart-track {
    position: relative;
    min-width: 720px;
}

.mini-chart {
    display: grid;
    align-items: end;
    grid-template-columns: repeat(48, minmax(8px, 1fr));
    gap: 5px;
    height: 150px;
    padding: 14px 8px 9px;
    border-radius: var(--radius);
    background:
        repeating-linear-gradient(to top, transparent 0 32px, rgba(96, 115, 134, .1) 32px 33px),
        linear-gradient(180deg, #f9fcff, #eef7fd);
}

.chart-point {
    position: relative;
    display: block;
    height: var(--temp);
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px 999px 2px 2px;
    background: linear-gradient(180deg, #f46a2f, #ffd166);
    cursor: pointer;
    transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}

.chart-point::after {
    position: absolute;
    right: 1px;
    bottom: 0;
    left: 1px;
    height: var(--rain);
    min-height: 5px;
    border-radius: inherit;
    background: linear-gradient(180deg, #1388d9, #8ecaff);
    content: "";
}

.chart-point:hover,
.chart-point:focus-visible,
.chart-point.is-active {
    outline: 0;
    filter: saturate(1.12);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(11, 18, 32, .12), 0 10px 18px rgba(22, 119, 201, .18);
}

.chart-axis {
    position: relative;
    height: 32px;
    margin: 7px 8px 0;
    color: var(--muted);
}

.chart-axis span {
    position: absolute;
    left: var(--tick);
    display: grid;
    gap: 1px;
    min-width: 52px;
    font-size: 10px;
    line-height: 1.15;
    transform: translateX(-50%);
}

.chart-axis span.is-start {
    transform: translateX(0);
}

.chart-axis span.is-end {
    text-align: right;
    transform: translateX(-100%);
}

.chart-axis strong {
    color: var(--ink);
    font-size: 10px;
}

.chart-axis small {
    font-size: 10px;
}

.chart-tooltip {
    position: absolute;
    z-index: 2;
    max-width: min(260px, calc(100vw - 42px));
    padding: 7px 9px;
    border: 1px solid rgba(11, 18, 32, .08);
    border-radius: var(--radius);
    background: rgba(11, 18, 32, .92);
    box-shadow: 0 14px 28px rgba(11, 18, 32, .18);
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -100%) translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
    white-space: nowrap;
}

.chart-tooltip.is-visible {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(0);
}

.source-line {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.quality-line {
    margin-top: 8px;
}

.subscribe-form {
    display: grid;
    gap: 10px;
}

.subscribe-card {
    padding: 14px;
}

.subscribe-card .section-heading {
    margin-bottom: 8px;
}

.subscribe-card label {
    gap: 6px;
    font-size: 12px;
}

.subscribe-card input,
.subscribe-card select,
.subscribe-card .value-row span {
    min-height: 40px;
    font-size: 13px;
}

.subscribe-card .button {
    min-height: 40px;
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.value-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px;
}

.value-row span {
    display: grid;
    min-height: 46px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--blue-dark);
    font-weight: 850;
}

.subscription-list {
    display: grid;
    gap: 10px;
}

.subscription-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
}

.subscription-row.local-subscription {
    border-color: rgba(22, 119, 201, .25);
    background: linear-gradient(180deg, #fbfdff, #f4fbff);
}

.subscription-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.subscription-list strong {
    font-size: 15px;
}

.subscription-list span,
.subscription-list small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
    border-color: #ffc8c8;
    color: #b42318;
    background: #fff5f5;
}

.empty-subscriptions.is-hidden {
    display: none;
}

@media (min-width: 800px) {
    .simple-shell {
        width: min(100%, 760px);
        padding-top: 24px;
    }

    .address-row {
        grid-template-columns: minmax(0, 1fr) 180px;
    }

    .simple-card {
        padding: 20px;
    }

    .chart-track {
        min-width: 100%;
    }

    .subscribe-card {
        padding: 16px;
    }
}

@media (max-width: 390px) {
    .form-grid,
    .forecast-current {
        grid-template-columns: 1fr;
        display: grid;
    }

    .forecast-current span {
        text-align: left;
    }

    .chart-track {
        min-width: 760px;
    }

    .mini-chart {
        grid-template-columns: repeat(48, minmax(9px, 1fr));
        gap: 4px;
        height: 150px;
    }

    .chart-point {
        min-height: 20px;
    }

    .chart-point::after {
        min-height: 5px;
    }
}

@media (max-width: 480px) {
    .chart-track {
        min-width: 760px;
    }

    .mini-chart {
        grid-template-columns: repeat(48, minmax(9px, 1fr));
        gap: 4px;
        height: 150px;
    }
}
