@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/manrope-regular.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/manrope-semibold.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/manrope-bold.ttf") format("truetype");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-semibold.ttf") format("truetype");
}

:root {
  --plum: #285548;
  --plum-dark: #1c4035;
  --lavender: #edf3ef;
  --paper: #f2f6f3;
  --ink: #25332f;
  --muted: #596660;
  --line: #dce4df;
  --teal: #466e58;
  --coral: #a52b2b;
  --peach: #f5d4bd;
  --shadow: 0 8px 28px rgba(37, 51, 47, 0.06);
  --body-font: "Manrope", Arial, sans-serif;
  --display-font: "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: white;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

button:focus-visible,
select:focus-visible {
  outline: 3px solid #a45d30;
  outline-offset: 3px;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--paper);
}

.auth-screen.hidden,
.app-shell.locked {
  display: none;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 6px;
  font-size: 34px;
}

.auth-logo {
  display: block;
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.auth-submit {
  width: 100%;
}

.auth-error {
  min-height: 22px;
  margin: 0;
  color: var(--coral);
  font-size: 14px;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(620px, 1fr) 380px;
  min-height: 100vh;
}

.sidebar,
.inspector {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.sidebar {
  padding: 24px 20px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}

.brand > div {
  min-width: 0;
}

.brand h1 {
  overflow-wrap: anywhere;
  font-family: var(--body-font);
  font-size: 20px;
  line-height: 1.35;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 72px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--plum);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.15;
}

h1,
h2 {
  font-family: var(--display-font);
  font-weight: 600;
}

.step-nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.nav-button:hover {
  background: white;
  border-color: var(--line);
}

.nav-button.active {
  color: white;
  background: var(--plum);
  box-shadow: none;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e3ece6;
}

.nav-button.active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
}

.nav-icon svg,
.icon-button svg,
.tool-card svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
}

.nav-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nav-label span,
.nav-progress {
  font-size: 14px;
  opacity: 0.76;
}

.sidebar-card {
  margin-top: 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.sidebar-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  width: 100%;
  margin-bottom: 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.page-tab {
  min-height: 40px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.page-tab:hover {
  color: var(--plum);
  background: var(--paper);
}

.page-tab.active {
  color: var(--plum);
  background: #e3ece6;
  border-color: #a9bcb2;
}

.topbar {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.session-meta,
.actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #b7c8be;
  border-radius: 6px;
  color: var(--ink);
  background: white;
  outline: none;
  font-size: 17px;
}

input {
  height: 48px;
  min-width: 170px;
  padding: 0 12px;
}

textarea {
  min-height: 90px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(40, 85, 72, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #66746b;
  opacity: 1;
}

.icon-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--plum-dark);
  background: white;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.icon-button:hover {
  border-color: var(--plum);
  color: var(--plum);
  background: var(--paper);
}

.auth-submit,
.plan-add {
  background: var(--plum);
  color: white;
  border-color: var(--plum);
}

.auth-submit:hover,
.plan-add:hover {
  background: var(--plum-dark);
  border-color: var(--plum-dark);
  color: white;
}

.icon-button.danger:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.stage {
  min-height: calc(100vh - 90px);
}

.section-view {
  display: grid;
  gap: 16px;
}

.section-hero {
  display: grid;
  gap: 12px;
  padding: 12px 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.section-hero h2 {
  margin: 0;
  max-width: 800px;
  font-size: 38px;
  line-height: 1.15;
}

.section-hero p {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.5;
}

.section-hero .eyebrow {
  margin: 0 0 12px;
  color: var(--plum);
}

.question-list {
  display: grid;
  gap: 10px;
}

.question-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: white;
}

.question-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  color: var(--plum);
  background: #e3ece6;
  font-weight: 700;
}

.question-main h3 {
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wheel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sphere-card,
.tool-card,
.plan-card,
.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.sphere-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--lavender);
}

.sphere-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.score-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: white;
  background: var(--plum);
  font-weight: 700;
  flex: 0 0 auto;
}

.level-list {
  display: grid;
}

.level-option {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid rgba(80, 67, 82, 0.1);
  color: var(--ink);
  text-align: left;
}

.level-option:hover,
.level-option.selected {
  outline: 2px solid var(--plum);
  outline-offset: -2px;
}

.level-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  padding: 16px;
}

.tool-card header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.tool-card header span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: white;
  background: var(--teal);
}

.tool-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tool-list {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: start;
  padding: 8px;
  border-radius: 8px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.check-row input {
  min-width: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--plum);
}

.priority-select {
  margin-top: 12px;
  height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
  padding: 0 10px;
  font-size: 15px;
}

.plan-stack {
  display: grid;
  gap: 14px;
}

.plan-card {
  padding: 16px;
}

.plan-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.plan-head span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: white;
  background: var(--plum);
}

.plan-head svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.implementation-card {
  display: grid;
  gap: 14px;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.implementation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.implementation-column {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.implementation-column h4 {
  margin: 0;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--plum);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
}

.implementation-cell {
  display: grid;
  gap: 10px;
  min-height: 230px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  align-content: start;
}

.implementation-cell.positive {
  border-top: 4px solid var(--teal);
  background: #edf5ef;
}

.implementation-cell.negative {
  border-top: 4px solid var(--coral);
  background: #fff0ed;
}

.implementation-cell-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.implementation-cell-head span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-weight: 700;
}

.implementation-cell.negative .implementation-cell-head span {
  background: var(--coral);
}

.implementation-cell-head h5 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.plan-input-label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.plan-input-label label {
  display: block;
}

.plan-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.plan-input-label input {
  min-width: 0;
}

.plan-add {
  white-space: nowrap;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.plan-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: grab;
}

.plan-item:active {
  cursor: grabbing;
}

.plan-item.dragging {
  opacity: 0.58;
  border-color: var(--plum);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-item p {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.plan-remove {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.plan-remove:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: white;
}

.empty-plan {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  font-size: 15px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  padding: 18px;
}

.summary-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--plum);
  font-size: 32px;
}

.summary-card span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.inspector {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px 20px;
  background: var(--paper);
  border-left: 1px solid var(--line);
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: none;
}

.panel-head h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

#wheelCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 330px;
  margin: 0 auto 12px;
}

.score-list {
  display: grid;
  gap: 8px;
}

.score-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 15px;
}

.score-pill {
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  color: white;
  background: var(--plum);
  text-align: center;
  font-weight: 700;
}

.notes-panel textarea {
  min-height: 190px;
}

@media (max-width: 1360px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .brand {
    grid-template-columns: 1fr;
  }

  .inspector {
    position: static;
    grid-column: 1 / -1;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .profile-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: center;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    width: 100%;
    overflow-x: hidden;
  }

  .sidebar,
  .inspector {
    position: static;
    height: auto;
  }

  .workspace {
    padding: 16px;
  }

  .brand {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .topbar,
  .section-hero,
  .profile-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-meta label,
  .session-meta input {
    min-width: 0;
  }

  .session-meta label {
    flex: 1 1 150px;
  }

  .wheel-grid,
  .tools-grid,
  .implementation-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .plan-item {
    grid-template-columns: 1fr 34px;
  }

  .plan-input-row {
    grid-template-columns: 1fr;
  }

  .step-badge {
    justify-self: start;
  }

  .plan-item p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .section-hero h2 {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 16px;
  }

  .auth-card {
    padding: 24px;
  }

  .auth-card input {
    min-width: 0;
  }

  .page-tab {
    padding: 10px 8px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

@media print {
  body {
    background: white;
  }

  .sidebar,
  .topbar,
  .inspector {
    display: none;
  }

  .app-shell,
  .workspace {
    display: block;
    padding: 0;
  }

  .section-view {
    break-inside: avoid;
  }
}
