:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --ink: #202327;
  --muted: #66707a;
  --panel: #ffffff;
  --line: #dce2e8;
  --accent: #1c7c64;
  --accent-strong: #0f5d4b;
  --warm: #c96f3d;
  --shadow: 0 18px 45px rgba(37, 48, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(28, 124, 100, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(201, 111, 61, 0.12), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: end;
  gap: 24px;
  min-height: 150px;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.search {
  display: grid;
  grid-template-columns: 1fr 88px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search input,
.search button {
  border: 0;
  font: inherit;
}

.search input {
  min-width: 0;
  padding: 0 18px;
  outline: none;
}

.search button {
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(280px, 0.9fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-top: 24px;
}

.panel,
.link-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-head,
.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.weather-body {
  margin-top: 18px;
}

.temperature {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.temperature strong {
  font-size: 44px;
  line-height: 0.9;
}

.temperature span {
  padding-top: 4px;
  color: var(--muted);
  font-size: 18px;
}

.weather-meta {
  color: var(--muted);
  line-height: 1.8;
}

.forecast {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.forecast-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  background: #f9fbfb;
  text-align: center;
}

.forecast-day b {
  display: block;
  font-size: 13px;
}

.forecast-day span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.news-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stocks-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stock-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfb;
}

.stock-item b,
.stock-item span {
  display: block;
}

.stock-item b {
  font-size: 15px;
}

.stock-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stock-values {
  text-align: right;
}

.stock-values strong {
  display: block;
  font-size: 18px;
}

.stock-item.up .stock-values,
.stock-item.up .stock-values span {
  color: #c43e32;
}

.stock-item.down .stock-values,
.stock-item.down .stock-values span {
  color: #16825d;
}

.news-item {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.news-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.news-item a {
  font-weight: 700;
  line-height: 1.45;
}

.news-item span {
  color: var(--muted);
  font-size: 13px;
}

.links-section {
  margin-top: 28px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.link-group {
  padding: 22px;
}

.link-group h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

.link-list {
  display: grid;
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 16px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid transparent;
  font-size: 18px;
  font-weight: 700;
}

.link-card:hover {
  border-color: rgba(28, 124, 100, 0.34);
  background: #fff;
}

.favicon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e7f1ee;
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 800;
}

.loading,
.empty {
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .dashboard-grid,
  .links-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1160px);
    padding-top: 18px;
  }

  .search {
    grid-template-columns: 1fr 72px;
  }

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

  .panel {
    padding: 18px;
  }
}
