/* =============================================================
   심화주제 탐구보고서 — 디자인 시스템
   Editorial Paper Tone (Beige + Charcoal + Orange)
   ============================================================= */

:root {
  /* === 베이스 컬러 (베이지 페이퍼 톤) === */
  --bg: #ECE1CF;
  --bg-soft: #F2EBDC;
  --bg-deep: #E3D6BE;
  --paper: #F7F0DF;

  /* === 텍스트 컬러 === */
  --ink: #1E1814;         /* 메인 다크 차콜 */
  --ink-soft: #3A312A;    /* 본문 진한 톤 */
  --muted: #74695C;       /* 보조 텍스트 그레이 */
  --muted-light: #9C8F7E;

  /* === 액센트 (오렌지) === */
  --accent: #D87933;
  --accent-hover: #C26721;
  --accent-soft: #F4D9BD;
  --accent-tint: #FBEAD5;

  /* === 상태 컬러 (페이퍼 톤에 맞춘 채도) === */
  --green: #4F7A3A;
  --green-soft: #E1E8CC;
  --yellow: #B07A1F;
  --yellow-soft: #F2E3BE;
  --red: #B0432E;
  --red-soft: #F1D4CB;
  --slate-soft: #DDD2BD;

  /* === 라인/구조 === */
  --line: #D4C7AE;
  --line-soft: #E0D5BD;
  --shadow-sm: 0 2px 8px rgba(30, 24, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(30, 24, 20, 0.08);
  --shadow-lg: 0 20px 48px rgba(30, 24, 20, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Pretendard', 'Pretendard Variable', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  /* 페이퍼 그레인 텍스처 - SVG noise */
  background-image:
    radial-gradient(ellipse at top, rgba(255, 250, 235, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(216, 121, 51, 0.05) 0%, transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  background-size: auto, auto, 220px 220px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   HEADER · NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(236, 225, 207, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 199, 174, 0.5);
}

.top-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  font-size: 16px;
}

.brand strong, .brand small { display: block; }
.brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.nav-actions {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(30, 24, 20, 0.06);
}

.nav-button {
  border: 0;
  padding: 9px 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-pill);
  letter-spacing: -0.01em;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-button:hover { color: var(--ink); }
.nav-button.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 12px rgba(30, 24, 20, 0.18);
}

/* ============================================================
   PAGE SHELL
   ============================================================ */

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 28px 90px;
}

/* ============================================================
   HERO
   ============================================================ */

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 56px 8px 48px;
  margin-bottom: 48px;
  border: 0;
  background: transparent;
  box-shadow: none;
  align-items: flex-end;
}
.hero-card > div { flex: 1; min-width: 0; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3, h4 {
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-weight: 800;
}
h1 {
  margin-bottom: 20px;
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 800;
}
h1 .hl { color: var(--accent); }
h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 36px);
}
h3 { margin-bottom: 16px; font-size: 19px; font-weight: 700; }
h4 { margin-bottom: 12px; font-size: 16px; font-weight: 700; }

.hero-description {
  max-width: 640px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.hero-description strong { color: var(--ink); font-weight: 700; }

.deadline-panel {
  min-width: 220px;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.deadline-panel::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.deadline-panel span {
  color: rgba(247, 240, 223, 0.7);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.deadline-panel strong {
  display: block;
  font-size: 40px;
  font-weight: 800;
  margin: 10px 0 6px;
  letter-spacing: -0.03em;
  color: var(--paper);
}
.deadline-panel small { color: rgba(247, 240, 223, 0.65); font-size: 12px; }

/* ============================================================
   SECTIONS
   ============================================================ */

.workspace-section { display: none; }
.workspace-section.active { display: block; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   CARDS
   ============================================================ */

.panel-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 20px;
}
.login-card { max-width: 520px; }

.muted-text { color: var(--muted); font-size: 14px; word-break: keep-all; line-height: 1.7; }
.help-text { color: var(--muted); font-size: 13px; margin-top: 4px; }
.optional-text { color: var(--muted-light); font-size: 12px; font-weight: 500; }

/* ============================================================
   FORMS
   ============================================================ */

.form-grid { display: grid; gap: 14px; }
.form-grid label, .inline-fieldset legend {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(255, 251, 240, 0.6);
  color: var(--ink);
  outline: none;
  font-size: 14.5px;
  transition: all .15s ease;
  font-family: inherit;
}
.form-grid select,
.filter-bar select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2374695C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: var(--muted-light);
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(216, 121, 51, 0.15);
}
.form-grid textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

.compact-form { gap: 12px; }

.inline-fieldset {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(255, 251, 240, 0.5);
  flex-wrap: wrap;
}
.inline-fieldset legend {
  padding: 0 8px;
  margin-left: -8px;
  font-size: 13px;
  color: var(--muted);
}
.inline-fieldset label {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  cursor: pointer;
}
.inline-fieldset input[type="radio"],
.inline-fieldset input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  letter-spacing: -0.01em;
  transition: all .18s ease;
  white-space: nowrap;
}

.primary-button {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 6px 16px rgba(30, 24, 20, 0.18);
}
.primary-button:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(30, 24, 20, 0.24);
}

.secondary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(216, 121, 51, 0.25);
}
.secondary-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(30, 24, 20, 0.06);
  color: var(--ink-soft);
  padding: 10px 16px;
  font-size: 13.5px;
}
.ghost-button:hover { background: rgba(30, 24, 20, 0.12); }

.full-width { width: 100%; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   STUDENT SUMMARY STRIP
   ============================================================ */

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 22px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.summary-strip div {
  padding: 22px 24px;
  border-right: 1px solid var(--line-soft);
}
.summary-strip div:last-child { border-right: 0; }
.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  word-break: keep-all;
}
.summary-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.card-title-row h3 { margin-bottom: 0; }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent-hover);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.warning { background: var(--yellow-soft); color: var(--yellow); }

/* ============================================================
   MILESTONE
   ============================================================ */

.milestone-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.date-input-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 251, 240, 0.5);
}
.date-input-card span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.date-input-card input {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-weight: 600;
}

.milestone-guide-list {
  padding-left: 0;
  margin: 0 0 20px;
  list-style: none;
}
.milestone-guide-list li {
  margin-bottom: 14px;
  padding-left: 22px;
  position: relative;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
.milestone-guide-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.milestone-guide-list strong { color: var(--ink); font-weight: 700; }

.notice-box {
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink-soft);
}
.notice-box strong { color: var(--accent-hover); display: block; margin-bottom: 6px; font-size: 13.5px; }
.notice-box p { margin: 0; font-size: 13.5px; line-height: 1.6; }

.update-grid {
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: start;
}
.update-grid button { grid-column: 2; justify-self: start; margin-top: 4px; }

/* ============================================================
   TIMELINE
   ============================================================ */

.timeline-list { display: grid; gap: 12px; }
.timeline-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(255, 251, 240, 0.6);
  transition: all .15s ease;
}
.timeline-item:hover {
  border-color: var(--line);
  background: #fff;
}
.timeline-item header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}
.timeline-item h4 { margin: 0; font-size: 14.5px; }
.timeline-item p {
  margin: 6px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
.timeline-item small { color: var(--muted); font-size: 12px; }

.empty-state {
  color: var(--muted);
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 251, 240, 0.3);
  text-align: center;
  font-size: 14px;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

/* ============================================================
   STATUS PILLS
   ============================================================ */

.status-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  margin-top: 6px;
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-pill.good { background: var(--green-soft); color: var(--green); }
.status-pill.good::before { background: var(--green); }
.status-pill.delay { background: var(--yellow-soft); color: var(--yellow); }
.status-pill.delay::before { background: var(--yellow); }
.status-pill.blocked { background: var(--red-soft); color: var(--red); }
.status-pill.blocked::before { background: var(--red); }
.status-pill.neutral { background: var(--slate-soft); color: var(--muted); }
.status-pill.neutral::before { background: var(--muted-light); }

/* ============================================================
   METRIC CARDS
   ============================================================ */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.metric-card {
  padding: 22px 22px 20px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-light);
}
.metric-card.green::after { background: var(--green); }
.metric-card.yellow::after { background: var(--yellow); }
.metric-card.red::after { background: var(--red); }
.metric-card.slate::after { background: var(--muted); }
.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  word-break: keep-all;
}
.metric-card strong {
  display: block;
  font-size: 38px;
  margin-top: 8px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}
.metric-card.green strong { color: var(--green); }
.metric-card.yellow strong { color: var(--yellow); }
.metric-card.red strong { color: var(--red); }
.metric-card.slate strong { color: var(--muted); }

/* ============================================================
   MILESTONE BARS
   ============================================================ */

.milestone-bars { display: grid; gap: 12px; }
.milestone-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 44px;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.milestone-bar-row strong { font-weight: 600; color: var(--ink); }
.milestone-track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(212, 199, 174, 0.5);
  overflow: hidden;
}
.milestone-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: inherit;
  transition: width .4s ease;
}

/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.filter-bar input,
.filter-bar select {
  padding: 11px 14px;
  font-size: 14px;
}
.filter-bar input[type="search"] { min-width: 240px; flex: 1; }

.checkbox-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  padding: 0 10px;
  cursor: pointer;
  word-break: keep-all;
}
.checkbox-filter input[type="checkbox"],
.checkbox-filter input[type="radio"] {
  width: auto;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
}

/* ============================================================
   PROGRESS TABLE
   ============================================================ */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--paper);
}
.progress-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}
.progress-table th,
.progress-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  word-break: keep-all;
}
.progress-table th {
  background: rgba(212, 199, 174, 0.18);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}
.progress-table tbody tr { transition: background .15s ease; }
.progress-table tbody tr:hover { background: rgba(216, 121, 51, 0.05); }
.progress-table tbody tr:last-child td { border-bottom: 0; }
.progress-table td strong { font-weight: 700; color: var(--ink); }
.table-topic {
  max-width: 240px;
  color: var(--ink-soft);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.small-muted {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

/* table buttons inside */
.progress-table .ghost-button {
  padding: 7px 12px;
  font-size: 12.5px;
}

/* ============================================================
   CHECK LIST (admin help)
   ============================================================ */

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  margin-bottom: 12px;
  padding-left: 26px;
  position: relative;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

/* ============================================================
   DIALOG
   ============================================================ */

.detail-dialog {
  width: min(980px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(30, 24, 20, 0.35);
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}
.detail-dialog::backdrop {
  background: rgba(30, 24, 20, 0.55);
  backdrop-filter: blur(4px);
}
.dialog-close-form {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 16px 16px 0;
  background: var(--paper);
  z-index: 2;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.icon-button {
  border: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: rgba(30, 24, 20, 0.06);
  color: var(--ink-soft);
  border-radius: 50%;
  transition: all .15s ease;
}
.icon-button:hover { background: rgba(30, 24, 20, 0.12); }
#student-detail-content { padding: 0 28px 28px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-box {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 251, 240, 0.5);
}
.detail-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  word-break: keep-all;
}
.comment-form { margin-top: 20px; }

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 20px 44px rgba(30, 24, 20, 0.3);
  transform: translateY(140%);
  transition: transform .25s ease;
  z-index: 100;
  font-size: 14px;
  font-weight: 500;
}
.toast.show { transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 980px) {
  .hero-card {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    padding: 40px 4px 32px;
  }
  .section-heading { flex-direction: column; align-items: stretch; }
  .two-column-layout { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-strip div:nth-child(2) { border-right: 0; }
  .summary-strip div:nth-child(1),
  .summary-strip div:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .update-grid { grid-template-columns: 1fr; }
  .update-grid button { grid-column: 1; }
  .deadline-panel { min-width: auto; }
}

@media (max-width: 640px) {
  .top-nav {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-actions { width: 100%; justify-content: stretch; }
  .nav-button { flex: 1; justify-content: center; padding: 10px 12px; }
  .page-shell { padding: 28px 18px 70px; }
  .hero-card { padding: 28px 0 24px; }
  h1 { font-size: 38px; }
  .panel-card { padding: 22px 20px; border-radius: var(--radius); }
  .summary-strip, .metric-grid, .milestone-date-grid, .detail-grid { grid-template-columns: 1fr; }
  .summary-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .summary-strip div:last-child { border-bottom: 0; }
  .filter-bar input[type="search"] { min-width: 100%; }
  .milestone-bar-row { grid-template-columns: 80px 1fr 36px; gap: 10px; font-size: 13px; }
  .deadline-panel strong { font-size: 32px; }
  .brand small { display: none; }
}

/* ============================================================
   STATUS DROPDOWN (Native-select replacement, paper tone)
   ============================================================ */
.status-dropdown { position: relative; }
.status-dropdown-native {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.status-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: rgba(255, 251, 240, 0.6);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  cursor: pointer;
  transition: all .15s ease;
  text-align: left;
}
.status-dropdown-trigger:hover { border-color: var(--muted-light); }
.status-dropdown-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(216, 121, 51, 0.15);
}
.status-dropdown-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  background: #fff;
}
.status-dropdown-trigger .status-pill { margin-top: 0; }

.status-dropdown-chevron {
  width: 12px;
  height: 8px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .15s ease;
}
.status-dropdown-trigger[aria-expanded="true"] .status-dropdown-chevron {
  transform: rotate(180deg);
}

.status-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.status-dropdown-menu[hidden] { display: none; }
.status-dropdown-menu li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background .12s ease;
}
.status-dropdown-menu li:hover,
.status-dropdown-menu li[data-highlighted="true"] {
  background: var(--accent-tint);
}
.status-dropdown-menu li[aria-selected="true"] {
  background: var(--accent-soft);
}
.status-dropdown-menu li[aria-selected="true"] .status-pill {
  font-weight: 800 !important;
}
.status-dropdown-menu li .status-pill { margin-top: 0; }
