* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", "Noto Sans KR", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: #ffffff;
  color: #111111;
  text-align: center;
  padding: 0 20px;
}

/* Top Navigation (formerly sidebar) */
.sidebar {
  width: 100%;
  max-width: 800px;
  padding: 40px 0 30px;
  margin-bottom: 20px;
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #000000;
  margin-bottom: 24px;
}

.sidebar-logo a {
  color: inherit;
  text-decoration: none;
}

.sidebar-logo .badge {
  font-size: 11px;
  font-weight: 400;
  color: #666666;
  margin-left: 8px;
}

.nav-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  row-gap: 8px;
  margin-bottom: 16px;
}

.nav-container a {
  color: #555555;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-container a:hover {
  color: #000000;
}

.nav-container a.active {
  font-weight: 700;
  color: #000000;
}

.nav-separator {
  color: #cccccc;
  font-size: 12px;
}

.langswitch {
  margin-top: 16px;
}

.langswitch select {
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
  border: none;
  background: transparent;
  color: #666666;
  cursor: pointer;
  outline: none;
  text-align: center;
  text-decoration: underline;
}

.langswitch select:hover {
  color: #000000;
}

/* Main Content Container */
.main {
  width: 100%;
  max-width: 680px;
  padding-bottom: 80px;
}

/* Typography Hierarchy */
h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #000000;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 48px 0 16px;
  color: #111111;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: #333333;
  margin: 32px 0 12px;
}

p {
  line-height: 1.8;
  font-size: 16px;
  color: #444444;
  margin: 0 0 24px;
  word-break: keep-all;
}

.lead {
  font-size: 18px;
  color: #222222;
  line-height: 1.8;
  margin-bottom: 48px;
}

ul, ol {
  padding-left: 0;
  list-style-position: inside;
  margin: 0 0 24px;
  text-align: left;
  display: inline-block; /* to center the block but keep left-aligned text */
  max-width: 100%;
}

li {
  font-size: 16px;
  color: #444444;
  line-height: 1.8;
  margin-bottom: 8px;
}

/* Quiz Specific Styling */
.quiz-box {
  text-align: center;
  margin-top: 20px;
}

.content h2 {
  font-size: 22px;
  margin: 0 0 32px;
  line-height: 1.5;
  color: #000000;
}

button.opt {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 12px;
  padding: 16px;
  font-size: 16px;
  font-weight: 400;
  font-family: inherit;
  background: transparent;
  color: #000000;
  border: 1px solid #dddddd;
  cursor: pointer;
  transition: all 0.2s ease;
}

button.opt:hover {
  border-color: #000000;
  background: #fcfcfc;
}

button.btn-primary,
a.btn-primary {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

button.btn-primary:hover,
a.btn-primary:hover {
  background: #333333;
  color: #ffffff;
}

progress {
  width: 100%;
  max-width: 400px;
  height: 2px;
  margin: 24px auto;
  display: block;
  border: none;
  background: #eeeeee;
}

progress::-webkit-progress-bar {
  background-color: #eeeeee;
}

progress::-webkit-progress-value {
  background-color: #000000;
}

#loadingtext {
  font-size: 14px;
  color: #666666;
}

table {
  border-collapse: collapse;
  margin: 32px auto;
  width: 100%;
  max-width: 320px;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #eeeeee;
  font-size: 15px;
  text-align: left;
  color: #444444;
}

td:last-child {
  text-align: right;
  font-family: monospace;
  color: #000000;
}

.total td {
  font-weight: bold;
  color: #000000;
  border-top: 1px solid #000000;
  border-bottom: none;
}

.revealtitle {
  font-size: 40px;
  font-weight: 800;
  margin: 8px 0 24px;
  color: #000000;
}

/* FAQ */
.faq-list {
  margin-top: 40px;
}

.faq-item {
  margin-bottom: 40px;
}

.faq-question {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
}

.faq-answer {
  font-size: 16px;
  color: #444444;
  line-height: 1.8;
  margin: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #000000;
  color: #ffffff;
  padding: 12px 24px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease-out;
  z-index: 9999;
  white-space: nowrap;
  font-family: inherit;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Utils */
.centered-text-block {
  text-align: center;
}
.meta-text {
  color: #888888;
  font-size: 14px;
  margin-bottom: 40px;
}
