/* Community board and privacy page. Colors and type match the lecture page (public/index.html). */
:root {
  --navy: #102238;
  --navy-2: #19344e;
  --ink: #17212b;
  --muted: #5e6a76;
  --cream: #f7f3ea;
  --paper: #fffdf8;
  --line: #d9d5cc;
  --terracotta: #bf6049;
  --terracotta-soft: #f4e2dc;
  --teal: #247773;
  --teal-soft: #dceeed;
  --gold: #d7a444;
  --gold-soft: #f6ead0;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(16, 34, 56, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 9% 4%, rgba(215, 164, 68, .14), transparent 28rem), var(--cream);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
  word-break: keep-all;
}
a { color: var(--teal); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--navy); line-height: 1.3; letter-spacing: -.03em; }
h1 { margin: 0 0 10px; font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { margin: 0 0 12px; font-size: 1.3rem; }
p { margin: 0 0 12px; }
.small { font-size: .88rem; }

.topbar { position: sticky; top: 0; z-index: 10; background: rgba(16, 34, 56, .95); }
.topbar-inner {
  width: min(960px, calc(100% - 32px)); min-height: 60px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { color: var(--white); font-weight: 850; letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .88rem; font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.topnav a:hover, .topnav a:focus-visible { color: var(--white); background: rgba(255, 255, 255, .1); outline: none; }

.wrap { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 80px; }
.intro { margin-bottom: 22px; }
.kicker { margin: 0 0 4px; color: var(--terracotta); font-size: .78rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 680px; }
.crumbs { margin-bottom: 14px; color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); padding: 18px 0; }

.panel, .post {
  margin: 0 0 24px; padding: 26px; background: var(--paper);
  border: 1px solid rgba(16, 34, 56, .09); border-radius: 18px; box-shadow: var(--shadow);
}
.message { max-width: 640px; }
.message blockquote { margin: 0 0 14px; padding: 12px 16px; border-left: 4px solid var(--line); background: var(--cream); border-radius: 0 10px 10px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.inline { display: inline; margin: 0; }

.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer;
  color: var(--white); background: var(--navy); font: inherit; font-size: .92rem; font-weight: 800; text-decoration: none;
}
.btn:hover, .btn:focus-visible { background: var(--terracotta); outline: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { color: var(--navy); background: var(--white); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--white); background: var(--navy); }
.btn.danger { background: #a3392a; }
.btn.small { padding: 6px 12px; font-size: .8rem; }

.flash { margin: 0 0 18px; padding: 14px 18px; border-radius: 14px; background: var(--teal-soft); color: #155b58; font-weight: 700; }
.form-error { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--terracotta-soft); color: #93402e; font-weight: 700; }
.form-intro, .form-note { color: var(--muted); font-size: .93rem; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.filters a { padding: 7px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--navy); text-decoration: none; font-size: .88rem; font-weight: 800; }
.filters a[aria-current="page"] { color: var(--white); background: var(--navy); border-color: var(--navy); }

.post-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.post-card { padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.post-card.pinned { border-color: var(--gold); background: #fffaf0; }
.post-card h2 { margin: 6px 0 6px; font-size: 1.12rem; }
.post-card h2 a { color: var(--navy); text-decoration: none; }
.post-card h2 a:hover { color: var(--terracotta); }
.excerpt { margin: 0 0 6px; color: var(--ink); font-size: .93rem; }
.meta { margin: 0; color: var(--muted); font-size: .85rem; }
.pager { display: flex; justify-content: space-between; margin: 0 0 28px; font-weight: 800; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 850; background: var(--teal-soft); color: var(--teal); }
.badge.kind-question { background: var(--teal-soft); color: var(--teal); }
.badge.kind-feedback { background: var(--gold-soft); color: #7b5511; }
.badge.kind-idea { background: var(--terracotta-soft); color: #93402e; }
.badge.instructor { background: var(--navy); color: var(--white); }
.badge.answered { background: #e3f1e6; color: #2d6a3c; }
.badge.pin { background: var(--gold); color: var(--navy); }
.badge.status-pending { background: #eceae4; color: var(--muted); }
.badge.status-hidden { background: #f3d9d4; color: #93402e; }
.badge.status-visible { background: #e3f1e6; color: #2d6a3c; }

.post h1 { margin-top: 10px; }
.post .meta { margin-bottom: 16px; }
.text p { margin: 0 0 12px; }
.replies { margin: 0 0 24px; }
.reply-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.reply { padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.reply.instructor { border: 2px solid var(--navy); background: #f4f7fb; }
.reply .meta { margin-bottom: 8px; }

form .field { display: block; margin: 0 0 14px; }
form .field span { display: block; margin-bottom: 5px; color: var(--navy); font-size: .9rem; font-weight: 800; }
form .field em { color: var(--muted); font-style: normal; font-weight: 600; }
input[type="text"], input[type="email"], input:not([type]), textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #c9c4b8; border-radius: 10px; background: var(--white);
  color: var(--ink); font: inherit; font-size: 1rem;
}
input:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kinds { border: 0; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kinds legend { width: 100%; margin-bottom: 6px; color: var(--navy); font-size: .9rem; font-weight: 800; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 800; font-size: .9rem; cursor: pointer; }
.chip input:checked + span { color: var(--white); background: var(--navy); border-color: var(--navy); }
.chip input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: .9rem; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: 0 0 auto; }
.consent { padding: 12px 14px; border-radius: 12px; background: var(--cream); color: var(--muted); font-size: .84rem; }
.cf-turnstile { margin: 6px 0 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.admin-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.admin-bar form { margin: 0; }
.admin-bar strong { margin-right: 4px; color: var(--terracotta); font-size: .82rem; }
.small-bar { margin-top: 8px; padding-top: 8px; }
details.danger summary { cursor: pointer; color: #a3392a; font-size: .82rem; font-weight: 800; padding: 6px 4px; }
details.danger form { margin-top: 6px; }
.instructor-panel { border: 2px solid var(--navy); }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.row-title { margin: 6px 0 2px; font-weight: 800; }

.footer { color: rgba(255, 255, 255, .72); background: var(--navy); padding: 36px 16px; }
.footer-inner { width: min(960px, 100%); margin: 0 auto; }
.footer strong { color: var(--white); }
.footer a { color: #cfe8e6; }

/* Privacy page */
.doc h2 { margin-top: 26px; }
.doc ul { padding-left: 1.2rem; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .92rem; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { color: var(--navy); background: var(--cream); }

@media (max-width: 640px) {
  .wrap { width: min(100% - 24px, 960px); padding-top: 24px; }
  .panel, .post { padding: 20px 16px; border-radius: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .brand { font-size: .9rem; }
  .doc table { display: block; overflow-x: auto; }
}
