:root {
  --brand: #0f766e;
  --brand-dark: #0b5d57;
  --brand-soft: #e8f5f3;
  --accent: #f59e0b;
  --ink: #101828;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --panel: #ffffff;
  --canvas-bg: #eef1f5;
  --surface: #f8fafc;
  --danger: #b42318;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .11);
  --shadow-canvas: 0 24px 60px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .1);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
}

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--canvas-bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

button { color: inherit; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .18);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 500;
  padding: 9px 13px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: var(--brand-dark);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  transform: translateY(-150%);
}

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

#mainContent { background: #fff; }

.studio-shell {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  min-width: 0;
  height: 100dvh;
  background: var(--canvas-bg);
}

.studio-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 282px minmax(180px, 1fr) auto;
  align-items: center;
  min-width: 0;
  height: 64px;
  padding: 0 16px 0 18px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 7px rgba(15, 23, 42, .03);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand img {
  display: block;
  width: 202px;
  height: 38px;
}

.document-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-self: start;
}

.document-identity input {
  width: min(250px, 28vw);
  padding: 7px 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  text-overflow: ellipsis;
}

.document-identity input:hover { background: var(--surface); }

.document-identity input:focus {
  background: #fff;
  border-color: var(--line-strong);
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.save-state > span {
  width: 7px;
  height: 7px;
  background: #12b76a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #ecfdf3;
}

.save-state.is-saving > span {
  background: #f79009;
  box-shadow: 0 0 0 3px #fffaeb;
}

.header-actions,
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.button,
.icon-button,
.zoom-readout,
.text-button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  font-weight: 650;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { opacity: .42; cursor: not-allowed; }

.button-primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 3px 8px rgba(15, 118, 110, .22);
}

.button-primary:hover { background: var(--brand-dark); }

.button-secondary {
  color: #344054;
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover { background: var(--surface); }

.button-ghost {
  color: #475467;
  background: transparent;
}

.button-ghost:hover { background: var(--surface); }

.button-small {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--brand);
  font-size: 12px;
  background: var(--brand-soft);
}

.button-block { width: 100%; }
.button-wide { min-width: 170px; }
.danger { color: var(--danger) !important; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #475467;
  background: transparent;
  border-radius: 9px;
}

.icon-button:hover { color: var(--ink); background: #f2f4f7; }

.icon-button svg {
  width: 19px;
  height: 19px;
}

.workspace {
  display: grid;
  grid-template-columns: 282px minmax(420px, 1fr) 276px;
  min-width: 0;
  min-height: 0;
}

.left-panel,
.right-panel {
  position: relative;
  z-index: 10;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
}

.left-panel {
  display: grid;
  grid-template-rows: 63px minmax(0, 1fr);
  border-right: 1px solid var(--line);
}

.right-panel {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  border-left: 1px solid var(--line);
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 7px 7px 0;
  border-bottom: 1px solid var(--line);
}

.tool-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 5px 2px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}

.tool-tab::after {
  position: absolute;
  right: 9px;
  bottom: -1px;
  left: 9px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
  content: "";
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .16s ease, transform .16s ease;
}

.tool-tab:hover { color: var(--ink); background: var(--surface); }
.tool-tab.is-active { color: var(--brand); }
.tool-tab.is-active::after { opacity: 1; transform: scaleX(1); }

.tool-tab svg {
  width: 18px;
  height: 18px;
}

.panel-scroll,
.inspector-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d0d5dd transparent;
}

.panel-scroll::-webkit-scrollbar,
.inspector-scroll::-webkit-scrollbar { width: 7px; }
.panel-scroll::-webkit-scrollbar-thumb,
.inspector-scroll::-webkit-scrollbar-thumb { background: #d0d5dd; border: 2px solid #fff; border-radius: 10px; }

.tool-panel {
  padding: 18px 15px 26px;
  animation: panel-in .18s ease both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-heading,
.inspector-header,
.record-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading { margin-bottom: 14px; }

.panel-heading h2,
.inspector-header h2,
.dialog-header h2,
.progress-dialog h2 {
  margin: 1px 0 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -.2px;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.15px;
  text-transform: uppercase;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 23px;
  padding: 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  background: var(--brand-soft);
  border-radius: 999px;
}

.panel-help,
.microcopy {
  margin: -4px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.search-field {
  position: relative;
  display: block;
  margin-bottom: 11px;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 37px;
  padding: 7px 10px 7px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.search-field input:focus { background: #fff; border-color: var(--brand); }

.filter-chips {
  display: flex;
  gap: 6px;
  margin: 0 -15px 13px;
  padding: 0 15px 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chips button {
  flex: none;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.filter-chips button:hover,
.filter-chips button.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #b7ddd8;
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.template-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.template-card:hover {
  border-color: #98a2b3;
  box-shadow: 0 5px 14px rgba(16, 24, 40, .09);
  transform: translateY(-2px);
}

.template-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, .12);
}

.template-card.is-active::after {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 18px;
  height: 18px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  background: var(--brand);
  border: 2px solid #fff;
  border-radius: 50%;
  content: "✓";
  place-items: center;
}

.template-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1.414 / 1;
  overflow: hidden;
  background: var(--thumb-bg, #fff);
}

.template-thumb::before,
.template-thumb::after {
  position: absolute;
  content: "";
}

.template-thumb::before {
  inset: 7px;
  border: 2px solid var(--thumb-accent, #0f766e);
  opacity: .8;
}

.template-thumb::after {
  top: 50%;
  left: 50%;
  width: 36%;
  height: 4px;
  background: var(--thumb-accent, #0f766e);
  border-radius: 2px;
  box-shadow: 0 -11px 0 -1px var(--thumb-accent, #0f766e), 0 11px 0 -1px rgba(16,24,40,.28);
  transform: translate(-50%, -50%);
}

.template-thumb[data-decor="corner"] { background: linear-gradient(135deg, var(--thumb-accent) 0 13%, var(--thumb-bg) 13% 87%, var(--thumb-accent) 87%); }
.template-thumb[data-decor="band"] { background: linear-gradient(90deg, var(--thumb-accent) 0 17%, var(--thumb-bg) 17%); }
.template-thumb[data-decor="dark"] { background: var(--thumb-bg); }
.template-thumb[data-decor="dark"]::before { border-color: rgba(255,255,255,.65); }
.template-thumb[data-decor="dark"]::after { box-shadow: 0 -11px 0 -1px #fff, 0 11px 0 -1px rgba(255,255,255,.55); }
.template-thumb[data-decor="wave"] { background: radial-gradient(circle at 0 100%, var(--thumb-accent) 0 33%, transparent 34%), var(--thumb-bg); }

.template-card > span:last-child {
  display: block;
  padding: 7px 8px 8px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-templates {
  grid-column: 1 / -1;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
}

.field-stack,
.details-body {
  display: grid;
  gap: 11px;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field > span,
.range-field > span,
.color-field > span:first-child {
  color: #475467;
  font-size: 10px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select,
.export-settings select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field input,
.field select { height: 36px; }

.field textarea {
  min-height: 76px;
  line-height: 1.45;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.export-settings select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
  outline: none;
}

.field-featured input {
  color: var(--brand-dark);
  font-weight: 700;
  background: #f4fbfa;
  border-color: #aad9d4;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  min-width: 0;
}

.panel-section {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 1px 9px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.panel-section summary::-webkit-details-marker { display: none; }
.panel-section summary::after { color: var(--muted); content: "＋"; }
.panel-section[open] summary::after { content: "−"; }
.panel-section summary span { margin-left: auto; margin-right: 8px; color: var(--muted); font-size: 10px; }

.upload-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  margin-bottom: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.upload-card.has-file {
  background: #f0fdf9;
  border-color: #a6f4d0;
}

.upload-icon {
  display: grid;
  width: 36px;
  height: 36px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  place-items: center;
}

.upload-icon svg { width: 20px; height: 20px; }

.upload-card strong,
.upload-card span { display: block; min-width: 0; }
.upload-card strong { margin-bottom: 2px; font-size: 11px; }
.upload-card span { color: var(--muted); font-size: 9px; }

.bulk-methods,
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: #f2f4f7;
  border-radius: 9px;
}

.bulk-methods { margin-bottom: 14px; }

.bulk-methods button,
.segmented button {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.bulk-methods button.is-active,
.segmented button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.bulk-view textarea { min-height: 170px; }

.file-drop {
  display: grid;
  width: 100%;
  min-height: 150px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  background: #fbfdfd;
  border: 1.5px dashed #98a2b3;
  border-radius: var(--radius);
  cursor: pointer;
  place-items: center;
}

.file-drop:hover,
.file-drop.is-dragging { color: var(--brand); background: var(--brand-soft); border-color: var(--brand); }
.file-drop svg { width: 26px; height: 26px; margin-bottom: 5px; }
.file-drop strong { color: var(--ink); font-size: 12px; }
.file-drop span { font-size: 10px; }

.text-button {
  padding: 5px 1px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
}

.text-button:hover { text-decoration: underline; }
.bulk-view > .text-button { margin-top: 8px; }

.record-list-wrap {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.record-list-head strong { font-size: 11px; }

.record-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  max-height: 270px;
  overflow-y: auto;
}

.record-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.record-item:hover,
.record-item.is-active { background: var(--brand-soft); border-color: #b7ddd8; }

.record-number {
  display: grid;
  width: 23px;
  height: 23px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  background: var(--surface);
  border-radius: 6px;
  place-items: center;
}

.record-item strong,
.record-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-item strong { font-size: 10px; }
.record-item small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.record-item .remove-record { display: grid; width: 24px; height: 24px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 6px; cursor: pointer; place-items: center; }
.record-item .remove-record:hover { color: var(--danger); background: #fef3f2; }
.record-item .remove-record svg { width: 13px; height: 13px; }

.canvas-workspace {
  position: relative;
  display: grid;
  grid-template-rows: 49px minmax(0, 1fr) 30px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas-bg);
}

.canvas-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(248, 250, 252, .9);
  border-bottom: 1px solid #dfe4ea;
  backdrop-filter: blur(10px);
}

.canvas-toolbar .icon-button {
  width: 31px;
  height: 31px;
}

.canvas-toolbar .icon-button svg { width: 17px; height: 17px; }

.zoom-readout {
  min-width: 49px;
  height: 29px;
  padding: 0 7px;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.toolbar-separator { width: 1px; height: 22px; background: var(--line-strong); }
.toggle-button[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }

.canvas-hint {
  position: absolute;
  right: 15px;
  color: var(--muted);
  font-size: 9px;
}

kbd {
  padding: 1px 4px;
  font-family: inherit;
  font-size: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
}

.canvas-viewport {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 36px;
  overflow: auto;
  place-items: center;
  scrollbar-color: #c8cfd8 transparent;
}

.canvas-viewport::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#cbd3dd 1px, transparent 1px);
  background-size: 18px 18px;
  content: "";
  opacity: .28;
  pointer-events: none;
}

.canvas-scaler {
  position: relative;
  flex: none;
  line-height: 0;
  background: #fff;
  box-shadow: var(--shadow-canvas);
  transform-origin: center;
  transition: width .18s ease, height .18s ease;
}

#certificateCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  cursor: default;
  touch-action: none;
}

#certificateCanvas.is-hovering { cursor: grab; }
#certificateCanvas.is-dragging { cursor: grabbing; }

.canvas-statusbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 9px;
  background: #f8fafc;
  border-top: 1px solid #dfe4ea;
}

.canvas-statusbar span:nth-child(2) { justify-self: center; }
.canvas-statusbar span:last-child { justify-self: end; }

.inspector-header {
  padding: 14px 15px 12px;
  border-bottom: 1px solid var(--line);
}

.inspector-scroll { padding: 0 15px 28px; }

.inspector-group {
  display: grid;
  gap: 11px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.inspector-group h3 {
  margin: 0 0 1px;
  color: #344054;
  font-size: 10px;
  letter-spacing: .15px;
  text-transform: uppercase;
}

.color-field,
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.color-control input {
  width: 30px;
  height: 27px;
  padding: 2px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
}

.color-control output {
  width: 59px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  text-align: right;
  text-transform: uppercase;
}

.switch-row > span { display: grid; gap: 2px; }
.switch-row strong { color: #344054; font-size: 10px; }
.switch-row small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i {
  position: relative;
  flex: none;
  width: 32px;
  height: 19px;
  background: #d0d5dd;
  border-radius: 999px;
  transition: background .16s ease;
  cursor: pointer;
}
.switch-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(16,24,40,.18);
  content: "";
  transition: transform .16s ease;
}
.switch-row input:checked + i { background: var(--brand); }
.switch-row input:checked + i::after { transform: translateX(13px); }

.selected-element-name {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0 2px;
}

.selected-icon {
  display: grid;
  width: 33px;
  height: 33px;
  color: var(--brand);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  background: var(--brand-soft);
  border-radius: 8px;
  place-items: center;
}

.selected-element-name strong,
.selected-element-name small { display: block; }
.selected-element-name strong { font-size: 11px; }
.selected-element-name small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.range-field {
  display: grid;
  gap: 8px;
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-field output { color: var(--muted); font-size: 9px; font-weight: 500; }

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 4px 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.format-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.format-row button {
  display: grid;
  height: 30px;
  color: #475467;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  place-items: center;
}

.format-row button:hover,
.format-row button.is-active { color: var(--brand); background: var(--brand-soft); border-color: #b7ddd8; }
.format-row svg { width: 15px; height: 15px; }

.quick-position-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.quick-position-row button {
  padding: 6px;
  color: #475467;
  font-size: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.quick-position-row button:hover { color: var(--brand); border-color: #b7ddd8; }

.mobile-only { display: none; }

.mobile-scrim {
  position: fixed;
  inset: 64px 0 0;
  z-index: 49;
  background: rgba(16, 24, 40, .38);
  backdrop-filter: blur(2px);
}

.studio-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  color: var(--ink);
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(16, 24, 40, .3);
}

.studio-dialog::backdrop {
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(5px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  background: #f9fafb;
  border-top: 1px solid var(--line);
}

.preview-dialog { width: min(980px, calc(100vw - 32px)); }

.preview-frame {
  display: grid;
  max-height: calc(100dvh - 190px);
  padding: 25px;
  overflow: auto;
  background: #e9edf2;
  place-items: center;
}

#previewCanvas {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 240px);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.export-body {
  max-height: calc(100dvh - 150px);
  padding: 17px 20px 19px;
  overflow-y: auto;
}

.export-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  margin-bottom: 16px;
  background: var(--brand-soft);
  border: 1px solid #cce9e5;
  border-radius: 11px;
}

.export-summary-icon {
  display: grid;
  width: 38px;
  height: 38px;
  color: var(--brand);
  background: #fff;
  border-radius: 9px;
  place-items: center;
}
.export-summary-icon svg { width: 21px; height: 21px; }
.export-summary strong,
.export-summary span { display: block; }
.export-summary strong { font-size: 11px; }
.export-summary > div > span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.export-options {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
}

.export-options legend {
  margin-bottom: 8px;
  color: #344054;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.export-option {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.export-option:hover { background: var(--surface); }
.export-option.is-selected { background: #f4fbfa; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(15,118,110,.08); }
.export-option input { position: absolute; opacity: 0; }
.format-badge {
  display: grid;
  width: 42px;
  height: 35px;
  color: #b42318;
  font-size: 9px;
  font-weight: 850;
  background: #fef3f2;
  border-radius: 7px;
  place-items: center;
}
.format-png { color: #175cd3; background: #eff8ff; }
.format-zip { color: #7a2e0e; background: #fffaeb; }
.export-option strong,
.export-option small { display: block; }
.export-option strong { font-size: 11px; }
.export-option small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.export-option i { width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.export-option.is-selected i { border: 5px solid var(--brand); }

.export-settings {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: end;
  gap: 13px;
  padding: 15px 0;
  margin-top: 9px;
  border-top: 1px solid var(--line);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}
.privacy-note svg { flex: none; width: 16px; height: 16px; color: #027a48; }

.progress-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 30px 28px;
  text-align: center;
}

.progress-visual { display: grid; margin-bottom: 14px; place-items: center; }
.progress-visual > span {
  display: grid;
  width: 76px;
  height: 76px;
  background: conic-gradient(var(--brand) var(--progress, 0%), #e4e7ec 0);
  border-radius: 50%;
  place-items: center;
}
.progress-visual > span::before { position: absolute; width: 61px; height: 61px; background: #fff; border-radius: 50%; content: ""; }
.progress-visual b { position: relative; z-index: 1; font-size: 13px; }
.progress-dialog p { margin: 7px 0 16px; color: var(--muted); font-size: 11px; }
.progress-bar { height: 6px; overflow: hidden; background: #e4e7ec; border-radius: 999px; }
.progress-bar span { display: block; width: 0; height: 100%; background: var(--brand); border-radius: inherit; transition: width .18s ease; }
.progress-dialog .text-button { margin-top: 13px; }

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(330px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  background: #101828;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  animation: toast-in .2s ease both;
}
.toast::before { display: grid; flex: none; width: 18px; height: 18px; color: #101828; font-weight: 900; background: #6ce9a6; border-radius: 50%; content: "✓"; place-items: center; }
.toast.is-error::before { background: #fda29b; content: "!"; }
.toast.is-leaving { animation: toast-out .2s ease both; }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.seo-content {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 66px 0 42px;
  color: #253149;
  background: #fff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 30px;
  color: #667085;
  font-size: 11px;
}

.breadcrumbs a {
  color: #475467;
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumbs span[aria-hidden="true"] { color: #b2b8c2; }

.seo-hero {
  max-width: 900px;
  margin-bottom: 38px;
}

.content-eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.seo-hero h1 {
  max-width: 880px;
  margin: 0;
  color: #101828;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -2.4px;
}

.seo-lead {
  max-width: 860px;
  margin: 21px 0 18px;
  color: #475467;
  font-size: 17px;
  line-height: 1.72;
}

.back-to-studio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.back-to-studio span {
  display: grid;
  width: 23px;
  height: 23px;
  background: var(--brand-soft);
  border-radius: 50%;
  place-items: center;
}

.back-to-studio:hover { text-decoration: underline; }

.answer-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  margin-bottom: 70px;
  background: linear-gradient(135deg, #f0fdfa, #f8fffd);
  border: 1px solid #b9e7df;
  border-radius: 18px;
}

.answer-icon {
  display: grid;
  width: 54px;
  height: 54px;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.5px;
  background: var(--brand);
  border-radius: 15px;
  box-shadow: 0 7px 18px rgba(15, 118, 110, .2);
  place-items: center;
}

.answer-card h2,
.content-section h2,
.privacy-section h2,
.responsible-note h2 {
  margin: 0;
  color: #101828;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -.8px;
}

.answer-card h2 { font-size: 22px; }

.answer-card p,
.content-section p,
.privacy-section p,
.responsible-note p {
  margin: 9px 0 0;
  color: #475467;
  font-size: 15px;
  line-height: 1.75;
}

.answer-card p { margin-top: 7px; }

.content-section { margin: 0 0 76px; }

.section-heading {
  max-width: 790px;
  margin-bottom: 27px;
}

.section-heading > p:last-child { margin-top: 10px; }

.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: none;
}

.step-grid li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 14px;
}

.step-grid li > span {
  display: grid;
  width: 38px;
  height: 38px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
  background: var(--brand-soft);
  border: 1px solid #c5e8e3;
  border-radius: 10px;
  place-items: center;
}

.step-grid h3,
.feature-grid h3 {
  margin: 1px 0 0;
  color: #1d2939;
  font-size: 15px;
}

.step-grid p,
.feature-grid p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 56px;
  align-items: center;
  padding: 42px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 22px;
}

.split-section p + p { margin-top: 14px; }

.data-example {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 13px;
  box-shadow: 0 16px 36px rgba(16, 24, 40, .09);
}

.data-example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #344054;
  font-size: 11px;
  background: #f2f4f7;
  border-bottom: 1px solid #e4e7ec;
}

.data-example-head span {
  padding: 3px 7px;
  color: #027a48;
  font-size: 9px;
  font-weight: 800;
  background: #ecfdf3;
  border-radius: 5px;
}

.data-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr .75fr;
  gap: 8px;
  padding: 11px 13px;
  color: #475467;
  font-size: 10px;
  border-bottom: 1px solid #f0f1f3;
}

.data-row:last-child { border-bottom: 0; }
.data-header { color: #344054; font-size: 9px; font-weight: 800; text-transform: uppercase; background: #fcfcfd; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.feature-grid article {
  padding: 21px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  box-shadow: 0 5px 15px rgba(16, 24, 40, .035);
}

.feature-grid article > span {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  background: var(--brand-soft);
  border-radius: 10px;
  place-items: center;
}

.content-section .library-callout {
  margin-top: 18px;
  padding: 17px 19px;
  color: #344054;
  background: #f0fdfa;
  border: 1px solid #bfe7df;
  border-left: 4px solid var(--brand);
  border-radius: 12px;
}

.library-callout a { color: var(--brand-dark); font-weight: 750; }

.format-table-wrap {
  overflow-x: auto;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
}

.format-table {
  width: 100%;
  min-width: 720px;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: left;
}

.format-table th,
.format-table td {
  padding: 15px 17px;
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
  border-bottom: 1px solid #eaecf0;
}

.format-table thead th {
  color: #344054;
  font-size: 10px;
  letter-spacing: .35px;
  text-transform: uppercase;
  background: #f9fafb;
}

.format-table tbody th {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 850;
}

.format-table tbody tr:last-child th,
.format-table tbody tr:last-child td { border-bottom: 0; }

.wording-layout {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 48px;
  align-items: start;
}

.check-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 27px;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.check-list li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  color: #027a48;
  font-size: 10px;
  font-weight: 900;
  background: #ecfdf3;
  border-radius: 50%;
  content: "✓";
  place-items: center;
}

.wording-layout blockquote {
  margin: 0;
  padding: 26px;
  background: #fffaf0;
  border: 1px solid #f2d9a0;
  border-radius: 16px;
}

.wording-layout blockquote span {
  color: #935f10;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.wording-layout blockquote p {
  margin-top: 12px;
  color: #59451f;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}

.privacy-section {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 27px;
  margin-bottom: 76px;
  color: #fff;
  background: #102d2a;
  border-radius: 18px;
}

.privacy-icon {
  display: grid;
  width: 54px;
  height: 54px;
  color: #6ce9a6;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  place-items: center;
}

.privacy-icon svg { width: 27px; height: 27px; }
.privacy-section h2 { color: #fff; font-size: 23px; }
.privacy-section p { color: #d5e8e5; font-size: 14px; }

.faq-list {
  border-top: 1px solid #d0d5dd;
}

.faq-list details { border-bottom: 1px solid #d0d5dd; }

.faq-list summary {
  position: relative;
  padding: 19px 46px 19px 2px;
  color: #1d2939;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 27px;
  height: 27px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 400;
  background: var(--brand-soft);
  border-radius: 50%;
  content: "+";
  transform: translateY(-50%);
  place-items: center;
}

.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 900px; padding: 0 44px 19px 2px; margin: -4px 0 0; font-size: 14px; }

.responsible-note {
  padding: 24px 27px;
  margin-bottom: 30px;
  background: #fffaeb;
  border-left: 4px solid #f79009;
  border-radius: 5px 14px 14px 5px;
}

.responsible-note h2 { font-size: 19px; }
.responsible-note p { font-size: 13px; }

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 25px;
  border-top: 1px solid #e4e7ec;
}

.related-links strong {
  width: 100%;
  margin-bottom: 2px;
  color: #344054;
  font-size: 12px;
}

.related-links a {
  padding: 8px 11px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  background: var(--brand-soft);
  border: 1px solid #c5e8e3;
  border-radius: 8px;
}

.related-links a:hover { background: #d8f0ed; }

.module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px max(24px, calc((100% - 1120px) / 2));
  color: #98a2b3;
  font-size: 10px;
  background: #101828;
}

.module-footer p { margin: 0; }
.module-footer nav { display: flex; gap: 16px; }
.module-footer a { color: #d0d5dd; text-decoration: none; }
.module-footer a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 260px minmax(400px, 1fr) 250px; }
  .studio-header { grid-template-columns: 260px minmax(140px, 1fr) auto; }
  .brand img { width: 188px; }
  .canvas-hint { display: none; }
  .header-actions .button span { display: none; }
  .header-actions .button { min-width: 38px; padding: 8px 10px; }
  .header-actions .button-primary { min-width: auto; }
}

@media (max-width: 920px) {
  .studio-header { grid-template-columns: auto minmax(0, 1fr) auto; height: 60px; padding: 0 10px; }
  .studio-shell { grid-template-rows: 60px minmax(0, 1fr); }
  .brand img { width: 158px; height: auto; }
  .document-identity { justify-self: stretch; padding: 0 6px; }
  .document-identity input { width: 100%; }
  .save-state { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .mobile-only { display: inline-flex; }
  .desktop-action { display: none; }
  .left-panel,
  .right-panel {
    position: fixed;
    top: 60px;
    bottom: 0;
    z-index: 60;
    width: min(340px, 92vw);
    box-shadow: 15px 0 40px rgba(16,24,40,.18);
    transition: transform .25s ease;
  }
  .left-panel { left: 0; transform: translateX(-105%); }
  .left-panel.is-open { transform: translateX(0); }
  .right-panel { right: 0; transform: translateX(105%); box-shadow: -15px 0 40px rgba(16,24,40,.18); }
  .right-panel.is-open { transform: translateX(0); }
  .canvas-workspace { grid-column: 1; }
  .canvas-viewport { padding: 24px; }
  .mobile-scrim { inset: 60px 0 0; }
  .seo-content { padding-top: 50px; }
  .seo-hero h1 { letter-spacing: -1.6px; }
  .split-section { grid-template-columns: 1fr; gap: 30px; padding: 30px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .wording-layout { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 600px) {
  .studio-header { grid-template-columns: minmax(106px, 1fr) auto; gap: 4px; }
  .brand img { width: 143px; }
  .document-identity { display: none; }
  .header-actions { gap: 2px; }
  .header-actions .button-ghost { display: none; }
  .header-actions .button-primary { gap: 5px; min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .header-actions .button-primary::after { content: "Save"; }
  .header-actions .button-primary { font-size: 0; }
  .header-actions .button-primary svg,
  .header-actions .button-primary::after { font-size: 12px; }
  .canvas-workspace { grid-template-rows: 44px minmax(0, 1fr) 28px; }
  .canvas-toolbar { justify-content: flex-start; padding: 5px 8px; }
  .canvas-viewport { padding: 17px; }
  .canvas-statusbar { grid-template-columns: 1fr auto; padding: 0 8px; }
  .canvas-statusbar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .canvas-statusbar span:last-child { display: none; }
  .preview-frame { padding: 12px; }
  .dialog-header { padding: 15px; }
  .dialog-footer { padding: 12px 15px; }
  .export-body { padding: 14px 15px 17px; }
  .export-settings { grid-template-columns: 1fr; }
  .dialog-footer .button { flex: 1; }
  .button-wide { min-width: 0; }
  .seo-content { width: calc(100% - 28px); padding: 43px 0 32px; }
  .breadcrumbs { margin-bottom: 22px; font-size: 10px; }
  .seo-hero { margin-bottom: 28px; }
  .seo-hero h1 { font-size: 35px; letter-spacing: -1.3px; }
  .seo-lead { font-size: 15px; line-height: 1.65; }
  .answer-card { grid-template-columns: 1fr; gap: 12px; padding: 20px; margin-bottom: 54px; }
  .answer-icon { width: 44px; height: 44px; border-radius: 12px; }
  .answer-card h2 { font-size: 21px; }
  .answer-card p,
  .content-section p,
  .privacy-section p,
  .responsible-note p { font-size: 14px; }
  .content-section { margin-bottom: 58px; }
  .step-grid { grid-template-columns: 1fr; }
  .step-grid li { padding: 17px; }
  .split-section { padding: 22px 18px; border-radius: 17px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { padding: 18px; }
  .wording-layout blockquote { padding: 21px; }
  .wording-layout blockquote p { font-size: 17px; }
  .privacy-section { grid-template-columns: 1fr; gap: 13px; padding: 22px 19px; margin-bottom: 58px; }
  .privacy-icon { width: 45px; height: 45px; }
  .faq-list summary { padding: 17px 40px 17px 1px; font-size: 14px; }
  .faq-list details p { padding-right: 10px; }
  .responsible-note { padding: 20px; }
  .module-footer { flex-direction: column; align-items: flex-start; padding: 19px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
