﻿:root {
  --bg: #f4efe4;
  --card: #fffdf8;
  --ink: #211b17;
  --muted: #6f6258;
  --line: #dccfbe;
  --accent: #146a52;
  --accent-2: #c46833;
  --danger: #a64137;
  --soft: #f2eadf;
  --shadow: 0 14px 40px rgba(40, 30, 20, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(196,104,51,.12), transparent 34%),
    radial-gradient(circle at top right, rgba(20,106,82,.12), transparent 30%),
    var(--bg);
}
h1, h2, h3, .eyebrow { font-family: Georgia, "Times New Roman", serif; }
a { color: inherit; }
button, input, select { font: inherit; }
button {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  cursor: pointer;
}
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
button.warning { background: var(--accent-2); }
button.danger { background: var(--danger); }
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(135deg, #17372e 0%, #285247 52%, #8d4e2b 100%);
  color: #fff8f0;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .88;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 6vw, 5rem);
}
.hero-copy, .hero-subcopy { margin: 0; max-width: 62ch; line-height: 1.5; }
.hero-subcopy { margin-top: 10px; opacity: .92; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 12px;
}
.hero-actions a,
.hero-actions button,
.import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: inherit;
  text-decoration: none;
}
.import-label input { display: none; }
.layout {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.workspace-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.section-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.workspace-note,
.section-copy,
.micro-note {
  color: var(--muted);
  line-height: 1.55;
}
.controls-grid,
.metrics-grid,
.materials-grid,
.resource-links-grid,
.split-grid {
  display: grid;
  gap: 14px;
}
.controls-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.materials-grid,
.resource-links-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.split-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr);
}
.split-grid-compact {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .7fr);
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
input, select {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.pane { display: grid; gap: 18px; }
.controls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.compact-actions { margin-top: 4px; }
.material-card,
.resource-card,
.metric-card,
.info-card,
.log-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf8 0%, #faf4ea 100%);
  border-radius: 18px;
  padding: 16px;
}
.material-card h3,
.resource-card h3,
.metric-card h3,
.info-card h3,
.log-card h3 { margin: 0 0 10px; }
.material-card ul,
.resource-card ul,
.info-card ul {
  margin: 10px 0 0 18px;
  padding: 0;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--soft);
  font-size: 12px;
}
.badge-timer {
  font-weight: 700;
}
.badge-timer.timer-good {
  background: rgba(20,106,82,.14);
  color: #125743;
}
.badge-timer.timer-warn {
  background: rgba(196,104,51,.16);
  color: #8b441b;
}
.badge-timer.timer-bad {
  background: rgba(166,65,55,.16);
  color: #8a2018;
}
.question-panel {
  display: grid;
  gap: 14px;
}
.question-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}
.question-prompt {
  margin: 10px 0 16px;
  font-size: 21px;
  line-height: 1.55;
}
.answer-list {
  display: grid;
  gap: 10px;
}
.answer-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}
.answer-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}
.feedback {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
}
.feedback.good {
  background: rgba(20,106,82,.08);
  border-color: rgba(20,106,82,.28);
}
.feedback.bad {
  background: rgba(166,65,55,.08);
  border-color: rgba(166,65,55,.25);
}
.info-stack,
.log-list {
  display: grid;
  gap: 12px;
}
.metric-value {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 30px;
  font-weight: 700;
}
.log-card small,
.muted { color: var(--muted); }
.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
}
[data-owner-only][hidden] { display: none !important; }
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .split-grid,
  .split-grid-compact { grid-template-columns: 1fr; }
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.metric-card p {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 30px;
  font-weight: 700;
}

.pane[hidden] {
  display: none !important;
}

.sync-note { border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 10px 12px; background: rgba(11, 21, 37, 0.5); }
.sync-note.good { border-color: rgba(77, 227, 184, 0.35); color: #dffcf4; }
.sync-note.warn { border-color: rgba(255, 211, 111, 0.35); color: #fff2c9; }
.sync-note.bad { border-color: rgba(255, 119, 146, 0.35); color: #ffd7df; }



.study-log-grid {
  margin-top: 14px;
}
.study-log-notes {
  grid-column: 1 / -1;
}
.sync-note {
  overflow-wrap: anywhere;
}
.material-card .controls-grid label span,
.material-card h3,
.log-card h3,
.question-prompt {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .study-log-notes {
    grid-column: auto;
  }
}
