/* App chrome: toolbar, editor and preview layout. Hidden when printing. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  background: #eef1f5;
  color: #1f2933;
  display: flex;
  flex-direction: column;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: #1b2333;
  color: #f5f7fa;
}
.brand { font-size: 1.1rem; margin: 0; letter-spacing: 0.02em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.field { display: flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; }
button, select {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #3c4a63;
  background: #27324a;
  color: #f5f7fa;
  cursor: pointer;
}
button:hover { background: #33405c; }
button:focus-visible, select:focus-visible {
  outline: 2px solid #5fa8ff;
  outline-offset: 2px;
}
/* On the light panes the ring is darker and drawn inside the box, because the panes clip overflow. */
.editor-pane textarea:focus-visible, .preview-pane:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: -2px;
}
button.primary { background: #255fd0; border-color: #255fd0; }
button.primary:hover { background: #1f52b5; }
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
}
.pane { min-height: 0; overflow: auto; }
.editor-pane { display: flex; flex-direction: column; border-right: 1px solid #d3d9e2; background: #fff; }
/* Selected by element, not by #editor: resume headings get ids too ("## Editor" -> id="editor"). */
.editor-pane textarea {
  flex: 1;
  width: 100%;
  border: 0;
  resize: none;
  padding: 1rem;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color: #1f2933;
}
.hint { margin: 0; padding: 0.4rem 1rem; font-size: 0.8rem; color: #616e7c; border-top: 1px solid #e4e7eb; }
.preview-pane { padding: 1.5rem; }
.preview-pane .resume {
  background: #fff;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 16mm;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .editor-pane { min-height: 50vh; border-right: 0; border-bottom: 1px solid #d3d9e2; }
}
@media print {
  @page { size: auto; margin: 14mm; }
  html, body { height: auto; background: #fff; display: block; }
  .no-print { display: none !important; }
  .workspace { display: block; }
  .pane { overflow: visible; }
  .preview-pane { padding: 0; }
  .preview-pane .resume { box-shadow: none; padding: 0; max-width: none; min-height: 0; }
}
