:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --paper: #fffefa;
  --text: #283432;
  --muted: #67736e;
  --line: #dce2dc;
  --accent: #21685e;
  --button-fill: #e9eee8;
  --button-fill-hover: #d4dfd2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.65 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 11px;
}
button:hover {
  background: var(--button-fill);
}
.button-primary {
  background: var(--button-fill);
}
.button-primary:hover {
  background: var(--button-fill-hover);
}
.button-secondary {
  background: transparent;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #438b80;
  outline-offset: 3px;
}
header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 22px 4vw 16px;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.interview-identity {
  min-width: 0;
  flex: 1;
}
.interview-meta {
  min-width: 0;
  max-width: 45%;
  text-align: right;
  overflow-wrap: anywhere;
}
.interview-meta .interview-links {
  justify-content: flex-end;
}
.interview-meta .interview-links-form {
  text-align: left;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.7px;
  margin: 0 0 4px;
  font-weight: 650;
}
header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
#role {
  color: var(--text);
  margin-top: 4px;
}
#saved {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 6px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.search {
  display: flex;
  flex: 1;
  max-width: 600px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.search input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  padding: 9px 12px;
}
.search button {
  color: var(--muted);
  font-size: 12px;
}
.mode {
  margin-left: auto;
  white-space: nowrap;
  font-size: 13px;
}
input[type='checkbox'] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 6px;
}
.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 280px;
  gap: 30px;
  max-width: 1560px;
  margin: auto;
  padding: 30px 32px;
}
aside {
  position: sticky;
  top: 205px;
  align-self: start;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 14px;
}
nav a:hover {
  background: #e8eee7;
  color: var(--accent);
}
.local {
  color: var(--muted);
  font-size: 11px;
  padding-left: 10px;
  margin-top: 26px;
}
main {
  min-width: 0;
}
.workspace-sidebar {
  position: sticky;
  top: 205px;
  align-self: start;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  margin-top: 12px;
}
.workspace-sidebar h2 {
  font-size: 14px;
  margin: 0 0 8px;
}
textarea {
  display: block;
  resize: vertical;
  width: 100%;
  field-sizing: content;
  min-height: 10lh;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  padding: 12px;
  border-radius: 5px;
  line-height: 1.6;
}
.workspace-sidebar textarea {
  font-size: 13px;
}
.notes-input,
#live {
  min-height: calc(3lh + 26px);
}
.section {
  scroll-margin-top: 205px;
  margin-bottom: 30px;
  border: 0;
}
.section > summary {
  font-size: 19px;
  font-weight: 650;
  padding: 9px 0 15px;
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary:before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--muted);
  mask: url('assets/icons/chevron-right.svg') center / contain no-repeat;
  color: var(--muted);
  font-weight: 400;
  transform: rotate(0deg);
  transition: transform 0.16s;
}
details[open] > summary:before {
  transform: rotate(90deg);
}
.entry {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.entry > :is(summary, .entry-header) {
  padding: 18px 18px;
  font-size: 15px;
  font-weight: 550;
}
.summarytext {
  flex: 1;
}
.entry-content {
  padding: 0 24px 23px 42px;
  animation: reveal 0.18s ease-out;
}
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}
.actions button {
  font-size: 12px;
}
.actions label {
  font-size: 12px;
}
.markdown p {
  margin: 12px 0;
}
.markdown h3,
.markdown h4 {
  font-size: 14px;
  margin: 22px 0 8px;
}
.markdown ul,
.markdown ol {
  padding-left: 23px;
}
.markdown li {
  margin: 5px 0;
}
.notes-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 7px;
}
.editor {
  margin-bottom: 12px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.compact {
  color: var(--accent);
  margin: 8px 0 14px;
}
.interview {
  font-size: 17px;
}
.interview .section > summary {
  font-size: 21px;
}
.interview .entry > :is(summary, .entry-header) {
  font-size: 18px;
}
.question-text {
  font-size: 18px;
  line-height: 1.65;
  font-weight: 500;
  margin: 12px 0;
}
.title-edit {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  font: inherit;
}
.check-item {
  padding: 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.check-item label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.check-item button {
  font-size: 11px;
  margin-top: 10px;
}
mark {
  background: #f4e3a8;
  color: inherit;
}
#search-status {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 800px) {
  header {
    padding: 16px;
  }
  .heading {
    gap: 10px;
    flex-direction: column;
  }
  .interview-meta {
    max-width: none;
    text-align: left;
  }
  .interview-meta .interview-links {
    justify-content: flex-start;
  }
  .heading .interview-meta > .editable-field {
    margin-left: 0;
  }
  h1 {
    font-size: 20px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    max-width: none;
    flex-basis: 100%;
  }
  .mode {
    margin-left: 0;
    margin-right: auto;
  }
  .layout {
    display: block;
    padding: 18px 16px;
  }
  aside {
    position: static;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    gap: 4px;
    margin-bottom: 20px;
  }
  nav a {
    white-space: nowrap;
    font-size: 12px;
    padding: 6px;
  }
  .local {
    display: none;
  }
  .entry-content {
    padding-left: 24px;
  }
  .section {
    scroll-margin-top: 245px;
  }
  #saved {
    font-size: 10px;
  }
}

.entry .markdown p:first-child + p {
  overflow-wrap: anywhere;
}
.entry-title {
  overflow-wrap: anywhere;
}
.entry .markdown p {
  max-width: 75ch;
}

@media (min-width: 801px) and (max-width: 1100px) {
  .layout {
    grid-template-columns: 150px minmax(0, 1fr) 240px;
    gap: 20px;
    padding: 24px 20px;
  }
  .workspace-sidebar {
    padding-left: 14px;
  }
}
@media (max-width: 800px) {
  .workspace-sidebar {
    position: static;
    margin: 28px 0 0;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.drag-handle {
  cursor: grab;
  border: 0;
  padding: 2px 4px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
  flex-shrink: 0;
}
.drag-handle:active {
  cursor: grabbing;
}
.header-status {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}
.header-status input {
  margin: 0;
}
.entry.covered > :is(summary, .entry-header) {
  background: #e6f0e9;
  color: #39745b;
}
.entry.covered .header-status {
  color: #39745b;
}
.interview .question-entry.priority:not(.covered) > .entry-header {
  background: #d5dadd;
  color: #263238;
  box-shadow: inset 4px 0 #667780;
}
.interview .question-entry.priority:not(.covered) .header-status {
  color: #263238;
}
.entry.dragging {
  opacity: 0.45;
}
.entry.drop-before {
  box-shadow: 0 -3px 0 var(--accent);
}
.entry.drop-after {
  box-shadow: 0 3px 0 var(--accent);
}
@media (max-width: 800px) {
  .entry > :is(summary, .entry-header) {
    gap: 8px;
    padding: 14px 10px;
  }
  .header-status {
    font-size: 10px;
  }
}

/* Preparation exposes editing; Interview Mode exposes progress tracking. */
.edit-pencil {
  padding: 2px 7px;
  font-size: 18px;
  line-height: 1.4;
  margin-left: 8px;
  flex-shrink: 0;
  font-weight: 400;
  letter-spacing: normal;
}
.editable-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}
.editable-field > h1,
.editable-field > p {
  min-width: 0;
  overflow-wrap: anywhere;
}
.editable-field > .edit-pencil {
  margin-left: 0;
  width: 32px;
  height: 32px;
}
.editable-field.is-editing {
  width: 100%;
}
.editable-field > .title-edit {
  flex: 1;
  min-width: 0;
  font-size: 15px;
}
.interview-meta > .editable-field {
  margin-left: auto;
}
.section > summary > .edit-pencil,
.entry > :is(summary, .entry-header) > .actions {
  margin: 0 0 0 auto;
}
.entry > :is(summary, .entry-header) > .actions {
  flex-shrink: 0;
  gap: 8px;
}
.section-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.section-controls .edit-pencil,
.entry > :is(summary, .entry-header) .edit-pencil {
  margin-left: 0;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 4px;
  flex-shrink: 0;
}
.entry > :is(summary, .entry-header) .edit-pencil,
.section-controls .edit-pencil {
  width: 32px;
  height: 32px;
}
.delete-entry:hover {
  color: #9d3029;
  background: #f7e7e4;
}
.section-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.add-entry-form {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.add-entry-form .form-field {
  font-size: 14px;
}
body:not(.interview) .header-status,
.interview .edit-pencil,
.interview .drag-handle {
  display: none;
}
body:not(.interview) .entry.covered > summary {
  background: var(--paper);
  color: var(--text);
}

/* App navigation, interview list, and creation form share the workspace palette. */
[hidden] {
  display: none !important;
}
.app-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 4vw;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.app-brand {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.app-bar #saved {
  margin-left: auto;
}
.app-screen {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
}
.view-description,
.section-empty {
  color: var(--muted);
}
.section-empty {
  padding: 0 24px;
}
.interview-list {
  list-style: none;
  padding: 0;
  margin: 28px 0;
}
.interview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.interview-row h2 {
  font-size: 18px;
  margin: 0;
}
.interview-row p {
  margin: 4px 0;
}
.interview-row button {
  flex-shrink: 0;
}
.interview-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.open-interview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.interview-form {
  max-width: 560px;
  margin-top: 24px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-field input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--text);
}
.form-actions {
  display: flex;
  gap: 12px;
}
.form-error {
  color: #9d3029;
}
.interview-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.interview-links a {
  color: var(--accent);
  font-size: 14px;
}
.interview-links-form {
  width: min(100%, 560px);
}
.interview-links-form > button {
  margin-right: 8px;
}
@media (max-width: 600px) {
  .app-screen {
    margin-top: 24px;
    padding: 0 18px;
  }
  .interview-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .app-bar #saved {
    margin-left: 0;
    width: 100%;
  }
}

/* Static SVG assets use masks so hover and inherited colors remain consistent. */
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
}
.icon-arrow-right {
  --icon-url: url('assets/icons/arrow-right.svg');
}
.icon-plus {
  --icon-url: url('assets/icons/plus.svg');
}
.icon-trash {
  --icon-url: url('assets/icons/trash.svg');
}
.icon-check {
  --icon-url: url('assets/icons/check.svg');
}
.icon-close {
  --icon-url: url('assets/icons/close.svg');
}
.icon-pencil {
  --icon-url: url('assets/icons/pencil.svg');
}
.icon-external-link {
  --icon-url: url('assets/icons/external-link.svg');
}
.icon-chevron-right {
  --icon-url: url('assets/icons/chevron-right.svg');
}
.icon-grip {
  --icon-url: url('assets/icons/grip.svg');
}
.interview-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.interview-list-header h1 {
  margin: 0;
}
.interview-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.interview-links .icon {
  width: 14px;
  height: 14px;
}
.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Preparation suggestions are read-only previews, independent of workspace accordions. */
.suggestion-help,
.suggestion-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
#suggestion-list {
  max-height: max(260px, calc(100dvh - 340px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.suggestion-group {
  margin-top: 20px;
}
.suggestion-group > h3 {
  font-size: 13px;
  margin: 0 0 8px;
  font-weight: 650;
}
.suggestion-preview {
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.suggestion-preview > summary {
  gap: 6px;
  padding: 10px 2px;
  align-items: flex-start;
}
.suggestion-preview > summary::before {
  margin-top: 4px;
  width: 12px;
}
.suggestion-heading {
  flex: 1;
  min-width: 0;
}
.suggestion-title {
  display: block;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
}
.suggestion-heading small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.suggestion-preview .icon-button {
  width: 28px;
  height: 28px;
}
.suggestion-preview button:disabled {
  opacity: 0.45;
  cursor: default;
}
.suggestion-content {
  font-size: 12px;
  padding: 0 8px 0 18px;
}
.suggestion-content .markdown h3 {
  font-size: 12px;
}
.suggestion-preview > .form-error {
  margin: 0;
  font-size: 12px;
}
@media (max-width: 800px) {
  #suggestion-list {
    max-height: none;
    overflow-y: visible;
  }
}

.entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Shared help stays available on the list and in every preparation. */
.help-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 650;
  flex-shrink: 0;
}
.help-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(440px, 100%);
  height: 100%;
  height: 100dvh;
  max-width: 100%;
  max-height: 100%;
  padding: 32px 28px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -12px 0 48px #28343218;
}
.help-drawer[open] {
  animation: help-slide-in 220ms ease-out;
}
.help-drawer::backdrop {
  background: #28343245;
}
body:has(.help-drawer[open]) {
  overflow: hidden;
}
.help-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.help-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.6px;
}
.help-heading button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}
.help-intro {
  color: var(--muted);
  margin: 12px 0 28px;
}
.help-steps {
  padding-left: 22px;
  margin: 0;
}
.help-steps li {
  padding-left: 6px;
  margin-bottom: 22px;
}
.help-steps li::marker {
  color: var(--accent);
  font-weight: 650;
}
.help-steps h3 {
  margin: 0 0 5px;
  font-size: 15px;
}
.help-steps p,
.help-storage p {
  margin: 0;
  font-size: 14px;
}
.help-storage {
  padding: 18px;
  border-radius: 10px;
  background: var(--button-fill);
}
.help-storage strong {
  display: block;
  margin-bottom: 6px;
}
@keyframes help-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .help-drawer[open] {
    animation: none;
  }
}
@media (max-width: 600px) {
  .app-bar #saved {
    order: 2;
    width: 100%;
    margin-left: 0;
  }
  .help-toggle {
    margin-left: auto;
  }
  .help-drawer {
    padding: 24px 20px;
  }
}

.section-creator {
  margin-bottom: 20px;
}
.add-section-form {
  max-width: 520px;
  padding: 18px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
