:root {
  --bg: #09111f;
  --bg-soft: #111c31;
  --surface: rgba(11, 21, 39, 0.78);
  --surface-strong: rgba(18, 31, 56, 0.96);
  --surface-soft: rgba(20, 36, 62, 0.74);
  --line: rgba(148, 163, 184, 0.18);
  --ink: #e5eefc;
  --muted: #9db0cf;
  --brand: #62d0ff;
  --brand-strong: #7ef0c2;
  --positive: #7ef0c2;
  --negative: #ff8e8e;
  --warning: #ffd36e;
  --shadow: 0 26px 80px rgba(1, 5, 17, 0.38);
}

:root[data-theme="light"] {
  --bg: #eff5ff;
  --bg-soft: #d9e7ff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(242, 247, 255, 0.92);
  --line: rgba(15, 23, 42, 0.1);
  --ink: #0f172a;
  --muted: #50627d;
  --brand: #0057ff;
  --brand-strong: #008b6a;
  --positive: #008b6a;
  --negative: #dc3f59;
  --warning: #aa6d00;
  --shadow: 0 22px 60px rgba(76, 98, 135, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(98, 208, 255, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(126, 240, 194, 0.14), transparent 30%),
    linear-gradient(155deg, var(--bg), var(--bg-soft) 52%, #08101d);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(12px);
}

body::before {
  top: 8%;
  right: 5%;
  width: 220px;
  height: 220px;
  background: rgba(98, 208, 255, 0.16);
}

body::after {
  bottom: 6%;
  left: 4%;
  width: 280px;
  height: 280px;
  background: rgba(126, 240, 194, 0.11);
}

.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 22px 24px;
  border-radius: 32px;
}

.hero-topbar,
.panel-head,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.hero-topbar,
.panel-head {
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.section-kicker,
.summary-label {
  margin: 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-date {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.theme-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
  transform: translateY(-1px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
  margin-top: 16px;
}

.hero h1,
.panel-head h2,
.hero-summary h2 {
  margin: 0;
  font-family: "Iropke Batang", "Noto Serif KR", serif;
  line-height: 1.16;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  text-wrap: balance;
}

.hero-copy {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: 0.98rem;
}

.hero-actions {
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-summary,
.overview-card,
.index-card,
.bullet-card,
.watch-card {
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.hero-summary {
  padding: 18px;
  border-radius: 24px;
  align-self: stretch;
}

.hero-summary h2 {
  margin-top: 10px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.hero-summary p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.primary-button,
.secondary-link,
input,
select {
  border-radius: 18px;
  font: inherit;
}

.primary-button {
  min-height: 52px;
  padding: 14px 18px;
  border: 0;
  background: linear-gradient(135deg, var(--brand), #3f87ff);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(32, 88, 245, 0.24);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

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

.panel {
  padding: 24px;
  border-radius: 28px;
}

.flow-panel,
.calendar-panel {
  grid-column: span 4;
}

.insight-panel,
.indices-panel,
.sectors-panel,
.watch-panel {
  grid-column: span 8;
}

.policy-stack,
.pulse-strip,
.sector-list,
.bullet-stack,
.watch-list {
  display: grid;
}

.contact-form,
.policy-stack,
.bullet-stack,
.watch-list {
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(98, 208, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(98, 208, 255, 0.12);
}

textarea {
  resize: vertical;
  min-height: 132px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.overview-card {
  padding: 22px;
  border-radius: 22px;
}

.overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.overview-footnote {
  margin-top: 12px !important;
  font-size: 0.92rem;
}

.overview-card strong {
  color: var(--ink);
}

.pulse-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pulse-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.pulse-card p,
.index-card p,
.bullet-card p,
.watch-card p {
  margin: 0;
}

.analysis-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.analysis-card + .analysis-card {
  margin-top: 12px;
}

.analysis-card h3 {
  margin: 0;
  font-size: 1rem;
}

.analysis-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.66;
}

.pulse-card strong,
.index-value {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

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

.index-card {
  padding: 18px;
  border-radius: 20px;
}

.index-head,
.index-meta,
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.index-head {
  align-items: center;
}

.index-head h3,
.policy-block h3,
.watch-card h3 {
  margin: 0;
  font-size: 1rem;
}

.index-change,
.sector-change {
  font-weight: 700;
}

.is-up {
  color: var(--positive);
}

.is-down {
  color: var(--negative);
}

.is-flat {
  color: var(--warning);
}

.index-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.sector-list {
  gap: 12px;
}

.sector-row {
  display: grid;
  grid-template-columns: 124px 1fr auto;
  gap: 14px;
  align-items: center;
}

.sector-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.sector-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.bullet-card,
.watch-card,
.policy-block {
  padding: 16px;
  border-radius: 18px;
}

.bullet-card {
  background: var(--surface-soft);
}

.bullet-card p:last-child,
.policy-block p,
.watch-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.66;
}

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

.watch-card {
  min-height: 154px;
}

.watch-card strong {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand);
}

.guide-panel,
.site-footer {
  margin-top: 20px;
}

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

.popup-shell {
  width: min(780px, calc(100% - 24px));
  padding-top: 24px;
}

.popup-panel {
  animation: rise 0.35s ease-out both;
}

.popup-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.popup-footer {
  justify-content: flex-start;
}

.contact-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .flow-panel,
  .calendar-panel,
  .insight-panel,
  .indices-panel,
  .sectors-panel,
  .watch-panel {
    grid-column: span 12;
  }
}

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

  .hero,
  .panel {
    padding: 20px;
    border-radius: 24px;
  }

  .pulse-strip,
  .indices-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

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

  .site-footer {
    gap: 6px;
  }
}
