:root {
  color-scheme: light;
  --ink: #172722;
  --muted: #718079;
  --line: #e2e9e4;
  --paper: #f7f9f6;
  --white: #fff;
  --forest: #153e35;
  --mint: #c9f278;
  --coral: #dc6047;
  --display: 'Manrope', 'DM Sans', sans-serif;
  --body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 15px; }
button, input { font: inherit; }
button { color: inherit; }
.wordmark { color: inherit; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: 0; text-decoration: none; }
.wordmark span, .welcome-row h1 span { color: var(--coral); }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.login-shell { display: grid; min-height: 100svh; grid-template-columns: minmax(320px, 540px) 1fr; }
.login-panel { display: flex; flex-direction: column; justify-content: center; width: min(100%, 440px); margin: 0 auto; padding: 48px 36px; animation: enter 500ms ease both; }
.login-panel > .wordmark { margin-bottom: 74px; }
.login-panel > .eyebrow { margin-bottom: 18px; }
.login-panel h1 { margin: 0; font-family: var(--display); font-size: clamp(40px, 6vw, 58px); font-weight: 700; line-height: 1.06; }
.login-intro { max-width: 330px; margin: 18px 0 30px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.login-form { display: grid; gap: 10px; }
.login-form label { margin-top: 8px; font-size: 12px; font-weight: 700; }
.login-form input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #dce4de; border-radius: 4px; outline: none; background: #fff; }
.login-form input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px #153e3517; }
.primary-button { display: flex; justify-content: space-between; align-items: center; min-height: 50px; margin-top: 14px; padding: 0 18px; border: 0; border-radius: 4px; background: var(--forest); color: white; cursor: pointer; font-weight: 600; }
.primary-button span { color: var(--mint); font-size: 20px; }
.primary-button:hover { background: #205448; }
.login-foot { margin-top: 36px; color: #919d96; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.login-foot span { padding: 0 5px; color: var(--coral); }
.form-error { padding: 12px; border-left: 3px solid var(--coral); background: #fff0ec; color: #853a2d; font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.auth-tab { min-height: 42px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.auth-tab.is-active { border-bottom-color: var(--forest); color: var(--forest); }
.auth-form.is-hidden { display: none; }
.settings-notice { padding: 12px 14px; border-left: 3px solid #598a61; background: #e9f2e8; color: #31563a; font-size: 12px; }
.settings-error { margin: 12px 0; }
.login-art { position: relative; display: flex; min-height: 100vh; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 38px 44px; background-color: var(--forest); background-image: linear-gradient(90deg, #ffffff09 1px, transparent 1px), linear-gradient(#ffffff09 1px, transparent 1px); background-size: 56px 56px; color: #f5f6e9; }
.art-index { position: relative; z-index: 1; font-size: 10px; letter-spacing: 1.1px; }
.sun-mark { position: absolute; top: 17%; right: 19%; width: min(32vw, 360px); aspect-ratio: 1; border: 1px solid #d9edbe75; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 31px, #d9edbe20 32px 33px); }
.sun-mark::before, .sun-mark::after { position: absolute; content: ''; }
.sun-mark::before { inset: 16%; border: 1px solid #d9edbe72; border-radius: 50%; }
.sun-mark::after { top: 50%; left: -28%; width: 156%; height: 1px; background: #d9edbe72; transform: rotate(-32deg); }
.art-caption { position: relative; z-index: 1; display: grid; gap: 18px; }
.art-caption span { color: var(--mint); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
.art-caption strong { font-family: var(--display); font-size: clamp(42px, 6vw, 76px); font-weight: 600; line-height: 1.05; }
.art-line { width: 100%; height: 1px; background: #ffffff42; }
.topbar { position: sticky; z-index: 2; top: 0; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 max(22px, calc((100vw - 1000px) / 2)); border-bottom: 1px solid var(--line); background: #f7f9f6ed; backdrop-filter: blur(12px); }
.topbar .wordmark { font-size: 21px; }
.topbar-place { display: flex; align-items: center; gap: 8px; color: #4c6056; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.place-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.logout-form { margin: 0; }
.logout-button { padding: 8px 0 8px 12px; border: 0; background: transparent; color: #596960; cursor: pointer; font-size: 12px; }
.logout-button span { padding-left: 4px; color: var(--coral); }
.dashboard { width: min(100% - 40px, 840px); margin: 0 auto; }
.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 46px 0 26px; animation: enter 450ms ease both; }
.welcome-row .eyebrow { margin-bottom: 10px; }
.welcome-row h1 { margin: 0; font-family: var(--display); font-size: clamp(27px, 5vw, 38px); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.date-stamp { flex: 0 0 auto; padding-bottom: 5px; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.weather-panel { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; overflow: hidden; padding: 26px 28px 22px; border-radius: 5px; background: var(--forest); color: white; animation: enter 550ms 60ms ease both; }
.weather-panel::after { position: absolute; top: -75px; right: 31%; width: 190px; height: 190px; border: 1px solid #ffffff1b; border-radius: 50%; content: ''; box-shadow: 0 0 0 24px #ffffff08, 0 0 0 48px #ffffff06; pointer-events: none; }
.weather-main, .weather-details, .weather-alerts { position: relative; z-index: 1; }
.weather-heading { display: flex; align-items: center; gap: 12px; }
.weather-spark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--forest); font-size: 20px; }
.weather-heading .eyebrow { color: #c3d5ca; font-size: 9px; }
.weather-heading h2 { margin: 2px 0 0; font-family: var(--display); font-size: 17px; }
.weather-temperature { margin: 13px 0 0; font-family: var(--display); font-size: 50px; font-weight: 600; letter-spacing: 0; line-height: 1.1; }
.weather-temperature span { color: #b2c4b8; font-size: 24px; }
.weather-description { margin: 3px 0 0; color: #d1ddd4; font-size: 12px; }
.weather-details { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.weather-metric { display: flex; align-items: center; gap: 10px; }
.metric-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #ffffff38; border-radius: 50%; color: var(--mint); font-size: 13px; }
.weather-metric div { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 8px; color: #d1ddd4; font-size: 11px; }
.weather-metric strong { color: #fff; font-size: 12px; font-weight: 600; }
.weather-alerts { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 7px; }
.weather-alert { padding: 6px 9px; border: 1px solid #f2a49080; border-radius: 3px; background: #f2a49017; color: #ffd3c7; font-size: 11px; }
.news-section { padding-top: 39px; animation: enter 600ms 120ms ease both; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: 0; }
.news-actions { display: flex; align-items: center; gap: 8px; }
.language-button, .icon-button { display: inline-flex; height: 36px; align-items: center; justify-content: center; border: 1px solid #dfe6e1; border-radius: 4px; background: white; cursor: pointer; }
.language-button { gap: 8px; padding: 0 11px; font-size: 10px; font-weight: 700; letter-spacing: .5px; }
.language-button span { color: var(--coral); font-size: 14px; }
.icon-button { width: 36px; font-size: 21px; }
.icon-button:hover, .language-button:hover { border-color: #a7b8ad; }
.icon-button:disabled, .language-button:disabled { cursor: wait; opacity: .55; }
.feed-status { min-height: 18px; margin: 0 0 11px; color: var(--muted); font-size: 11px; }
.feed-status.is-error { color: #a24032; }
.category-list { border-top: 1px solid var(--line); }
.category { border-bottom: 1px solid var(--line); }
.category summary { display: grid; min-height: 59px; grid-template-columns: 1fr auto 24px; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.category summary::-webkit-details-marker { display: none; }
.category-name { font-family: var(--display); font-size: 16px; font-weight: 700; }
.category-count { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.category-arrow { color: var(--forest); font-size: 17px; text-align: right; transition: transform 180ms ease; }
.category[open] .category-arrow { transform: rotate(90deg); }
.article-list { padding: 0 0 8px; animation: reveal 220ms ease both; }
.news-item { padding: 15px 0 16px; border-top: 1px solid #e9eeea; }
.news-meta { display: flex; justify-content: space-between; gap: 8px; color: #8b9790; font-size: 10px; }
.news-source { color: #557064; font-weight: 700; }
.news-item h3 { margin: 7px 0 0; font-family: var(--display); font-size: 16px; font-weight: 700; line-height: 1.4; }
.news-excerpt { margin: 7px 0 0; color: #63736a; font-size: 12px; line-height: 1.6; }
.article-link { display: inline-block; margin-top: 9px; color: #416d58; font-size: 11px; font-weight: 700; text-decoration-color: #9fb6a7; text-underline-offset: 3px; }
.article-link:hover { color: var(--coral); }
.empty-state { padding: 12px 0; color: var(--muted); font-size: 12px; }
.source-note { margin: 16px 0 0; color: #8b9790; font-size: 10px; }
.settings-panel { margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.settings-panel > summary { display: flex; min-height: 56px; align-items: center; justify-content: space-between; cursor: pointer; font-family: var(--display); font-size: 15px; font-weight: 700; list-style: none; }
.settings-panel > summary::-webkit-details-marker { display: none; }
.settings-form { display: grid; gap: 9px; padding: 0 0 20px; }
.settings-label, .source-fieldset legend { font-size: 12px; font-weight: 700; }
.settings-form > input { min-height: 44px; padding: 0 12px; border: 1px solid #dce4de; border-radius: 4px; background: #fff; }
.source-fieldset { display: grid; gap: 8px; margin: 8px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 4px; }
.source-fieldset legend { padding: 0 5px; }
.source-option { display: flex; align-items: center; gap: 9px; color: #516259; font-size: 12px; }
.source-option input { width: 16px; height: 16px; accent-color: var(--forest); }
.settings-form .primary-button { width: 100%; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 39px; padding: 15px 0 22px; border-top: 1px solid var(--line); color: #8b9790; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.footer-dot { padding: 0 4px; color: var(--coral); }
@keyframes enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-panel { justify-content: flex-start; min-height: 74svh; padding: 30px 26px 35px; }
  .login-panel > .wordmark { margin-bottom: 58px; }
  .login-art { min-height: 26svh; padding: 20px 26px; }
  .sun-mark { top: -39px; right: 10%; width: 150px; }
  .art-caption { gap: 7px; }
  .art-caption strong { font-size: 31px; }
  .art-line { margin-top: 20px; }
  .art-index { position: absolute; top: 21px; right: 26px; }
  .dashboard { width: min(100% - 36px, 520px); }
  .topbar { height: 58px; padding: 0 18px; }
  .topbar .wordmark { font-size: 20px; }
  .topbar-place { font-size: 9px; }
  .welcome-row { align-items: flex-start; flex-direction: column; gap: 9px; padding: 31px 0 19px; }
  .welcome-row .eyebrow { font-size: 9px; }
  .welcome-row h1 { font-size: 28px; }
  .date-stamp { padding: 0; font-size: 11px; }
  .weather-panel { gap: 12px; padding: 20px 17px 17px; }
  .weather-temperature { font-size: 43px; }
  .weather-temperature span { font-size: 19px; }
  .weather-details { gap: 11px; }
  .weather-metric { gap: 7px; }
  .weather-metric div { align-items: flex-start; flex-direction: column; gap: 2px; font-size: 10px; }
  .weather-metric strong { font-size: 11px; }
  .metric-icon { width: 26px; height: 26px; flex: 0 0 26px; }
  .news-section { padding-top: 32px; }
  .section-heading h2 { font-size: 22px; }
  .category summary { min-height: 56px; }
  .page-footer { margin-top: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}