:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1ea;
  color: #161616;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 234, 0.92)),
    repeating-linear-gradient(115deg, rgba(80, 68, 52, 0.04) 0 1px, transparent 1px 88px);
}

button,
input,
select {
  font: inherit;
}

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

.masthead {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  align-items: end;
  gap: 28px;
  padding: 16px 0 24px;
}

.brand {
  color: inherit;
  text-decoration: none;
  letter-spacing: 0;
}

.brand span {
  display: block;
  color: #a3342b;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(42px, 5vw, 82px);
  line-height: 0.95;
}

.tagline {
  margin: 0;
  max-width: 640px;
  color: #55504a;
  font-size: 18px;
  line-height: 1.5;
}

.searchbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 210px 210px;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8d2c6;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(10px);
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: #756e64;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc7ba;
  border-radius: 0;
  padding: 0 13px;
  background: #fff;
  color: #161616;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #a3342b;
  outline-offset: 2px;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 2fr) minmax(240px, 1fr);
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.panel {
  min-height: 640px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
}

.feed {
  background: rgba(255, 255, 255, 0.92);
}

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

.panel-head p {
  order: 2;
  margin: 0;
  color: #817970;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  text-transform: uppercase;
}

.panel-head h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.05;
}

.stack {
  display: grid;
  gap: 12px;
}

.news-stack {
  gap: 14px;
}

.news-card {
  border: 1px solid #ded8cd;
  padding: 16px;
  background: #fff;
}

.feed .news-card {
  padding: 20px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-row span,
.topic {
  border: 1px solid #ddd5ca;
  padding: 4px 8px;
  color: #5e574f;
  font-size: 12px;
  font-weight: 700;
}

.source {
  color: #a3342b !important;
}

.news-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.feed .news-card h2 {
  font-size: 22px;
}

.summary,
.importance,
.detail {
  margin: 10px 0 0;
  color: #4f4a44;
  line-height: 1.7;
}

.importance {
  color: #232323;
  font-weight: 700;
}

.detail {
  display: none;
  border-top: 1px solid #ebe6dd;
  padding-top: 10px;
  color: #5f584f;
}

.news-card.is-open .detail {
  display: block;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.card-actions button,
.card-actions a {
  border: 1px solid #161616;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #161616;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.card-actions .topic {
  margin-left: auto;
  border-color: transparent;
  background: #f4f1ea;
}

.source-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.source-strip div {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.82);
}

.source-strip span {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.source-strip small {
  color: #6f675d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.empty {
  border: 1px dashed #cfc7ba;
  padding: 18px;
  color: #70685e;
  line-height: 1.6;
  background: #fff;
}

@media (max-width: 1080px) {
  .searchbar {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 1440px);
    padding-top: 20px;
  }

  .masthead,
  .searchbar,
  .source-strip {
    grid-template-columns: 1fr;
  }

  .brand strong {
    font-size: 46px;
  }

  .panel {
    padding: 18px;
  }

  .panel-head {
    display: block;
  }

  .panel-head p {
    margin-top: 6px;
    text-align: left;
  }
}
