/* Shared system roles. Keep components mapped to these roles in both appearances. */
.hd-dashboard,
.hd-current {
    color-scheme: light;
    --hd-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --hd-size-label: 16px;
    --hd-size-body: 17px;
    --hd-size-value: 23px;
    --hd-space-1: 4px;
    --hd-space-2: 8px;
    --hd-space-3: 12px;
    --hd-space-4: 16px;
    --hd-space-5: 24px;
    --hd-space-6: 32px;
    --hd-radius-small: 8px;
    --hd-radius-control: 14px;
    --hd-radius-card: 18px;
    --hd-radius-panel: 24px;
    --hd-radius-shell: 30px;
    --hd-target: 44px;
    --hd-motion: 140ms;

    --hd-canvas: #f0f4f0;
    --hd-surface: #fff;
    --hd-container: #f1f5f1;
    --hd-container-high: #e5ede7;
    --hd-hero: #e9f3ed;
    --hd-hero-ink: #19382d;
    --hd-hero-muted: #425d51;
    --hd-ink: #172925;
    --hd-muted: #445a51;
    --hd-outline: #9cafa5;
    --hd-divider: #dbe6de;
    --hd-primary: #236650;
    --hd-primary-container: #daede2;
    --hd-on-primary-container: #214c3c;
    --hd-secondary: #28688a;
    --hd-focus: #255f91;
    --hd-glass: #ffffff9e;
    --hd-glass-outline: #ffffffc9;

    --hd-info-bg: #e3f0f7;
    --hd-info-text: #2b5570;
    --hd-safe-bg: #e0f0e6;
    --hd-safe-text: #28583f;
    --hd-warning-bg: #fcf0d8;
    --hd-warning-text: #704815;
    --hd-danger-bg: #f9e8e6;
    --hd-danger-text: #85393e;

    --hd-series-blue: #387ba3;
    --hd-series-green: #437f6d;
    --hd-series-area: #82b8a3;
    --hd-series-amber: #9a6a21;
    --hd-series-red: #a54854;
    --hd-chart-grid: #d7e4dd;
    --hd-chart-zero: #82968b;
    --hd-scroll-thumb: #829f91;
    --hd-map-land: #dce6e5;
    --hd-map-border: #7d9a98;
    --hd-map-region: #a8d0be;
    --hd-map-region-outline: #578e79;
    --hd-map-selected: #2a78a4;
    --hd-map-active: #6fa9c9;

    --hd-icon-sun: #b87920;
    --hd-icon-cloud: #6887a3;
    --hd-icon-water: #2974a8;
    --hd-icon-moon: #647ca7;
    --hd-icon-lightning: #a36216;
    --hd-icon-storm: #637a9a;
}
.hd-dashboard[data-hd-theme="dark"],
.hd-current[data-hd-theme="dark"] {
    color-scheme: dark;
    --hd-canvas: #111a17;
    --hd-surface: #1b2622;
    --hd-container: #24322b;
    --hd-container-high: #303f37;
    --hd-hero: #263c31;
    --hd-hero-ink: #e9f8ee;
    --hd-hero-muted: #bed2c3;
    --hd-ink: #e6efe8;
    --hd-muted: #bdcfc2;
    --hd-outline: #71857a;
    --hd-divider: #3b4c42;
    --hd-primary: #9bd8bd;
    --hd-primary-container: #335648;
    --hd-on-primary-container: #d4f4e4;
    --hd-secondary: #a3d3f4;
    --hd-focus: #a2cff4;
    --hd-glass: #27382fcc;
    --hd-glass-outline: #74908365;

    --hd-info-bg: #273e4b;
    --hd-info-text: #b8def2;
    --hd-safe-bg: #2a4336;
    --hd-safe-text: #bbe8cc;
    --hd-warning-bg: #473920;
    --hd-warning-text: #f7dda2;
    --hd-danger-bg: #492e33;
    --hd-danger-text: #ffd0cd;

    --hd-series-blue: #89c6ed;
    --hd-series-green: #88c5a8;
    --hd-series-area: #6ba98d;
    --hd-series-amber: #e8ba69;
    --hd-series-red: #f2a1a7;
    --hd-chart-grid: #40544a;
    --hd-chart-zero: #9bb1a4;
    --hd-scroll-thumb: #87a797;
    --hd-map-land: #415550;
    --hd-map-border: #78928a;
    --hd-map-region: #527d69;
    --hd-map-region-outline: #a2c9b4;
    --hd-map-selected: #81bce5;
    --hd-map-active: #a4d3ed;

    --hd-icon-sun: #edbf70;
    --hd-icon-cloud: #a7c6dd;
    --hd-icon-water: #83c3f4;
    --hd-icon-moon: #bacbf0;
    --hd-icon-lightning: #f2bc63;
    --hd-icon-storm: #a9b8d6;
}
.hd-dashboard, .hd-current, .hd-dashboard *, .hd-current * { box-sizing: border-box; }
.hd-dashboard [hidden], .hd-current [hidden] { display: none !important; }
.hd-dashboard .hd-sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.hd-icon { display: inline-block; width: 1em; height: 1em; flex-shrink: 0; vertical-align: middle; }
.hd-glyph-sun { fill: var(--hd-icon-sun, #b87920); }
.hd-glyph-cloud { fill: var(--hd-icon-cloud, #6887a3); }
.hd-glyph-water { fill: var(--hd-icon-water, #2974a8); }
.hd-glyph-moon { fill: var(--hd-icon-moon, #647ca7); }
.hd-glyph-lightning { fill: var(--hd-icon-lightning, #a36216); }
.hd-glyph-shine { fill: #fff; opacity: .5; }
.hd-icon--storm .hd-glyph-cloud { fill: var(--hd-icon-storm, #637a9a); }

.hd-dashboard :is(button, select, a, [tabindex]):focus-visible,
.hd-current :is(button, select, a, [tabindex]):focus-visible { outline: 2px solid var(--hd-focus); outline-offset: 3px; }
.hd-dashboard [data-tone] { --hd-tone-bg: var(--hd-info-bg); --hd-tone-text: var(--hd-info-text); }
.hd-dashboard [data-tone="safe"] { --hd-tone-bg: var(--hd-safe-bg); --hd-tone-text: var(--hd-safe-text); }
.hd-dashboard [data-tone="warning"] { --hd-tone-bg: var(--hd-warning-bg); --hd-tone-text: var(--hd-warning-text); }
.hd-dashboard [data-tone="danger"] { --hd-tone-bg: var(--hd-danger-bg); --hd-tone-text: var(--hd-danger-text); }
.hd-status-badge { display: inline-block; width: fit-content; max-width: 100%; padding: var(--hd-space-1) var(--hd-space-2); border-radius: var(--hd-radius-small); color: var(--hd-tone-text); background: var(--hd-tone-bg); font-size: var(--hd-size-label); line-height: 1.28; font-weight: 660; }

.hd-current {
    --hd-card-bg: var(--hd-hero);
    --hd-card-text: var(--hd-ink);
    --hd-card-accent: var(--hd-primary);
    --hd-card-width: 380px;
    width: min(100%, var(--hd-card-width));
    max-width: 100%;
    padding: var(--hd-space-5);
    border-radius: var(--hd-radius-panel);
    background: var(--hd-card-bg);
    color: var(--hd-card-text);
    font: 400 var(--hd-size-body)/1.4 var(--hd-font);
    overflow-wrap: anywhere;
}
.hd-current:not([data-hd-theme="dark"]) {
    --hd-card-bg: var(--hd-light-card-bg, var(--hd-hero));
    --hd-card-text: var(--hd-light-card-text, var(--hd-ink));
    --hd-card-accent: var(--hd-light-card-accent, var(--hd-primary));
}
.hd-current--kucuk { --hd-card-width: 250px; padding: var(--hd-space-4); }
.hd-current--buyuk { --hd-card-width: 650px; padding: clamp(20px, 4vw, var(--hd-space-6)); }
.hd-current p { margin: 0; }
.hd-current__top, .hd-current__reading { display: flex; align-items: center; justify-content: space-between; gap: var(--hd-space-2); }
.hd-current__location { display: flex; align-items: center; gap: var(--hd-space-2); font-size: 19px; font-weight: 720; letter-spacing: -.018em; }
.hd-current__location .hd-icon { width: 20px; height: 20px; color: var(--hd-card-accent); }
.hd-current--buyuk .hd-current__location { font-size: var(--hd-size-value); }
.hd-current__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    color: var(--hd-card-accent);
    border-radius: var(--hd-radius-card);
    background: var(--hd-primary-container);
    background: color-mix(in srgb, var(--hd-card-accent) 13%, transparent);
}
.hd-current__icon .hd-icon { width: 36px; height: 36px; }
.hd-current__reading { flex-wrap: wrap; justify-content: flex-start; align-items: baseline; margin-top: var(--hd-space-1); }
.hd-current__reading strong { font-size: clamp(38px, 6vw, 52px); font-weight: 730; letter-spacing: -.061em; line-height: 1.06; white-space: nowrap; }
.hd-current--kucuk .hd-current__reading strong { font-size: 38px; }
.hd-current--buyuk .hd-current__reading strong { font-size: clamp(44px, 7vw, 60px); }
.hd-current__reading span, .hd-current__time { font-size: var(--hd-size-label); }
.hd-current__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hd-space-2); margin: var(--hd-space-4) 0 var(--hd-space-3); }
.hd-current__details > div {
    padding: var(--hd-space-2) var(--hd-space-3);
    border-radius: var(--hd-radius-control);
    background: var(--hd-container);
    background: color-mix(in srgb, var(--hd-card-accent) 10%, transparent);
}
.hd-current__details dt { font-size: var(--hd-size-label); }
.hd-current__details dd { margin: 1px 0 0; font-weight: 670; font-size: 18px; }
.hd-current--kucuk .hd-current__details > div:nth-child(-n+2) { display: none; }
.hd-current__time { display: block; font-variant-numeric: tabular-nums; }
.hd-current p.hd-current__status { margin-top: var(--hd-space-2); font-size: var(--hd-size-label); }

.hd-current .hd-current__retry, .hd-dashboard .hd-panel-retry {
    display: block;
    width: fit-content;
    min-height: var(--hd-target);
    margin-top: var(--hd-space-2);
    padding: var(--hd-space-2) var(--hd-space-4);
    border: 0;
    border-radius: var(--hd-radius-control);
    background: var(--hd-primary-container);
    color: var(--hd-on-primary-container);
    font: 660 var(--hd-size-label)/1.3 var(--hd-font);
    text-transform: none;
    cursor: pointer;
}
.hd-panel-message { margin: 0; color: var(--hd-muted); font-size: var(--hd-size-label); }