/* ==== Global Theme & Typography ==== */
:root {
  --accent: #34d399; /* emerald-400 */
  --accent-dark: #059669; /* emerald-600 */
  --warn: #f59e0b; /* amber-500 */
  --bg-main: #020617; /* slate-950 */
  --bg-card: rgba(30, 41, 59, 0.5); /* slate-800 with transparency */
  --border-color: rgba(148, 163, 184, 0.2);
  --text-main: #e2e8f0; /* slate-200 */
  --text-muted: #94a3b8; /* slate-400 */
  --text-heading: #f1f5f9; /* slate-100 */
}

body {
  background-color: var(--bg-main);
  background-image:
    radial-gradient(circle at 1% 1%, rgba(52, 211, 153, 0.15) 0, transparent 40%),
    radial-gradient(circle at 99% 99%, rgba(59, 130, 246, 0.15) 0, transparent 40%);
  font-family: "Noto Sans KR", system-ui, -apple-system, Segoe UI, Roboto, "Apple SD Gothic Neo", sans-serif;
  color: var(--text-main);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: white;
  text-decoration: underline;
}

main h1, main h2, main h3 {
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}
main h1 { font-size: 2.25rem; line-height: 1.2; }
main h2 { font-size: 1.5rem; margin-top: 2.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); }
main h3 { font-size: 1.25rem; margin-top: 2rem; }

/* ==== Main Layout & Components ==== */
.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.sitemap-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.7);
}
.sitemap-card {
  width: min(980px, 92vw);
  max-height: 85vh;
  overflow: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.sitemap-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
}
.sitemap-item a {
  color: #f8fafc;
  font-weight: 600;
  text-decoration: none;
}
.sitemap-item a:hover {
  text-decoration: underline;
}
.sitemap-item .desc {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.3;
}

.hero {
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  background: none;
  border: none;
  text-align: center;
}
.hero h1 {
  color: transparent;
  background: linear-gradient(90deg, white, #a7f3d0);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 1rem auto 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .3);
  border-color: rgba(52, 211, 153, 0.3);
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  background: rgba(255, 255, 255, .05);
  font-weight: 500;
}

.notice {
  padding: 1rem;
  border-radius: 0.75rem;
  margin: 1rem 0;
  border-left-width: 4px;
  background-color: rgba(30, 41, 59, 0.8);
}
.notice.ok {
  border-color: var(--accent);
  background-color: rgba(52, 211, 153, 0.1);
}
.notice.warn {
  border-color: var(--warn);
  background-color: rgba(245, 159, 11, 0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.table th, .table td {
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  text-align: left;
}
.table th {
  background: rgba(255, 255, 255, .05);
  font-weight: 600;
  color: var(--text-main);
}
.table tr:last-child td {
  border-bottom: none;
}

details.details-box {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  margin-top: 1rem;
  transition: background-color 0.2s ease;
}
details.details-box[open] {
  background-color: rgba(255, 255, 255, 0.03);
}
details.details-box summary {
  padding: 1rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.details-content {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px solid var(--border-color);
}
.details-content p { margin-top: 0.5rem; }

/* Flowchart Styles */
.flowchart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
@media (min-width: 768px) {
    .flowchart-container {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 0;
    }
}
.flow-step {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (min-width: 768px) {
    .flow-step { width: auto; flex: 1; }
}
.flow-step span { font-weight: 700; }
.flow-step small { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.flow-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flow-step.warn {
    background-color: rgba(245, 159, 11, 0.1);
    border-color: rgba(245, 159, 11, 0.4);
}
.flow-step.ok {
    background-color: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.4);
}
