:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #10243d;
  background: #f4f8fa;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(20px, calc((100vw - 1440px) / 2));
  background: white;
  border-bottom: 1px solid #dbe4eb;
}
.top img {
  width: 190px;
  height: 60px;
  object-fit: contain;
}
.top nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
a {
  color: #007e87;
  text-underline-offset: 3px;
}
main {
  max-width: 1440px;
  margin: 30px auto;
  padding: 0 24px;
}
.intro {
  max-width: 850px;
  margin-bottom: 26px;
}
h1 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 8px 0;
}
h2 {
  font-size: 20px;
  margin: 0 0 18px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #007f87;
}
.privacy,
.hint {
  color: #52657b;
  font-size: 14px;
  line-height: 1.6;
}
.privacy {
  border-left: 3px solid #008b94;
  padding: 6px 14px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
form section {
  padding: 24px;
  background: white;
  border: 1px solid #dbe4eb;
  border-radius: 12px;
  margin-bottom: 16px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  min-width: 0;
}
input,
textarea,
select {
  font: inherit;
  font-weight: 400;
  width: 100%;
  padding: 12px;
  border: 1px solid #bfcdd8;
  border-radius: 6px;
  color: #10243d;
  background: #fff;
  min-width: 0;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b3e4e5;
  outline-offset: 2px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.check {
  flex-direction: row;
  align-items: center;
}
.check input {
  width: 20px;
  height: 20px;
  flex: none;
}
button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  border: 1px solid #00858e;
  border-radius: 6px;
  padding: 12px 18px;
  background: #00858e;
  color: white;
  cursor: pointer;
}
button.secondary {
  background: white;
  color: #007780;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.item {
  border-bottom: 1px solid #e0e7ed;
  margin-bottom: 18px;
  padding-bottom: 16px;
}
.item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.item-heading button {
  padding: 5px 10px;
  color: #a32d31;
  border-color: #e5c3c5;
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-heading h2 {
  margin-bottom: 12px;
}
aside {
  min-width: 0;
}
.template-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe4eb;
  border-radius: 8px;
  cursor: pointer;
}
.template-choice:has(:checked) {
  border-color: #005a75;
  background: #eef7fa;
}
.template-choice input {
  width: auto;
}
.template-sample {
  width: 30px;
  height: 38px;
  border: 1px solid #aab9c7;
  background:
    linear-gradient(#153e75, #153e75) 5px 7px / 12px 3px no-repeat,
    repeating-linear-gradient(#c9d5df 0 1px, white 1px 4px) 5px 17px / 20px 15px no-repeat,
    white;
}
.template-sample.professional {
  background:
    linear-gradient(#153e75, #153e75) 4px 5px / 22px 8px no-repeat,
    repeating-linear-gradient(#c9d5df 0 1px, white 1px 4px) 4px 18px / 22px 14px no-repeat,
    white;
}
.template-sample.executive {
  background:
    linear-gradient(#153e75, #153e75) 16px 6px / 9px 3px no-repeat,
    linear-gradient(#dce5eb, #dce5eb) 4px 15px / 22px 5px no-repeat,
    repeating-linear-gradient(#c9d5df 0 1px, white 1px 4px) 4px 24px / 22px 9px no-repeat,
    white;
}
.builder-preview-sheet {
  position: relative;
  margin-bottom: 18px;
  border: 1px solid #dbe4eb;
  box-shadow: 0 4px 18px #18365318;
}
#preview canvas {
  display: block;
  width: 100%;
  height: auto;
  background: white;
}
.builder-preview-link {
  position: absolute;
}
.builder-preview-link:hover,
.builder-preview-link:focus-visible {
  outline: 2px solid #005a75;
}
#feedback {
  font-weight: 600;
  line-height: 1.6;
  color: #8b2b20;
}
#feedback.success {
  color: #087145;
}
footer {
  padding: 28px;
  text-align: center;
  color: #52657b;
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }
  aside {
    max-width: 700px;
    width: 100%;
    margin: auto;
  }
}
@media (max-width: 500px) {
  main {
    padding: 0 14px;
    margin-top: 24px;
  }
  .top {
    padding: 12px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .top img {
    width: 150px;
    height: 48px;
  }
  .top nav {
    gap: 12px;
    font-size: 13px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  form section {
    padding: 18px;
  }
  .actions button {
    width: 100%;
  }
}
.palette-fieldset {
  border: 0;
  padding: 0;
  margin: 4px 0 24px;
  min-width: 0;
}
.palette-fieldset legend {
  font-size: 15px;
  font-weight: 700;
}
.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.palette-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.palette-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  min-height: 0;
}
.palette-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid #d2dde5;
  border-radius: 8px;
  padding: 15px 7px 12px;
  min-height: 88px;
  background: white;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.palette-option input:checked + .palette-visual {
  border-color: #007c87;
  box-shadow: 0 0 0 1px #007c87;
  background: #f4fbfb;
}
.palette-option input:focus-visible + .palette-visual {
  outline: 3px solid #8cd1da;
  outline-offset: 3px;
}
.swatches {
  display: flex;
  gap: 5px;
}
.swatches i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #00000020;
}
.palette-name {
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  font-weight: 600;
}
.palette-tick {
  display: none;
  position: absolute;
  right: 6px;
  top: 3px;
  font-size: 12px;
  color: #007680;
}
.palette-option input:checked + .palette-visual .palette-tick {
  display: block;
}
.custom-colours {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: #f4f8fa;
  border-radius: 8px;
  margin-bottom: 20px;
}
.palette-selected {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: #536477;
  font-size: 12px;
}
.palette-selected .swatches {
  margin: 0;
}
#palette {
  min-height: 44px;
}
.custom-colours input[type="color"] {
  height: 42px;
  padding: 3px;
  cursor: pointer;
}
.custom-colours output {
  font-size: 11px;
  font-family: monospace;
}
.custom-colours .hint {
  grid-column: 1/-1;
  margin: 0;
}
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border: 1px solid #bfcdd8;
  border-radius: 6px 6px 0 0;
  padding: 6px;
  background: #f5f8fa;
}
.rich-toolbar button {
  font-size: 13px;
  padding: 7px 10px;
  min-height: 38px;
  border: 1px solid #d0dbe3;
  background: white;
  color: #17354e;
}
.rich-editor {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  min-height: 140px;
  border: 1px solid #bfcdd8;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  padding: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  margin-bottom: 22px;
}
.rich-editor:focus {
  outline: 3px solid #b3e4e5;
  outline-offset: 2px;
}
.rich-editor p {
  margin: 0 0 6px;
}
.rich-editor ol,
.rich-editor ul {
  margin: 0;
  padding-left: 22px;
}
.section-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.discount {
  margin: 20px 0 0;
  max-width: 230px;
}
.item-heading > div {
  display: flex;
  gap: 6px;
}
.preview-heading {
  flex-wrap: wrap;
  gap: 8px;
}
.preview-heading a {
  font-size: 13px;
}
aside {
  scroll-margin-top: 20px;
}
#builder {
  scroll-margin-top: 20px;
}
.palette-jump {
  display: inline-block;
  font-size: 13px;
  margin: 12px 0 0;
}
@media (min-width: 1001px) {
  aside {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 8px;
  }
}
@media (max-width: 500px) {
  .palette-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .palette-visual {
    min-height: 82px;
    padding: 12px 6px;
  }
  .custom-colours {
    gap: 8px;
    padding: 12px;
  }
  .item-heading {
    gap: 8px;
    align-items: flex-start;
  }
  .item-heading button {
    font-size: 12px;
  }
  .rich-toolbar button {
    min-height: 44px;
  }
  .rich-editor {
    font-size: 16px;
  }
  .check {
    font-size: 13px;
  }
}
