@font-face {
  font-family: "Mona Sans";
  src: url("monasans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans";
  src: url("monasans-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --vb-red: #fe1a3f;
  --vb-black: #262626;
  --headings-color: #262626;
  --text-color: #6a6f82;
  --font-family: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --link-color: #e3062b;
  --button-primary-color: #fe1a3f;
  --button-secondary-color: #898e9e;
  --button-secondary-hover: #7b8192;
  --bg-input: #f3f3f6;
  --bg-subtle: #f5f5f7;
  --border-color: #e2e2e8;
  --border-color-light: #ebebf0;
  --line-color: #ebebf0;
  --color-white: #ffffff;
  --gray-40: #a4a8b8;
  --gray-60: #6a6f82;
  --border-radius-button: 8px;
  --border-radius-card: 12px;
  --transition-fast: 0.15s ease-in-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The page grows the frame to the document height, so nothing here keeps
   a height of its own or scrolls inside -- the whole page scrolls. */
html,
body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-family);
  font-weight: 400;
  font-feature-settings: "ss05" 0, "calt" 0, "rvrn" 0;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.app {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 2fr);
  gap: 2rem;
  align-items: start;
  padding: 0;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.panel {
  background: var(--color-white);
  border: 1px solid var(--border-color-light);
  border-radius: var(--border-radius-card);
}

.panel-head {
  padding: 1rem 1.15rem 0.7rem;
  border-bottom: 1px solid var(--line-color);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--headings-color);
}

.panel-body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.field-row .field-label {
  margin: 0;
}

.field-label,
.label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--headings-color);
}

.hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--gray-60);
}

/* One switch: the options share a single rounded track, only its outer
   corners are rounded and the active part fills in black. */
.seg {
  display: grid;
  grid-auto-rows: minmax(40px, auto);
  gap: 0;
  background: var(--bg-input);
  border-radius: var(--border-radius-button);
  overflow: hidden;
}

.seg--2 { grid-template-columns: repeat(2, 1fr); }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg--4 { grid-template-columns: repeat(4, 1fr); }

.seg button {
  appearance: none;
  margin: 0;
  padding: 0.7rem 0.45rem;
  border: 0;
  background: var(--bg-input);
  color: var(--gray-60);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.15;
  cursor: pointer;
  border-radius: 0;
}

.seg button small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--gray-40);
}

.seg button:hover {
  color: var(--headings-color);
}

.seg button.is-on {
  background: var(--vb-black);
  color: var(--color-white);
}

.seg button.is-on small {
  color: rgba(255, 255, 255, 0.62);
}

.seg button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--gray-40);
}

.seg button:disabled:hover {
  color: var(--gray-40);
}

/* The track clips outlines, so the focus ring is drawn inside. */
.seg button:focus-visible {
  outline: 2px solid var(--button-primary-color);
  outline-offset: -2px;
  z-index: 1;
}

input[type="text"],
input[type="search"],
textarea,
select {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  border: 0;
  background: var(--bg-input);
  color: var(--headings-color);
  border-radius: var(--border-radius-button);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236f6f6f' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

select::-ms-expand {
  display: none;
}

textarea {
  height: auto;
  min-height: 88px;
  padding: 0.7rem 0.75rem;
  resize: vertical;
  line-height: 1.4;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--button-primary-color);
  outline-offset: 2px;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--headings-color);
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--button-primary-color);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.actions .btn {
  width: 100%;
}



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 2em;
  border: 1px solid transparent;
  background: transparent;
  color: var(--headings-color);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  border-radius: var(--border-radius-button);
  box-shadow: none;
}

.btn:focus {
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid var(--button-primary-color);
  outline-offset: 2px;
}

.btn-primary {
  color: var(--color-white);
  background: var(--button-primary-color);
  border-color: var(--button-primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
  color: var(--color-white);
  background: var(--button-primary-color);
  border-color: var(--button-primary-color);
  filter: brightness(110%);
}

.btn-outline-primary {
  color: var(--button-primary-color);
  border-color: var(--button-primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: var(--color-white);
  background: var(--button-primary-color);
  border-color: var(--button-primary-color);
}

.btn-secondary {
  color: var(--color-white);
  background: var(--button-secondary-color);
  border-color: var(--button-secondary-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
  color: var(--color-white);
  background: var(--button-secondary-hover);
  border-color: var(--button-secondary-hover);
}

.btn-outline-secondary {
  color: var(--button-secondary-color);
  border-color: var(--button-secondary-color);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: var(--color-white);
  background: var(--button-secondary-color);
  border-color: var(--button-secondary-color);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.stage {
  min-width: 0;
}

/* The tool runs in a frame that clips at its edges, so the column leaves
   room on the right for the mail window's side shadow. */
.stage-frame {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 0 20px 0 0;
}













.field-tag {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--gray-40);
}

input[type="url"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  border: 0;
  background: var(--bg-input);
  color: var(--headings-color);
  border-radius: var(--border-radius-button);
}



.warnings {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.warnings:empty {
  display: none;
}

.warnings li {
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--link-color);
  background: #fff0f2;
  border-radius: var(--border-radius-button);
}






.status:empty {
  display: none;
}

.status {
  min-height: 1.2em;
  font-size: 0.75rem;
  color: var(--text-color);
}

.status.is-ok { color: #00a36d; }
.status.is-err { color: var(--link-color); }

@media (max-width: 639.98px) {
  .app {
    grid-template-columns: 1fr;
  }

  .stage {
    order: -1;
  }

  .seg--3,
  .seg--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

[hidden] {
  display: none !important;
}

.hint strong {
  font-weight: 800;
  color: var(--headings-color);
}

/* The preview imitates an open macOS Mail compose window. Window chrome
   uses the system font, like the real one. */
.mail {
  --mac-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  width: 100%;
  background: #ffffff;
  border-radius: var(--border-radius-card);
  /* Hairline window edge, then a shadow dropped below the window: nothing
     above the top edge, about 16 px at the sides, more at the bottom. */
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.16),
    0 16px 24px -8px rgba(20, 20, 30, 0.20),
    0 4px 8px -4px rgba(20, 20, 30, 0.10);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stage.is-ready .mail {
  opacity: 1;
}

.mail-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 52px;
  padding: 0 16px;
  background: #ececec;
  border-bottom: 1px solid #d5d5d5;
  font-family: var(--mac-font);
}

.mail-lights {
  display: inline-flex;
  gap: 8px;
}

.mail-lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.mail-lights .is-close { background: #ff5f57; }
.mail-lights .is-min { background: #febc2e; }
.mail-lights .is-max { background: #28c840; }

.mail-send {
  display: inline-flex;
  color: #7a7a7a;
}

.mail-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mac-font);
  font-size: 13px;
  font-weight: 600;
  color: #3c3c3c;
  white-space: nowrap;
}

.mail-meta {
  display: grid;
  grid-template-columns: 84px 1fr;
  margin: 0;
  padding: 0 16px;
  font-family: var(--mac-font);
  font-size: 13px;
}

.mail-meta dt,
.mail-meta dd {
  margin: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e6e6e6;
}

.mail-meta dt {
  justify-content: flex-end;
  padding-right: 8px;
  color: #8a8a8a;
}

.mail-meta dd {
  color: #1d1d1f;
}

.mail-token {
  padding: 1px 7px;
  border-radius: 4px;
  background: #e3edfb;
  color: #0a5cd6;
}

.mail-body {
  padding: 1.5rem 1.25rem 2.25rem;
  overflow-x: auto;
}

/* The message text imitates a mail client, not the page. */
.mail-text {
  margin: 0 0 1.5rem;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #222222;
}

/* The signature must render exactly as its inline styles say. */
.sig,
.sig * {
  all: revert;
}

.sig {
  display: block;
}

.guide {
  width: 100%;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stage.is-ready .guide {
  opacity: 1;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.tabs button {
  appearance: none;
  border: 0;
  padding: 0.5rem 0.85rem;
  border-radius: var(--border-radius-button);
  background: var(--bg-input);
  color: var(--gray-60);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
}

.tabs button:hover {
  color: var(--headings-color);
}

.tabs button.is-on {
  background: var(--vb-black);
  color: var(--color-white);
}

.tabs button:focus-visible {
  outline: 2px solid var(--button-primary-color);
  outline-offset: 2px;
}

.guide-body,
.rules {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--headings-color);
}

.guide-body ol {
  margin: 0 0 0.75rem;
  padding-left: 1.3rem;
}

.guide-body li,
.rules li {
  margin-bottom: 0.4rem;
}

.guide-body p {
  margin: 0 0 0.6rem;
}

.guide-body .note {
  font-size: 0.875rem;
  color: var(--text-color);
}

.guide-body strong,
.rules strong {
  font-weight: 800;
}

.guide-body code {
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: var(--bg-input);
  font-size: 0.85em;
}

.guide-body kbd {
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font: inherit;
  font-size: 0.85em;
}

.rules {
  margin: 0;
  padding-left: 1.2rem;
}
