
:root {
  color-scheme: dark;
  --indigo-950: #050817;
  --indigo-900: #081022;
  --indigo-850: #0a1630;
  --indigo-800: #10213f;
  --brass: #c89a4a;
  --brass-soft: #e3c07b;
  --ivory: #eee7d8;
  --muted: #a4adba;
  --line: rgba(205, 161, 83, 0.28);
  --line-soft: rgba(255,255,255,0.09);
  --panel: rgba(5, 10, 21, 0.82);
  --panel-2: rgba(9, 17, 34, 0.93);
  --blue: #6ea4c9;
  --green: #6fc086;
  --amber: #dda51f;
  --red: #ce6f6f;
  --shadow: 0 30px 80px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(circle at 70% 0%, rgba(69, 75, 141, .20), transparent 35rem),
    linear-gradient(180deg, var(--indigo-900), var(--indigo-950));
}

button, textarea, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(8,16,34,.98), rgba(5,8,23,.98));
  box-shadow: 12px 0 50px rgba(0,0,0,.28);
  z-index: 4;
}

.brand {
  padding: 20px 12px 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.compass-mark {
  color: var(--brass);
  font-size: 2.2rem;
}
.brand-word {
  margin-top: 8px;
  font-family: Italiana, serif;
  letter-spacing: .18em;
  font-size: 1.65rem;
  color: var(--brass-soft);
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ivory);
  background: transparent;
  text-align: left;
}
.nav-item span { color: var(--brass); width: 18px; }
.nav-item:hover,
.nav-item.active {
  border-color: var(--line);
  background: linear-gradient(90deg, rgba(200,154,74,.10), transparent);
}

.sidebar-quote {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  color: var(--brass-soft);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

.main-area { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5,8,18,.88);
  backdrop-filter: blur(18px);
}
.welcome-line {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: var(--ivory);
}
.welcome-line:first-letter { color: var(--brass); }
.top-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
}
.top-meta button {
  border: 0;
  background: transparent;
  color: var(--brass-soft);
  font-size: 1.2rem;
}

main { padding: 0 18px 24px; }
.view { display: none; }
.view.active { display: block; }

.hero {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(5,8,18,.96) 0%, rgba(5,8,18,.78) 36%, rgba(5,8,18,.18) 70%),
    url("assets/bridge-vision.png") center 18% / cover no-repeat;
  box-shadow: var(--shadow);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%, rgba(0,0,0,.24)),
    radial-gradient(circle at 62% 25%, rgba(120,130,255,.08), transparent 28rem);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(620px, 86%);
  padding: 70px 50px 42px;
}
.kicker, .section-kicker, .small-label {
  margin: 0;
  color: var(--brass);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
}
.hero h1 {
  margin: 8px 0 0;
  font-family: Italiana, serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: .04em;
}
.hero h2 {
  margin: 4px 0 16px;
  font-family: "Cormorant Garamond", serif;
  color: var(--brass-soft);
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 500;
}
.ornament { color: var(--brass); font-size: 1.6rem; margin: 12px 0; }
.hero blockquote {
  margin: 0;
  color: var(--ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.45;
}
.script-line {
  margin-top: 26px;
  color: var(--brass);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.3rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.course-card {
  min-height: 245px;
  padding: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(200,154,74,.04), transparent 44%),
    var(--panel);
  box-shadow: var(--shadow);
}
.course-card.highlight {
  background:
    linear-gradient(180deg, rgba(200,154,74,.12), transparent 48%),
    var(--panel-2);
}
.course-card.blue {
  border-color: rgba(110,164,201,.35);
}
.course-card h3 {
  margin: 0 0 8px;
  color: var(--brass-soft);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  text-transform: uppercase;
}
.course-card.blue h3 { color: var(--blue); }
.course-card p {
  min-height: 38px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .88rem;
}
textarea, select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: rgba(3,7,15,.58);
  color: var(--ivory);
  outline: none;
}
textarea {
  min-height: 100px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}
textarea:focus, select:focus { border-color: var(--brass); }
.save-state {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: .74rem;
}

.center-action {
  display: flex;
  justify-content: center;
  padding: 16px 0 8px;
}
.ornate-button, .ghost-button, .round-button, .import-label {
  border: 1px solid var(--line);
  color: var(--ivory);
  background: linear-gradient(180deg, rgba(200,154,74,.12), rgba(5,10,20,.2));
}
.ornate-button {
  min-width: 250px;
  padding: 12px 20px;
  border-radius: 999px;
}
.ghost-button, .import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 6px;
}
.ghost-button:hover, .ornate-button:hover, .import-label:hover {
  border-color: var(--brass);
  color: var(--brass-soft);
}
.import-label input { display: none; }

.logbook-panel, .content-page {
  margin-top: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.section-heading h2, .content-page h1 {
  margin: 4px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}
.table-wrap { overflow-x: auto; margin-top: 18px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
th { color: var(--brass-soft); font-weight: 500; }
td { color: #d8dee6; }
.result-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
}
.result-dot.yes { background: var(--green); }
.result-dot.partial { background: var(--amber); }
.result-dot.no { background: var(--red); }
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
}
.row-actions button:hover { color: var(--brass-soft); }

.atmosphere-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 10px 0;
}
.atmosphere-bar strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
}
.round-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
#ambient-volume { width: 180px; accent-color: var(--brass); }
.spacer { flex: 1; }

.content-page {
  min-height: calc(100vh - 110px);
  padding: 50px;
}
.content-page > p:not(.section-kicker) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}
.question-card, .quote-list blockquote {
  max-width: 850px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(4,8,18,.56);
}
.question-card h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
}
.question-card li, .question-card p { margin: 10px 0; line-height: 1.6; }
.quote-list {
  display: grid;
  gap: 14px;
}
.quote-list blockquote {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
}

dialog {
  width: min(620px, calc(100% - 28px));
  border: 1px solid var(--line);
  padding: 0;
  background: var(--indigo-900);
  color: var(--ivory);
}
dialog::backdrop {
  background: rgba(0,0,0,.74);
  backdrop-filter: blur(8px);
}
.dialog-card {
  position: relative;
  padding: 28px;
}
.dialog-card h2 {
  margin: 4px 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}
.dialog-card label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}
.dialog-card select { padding: 10px; }
.dialog-close {
  position: absolute;
  right: 16px;
  top: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
}
.dialog-card menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
}

body.dim .hero {
  filter: brightness(.68) saturate(.8);
}

@media (max-width: 1100px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar-quote { position: static; margin-top: 18px; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .topbar { position: static; }
}
@media (max-width: 620px) {
  main { padding: 0 8px 18px; }
  .course-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 48px 24px 34px; }
  .topbar, .section-heading, .atmosphere-bar { align-items: flex-start; flex-direction: column; }
  .top-meta { flex-wrap: wrap; }
  .spacer { display: none; }
  #ambient-volume { width: 100%; }
  .ghost-button, .import-label { width: 100%; }
  .content-page { padding: 28px 20px; }
}
