:root {
  color-scheme: light;
  --ink: #14231f;
  --muted: #5e6f68;
  --paper: #f6f7f2;
  --surface: #ffffff;
  --line: #dce3dc;
  --green: #0f6b4f;
  --green-dark: #084a37;
  --lime: #d9f65a;
  --warning: #fff7d6;
  --shadow: 0 18px 50px rgba(20, 35, 31, 0.08);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--green-dark); }
button.secondary {
  color: var(--green);
  background: transparent;
}
:focus-visible {
  outline: 3px solid #ffb000;
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-decoration: none;
}
.official-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { color: var(--muted); font-weight: 700; text-decoration: none; }
.site-header nav a:hover { color: var(--green); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.brand-banner { margin: 0 0 28px; }
.home-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  object-fit: contain;
  box-shadow: var(--shadow);
}
.brand-banner figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: .78rem;
  text-align: right;
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  padding: clamp(64px, 10vw, 120px) clamp(28px, 7vw, 88px);
  border-radius: 32px;
  color: #f5fff9;
  background:
    radial-gradient(circle at 85% 25%, rgba(217, 246, 90, 0.38), transparent 20%),
    linear-gradient(135deg, #063e30, #14765a 60%, #1e8d67);
  box-shadow: var(--shadow);
}
.hero::after {
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 50%;
  content: "";
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.hero .eyebrow { color: var(--lime); }
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.2rem, 5.7vw, 4.8rem);
  line-height: 1.13;
  letter-spacing: -0.055em;
}
.hero > p:not(.eyebrow) { max-width: 610px; margin: 28px 0; color: #dcefe6; font-size: 1.1rem; }
.hero .button { color: var(--ink); background: var(--lime); border-color: var(--lime); }

.trial-note {
  margin: 28px 0;
  padding: 16px 20px;
  border: 1px solid #eadb8c;
  border-radius: 14px;
  background: var(--warning);
}
.content-section { padding: 72px 0 96px; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -0.04em; }
.section-heading.compact h2 { font-size: 1.7rem; }
.status { min-height: 1.7em; color: var(--muted); }
.card-grid, .inbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.content-card, .inbox-card, .panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.content-card h3, .inbox-card h3 { margin: 5px 0 12px; font-size: 1.35rem; line-height: 1.35; }
.topic, .candidate-meta { margin: 0; color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .08em; }
.description { color: var(--muted); overflow-wrap: anywhere; }
.card-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.card-link { color: var(--green); font-weight: 800; }
.allowed-actions { margin-bottom: 0; color: var(--muted); font-size: .86rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px max(20px, calc((100% - 1180px) / 2));
  color: #cfe2d9;
  background: var(--ink);
}

.workbench-shell { padding-bottom: 80px; }
.login-panel { max-width: 760px; margin: 40px auto; }
.security-note { padding-left: 14px; border-left: 3px solid var(--lime); color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.workspace { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(380px, 1.2fr); gap: 24px; align-items: start; }
.dashboard-panel { grid-column: 1 / -1; order: -1; }
.candidate-panel { grid-column: 1 / 2; }
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.dashboard-metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf7;
}
.dashboard-metric span,
.dashboard-metric strong,
.dashboard-metric small { display: block; }
.metric-label { color: var(--muted); font-size: .78rem; font-weight: 850; }
.metric-value { margin: 4px 0; color: var(--green-dark); font-size: 1.8rem; line-height: 1.2; overflow-wrap: anywhere; }
.metric-value.unknown { font-size: .95rem; line-height: 1.45; }
.dashboard-boundary {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--lime);
  color: var(--muted);
  background: #f4f7ec;
}
.dashboard-focus-panel {
  margin: 24px 0;
  padding: 22px;
  border-radius: 16px;
  color: #f4fff9;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}
.dashboard-focus-panel .eyebrow { color: var(--lime); }
.dashboard-focus-panel h3,
.dashboard-focus-panel p { margin: 4px 0; }
.dashboard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.dashboard-search { flex: 1; margin: 0; }
.view-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.view-toggle button { min-height: 42px; }
.view-toggle button.selected { color: #fff; background: var(--green); }
.dashboard-results.board-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.dashboard-results.list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.dashboard-card {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
  text-align: left;
}
.dashboard-card:hover { color: var(--ink); background: #f5f9f5; border-color: #a9bcae; }
.dashboard-card h3 { margin: 7px 0 12px; font-size: 1.15rem; line-height: 1.35; overflow-wrap: anywhere; }
.category-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #e8f2eb;
  font-size: .74rem;
  font-weight: 800;
}
.next-action { margin-bottom: 0; font-weight: 750; }
.dashboard-results.list-view .dashboard-card { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(180px, 1.2fr) auto minmax(180px, 1fr); align-items: center; gap: 12px; }
.dashboard-results.list-view .dashboard-card .description { display: none; }
.dashboard-detail {
  width: min(720px, calc(100% - 32px));
  max-width: 720px;
  max-height: calc(100vh - 48px);
  padding: 28px;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(20, 35, 31, .28);
}
.dashboard-detail::backdrop { background: rgba(5, 25, 19, .55); }
.close-button { float: right; }
.candidate-detail h2 { padding-right: 80px; overflow-wrap: anywhere; }
.detail-boundary { padding: 12px 14px; border-left: 3px solid var(--lime); background: #f4f7ec; }
.detail-grid { display: grid; grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr); gap: 8px 16px; }
.detail-grid dt { color: var(--muted); font-weight: 800; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.candidate-edit-form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.candidate-edit-form label { margin-top: 14px; }
.candidate-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.candidate-edit-status { margin-bottom: 0; overflow-wrap: anywhere; }
button:disabled { cursor: wait; opacity: .62; }
.standards-panel { grid-column: 1 / -1; }
.standards-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.standards-group {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf7;
}
.standards-group h3 { margin: 0 0 8px; font-size: 1rem; }
.standards-group p { margin: 6px 0; }
.code-list { color: var(--green-dark); font-size: .88rem; font-weight: 800; overflow-wrap: anywhere; }
.standards-sources { grid-column: span 2; }
.standards-sources ul { margin: 0; padding-left: 1.2rem; }
.standards-sources li + li { margin-top: 8px; }
.standards-limit {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--lime);
  color: var(--muted);
  background: #f4f7ec;
}
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
label { display: block; margin: 18px 0 7px; font-weight: 800; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #b8c5bd;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; }
#candidate-form button { margin-top: 20px; }
code { padding: .1em .35em; border-radius: 5px; background: #edf0eb; }

@media (max-width: 720px) {
  .site-header { width: min(100% - 28px, 1180px); padding: 18px 0; }
  .brand { gap: 7px; font-size: 1.05rem; }
  .official-logo { width: 38px; height: 38px; }
  .site-header nav { gap: 12px; font-size: .9rem; }
  main { width: min(100% - 28px, 1180px); }
  .home-banner { border-radius: 14px; }
  .brand-banner figcaption { font-size: .68rem; line-height: 1.5; text-align: left; }
  .hero { min-height: 430px; padding: 58px 24px; border-radius: 22px; }
  .hero h1 br { display: none; }
  .content-section { padding: 48px 0 64px; }
  .workspace { grid-template-columns: 1fr; }
  .candidate-panel { grid-column: 1; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .view-toggle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view-toggle button { padding-inline: .55rem; }
  .dashboard-results.list-view .dashboard-card { display: block; }
  .dashboard-detail { max-height: calc(100vh - 24px); padding: 20px; }
  .detail-grid { grid-template-columns: 1fr; gap: 2px; }
  .detail-grid dd { margin-bottom: 10px; }
  .standards-content { grid-template-columns: 1fr; }
  .standards-sources { grid-column: auto; }
  .inline-form { grid-template-columns: 1fr; }
  .heading-row { align-items: flex-start; }
  footer { flex-direction: column; }
}
