:root {
  color-scheme: light;
  --bg: #f8f9ff;
  --surface: #ffffff;
  --surface-alt: #eff4ff;
  --surface-high: #dce9ff;
  --border: #c6c6cd;
  --text: #0b1c30;
  --muted: #45464d;
  --accent: #0058be;
  --accent-dark: #004395;
  --accent-soft: #d8e2ff;
  --danger: #ba1a1a;
  --danger-soft: #ffdad6;
  --inverse-surface: #213145;
  --inverse-on-surface: #eaf1ff;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 20px 60px rgba(11, 28, 48, 0.1);
  --shadow-sm: 0 4px 14px rgba(11, 28, 48, 0.06);
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: var(--header-h);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
  font-size: 20px;
}

/* -------------------- Header -------------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4%;
  background: rgba(248, 249, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.topbar-center {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.local-data-details {
  position: relative;
}

.local-data-details summary {
  list-style: none;
}

.local-data-details summary::-webkit-details-marker {
  display: none;
}

.local-data-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-high);
  border: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
}

.local-data-btn:hover {
  background: var(--accent-soft);
}

@media (max-width: 600px) {
  .local-data-btn span:not(:first-child) {
    display: none;
  }

  .local-data-btn {
    padding: 0.55rem;
  }
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.35rem;
  min-width: 190px;
  z-index: 100;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
}

.dropdown-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent);
}

.dropdown-item:hover {
  background: var(--surface-alt);
}

.home-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.home-link:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

/* -------------------- Typography -------------------- */

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: 'Manrope', 'Inter', sans-serif;
}

h1 {
  font-size: clamp(2rem, 2.8vw, 3rem);
}

.subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
  max-width: 38rem;
}

/* -------------------- Editor layout -------------------- */

.app-layout {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 4%;
  box-sizing: border-box;
}

.editor {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.panel {
  background: transparent;
}

.section-group {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(198, 198, 205, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.section-group:hover {
  box-shadow: 0 6px 20px rgba(11, 28, 48, 0.09);
}

.section-group > h3,
.section-header h3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.35rem;
  margin: 0 0 1.75rem;
  color: var(--text);
}

.section-group > h3::before,
.section-header h3::before {
  content: attr(data-step);
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-header h3 {
  margin-bottom: 0;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

label.wide {
  width: 100%;
}

label.full-width {
  width: 100%;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: #fff;
  color: var(--text);
  outline: none;
  font-weight: 400;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* -------------------- Buttons -------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.button:active {
  transform: scale(0.96);
}

.button .material-symbols-outlined {
  font-size: 18px;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
}

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

.button.secondary {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
}

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

.button.tiny {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.button.danger {
  background: none;
  border: none;
  color: var(--danger);
  opacity: 0.7;
}

.button.danger:hover {
  opacity: 1;
  background: var(--danger-soft);
}

.button.danger-solid {
  background: var(--danger);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
}

.button.danger-solid:hover {
  filter: brightness(0.92);
}

/* -------------------- Entries & lists -------------------- */

.list-container {
  display: grid;
  gap: 1rem;
}

.entry-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--surface-alt);
}

.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.entry-header h4 {
  font-size: 1rem;
}

.subsection {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(11, 28, 48, 0.08);
  margin-top: 1rem;
}

.subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.subsection-header p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.bullet-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.bullet-row + .bullet-row {
  margin-top: 1rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 0.35rem 0.5rem 0.35rem 1rem;
}

.skill-row input {
  border: none;
  background: none;
  padding: 0.2rem 0;
  width: auto;
  min-width: 4rem;
  flex: 1;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.88rem;
}

.skill-row input:focus {
  box-shadow: none;
}

.skill-row .button.danger {
  padding: 0.2rem;
  border-radius: 50%;
  opacity: 0.7;
}

.skill-row .button.danger:hover {
  background: rgba(0, 0, 0, 0.08);
}

.date-range {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.date-range > label {
  flex: 1;
  min-width: 9rem;
}

.mp-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.mp-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.mp-trigger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mp-trigger svg {
  flex-shrink: 0;
  color: var(--muted);
}

.mp-placeholder {
  color: var(--muted);
  font-weight: 400;
}

#mp-popup {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.6rem;
  width: 220px;
  z-index: 1000;
}

.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.mp-header button {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.1rem 0.5rem;
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
}

.mp-header button:hover:not(:disabled) {
  background: var(--surface-alt);
}

.mp-header button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.mp-year {
  font-weight: 700;
  font-size: 0.95rem;
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
}

.mp-month {
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.mp-month:hover:not(:disabled) {
  background: var(--surface-alt);
}

.mp-month:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.mp-month.mp-selected {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.present-label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
  white-space: nowrap;
  flex: 0;
}

.present-label input[type="checkbox"] {
  width: auto;
  padding: 0;
  border: none;
  box-shadow: none;
  accent-color: var(--accent);
}

/* -------------------- Tabs -------------------- */

.tabs-row {
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  overflow-x: auto;
  white-space: nowrap;
}

.tab-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0 0 1.5rem;
}

.page-tabs {
  display: flex;
  gap: 1.5rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 0.25rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: 0;
  transition: color 120ms ease, border-color 120ms ease;
}

.tab-btn .material-symbols-outlined {
  font-size: 19px;
}

.tab-btn:hover {
  color: var(--accent);
  transform: none;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.hidden {
  display: none;
}

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

/* -------------------- Welcome / hero -------------------- */

.hero {
  padding: 4.5rem 4% 3rem;
}

.hero-inner {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-alt);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-badge .material-symbols-outlined {
  font-size: 16px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 30rem;
  margin: 0 0 2rem;
  line-height: 1.65;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.hero-cta {
  padding: 0.95rem 2rem;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(0, 88, 190, 0.2);
}

.hero-cta:hover {
  box-shadow: 0 0 30px rgba(0, 88, 190, 0.35);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--muted);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-trust .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent);
}

.hero-visual {
  background: var(--surface-high);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  transition: transform 400ms ease;
}

.hero-visual:hover {
  transform: rotate(0deg);
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

/* -------------------- Steps section -------------------- */

.steps-section {
  padding: 5rem 4%;
}

.steps-section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.steps-heading {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.steps-heading h2 {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  margin-bottom: 0.75rem;
}

.steps-heading p {
  color: var(--muted);
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
  display: flex;
  flex-direction: column;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #0058be 0%, #2170e4 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-family: 'Manrope', sans-serif;
}

.step-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.step-card p {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.step-visual {
  border-radius: var(--radius-sm);
  opacity: 0.6;
  transition: opacity 200ms ease;
  margin-top: auto;
}

.step-card:hover .step-visual {
  opacity: 1;
}

.step-visual-icon {
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 7.6rem;
}

.step-visual-icon .material-symbols-outlined {
  font-size: 3rem;
  color: var(--accent);
}

/* -------------------- Privacy section -------------------- */

.privacy-section {
  padding: 0 4% 5rem;
}

.privacy {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  border-radius: 32px;
  padding: 3rem 4%;
  position: relative;
  overflow: hidden;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #71f8e4;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.privacy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 2rem;
  max-width: 34rem;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 44rem;
}

.privacy-grid h4 {
  color: #71f8e4;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.privacy-grid p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(234, 241, 255, 0.82);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badge,
  .hero-trust {
    justify-content: center;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .hero-visual {
    max-width: 420px;
    margin: 0 auto;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .privacy-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: white;
    color: #111;
  }
}

/* -------------------- Export dialog -------------------- */

dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(11, 28, 48, 0.55);
  backdrop-filter: blur(4px);
}

#export-dialog {
  max-width: 640px;
  width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

#confirm-dialog,
#notice-dialog {
  max-width: 420px;
  width: calc(100vw - 2rem);
}

#export-dialog #pay-step,
#export-dialog #export-step,
#confirm-dialog,
#notice-dialog {
  padding: 1.75rem 2rem 2rem;
}

.dialog-eyebrow {
  margin-bottom: 0.5rem;
}

dialog h3 {
  margin: 0 0 1.25rem;
  font-size: 1.3rem;
}

.dialog-step-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.dialog-step-label span.step-badge {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.template-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.template-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 120ms ease, background-color 120ms ease;
}

.template-card:hover:not(.selected) {
  border-color: var(--accent);
  background: var(--surface-alt);
}

.template-card img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  filter: grayscale(0.4);
  transition: filter 150ms ease;
}

.template-card:hover img,
.template-card.selected img {
  filter: grayscale(0);
}

.template-card.selected {
  border-color: var(--accent);
  color: var(--text);
}

.template-card.selected::after {
  content: '\2713';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.color-choices {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.color-swatch {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 2px solid var(--border);
  outline-offset: 2px;
  cursor: pointer;
  transition: outline-color 120ms ease;
}

.color-swatch:hover:not(.selected) {
  outline-color: var(--accent);
}

.color-swatch.selected {
  outline-color: var(--accent);
  outline-width: 3px;
}

.color-swatch.selected::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.language-choices {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.language-choice {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.language-choice:hover:not(.selected) {
  border-color: var(--accent);
  color: var(--text);
}

.language-choice.selected {
  border-color: var(--accent);
  border-width: 2px;
  color: var(--accent);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

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

#templates-dialog {
  max-width: 960px;
  width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
}

#templates-dialog > * {
  padding-left: 2rem;
  padding-right: 2rem;
}

#templates-dialog .dialog-eyebrow {
  margin-top: 1.75rem;
}

#templates-dialog h3 {
  margin-bottom: 1.5rem;
}

.templates-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding-bottom: 0.25rem;
}

.templates-preview-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.templates-preview-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.templates-preview-card figcaption {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

#templates-dialog .dialog-actions {
  padding-bottom: 1.75rem;
}

@media (max-width: 600px) {
  .templates-preview-grid {
    grid-template-columns: 1fr;
    max-height: 55vh;
  }
}

.paywall-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

#pay-step:not(.hidden) {
  display: flex;
  flex-direction: column;
  min-height: 20rem;
}

#pay-step h3 {
  margin-bottom: 0.75rem;
}

#pay-step .dialog-actions {
  margin-top: auto;
}

.pay-pitch {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 32rem;
}
