:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #edf4f1;
  --surface-3: #f9fbfb;
  --text: #17201d;
  --muted: #66736f;
  --line: #d8e1dd;
  --green: #1f7a5a;
  --green-dark: #15533f;
  --amber: #e4a33f;
  --blue: #315f8f;
  --red: #b24b46;
  --shadow: 0 18px 45px rgba(24, 42, 36, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

img,
svg {
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--green-dark);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 30px;
  align-items: center;
  padding: 44px 0 32px;
}

.portal-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.78fr);
  padding-bottom: 22px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.24;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.lead {
  max-width: 740px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

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

.button.secondary {
  background: #fff;
}

.hero-visual {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.compact-visual {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 250px;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.market-strip div {
  display: grid;
  gap: 4px;
  min-height: 106px;
  padding: 18px;
  background: var(--surface);
}

.market-strip span,
.market-strip small {
  color: var(--muted);
  line-height: 1.45;
}

.market-strip span {
  font-size: 13px;
  font-weight: 800;
}

.market-strip strong {
  color: var(--green-dark);
  font-size: 25px;
  line-height: 1.1;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.portal-main {
  min-width: 0;
}

.portal-sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 14px;
}

.tool-shell {
  padding: 0 0 18px;
}

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

.panel,
.content-band,
.article-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel {
  padding: 22px;
}

.primary-panel {
  min-height: 460px;
}

.panel-title-row,
.section-head,
.split {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.panel-title-row {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.filter-button {
  min-width: 58px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

.event-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.event-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 130px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.event-date {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.event-date strong {
  color: var(--text);
  font-size: 20px;
}

.event-title {
  margin-bottom: 6px;
  font-weight: 850;
}

.event-desc {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
}

.panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-foot a,
.text-link {
  color: var(--green);
  font-weight: 850;
}

.compact-table {
  margin-top: 0;
}

.compact-table table {
  min-width: 620px;
}

.tax-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.tax-list div {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-2);
}

.tax-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.tax-list dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 850;
}

.notice,
.summary-box {
  margin: 0;
  padding: 14px;
  border-left: 4px solid var(--amber);
  background: #fff8ea;
  color: #66532b;
  line-height: 1.65;
}

.content-band {
  margin: 18px 0;
  padding: 28px;
}

.section-head {
  align-items: end;
  margin-bottom: 22px;
}

.section-head p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.feature-card,
.article-list a,
.account-cards article,
.source-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.feature-card {
  display: grid;
  align-content: start;
  min-height: 210px;
  padding: 18px;
}

.feature-card span {
  color: var(--green);
  font-weight: 900;
}

.feature-card p,
.article-list span,
.split p,
.account-cards p,
.article-meta,
.article-page li,
.article-page p {
  color: var(--muted);
  line-height: 1.75;
}

.split {
  align-items: center;
}

.split > div:first-child {
  max-width: 520px;
}

.mini-calc,
.calc-card {
  display: grid;
  gap: 14px;
  min-width: min(100%, 420px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.sidebar-calc {
  min-width: 0;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

output {
  display: block;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 900;
}

.sidebar-calc output {
  background: var(--surface-2);
}

.article-list {
  display: grid;
  gap: 10px;
}

.article-list a {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.side-link-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.side-link-list a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--green-dark);
  font-weight: 850;
  line-height: 1.45;
}

.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed #b9c6c1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 244, 241, 0.88), rgba(255, 255, 255, 0.95)),
    var(--surface-2);
  color: var(--muted);
  text-align: center;
}

.ad-placeholder span {
  color: var(--text);
  font-weight: 900;
}

.ad-placeholder small {
  display: block;
  margin-top: 5px;
}

.article-page {
  max-width: 920px;
  margin: 30px auto;
  padding: 34px;
}

.article-page h1 {
  max-width: 820px;
  font-size: clamp(32px, 4.4vw, 52px);
}

.article-page h2 {
  margin-top: 34px;
  margin-bottom: 12px;
}

.article-page h3 {
  margin-top: 24px;
}

.article-page ul,
.article-page ol {
  padding-left: 22px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 22px;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.info-grid,
.account-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-card,
.account-cards article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.source-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.source-list li {
  padding: 12px;
}

.source-list a {
  color: var(--green);
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  gap: 14px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero,
  .dashboard-grid,
  .portal-layout,
  .feature-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

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

  .portal-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .panel-title-row,
  .section-head,
  .split,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .pill {
    justify-self: start;
  }

  .article-page {
    padding: 24px 18px;
  }

  .account-cards {
    grid-template-columns: 1fr;
  }

  .portal-sidebar,
  .market-strip {
    grid-template-columns: 1fr;
  }

  .market-strip div {
    min-height: auto;
  }
}
