:root {
  color-scheme: light;
  --ink: #1c2421;
  --muted: #66726d;
  --line: #d8dfd6;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --green: #2f7d57;
  --leaf: #dfeee4;
  --amber: #c58b2b;
  --blue: #416f92;
  --coral: #b85f4a;
  --shadow: 0 18px 40px rgba(31, 45, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(223, 238, 228, 0.7) 0, rgba(251, 252, 248, 0) 260px),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

.main-nav {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.nav-button,
.category-tab,
.text-action {
  cursor: pointer;
}

.nav-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.nav-button.active {
  color: #fff;
  background: var(--green);
}

.update-box {
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.update-box span,
.metric span,
.panel-heading span,
.section-heading span,
.item-meta,
.source-list span,
.status-list span {
  color: var(--muted);
  font-size: 13px;
}

.update-box strong {
  font-size: 14px;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: stretch;
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 125, 87, 0.12), rgba(65, 111, 146, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
}

.home-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.home-copy h2 {
  max-width: 740px;
  font-size: 34px;
  line-height: 1.18;
}

.signal-panel {
  display: grid;
  gap: 0;
  padding: 18px;
  border: 1px solid rgba(47, 125, 87, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.signal-row {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.signal-row:first-child {
  padding-top: 0;
}

.signal-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

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

.signal-row strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 125, 87, 0.14);
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 8px;
}

.category-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.category-tab.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.metric {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric.primary {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.metric.primary span {
  color: rgba(255, 255, 255, 0.82);
}

.metric strong {
  font-size: 34px;
  line-height: 1;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 16px;
}

.chart-panel {
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel-heading,
.section-heading,
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.view-header {
  min-height: 112px;
  margin-bottom: 18px;
  padding: 20px 0 4px;
}

.view-header h2 {
  font-size: 30px;
}

.view-header > span {
  color: var(--muted);
  font-weight: 800;
}

.text-action {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #fff;
  font-weight: 800;
}

.text-action:hover {
  border-color: var(--green);
}

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

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 44px;
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ec;
}

.bar-fill {
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 18px;
}

.home-latest {
  margin-top: 18px;
}

.latest-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feed-list {
  margin-top: 18px;
}

.source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 16px;
}

.feed-column,
.side-column {
  min-width: 0;
}

.items-list,
.source-list,
.status-list {
  display: grid;
  gap: 12px;
}

.item-card,
.source-row,
.status-row,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.item-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.compact-card {
  align-content: space-between;
  min-height: 220px;
}

.compact-card h3 {
  font-size: 17px;
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.news {
  background: var(--blue);
}

.badge.plant_reviews {
  background: var(--green);
}

.badge.support {
  background: var(--amber);
}

.importance {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.item-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.item-card h3 a,
.item-card h3 span {
  color: var(--ink);
  text-decoration: none;
}

.item-card h3 a:hover {
  color: var(--green);
  text-decoration: underline;
}

.item-summary {
  color: #3f4a45;
  line-height: 1.55;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.item-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.open-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.open-link:hover {
  border-color: var(--green);
}

.open-link.disabled {
  color: var(--muted);
}

.mini-keyword {
  color: var(--muted);
  font-size: 12px;
}

.source-row,
.status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
}

.status-row {
  grid-template-columns: 1fr;
}

.compact {
  margin-top: 24px;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 920px) {
  .control-panel,
  .item-footer {
    align-items: stretch;
  }

  .item-footer {
    flex-direction: column;
  }

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

  .main-nav {
    width: 100%;
  }

  .home-hero,
  .control-panel,
  .home-grid,
  .content-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 620px) {
  .topbar {
    padding: 24px 16px 16px;
  }

  .layout {
    padding: 0 16px 36px;
  }

  h1 {
    font-size: 28px;
  }

  .category-tabs,
  .metrics {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 20px;
  }

  .home-copy h2 {
    font-size: 26px;
  }

  .latest-list {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 80px 1fr 36px;
  }
}

/* Greeno-inspired visual layer */
@font-face {
  font-family: "PoppinsLocal";
  src: url("./assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "PoppinsLocal";
  src: url("./assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 700;
}

@font-face {
  font-family: "PoppinsLocal";
  src: url("./assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 800;
}

:root {
  --ink: #15231d;
  --muted: #68776f;
  --line: #dce6dc;
  --paper: #f6faf2;
  --panel: #ffffff;
  --green: #2f8a1e;
  --deep-green: #083b24;
  --leaf: #e8f4df;
  --amber: #c99631;
  --blue: #174f72;
  --coral: #c85b46;
  --shadow: 0 24px 60px rgba(19, 55, 34, 0.11);
}

body {
  background:
    linear-gradient(180deg, rgba(246, 250, 242, 0.92), rgba(246, 250, 242, 0.98)),
    url("./assets/images/banner.jpg") center top / cover fixed,
    var(--paper);
  font-family: "PoppinsLocal", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: none;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(220, 230, 220, 0.86);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: grid;
  gap: 2px;
  justify-self: start;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-lockup h1 {
  font-size: 28px;
}

.brand-lockup:hover h1,
.brand-lockup:focus-visible h1 {
  color: var(--green);
}

.brand-lockup:focus-visible {
  outline: 3px solid rgba(47, 138, 30, 0.24);
  outline-offset: 6px;
}

.eyebrow {
  color: var(--green);
  letter-spacing: 0;
}

.main-nav {
  border-color: rgba(47, 138, 30, 0.2);
  background: #f7fbf4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.nav-button {
  color: #486155;
}

.nav-button.active {
  background: var(--green);
  box-shadow: 0 10px 24px rgba(47, 138, 30, 0.22);
}

.update-box {
  border-color: rgba(47, 138, 30, 0.18);
  background: #fff;
  box-shadow: 0 14px 30px rgba(19, 55, 34, 0.08);
}

.layout {
  max-width: 1240px;
  padding: 28px 24px 56px;
}

.home-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: center;
  padding: 54px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 43, 25, 0.94) 0%, rgba(9, 68, 38, 0.82) 48%, rgba(23, 89, 47, 0.4) 100%),
    url("./assets/images/banner.jpg") center / cover;
  box-shadow: 0 28px 80px rgba(8, 59, 36, 0.24);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -220px auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.home-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.home-copy .eyebrow {
  color: #aee28d;
}

.home-copy h2 {
  max-width: 760px;
  color: #fff;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.12;
}

.hero-subtitle {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  color: var(--deep-green);
  background: #fff;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.signal-panel {
  position: relative;
  z-index: 2;
  align-self: center;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.signal-row {
  border-color: rgba(255, 255, 255, 0.2);
}

.signal-row span {
  color: rgba(255, 255, 255, 0.7);
}

.signal-row strong {
  color: #fff;
}

.hero-plant {
  position: absolute;
  right: 28px;
  bottom: -58px;
  z-index: 1;
  width: min(36vw, 360px);
  opacity: 0.9;
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.metrics {
  gap: 16px;
}

.metric {
  position: relative;
  min-height: 134px;
  overflow: hidden;
  border: 0;
  box-shadow: 0 16px 40px rgba(25, 66, 42, 0.09);
}

.metric-link {
  cursor: pointer;
}

.metric-link::before {
  content: "보기";
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--green);
  background: rgba(47, 138, 30, 0.1);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.metric-link:hover,
.metric-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(25, 66, 42, 0.14);
}

.metric-link:hover::before,
.metric-link:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.metric-link.primary::before {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.metric-link:focus-visible {
  outline: 3px solid rgba(47, 138, 30, 0.28);
  outline-offset: 3px;
}

.metric::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -44px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(47, 138, 30, 0.08);
}

.metric.primary {
  background:
    linear-gradient(135deg, rgba(47, 138, 30, 0.94), rgba(8, 59, 36, 0.94)),
    var(--green);
}

.metric-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 10px;
}

.metric:not(.primary) .metric-icon {
  filter: saturate(0.9);
}

.metric strong {
  font-size: 38px;
  font-weight: 800;
}

.home-grid {
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  margin-top: 18px;
}

.chart-panel,
.item-card,
.source-row,
.status-row,
.empty-state,
.control-panel {
  border: 0;
  box-shadow: 0 16px 40px rgba(25, 66, 42, 0.08);
}

.chart-panel {
  min-height: 235px;
}

.bar-track {
  background: #eef3ea;
}

.keyword {
  border-color: #e3eadf;
  background: #f9fcf6;
}

.home-latest {
  margin-top: 26px;
}

.section-heading h2,
.panel-heading h2 {
  font-weight: 800;
}

.latest-list {
  gap: 18px;
}

.compact-card {
  min-height: 316px;
  padding: 0;
  overflow: hidden;
}

.compact-card > .item-top,
.compact-card > h3,
.compact-card > .item-footer {
  margin-left: 18px;
  margin-right: 18px;
}

.compact-card > .item-top {
  margin-top: 16px;
}

.compact-card > .item-footer {
  margin-bottom: 18px;
}

.compact-image {
  height: 118px;
  background-position: center;
  background-size: cover;
}

.item-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(25, 66, 42, 0.12);
}

.badge {
  border-radius: 8px;
}

.badge.news {
  background: var(--blue);
}

.badge.plant_reviews {
  background: var(--green);
}

.badge.support {
  background: var(--amber);
}

.open-link,
.text-action {
  border-color: #dce9d8;
  box-shadow: 0 8px 20px rgba(25, 66, 42, 0.05);
}

.view-header {
  min-height: 136px;
  padding: 30px 0 8px;
}

.view-header h2 {
  font-weight: 800;
}

.control-panel {
  background: #fff;
}

.category-tab.active {
  background: var(--green);
}

@media (max-width: 920px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }

  .main-nav,
  .update-box {
    width: 100%;
  }

  .layout {
    padding: 18px 16px 42px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 30px 22px;
  }

  .home-copy h2 {
    font-size: 34px;
  }

  .hero-plant {
    display: none;
  }

  .signal-panel {
    max-width: none;
  }

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

@media (max-width: 620px) {
  .brand-lockup h1 {
    font-size: 25px;
  }

  .home-copy h2 {
    font-size: 29px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
