:root {
  color-scheme: light;
  --ink: #192c45;
  --muted: #536579;
  --line: #d8e1e9;
  --navy: #063183;
  --accent: #c04c09;
  --surface: #f5f8fb;
  --error: #ad271f;
  --ok: #076750;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  padding: 24px;
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
  background: #fff;
}
.page {
  max-width: 800px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.connect-result {
  max-width: 520px;
  padding-top: 40px;
}
.connect-result h1 {
  margin: 0 0 8px;
}
.brand-logo {
  display: block;
  width: auto;
  height: 52px;
}
.brand-context {
  margin-left: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}
.card {
  width: 100%;
}
.first-invoice-illustration {
  width: 100%;
  height: auto;
}
#widget {
  max-width: 680px;
}
h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3;
}
h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
p {
  margin: 0 0 12px;
}
a {
  color: var(--navy);
  text-underline-offset: 3px;
}
.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.lead {
  font-size: 18px;
  color: var(--muted);
}
.muted,
.caption {
  color: var(--muted);
}
.muted {
  margin-top: 6px;
}
.caption {
  font-size: 14px;
  margin-top: 14px;
}
.is-error,
.error {
  color: var(--error);
}
.is-ok,
.ok {
  color: var(--ok);
}
label {
  display: block;
  margin: 20px 0 7px;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #aebcca;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
input[aria-invalid='true'],
select[aria-invalid='true'] {
  border-color: var(--error);
}
input:disabled,
select:disabled {
  background: #f3f5f7;
  color: var(--muted);
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  margin: 0;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button.primary,
.button.primary {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}
button.secondary,
.button.secondary {
  color: var(--navy);
  background: #fff;
  border-color: #abbcd2;
}
button.text-button {
  padding-left: 0;
  color: var(--navy);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button:hover:not(:disabled),
.button:hover {
  filter: brightness(0.95);
}
:focus-visible {
  outline: 3px solid #d65b0f;
  outline-offset: 3px;
}
#result-title:focus {
  outline: none;
}
.wide {
  width: 100%;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.status {
  min-height: 0;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.status:empty,
.field-error:empty {
  margin: 0;
}
.field-error {
  margin: 7px 0 0;
  color: var(--error);
}
.notice {
  background: #fff7e8;
  border: 1px solid #f1d6a6;
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
}
.notice p:last-child {
  margin-bottom: 0;
}
.notice.is-error {
  color: var(--error);
  background: #fff4f3;
  border-color: #ebc8c5;
}
.method-fieldset {
  padding: 0;
  border: 0;
  margin: 24px 0 0;
}
legend {
  font-weight: 600;
  margin-bottom: 10px;
}
.method-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.method-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  margin: 0;
  cursor: pointer;
  font-weight: 400;
}
.method-option:has(input:checked) {
  border-color: var(--navy);
  background: #f0f5ff;
  box-shadow: 0 0 0 1px var(--navy);
}
.method-option:has(input:disabled):not(:has(input:checked)) {
  opacity: 0.6;
  cursor: not-allowed;
}
.method-option input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--navy);
  flex-shrink: 0;
}
.method-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
#method-note {
  margin: 20px 0 14px;
}
.result-panel {
  padding: 22px;
  margin-top: 24px;
  border: 1px solid #b7d9cf;
  border-radius: 16px;
  background: #f6fbf9;
}
.result-status {
  display: inline-block;
  color: var(--ok);
  font-weight: 650;
  padding: 5px 10px;
  background: #e1f2eb;
  border-radius: 7px;
}
.summary-list {
  margin: 16px 0;
}
.summary-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.25fr);
  gap: 12px;
  padding: 8px 0;
}
.summary-list dt {
  color: var(--muted);
}
.summary-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.delivery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #cde1da;
  margin-top: 18px;
  padding-top: 4px;
}
.qr {
  margin: 8px 0;
  text-align: center;
}
.qr canvas {
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
}
.qr figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.wizard {
  max-width: 680px;
}
.wizard .eyebrow {
  margin-bottom: 8px;
  min-height: 20px;
}
.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.wizard-progress li::before {
  content: '';
  display: block;
  height: 6px;
  margin-bottom: 6px;
  border-radius: 3px;
  background: var(--line);
}
.wizard-progress li.is-done::before,
.wizard-progress li.is-current::before {
  background: var(--navy);
}
.wizard-progress li.is-current {
  color: var(--ink);
  font-weight: 650;
}
.wizard-view h1 {
  font-size: 28px;
  margin-bottom: 12px;
}
.wizard-view h1:focus {
  outline: none;
}
.wizard-view p:empty {
  display: none;
}
.wizard-view details:first-of-type {
  margin-top: 18px;
}
.wizard-hero {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.wizard-hero > div {
  flex: 1;
}
.wizard-illustration {
  flex: 0 0 200px;
}
.wizard-button {
  min-height: 56px;
  padding: 14px 28px;
  font-size: 18px;
}
.wizard-list {
  margin: 18px 0;
  padding-left: 24px;
  font-size: 17px;
}
.wizard-list li {
  margin-bottom: 10px;
}
.wizard-wait {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}
.wizard-wait::before {
  content: '';
  flex: 0 0 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: wizard-spin 0.9s linear infinite;
}
.is-stopped .wizard-wait::before {
  display: none;
}
@keyframes wizard-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-wait::before {
    animation: none;
  }
}
.support-help.is-compact h2 {
  margin-bottom: 8px;
  font-size: 16px;
}
.support-help.is-compact .actions {
  margin-top: 0;
}
.placements {
  padding: 0;
  margin: 12px 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.placements li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.badge {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}
.badge[data-state='ok'] {
  color: var(--ok);
}
.badge[data-state='fail'] {
  color: var(--error);
}
details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  color: var(--navy);
  font-weight: 600;
}
details[open] summary {
  margin-bottom: 12px;
}
.steps {
  padding-left: 24px;
  margin: 0;
}
.steps > li {
  padding-left: 4px;
  margin: 0 0 24px;
}
.steps button {
  margin-top: 12px;
}
code {
  display: inline-block;
  padding: 3px 5px;
  background: var(--surface);
  border-radius: 5px;
  font:
    13px/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.webhook {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.webhook code {
  padding: 10px;
  width: 100%;
}
.contact-list {
  padding-left: 22px;
  line-height: 1.8;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.page-footer a {
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.page-footer span {
  align-self: center;
}
.support-help {
  width: 100%;
  border-top: 0;
  padding: 0;
  font-size: 16px;
}
.support-help h2 {
  margin-top: 0;
  color: var(--ink);
}
.page-footer .button {
  font-size: 16px;
}
.ai-prompt {
  width: 100%;
  resize: vertical;
  min-height: 220px;
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 520px) {
  body {
    padding: 18px 14px;
  }
  .brand {
    margin-bottom: 22px;
  }
  .method-options {
    grid-template-columns: 1fr;
  }
  .wizard-illustration {
    display: none;
  }
  .wizard-progress {
    font-size: 13px;
  }
  .wizard-button {
    width: 100%;
  }
  .result-panel {
    padding: 18px;
  }
  .summary-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .placements li {
    flex-direction: column;
    gap: 4px;
  }
  .badge {
    text-align: left;
  }
}
