:root {
  color-scheme: light;
  --ink: #1b2925;
  --muted: #63716d;
  --muted-strong: #4c5c56;
  --paper: #fffefa;
  --canvas: #f4f2ed;
  --line: #e6e4dc;
  --accent: #2e665c;
  --accent-dark: #214f47;
  --accent-soft: #e8f0ec;
  --warm: #eee9dc;
  --radius-lg: 22px;
  --radius-md: 13px;
  --shadow-card: 0 16px 42px rgb(32 45 39 / 7%), 0 2px 6px rgb(32 45 39 / 3%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 88% 7%, rgb(219 230 222 / 58%), transparent 25rem),
    var(--canvas);
  font-size: 15px;
  line-height: 1.5;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #80ad9c;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 42px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 9px;
  color: white;
  background: var(--accent-dark);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(49 67 59 / 10%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #f5eee0;
  background: var(--accent-dark);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.brand-name {
  margin-left: 1px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -1.2px;
}

.brand-by {
  align-self: center;
  margin: 3px 0 0 1px;
  color: #697670;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.header-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.privacy-dot,
.live-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #629482;
}

.intro {
  max-width: 780px;
  margin: 54px auto 34px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: #75827b;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.45px;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
}

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

h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4.3vw, 58px);
  font-weight: 500;
  letter-spacing: -2.3px;
  line-height: 1.08;
}

h1 span {
  color: var(--accent);
  font-style: italic;
}

.intro-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.96fr) minmax(440px, 1.04fr);
  align-items: start;
  gap: 24px;
  padding-bottom: 44px;
}

.builder-grid > * {
  min-width: 0;
}

.editor-card,
.preview-card,
.guide-card {
  border: 1px solid rgb(225 225 216 / 88%);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.editor-card {
  padding: 28px 30px 30px;
}

.section-heading,
.preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.preview-topline h2 {
  margin: 5px 0 0;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.7px;
  line-height: 1.2;
}

.sample-label {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #e5e6dd;
  border-radius: 999px;
  color: #63726b;
  background: #f8f8f4;
  font-size: 10px;
  font-weight: 650;
}

.section-note {
  margin: 11px 0 24px;
  color: var(--muted);
  font-size: 12px;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.field-group + .field-group {
  margin-top: 22px;
}

.field-group > legend {
  float: left;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.field-group > legend + * {
  clear: both;
}

.optional-label {
  margin-left: 4px;
  color: #87938d;
  font-size: 10px;
  font-weight: 500;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: #45544e;
  font-size: 11px;
  font-weight: 650;
}

.field input:not([type="color"]),
.field select,
.source-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dedfd7;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:not([type="color"]),
.field select {
  height: 42px;
  padding: 0 11px;
  font-size: 12px;
}

.field input::placeholder {
  color: #9aa39e;
  opacity: 1;
}

.field input:not([type="color"]):hover,
.field select:hover,
.source-panel textarea:hover {
  border-color: #b8c3bc;
}

.field input:not([type="color"]):focus,
.field select:focus,
.source-panel textarea:focus {
  border-color: #719588;
  box-shadow: 0 0 0 3px rgb(113 149 136 / 14%);
  outline: none;
}

.field-help {
  margin: 0;
  color: #76827c;
  font-size: 10px;
  line-height: 1.5;
}

.image-fields .field-help {
  margin: 0 0 12px;
  font-size: 11px;
}

.image-status,
.field-error {
  min-height: 0;
  color: #9b4938;
  font-size: 10px;
  line-height: 1.35;
}

.image-status:empty,
.field-error:empty {
  display: none;
}

.image-status[data-state="valid"] {
  color: #4d7867;
}

.field-error {
  color: #a53c33;
}

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

.template-option {
  display: flex;
  min-width: 0;
  min-height: 70px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 9px 10px 8px;
  border: 1px solid #e4e5dd;
  border-radius: 10px;
  color: #5d6b65;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 620;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.template-option:hover {
  transform: translateY(-1px);
  border-color: #a6bbb0;
}

.template-option.is-selected,
.template-option[aria-pressed="true"] {
  border-color: #679184;
  color: var(--accent-dark);
  background: #f1f6f2;
  box-shadow: inset 0 0 0 1px rgb(103 145 132 / 12%);
}

.template-art {
  display: flex;
  width: 52px;
  height: 21px;
  align-items: flex-start;
  gap: 3px;
  padding: 2px 0;
}

.template-art i {
  display: block;
  height: 3px;
  border-radius: 4px;
  background: #bdc9c2;
}

.template-art i:first-child {
  width: 25px;
  background: #78988a;
}

.template-art i:nth-child(2) {
  width: 14px;
  margin-top: 7px;
  margin-left: -28px;
}

.template-art i:nth-child(3) {
  width: 19px;
  margin-top: 14px;
  margin-left: -17px;
}

.art-minimal {
  flex-direction: column;
  gap: 4px;
}

.art-minimal i:nth-child(2),
.art-minimal i:nth-child(3) {
  margin: 0;
}

.art-minimal i:first-child {
  width: 32px;
}

.art-modern {
  border-top: 3px solid #78988a;
}

.art-corporate {
  border-left: 3px solid #78988a;
  padding-left: 5px;
}

.art-photo::before {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 5px;
  background: #d5e2db;
  content: "";
}

.art-logo::before {
  width: 18px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid #78988a;
  border-radius: 2px;
  content: "";
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 13px;
  margin-top: 20px;
}

.color-control {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border: 1px solid #dedfd7;
  border-radius: 9px;
}

.color-control:focus-within {
  border-color: #719588;
  box-shadow: 0 0 0 3px rgb(113 149 136 / 14%);
}

.color-control input[type="color"] {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8ddd8;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.color-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-control input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 6px;
}

.color-control input[type="text"] {
  height: 30px;
  padding: 0 5px;
  border: 0;
  color: #4e5c56;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.color-control input[type="text"]:focus {
  border: 0;
  box-shadow: none;
  outline: none;
}

.color-field .field-help {
  margin-top: 0;
}

.segmented-control {
  display: flex;
  height: 42px;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e1e2da;
  border-radius: 9px;
  background: #f7f7f3;
}

.segmented-control button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  color: #75817b;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.segmented-control button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: white;
  box-shadow: 0 1px 4px rgb(35 50 43 / 12%);
}

.output-column {
  position: sticky;
  top: 18px;
}

.preview-card {
  padding: 28px;
}

.preview-topline {
  margin-bottom: 21px;
}

.preview-topline h2 {
  font-size: 20px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #658073;
  font-size: 10px;
  font-weight: 650;
}

.live-indicator > span {
  width: 6px;
  height: 6px;
}

.preview-toolbar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.view-switch {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #e8e8e1;
  border-radius: 9px;
  background: #f7f7f3;
}

.view-switch button {
  min-height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #728078;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.view-switch button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: white;
  box-shadow: 0 1px 4px rgb(35 50 43 / 11%);
}

.template-current {
  flex: 0 0 auto;
  color: #7d8982;
  font-size: 10px;
  font-weight: 650;
}

.email-window {
  overflow: hidden;
  border: 1px solid #e2e2da;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 10px rgb(33 44 38 / 4%);
}

.email-window-bar {
  display: flex;
  height: 31px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border-bottom: 1px solid #eeeee9;
  background: #fbfbf9;
}

.email-window-bar span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9dcd5;
}

.email-window-bar i {
  width: 64%;
  height: 5px;
  margin-left: 11px;
  border-radius: 5px;
  background: #efefe9;
}

.email-paper {
  min-height: 220px;
  padding: 19px 22px 18px;
  background: #fff;
}

.paper-caption {
  margin: 0 0 17px;
  color: #a1aaa4;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.25px;
}

.email-paper iframe {
  display: block;
  width: 100%;
  min-height: 145px;
  border: 0;
  background: white;
}

.source-panel {
  padding: 13px;
  border: 1px solid #e4e6df;
  border-radius: 12px;
  background: #f8f9f6;
}

.source-panel textarea {
  display: block;
  min-height: 250px;
  padding: 12px;
  resize: vertical;
  color: #35443e;
  background: white;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  line-height: 1.55;
  tab-size: 2;
}

.source-panel .field-help {
  margin-top: 9px;
}

.copy-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.9fr);
  gap: 9px;
  margin-top: 17px;
}

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 690;
  text-align: center;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: white;
  background: var(--accent-dark);
}

.button-primary:hover {
  background: #183f38;
}

.button-secondary {
  border-color: #dce1dc;
  color: #426055;
  background: #fff;
}

.button-secondary:hover {
  border-color: #a9bdb3;
  background: #f8faf8;
}

.copy-icon {
  font-size: 15px;
  line-height: 1;
}

.copy-hint {
  margin: 13px 0 0;
  color: #6c7972;
  font-size: 10px;
  line-height: 1.55;
}

.copy-hint strong {
  color: #46574f;
}

.copy-status {
  min-height: 0;
  margin: 8px 0 0;
  color: #356b59;
  font-size: 11px;
  font-weight: 600;
}

.copy-status:empty {
  display: none;
}

.guide-card {
  margin-top: 16px;
  padding: 0 22px;
  box-shadow: 0 7px 24px rgb(32 45 39 / 4%);
}

.guide-card summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.guide-card summary::-webkit-details-marker {
  display: none;
}

.guide-card summary > span:first-child {
  display: grid;
  gap: 3px;
}

.guide-card summary strong {
  font-size: 13px;
  font-weight: 680;
}

.guide-chevron {
  color: #728178;
  font-size: 20px;
  transition: transform 150ms ease;
}

.guide-card[open] .guide-chevron {
  transform: rotate(180deg);
}

.guide-card ol {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding-left: 21px;
  color: #52615a;
  font-size: 11px;
}

.guide-card li {
  padding-left: 3px;
}

.guide-card > p {
  margin: 0 0 19px;
  color: #748078;
  font-size: 10px;
  line-height: 1.55;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 5px 0;
  color: #78847e;
  font-size: 10px;
}

.privacy-note > span {
  color: #839d8f;
}

.site-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgb(49 67 59 / 10%);
  color: #7b8780;
  font-size: 10px;
}

.site-footer > span:first-child {
  color: #51635a;
  font-weight: 680;
  letter-spacing: 0.2px;
}

.footer-separator {
  padding: 0 4px;
  color: #a4afa7;
}

.clipboard-stage {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: min(720px, calc(100vw - 32px));
  padding: 16px;
  opacity: 0;
  color: #111;
  background: #fff;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

@media (max-width: 1020px) {
  .site-shell {
    padding: 0 28px;
  }

  .builder-grid {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.98fr);
    gap: 18px;
  }

  .editor-card,
  .preview-card {
    padding-right: 23px;
    padding-left: 23px;
  }
}

@media (max-width: 860px) {
  .intro {
    margin-top: 42px;
  }

  .builder-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
    margin: 0 auto;
  }

  .output-column {
    position: static;
  }

  .editor-card {
    order: 0;
  }

  .output-column {
    order: 1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .site-shell {
    padding: 0 16px;
  }

  .site-header {
    min-height: 67px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-by {
    font-size: 8px;
  }

  .header-note {
    gap: 6px;
    font-size: 10px;
  }

  .intro {
    margin: 34px 0 25px;
    text-align: left;
  }

  .eyebrow {
    max-width: 290px;
    font-size: 9px;
  }

  h1 {
    max-width: 420px;
    font-size: clamp(34px, 10vw, 46px);
    letter-spacing: -1.8px;
  }

  .intro-copy {
    max-width: 380px;
    font-size: 13px;
  }

  .builder-grid {
    gap: 14px;
    padding-bottom: 30px;
  }

  .editor-card,
  .preview-card {
    padding: 21px 17px;
    border-radius: 17px;
  }

  .section-heading h2,
  .preview-topline h2 {
    font-size: 19px;
  }

  .sample-label {
    padding: 5px 7px;
    font-size: 9px;
  }

  .section-note {
    margin-bottom: 20px;
    font-size: 11px;
  }

  .field-group {
    padding-top: 17px;
  }

  .field-group + .field-group {
    margin-top: 18px;
  }

  .field-grid,
  .style-grid {
    gap: 12px 9px;
  }

  .field input:not([type="color"]),
  .field select {
    height: 43px;
    padding-right: 9px;
    padding-left: 9px;
    font-size: 12px;
  }

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

  .template-option {
    min-height: 67px;
  }

  .preview-topline {
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .preview-toolbar {
    gap: 6px;
  }

  .view-switch button {
    padding: 0 8px;
    font-size: 9px;
  }

  .template-current {
    font-size: 9px;
  }

  .email-paper {
    min-height: 203px;
    padding: 15px 14px;
  }

  .email-paper iframe {
    min-height: 145px;
  }

  .source-panel {
    padding: 9px;
  }

  .source-panel textarea {
    min-height: 225px;
    padding: 9px;
    font-size: 9px;
  }

  .copy-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 13px;
  }

  .button {
    min-height: 45px;
  }

  .guide-card {
    padding: 0 17px;
  }

  .site-footer {
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}

@media (max-width: 360px) {
  .site-shell {
    padding: 0 12px;
  }

  .header-note {
    font-size: 9px;
  }

  .brand-by {
    display: none;
  }

  .field-grid,
  .style-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-wide {
    grid-column: auto;
  }

  .copy-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

