:root {
  --header: #1c2430;
  --header-ink: #f4f6f8;
  --accent: #2f6fad;
  --accent-ink: #f4f6f8;
  --page: #f4f6f8;
  --ink: #1c2430;
  --muted: #c5ced6;
  --heading-font: Georgia, serif;
  --body-font: "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-family: var(--body-font);
  line-height: 1.45;
}
body { margin: 0; }
header {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
  height: 5rem;
  min-height: 5rem;
  max-height: 5rem;
  padding: 0 1.2rem;
  background: var(--header);
  color: var(--header-ink);
  position: relative;
  z-index: 20;
  overflow: visible;
}
.brand { color: inherit; font-weight: 700; text-decoration: none; display: flex; gap: 0.75rem; align-items: center; height: 5rem; min-width: 0; flex: 0 0 auto; font-family: var(--heading-font); }
.brand span { background: var(--accent); color: var(--accent-ink); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 4px; }
.brand img { height: 5rem; width: auto; max-width: 16rem; object-fit: contain; object-position: left center; padding: 0.4rem 0; box-sizing: border-box; }
.app-name { margin: 0; flex: 1 1 auto; min-width: 0; text-align: center; font-family: var(--heading-font); font-size: 1.8rem; font-weight: 700; line-height: 1; white-space: nowrap; }
nav { display: flex; flex-wrap: nowrap; gap: 0.75rem; align-items: center; flex: 0 0 auto; overflow: visible; }
nav > a { color: var(--header-ink); text-decoration: none; }
nav details.menu { position: relative; }
nav details.menu summary { list-style: none; cursor: pointer; color: var(--header-ink); }
nav details.menu summary::-webkit-details-marker { display: none; }
nav details.menu summary::after { content: " ▾"; font-size: 0.75em; }
nav details.menu > div { position: absolute; top: calc(100% + 0.55rem); right: 0; min-width: 12.5rem; background: white; border-radius: 4px; padding: 0.3rem 0; z-index: 30; box-shadow: 0 8px 24px rgba(28, 25, 21, 0.28); }
nav details.menu a { display: block; color: var(--ink); text-decoration: none; padding: 0.55rem 0.9rem; white-space: nowrap; }
nav details.menu a:hover { background: #e7eef5; }
nav button, button, .button {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 4px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}
button:disabled { background: var(--muted); color: #5c6770; cursor: not-allowed; }
main { padding: 1.2rem; }
h1, h2 { font-family: var(--heading-font); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.6rem 0; }
.company-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1.2rem; max-width: 52rem; align-items: start; }
.company-form .wide, .company-form button { grid-column: 1 / -1; }
.company-form button { justify-self: start; }
.font-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.2rem; max-width: 40rem; }
.font-choices small, .swatch small { display: block; line-height: 1.35; }
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; align-items: stretch; }
.swatch { display: grid; grid-template-rows: auto auto 5.5rem auto; gap: 0.4rem; margin: 0; }
.swatch-name { font-weight: 600; }
.colour-block { position: relative; display: block; height: 5.5rem; }
.colour-block input[type="color"] { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; margin: 0; padding: 0; border: 1px solid rgba(28, 36, 48, 0.28); border-radius: 4px; background: transparent; cursor: pointer; box-sizing: border-box; }
.colour-block input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.colour-block input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.colour-hint { position: absolute; left: 0.4rem; right: 0.4rem; bottom: 0.4rem; text-align: center; font-size: 0.78rem; line-height: 1.2; padding: 0.2rem 0.3rem; border-radius: 3px; background: rgba(255, 255, 255, 0.92); color: #1c2430; pointer-events: none; }
.swatches input.hex { width: 100%; box-sizing: border-box; }
#logo-preview, #favicon-preview { background: white; border-radius: 4px; }
#logo-preview { max-height: 4.5rem; }
#favicon-preview { width: 2.4rem; height: 2.4rem; object-fit: contain; }
.notice { background: #e7eef5; border: 1px solid var(--muted); padding: 0.7rem; }
label { display: grid; gap: 0.25rem; margin: 0.6rem 0; }
input, select, textarea { font: inherit; font-size: 1rem; padding: 0.45rem; border: 1px solid var(--muted); border-radius: 4px; background: white; width: 100%; box-sizing: border-box; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: white; margin-top: 1rem; }
th, td { text-align: left; padding: 0.45rem; border-bottom: 1px solid #e4e9ee; vertical-align: top; white-space: nowrap; }
tr.selected td { background: #e7eef5; }
.scan { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.scan label { flex: 1 1 12rem; margin: 0; }
pre { white-space: pre-wrap; background: white; padding: 0.8rem; border: 1px solid var(--muted); }
dialog.record-dialog { border: 0; border-radius: 6px; padding: 1.2rem 1.3rem 1.4rem; width: min(64rem, calc(100vw - 2rem)); background: var(--page); }
dialog.record-dialog::backdrop { background: rgba(28, 36, 48, 0.45); }
dialog.record-dialog .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1.2rem; align-items: end; }
dialog.record-dialog .actions { margin-top: 0.8rem; }
@media (max-width: 800px) {
  .company-form, .font-choices, .swatches, dialog.record-dialog .form-grid { grid-template-columns: 1fr 1fr; }
}
.setup-note { background: white; border-radius: 4px; padding: 0.8rem 1rem 0.2rem; margin: 0.8rem 0 1rem; }
.setup-note ol { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; }
.setup-note a { color: inherit; }
