/* ==========================================
   Study Dashboard — style.css
   ========================================== */

:root {
  --bg:          #0f0e0d;
  --surface:     #191817;
  --surface-2:   #222020;
  --surface-3:   #2a2826;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.13);
  --accent:      #e8a020;
  --accent-dim:  rgba(232,160,32,0.14);
  --accent-text: #e8a020;
  --text:        #e4dfd7;
  --text-muted:  #8a857e;
  --text-dim:    #4e4b47;
  --green:       #4caf7d;
  --green-dim:   rgba(76,175,125,0.12);
  --red:         #e05c5c;
  --font:        'Sora', sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --r:           8px;
  --r-lg:        12px;
  --ease:        cubic-bezier(0.16,1,0.3,1);
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll; /* always reserve scrollbar gutter — prevents layout shift between tabs */
  /* Firefox */
  scrollbar-color: #2e2b28 transparent;
  scrollbar-width: thin;
}

/* WebKit custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #2e2b28;
  border-radius: 4px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #3d3a36; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--font); cursor: pointer; }

/* ── Hidden util ────────────────────────── */
.hidden { display: none !important; }

/* ── Buttons ────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0f0e0d;
  border: none;
  border-radius: var(--r);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn-primary:hover  { opacity: 0.88; }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 10px 20px;
  font-size: 14px;
  font-family: var(--font);
  transition: color .15s, border-color .15s, background .15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }

/* ── Home Screen ────────────────────────── */
#home-screen {
  min-height: 100vh;
  padding: 40px 24px 60px;
}

.home-inner {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.home-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding-top: 16px;
}

.home-glyph {
  font-size: 44px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.home-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.home-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.home-section-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--mono);
  margin-bottom: 14px;
}

.home-section-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 16px;
}

/* ── Collapsible sections ───────────────── */
.section-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: inherit;
}
.section-toggle .home-section-title { margin-bottom: 0; }
.section-toggle:hover .home-section-title { color: var(--text-muted); }

.section-chevron {
  font-size: 16px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
  transform: rotate(90deg); /* pointing down = open */
  line-height: 1;
}
[aria-expanded="false"] .section-chevron { transform: rotate(0deg); }

.section-body {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden; /* clips inner when collapsed */
  transition: grid-template-rows 0.3s var(--ease);
}
.section-body.collapsed { grid-template-rows: 0fr; }

/* padding-top on inner — gets clipped to 0 when wrapper collapses */
.section-body-inner { min-height: 0; padding-top: 14px; }

/* ── Plans Grid ─────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--plan-accent, var(--border-2));
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s, background .15s;
}
.plan-card:hover { background: var(--surface-2); }

.plan-card-body { flex: 1; }

.plan-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 5px;
}

.plan-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plan-open-btn {
  flex: 1;
  padding: 7px 12px;
  background: var(--plan-accent, var(--accent));
  color: #0f0e0d;
  border: none;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity .15s;
}
.plan-open-btn:hover { opacity: 0.85; }

.plan-del-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text-dim);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.plan-del-btn:hover {
  color: var(--red);
  border-color: rgba(224,92,92,0.4);
  background: rgba(224,92,92,0.08);
}

/* ── Load Panel ─────────────────────────── */
.load-panel {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.load-col {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.load-or {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--mono);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.load-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

.drop-zone {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px 16px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--text);
}

.drop-zone-icon {
  font-size: 20px;
  color: var(--text-dim);
  transition: color .15s;
}
.drop-zone:hover .drop-zone-icon,
.drop-zone.drag-over .drop-zone-icon { color: var(--accent); }

#file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.paste-ta {
  flex: 1;
  min-height: 88px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
  transition: border-color .15s;
}
.paste-ta:focus     { outline: none; border-color: var(--accent); }
.paste-ta::placeholder { color: var(--text-dim); }

/* ── Prompt Generator ───────────────────── */
.prompt-gen {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prompt-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.prompt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-field-wide { grid-column: 1 / -1; }

.prompt-field label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.prompt-field .optional {
  color: var(--text-dim);
  font-weight: 400;
}

.prompt-field input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  transition: border-color .15s;
}
.prompt-field input:focus        { outline: none; border-color: var(--accent); }
.prompt-field input::placeholder  { color: var(--text-dim); }

.prompt-field select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  transition: border-color .15s;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234e4b47' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.prompt-field select:focus { outline: none; border-color: var(--accent); }
.prompt-field select option { background: var(--surface-2); }

.prompt-gen-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.copy-confirm {
  font-size: 13px;
  color: var(--green);
  font-family: var(--mono);
}

/* ── Home Footer ────────────────────────── */
.home-footer {
  display: flex;
  justify-content: center;
  padding-bottom: 12px;
}

/* ── Header ─────────────────────────────── */
#header {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 16px 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.back-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.header-sep {
  width: 1px;
  height: 28px;
  background: var(--border-2);
  flex-shrink: 0;
}

#plan-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.plan-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Tabs Bar ───────────────────────────── */
.tabs-bar {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  background: rgba(15,14,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

#tabs-nav {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
#tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font);
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

.tab-icon {
  font-size: 11px;
  opacity: 0.7;
}

/* ── Content Area ───────────────────────── */
#content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Completion Banner ──────────────────── */
#completion-banner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.completion-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.completion-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.completion-glyph {
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
}

.completion-title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.completion-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.completion-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.completion-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.completion-footer-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.completion-tip {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Section base ───────────────────────── */
.section { width: 100%; }

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  font-family: var(--mono);
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: -8px;
}

/* ── Stats ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ── Cards ──────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-2); }
.card.card-accent {
  border-color: rgba(232,160,32,0.25);
  background: var(--accent-dim);
}

.card-tag {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--accent-text);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 2px 8px;
  align-self: flex-start;
  letter-spacing: 0.03em;
}

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.card-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Todo List ──────────────────────────── */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color .15s, opacity .2s;
  position: relative;
}
.todo-item:hover { border-color: var(--border-2); }
.todo-item.done  { opacity: 0.45; }
.todo-item.done .todo-text { text-decoration: line-through; }

.todo-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 2px 2px 0;
  background: var(--text-dim);
}
.todo-item.priority-high::before   { background: var(--red);    height: 70%; }
.todo-item.priority-medium::before { background: var(--accent); }
.todo-item.priority-low::before    { background: var(--text-dim); height: 40%; }

.todo-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
  margin-top: 1px;
}
.todo-check:hover { border-color: var(--accent); }
.done .todo-check {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.todo-check svg { width: 11px; height: 11px; color: var(--accent); }
.check-mark {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset .2s var(--ease);
}
.done .check-mark { stroke-dashoffset: 0; }

.todo-text {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.todo-tag {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-dim);
  background: var(--surface-2);
  border-radius: 4px;
  padding: 2px 8px;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: 2px;
}

.todo-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.todo-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.todo-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s var(--ease);
}
.todo-progress-label {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── Progress Bars ──────────────────────── */
.progress-row { margin-bottom: 16px; }
.progress-row:last-child { margin-bottom: 0; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.progress-label { font-size: 13px; color: var(--text); }

.progress-val  { font-size: 13px; font-family: var(--mono); color: var(--accent); }
.progress-max  { color: var(--text-dim); }

.progress-track {
  height: 5px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: height .15s;
}
.progress-track:hover { height: 7px; }

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .5s var(--ease);
}

/* ── Resources ──────────────────────────── */
.resource-item {
  display: flex;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 6px;
  transition: border-color .15s;
}
.resource-item:last-child { margin-bottom: 0; }
.resource-item:hover { border-color: var(--border-2); }

.resource-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.resource-tag {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--accent-text);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.resource-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: color .15s;
}
.resource-title:hover { color: var(--accent); text-decoration: none; }
.resource-title-plain { font-size: 13px; font-weight: 500; color: var(--text); }

.ext-arrow { font-size: 12px; color: var(--text-muted); transition: color .15s; }
.resource-title:hover .ext-arrow { color: var(--accent); }

.resource-desc { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ── Notes ──────────────────────────────── */
.notes-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: var(--r);
  padding: 16px 20px;
}

.notes-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.notes-content p:last-child { margin-bottom: 0; }

/* ── Milestones ─────────────────────────── */
.milestone-list {
  display: flex;
  flex-direction: column;
}

.milestone-item {
  display: flex;
  gap: 18px;
  transition: opacity .2s;
}

.milestone-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
}

.milestone-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: border-color .15s, background .15s, color .15s;
  cursor: pointer;
}
.milestone-dot:hover { border-color: var(--accent); color: var(--accent); }
.done .milestone-dot {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.milestone-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin: 4px 0;
  min-height: 20px;
}

.milestone-content { padding: 10px 0 24px; flex: 1; }

.milestone-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}
.done .milestone-title { color: var(--text-muted); text-decoration: line-through; }

.milestone-body { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── Rotation Grid ──────────────────────── */
.rotation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.rotation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s, background .15s;
}
.rotation-card:hover { border-color: var(--border-2); background: var(--surface-2); }

.rotation-label  { font-size: 13px; font-weight: 500; color: var(--text); }
.rotation-desc   { font-size: 12px; color: var(--text-muted); line-height: 1.55; flex: 1; }

.rotation-duration {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--accent-text);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 2px 8px;
  align-self: flex-start;
  margin-top: 4px;
}

/* ── Unknown type ───────────────────────── */
.unknown-type {
  font-size: 13px;
  color: var(--red);
  font-family: var(--mono);
  padding: 12px 16px;
  background: rgba(224,92,92,0.07);
  border: 1px solid rgba(224,92,92,0.2);
  border-radius: var(--r);
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 640px) {
  #home-screen  { padding: 24px 16px 40px; }
  .home-inner   { gap: 32px; }

  .load-panel   { flex-direction: column; }
  .load-or {
    padding: 8px 20px;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .prompt-fields    { grid-template-columns: 1fr; }
  .completion-fields { grid-template-columns: 1fr; }
  .plans-grid       { grid-template-columns: 1fr; }

  #content    { padding: 24px 16px 40px; gap: 24px; }
  #completion-banner { padding: 0 16px 60px; }
  .completion-inner  { padding: 24px; }
  .header-inner { padding: 14px 0; }
  #header     { padding: 0 16px; }
  .tabs-bar   { padding: 0 16px; }
  .tab-btn    { padding: 13px 12px; font-size: 12px; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .rotation-grid { grid-template-columns: 1fr 1fr; }
}
