/* Editorial aesthetic — clean publication layout */

@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --text: #121212;
  --text-muted: #666666;
  --border: #e5e5e5;
  --input-bg: #fafafa;
  --accent: #9b2c2c;
  --accent-hover: #7f2424;
  --font-serif: 'Inconsolata', ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  --font-body: 'Inconsolata', ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  --font-sans: 'Inconsolata', ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  --max-width: 720px;
  --layout-width: 1100px;
  --prose-width: 68ch;
}

html.dark {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-subtle: #171717;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --border: #262626;
  --input-bg: #171717;
  --accent: #e07a7a;
  --accent-hover: #f09090;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease;
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  max-width: var(--layout-width);
  margin: 0 auto;
}

.site-social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex: 0 0 auto;
  order: 2;
}

.site-social-links a {
  --social-color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

.site-social-links a:hover,
.site-social-links a:focus-visible {
  color: var(--social-color);
  transform: translateY(-1px);
  text-shadow: 0 0 0.5rem color-mix(in srgb, var(--social-color) 75%, transparent), 0 0 1rem color-mix(in srgb, var(--social-color) 45%, transparent);
}

.site-social-links .social-gmail { --social-color: #ea4335; }
.site-social-links .social-github { --social-color: #8b5cf6; }
.site-social-links .social-twitter { --social-color: #00b8ff; }
.site-social-links .social-deviantart { --social-color: #05cc47; }
.site-social-links .social-strava { --social-color: #fc4c02; }

.site-wordmark {
  order: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-wordmark:hover {
  color: var(--accent);
}

.site-header__utils {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
  order: 3;
}

.main-nav {
  display: flex;
  gap: 1.75rem;
}

.main-nav a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle__icon {
  font-size: 0.875rem;
  line-height: 1;
}

@media (max-width: 540px) {
  .site-header {
    padding: 1rem;
  }

  .site-header__inner {
    gap: 0.75rem;
  }

  .site-social-links {
    gap: 0.375rem;
  }

  .site-social-links a {
    width: 1rem;
    height: 1rem;
    font-size: 0.6875rem;
  }

  .site-header__utils {
    width: 100%;
    gap: 0.75rem;
    justify-content: flex-end;
  }

  .main-nav {
    gap: 0.75rem;
  }

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

/* ── Main ── */

main {
  flex: 1;
  width: 100%;
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

main h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--text);
}

.page-intro {
  margin: 0 0 3rem;
  max-width: 42rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ── Dashboard layout ── */

.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.widget {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: border-color 0.2s ease;
}

.widget--wide {
  padding-top: 0;
}

.widget--wide:last-child {
  border-bottom: none;
}

.widget h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* Quote & weather card row */

.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
  align-items: start;
}

@media (min-width: 720px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  #github-widget {
    grid-column: 1;
    grid-row: 2;
  }

  #quote-widget {
    grid-column: 1;
    grid-row: 1;
  }

  #weather-widget {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

.widget-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  overflow: visible;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dashboard-cards .widget-card {
  padding: 1.25rem 1.35rem;
}

#weather-widget.widget-card {
  padding: 0.75rem;
}

.widget-card h2 {
  margin-bottom: 0.85rem;
}

.github-widget-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.github-mark {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

/* Quote card */

.widget-card blockquote {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  border: none;
  overflow-wrap: anywhere;
}

.widget-card cite {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* GitHub widget */

.repo-link {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.repo-link:hover {
  color: var(--accent);
}

.repo-description {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.widget-error,
#weather-content > p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Tech news feed */

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.feed-list li:first-child {
  padding-top: 0;
}

.feed-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.feed-list a {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.feed-list a:hover {
  color: var(--accent);
}

.feed-meta {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.feed-list p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* World news — asymmetric editorial layout */

.world-news-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .world-news-layout {
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
  }

  .world-news-lead {
    padding-right: 2.5rem;
    border-right: 1px solid var(--border);
  }

  .world-news-wires {
    padding-left: 2.5rem;
  }
}

.world-news-category {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.world-news-lead h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.25vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
}

.world-news-lead h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.world-news-lead h3 a:hover {
  color: var(--accent);
}

.world-news-excerpt {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.world-news-wires {
  list-style: none;
  margin: 0;
  padding: 0;
}

.world-news-wires li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.world-news-wires li:first-child {
  padding-top: 0;
}

.world-news-wires li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.world-news-wires .world-news-category {
  margin-bottom: 0.5rem;
}

.world-news-wires a {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.world-news-wires a:hover {
  color: var(--accent);
}

/* ── Footer ── */

footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease;
}

footer p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Weather widget ── */

#weather-widget {
  --weather-ink: #4c5870;
  --weather-muted: #78859a;
  --weather-rule: #d9e0eb;
  --weather-panel: rgb(247 249 253 / 94%);
  --weather-chart: #e2a52b;
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 1rem;
  overflow: visible;
}

#weather-content {
  margin: 0;
  min-width: 0;
}

.weather-loading {
  margin: 0;
  color: var(--text-muted);
}

.weather-app {
  position: relative;
  display: block;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 0.75rem;
  background: #edf2f7;
  box-shadow: 0 1rem 2rem rgb(52 74 94 / 8%);
  color: var(--weather-ink);
}

.weather-app--dark {
  --weather-panel: rgb(26 34 48 / 92%);
  --weather-ink: #eef3fb;
  --weather-muted: #a9b5c8;
  --weather-rule: #3c4a60;
  --weather-chart: #74b9e8;
  border-color: #344258;
  background: #111a27;
}

.weather-app--still *,
.weather-app--still *::before,
.weather-app--still *::after {
  animation-play-state: paused !important;
}

.weather-slide-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}

.weather-slide {
  position: relative;
  flex: 0 0 50%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

/* Primary scene */

.weather-slide--primary .weather-scene {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 0 0.75rem;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(145deg, #55c4d0 0%, #68d0ba 48%, #d5e99d 100%);
  isolation: isolate;
}

.weather-scene--night {
  background: linear-gradient(145deg, #172b54 0%, #34577e 52%, #737b9d 100%);
}

.weather-scene--cloudy {
  background: linear-gradient(145deg, #8bb6c7, #a5c3c8 52%, #d4d1aa);
}

.weather-scene--rain,
.weather-scene--storm {
  background: linear-gradient(145deg, #455c78, #7692a3 52%, #aab5ae);
}

.weather-scene--snow {
  background: linear-gradient(145deg, #8bb8cc, #c7dce0 52%, #e8e4ca);
}

.weather-scene--mist {
  background: linear-gradient(145deg, #9ebcc0, #ccd2c7);
}

.weather-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.92;
  pointer-events: none;
}

.weather-sun {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #ffe184;
  box-shadow:
    0 0 0 0.4rem rgb(255 225 132 / 15%),
    0 0 2rem rgb(255 235 154 / 65%);
  animation: weather-pulse 5s ease-in-out infinite;
}

.weather-scene--night .weather-sun {
  background: #e7edf8;
  box-shadow:
    0 0 0 0.55rem rgb(231 237 248 / 12%),
    0 0 2rem rgb(231 237 248 / 28%);
}

.weather-scene--storm .weather-sun {
  display: none;
}

.weather-cloud {
  position: absolute;
  width: 10rem;
  height: 2.75rem;
  border-radius: 4rem;
  background: rgb(255 255 255 / 48%);
  animation: weather-drift 12s ease-in-out infinite alternate;
}

.weather-cloud::before,
.weather-cloud::after {
  position: absolute;
  content: '';
  border-radius: 50%;
  background: inherit;
}

.weather-cloud::before {
  width: 4.25rem;
  height: 4.25rem;
  left: 1.6rem;
  bottom: 0.45rem;
}

.weather-cloud::after {
  width: 3.25rem;
  height: 3.25rem;
  left: 5.4rem;
  bottom: 0.3rem;
}

.weather-cloud--one {
  bottom: 5.5rem;
  left: -2rem;
}

.weather-cloud--two {
  top: 5.5rem;
  right: -3.5rem;
  transform: scale(0.7);
  animation-delay: -4s;
}

.weather-scene--night .weather-cloud {
  background: rgb(171 191 218 / 30%);
}

.weather-precipitation {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: radial-gradient(circle, rgb(255 255 255 / 80%) 0 1px, transparent 2px);
  background-size: 1.4rem 2rem;
}

.weather-scene--rain .weather-precipitation,
.weather-scene--storm .weather-precipitation,
.weather-scene--snow .weather-precipitation {
  opacity: 0.65;
  animation: weather-fall 1.2s linear infinite;
}

.weather-scene--snow .weather-precipitation {
  background-size: 2.4rem 2.4rem;
  animation-duration: 4s;
}

.weather-scene--mist .weather-precipitation {
  opacity: 0.18;
  filter: blur(8px);
}

.weather-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem 0;
  color: #fff;
}

.weather-eyebrow,
.weather-section-label {
  margin: 0 0 0.25rem;
  font: 600 0.62rem/1.2 var(--font-sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.weather-eyebrow {
  color: rgb(255 255 255 / 75%);
}

.weather-section-label {
  color: var(--accent);
}

.weather-toolbar h2 {
  margin: 0;
  font: 500 0.95rem/1.25 var(--font-sans);
  letter-spacing: -0.02em;
  color: #fff;
}

.weather-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
}

.weather-icon-button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 15%);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.weather-icon-button:hover {
  background: rgb(255 255 255 / 30%);
  transform: translateY(-1px);
}

.weather-panel {
  position: relative;
  z-index: 2;
  width: calc(100% - 1.5rem);
  margin: 0 auto;
  padding: 0.75rem 0.9rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 0.7rem;
  background: var(--weather-panel);
  box-shadow: 0 0.75rem 1.75rem rgb(26 59 79 / 14%);
  color: var(--weather-ink);
  backdrop-filter: blur(12px);
}

.weather-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.weather-city {
  margin: 0 0 0.25rem;
  font: 500 0.68rem/1 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--weather-muted);
}

.weather-temp {
  margin: 0;
  font: 600 clamp(2rem, 6vw, 2.6rem)/0.95 var(--font-sans);
  letter-spacing: -0.05em;
  color: var(--weather-ink);
}

.weather-temp sup {
  margin-left: 0.1rem;
  font-size: 1.15rem;
  letter-spacing: 0;
  vertical-align: top;
}

.weather-feels,
.weather-high-low {
  margin: 0.45rem 0 0;
  font: 500 0.72rem var(--font-sans);
  color: var(--weather-muted);
}

.weather-condition {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.35rem 0.65rem;
  text-align: right;
}

.weather-condition .weather-icon {
  grid-row: span 2;
  font-size: 1.85rem;
  line-height: 1;
}

.weather-desc {
  margin: 0;
  font: 500 0.95rem/1.25 var(--font-sans);
  color: var(--weather-ink);
}

.weather-condition .weather-high-low {
  margin: 0;
  grid-column: 2;
}

/* Details slide */

.weather-slide--details {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 2.4rem 1rem 1.25rem;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.weather-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.weather-details-header h3 {
  margin: 0;
  font: 500 1.1rem/1.2 var(--font-sans);
  color: var(--text);
}

.weather-units {
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.weather-units button,
.weather-chart-tabs button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: 600 0.66rem var(--font-sans);
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.weather-units button {
  padding: 0.4rem 0.65rem;
}

.weather-units button.is-active,
.weather-chart-tabs button.is-active {
  color: var(--text);
  background: var(--surface-subtle);
}

.weather-detail-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 1rem 0 0;
  border-bottom: 1px solid var(--border);
}

.weather-detail-tabs button {
  padding: 0.45rem 0.55rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font: 600 0.65rem var(--font-sans);
}

.weather-detail-tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.weather-detail-panel {
  display: none;
}

.weather-detail-panel.is-active {
  display: block;
}

.weather-hourly {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 1.1rem 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.weather-hour {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
  padding: 0.6rem 0.15rem;
  place-items: center;
  border-right: 1px solid var(--border);
  text-align: center;
}

.weather-hour:last-child {
  border-right: 0;
}

.weather-hour small {
  color: var(--text-muted);
  font: 500 0.58rem var(--font-sans);
}

.weather-hour strong {
  font-size: 1.2rem;
  line-height: 1;
}

.weather-hour b {
  color: var(--text);
  font: 600 0.7rem var(--font-sans);
}

.weather-metrics {
  display: grid;
}

.weather-metrics--details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.weather-metrics--details span {
  padding: 0.7rem;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.weather-metrics--details span:nth-child(even) {
  border-right: 0;
}

.weather-metrics--details span:nth-child(n + 3) {
  border-bottom: 0;
}

.weather-metrics small,
.weather-detail-strip small {
  display: block;
  font: 500 0.6rem/1.3 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--weather-muted);
}

.weather-metrics strong,
.weather-detail-strip strong {
  display: block;
  margin-top: 0.3rem;
  font: 600 0.8rem var(--font-sans);
  color: var(--weather-ink);
}

.weather-detail-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.weather-detail-strip span {
  padding: 0 0.75rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.weather-detail-strip span:first-child {
  padding-left: 0;
}

.weather-detail-strip span:last-child {
  padding-right: 0;
  border-right: 0;
}

.weather-chart-card {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface-subtle);
}

.weather-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.weather-chart-header h3 {
  margin: 0;
  font: 500 1rem/1.25 var(--font-sans);
  color: var(--text);
}

.weather-chart-value {
  font: 600 1.35rem var(--font-sans);
  color: var(--text);
}

.weather-chart-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0.9rem 0 0.45rem;
  padding-bottom: 0.45rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.weather-chart-tabs button {
  flex-shrink: 0;
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.weather-chart-tabs button.is-active {
  border-bottom-color: var(--accent);
}

.weather-chart {
  height: 140px;
}

.weather-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.weather-chart-grid {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.weather-chart-area {
  fill: url(#weather-chart-fill);
}

.weather-chart-line {
  fill: none;
  stroke: var(--weather-chart);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.weather-chart-dot {
  fill: var(--surface);
  stroke: var(--weather-chart);
  stroke-width: 3;
}

.weather-chart text {
  fill: var(--text-muted);
  font: 500 11px var(--font-sans);
}

.weather-settings {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface-subtle);
}

.weather-settings > div,
.weather-settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.weather-settings > div {
  margin-bottom: 0.35rem;
  font: 600 0.75rem var(--font-sans);
  color: var(--text);
}

.weather-settings > div span {
  font: 500 0.65rem var(--font-sans);
  color: var(--text-muted);
}

.weather-settings label {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font: 500 0.75rem var(--font-sans);
  color: var(--text-muted);
}

.weather-text-button {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: none;
  cursor: pointer;
  font: 600 0.7rem var(--font-sans);
}

/* Carousel controls */

.weather-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  color: var(--weather-ink);
  background: rgb(255 255 255 / 85%);
  cursor: pointer;
  font: 1.35rem/1 var(--font-sans);
  box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 12%);
  transition: background 0.15s ease, transform 0.15s ease;
}

.weather-carousel-button:hover,
.weather-carousel-button:focus-visible {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.weather-carousel-button--previous {
  left: 0.5rem;
}

.weather-carousel-button--next {
  right: 0.5rem;
}

.weather-carousel-button:disabled {
  visibility: hidden;
  pointer-events: none;
}

@keyframes weather-pulse {
  50% { transform: scale(1.06); }
}

@keyframes weather-drift {
  to { transform: translateX(0.75rem); }
}

@keyframes weather-fall {
  to { background-position: 0 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .weather-slide-track {
    transition: none;
  }

  .weather-sun,
  .weather-cloud,
  .weather-precipitation {
    animation: none;
  }
}

@media (max-width: 719px) {
  #weather-widget {
    padding: 0.65rem;
  }

  .weather-app {
    height: 300px;
  }

  .weather-slide--details {
    padding: 0.85rem 2.1rem 0.85rem 0.85rem;
  }
}

@media (max-width: 460px) {
  .dashboard-cards {
    gap: 1rem;
  }

  .widget-card {
    padding: 1rem 1.1rem;
  }

  #weather-widget {
    padding: 0.5rem;
  }

  .weather-app {
    height: 290px;
  }

  .weather-toolbar {
    padding: 0.65rem 0.7rem 0;
  }

  .weather-panel {
    width: calc(100% - 1.25rem);
    padding: 0.7rem 0.75rem;
  }

  .weather-summary {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .weather-condition {
    display: block;
  }

  .weather-condition .weather-icon {
    display: block;
    margin: 0 0 0.25rem auto;
  }

  .weather-slide--details {
    padding: 0.75rem 2rem 0.75rem 0.75rem;
  }

  .weather-hourly {
    margin: 0.75rem 0;
  }

  .weather-hour {
    padding: 0.45rem 0.1rem;
  }
}
