.axd-dialog {
  --axd-ground: #f4f4f1;
  --axd-ink: #181a18;
  --axd-green: #075b42;
  --axd-surface: #e8ebe5;
  --axd-error: #9b2828;
  width: min(760px, calc(100% - 40px));
  max-width: none;
  max-height: min(880px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--axd-ground);
  color: var(--axd-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  overflow: hidden;
  overscroll-behavior: contain;
  color-scheme: light;
}

.axd-dialog::backdrop { background: rgb(15 24 18 / 58%); }
.axd-dialog *, .axd-dialog *::before, .axd-dialog *::after { box-sizing: border-box; }
.axd-dialog [hidden] { display: none !important; }
.axd-dialog p, .axd-dialog h2, .axd-dialog dl, .axd-dialog dd, .axd-dialog fieldset { margin: 0; }
.axd-dialog button, .axd-dialog input, .axd-dialog textarea, .axd-dialog a { font: inherit; }
.axd-dialog button, .axd-dialog a { -webkit-tap-highlight-color: transparent; }
.axd-dialog fieldset { min-width: 0; padding: 0; border: 0; }
.axd-dialog legend { width: 100%; padding: 0; }
.axd-dialog a { color: inherit; }
.axd-shell { display: flex; flex-direction: column; max-height: min(880px, calc(100dvh - 48px)); }
.axd-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 36px; background: var(--axd-surface); }
.axd-brand { font-weight: 650; }
.axd-close { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 72px; min-height: 44px; padding: 8px; border: 0; border-radius: 4px; color: var(--axd-ink); background: transparent; cursor: pointer; }
.axd-close span { font-size: 26px; font-weight: 400; line-height: 1; }
.axd-close:hover { background: #dbe1d8; }
.axd-scroll { flex: 1 1 auto; min-height: 0; padding: 28px 36px 36px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.axd-privacy { font-size: 14px; color: #454e46; }
.axd-progress-wrap { margin: 22px 0 30px; }
.axd-progress-label { margin-bottom: 9px !important; font-size: 14px; font-variant-numeric: tabular-nums; }
.axd-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 0; appearance: none; background: #d7ded4; color: var(--axd-green); }
.axd-progress::-webkit-progress-bar { background: #d7ded4; }
.axd-progress::-webkit-progress-value { background: var(--axd-green); }
.axd-progress::-moz-progress-bar { background: var(--axd-green); }
.axd-title { display: block; font-size: clamp(24px, 3vw, 32px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.axd-title:focus { outline: 0; }
.axd-intro { margin-top: 12px !important; }
.axd-options { display: grid; gap: 10px; margin-top: 26px; }
.axd-option { display: flex; align-items: center; gap: 16px; min-height: 62px; padding: 15px 18px; border: 2px solid transparent; border-radius: 4px; background: #e8ebe5; color: var(--axd-ink); cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease; }
.axd-option:hover { background: #dfe6dc; }
.axd-option:has(input:checked) { border-color: var(--axd-green); background: #e0e9e0; }
.axd-option:has(input:focus-visible) { outline: 3px solid var(--axd-green); outline-offset: 3px; }
.axd-option input { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: var(--axd-green); }
.axd-option span { min-width: 0; }
.axd-option strong { display: block; font-weight: 650; }
.axd-option small { display: block; margin-top: 2px; font-size: 14px; color: #454e46; }
.axd-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.axd-actions:has([data-axd-back]:not([hidden])) { justify-content: space-between; }
.axd-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 12px 24px; border: 0; border-radius: 999px; font-weight: 600 !important; line-height: 1.45 !important; text-align: center; text-decoration: none; cursor: pointer; transition: background-color 120ms ease, transform 120ms ease; }
.axd-button span { font-size: 20px; }
.axd-button-primary { color: #fff !important; background: var(--axd-green); }
.axd-button-primary:hover { background: #064b37; }
.axd-button-secondary { color: var(--axd-ink); background: var(--axd-surface); }
.axd-button-secondary:hover { background: #dbe1d8; }
.axd-button:active, .axd-close:active { transform: translateY(1px); }
.axd-dialog button:focus-visible, .axd-dialog a:focus-visible, .axd-dialog input:focus-visible, .axd-dialog textarea:focus-visible { outline: 3px solid var(--axd-green); outline-offset: 4px; }
.axd-field-label { display: block; margin-top: 30px; font-weight: 650; }
.axd-number-wrap { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.axd-number-wrap input { width: min(270px, 65%); min-height: 64px; padding: 10px 14px; border: 2px solid #9aa899; border-radius: 4px; background: #fff; color: var(--axd-ink); font-size: 28px; font-variant-numeric: tabular-nums; }
.axd-number-wrap input[aria-invalid="true"] { border-color: var(--axd-error); }
.axd-help { margin-top: 9px !important; font-size: 14px; color: #454e46; }
.axd-error { margin-top: 20px !important; color: var(--axd-error); font-size: 15px; font-weight: 650; }
.axd-result { padding-top: 28px; }
.axd-result-task { margin-top: 10px !important; font-size: 19px; }
.axd-time-block { margin-top: 26px; padding: 24px; background: #e2e9df; }
.axd-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-top: 4px !important; }
.axd-time strong { min-width: 0; font-size: clamp(38px, 7vw, 58px); font-weight: 600; line-height: 1.2; letter-spacing: -0.04em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.axd-time span { white-space: nowrap; }
.axd-recommendation { display: grid; gap: 24px; margin-top: 30px !important; }
.axd-recommendation dt { margin-bottom: 6px; font-weight: 700; }
.axd-recommendation dd { line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.axd-result-note { margin-top: 26px !important; font-size: 14px; color: #454e46; }
.axd-result-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 26px; }
.axd-reset { justify-self: center; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: var(--axd-ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.axd-copy-status { min-height: 24px; margin-top: 10px !important; font-size: 14px; }
.axd-copy-fallback { margin-top: 10px; }
.axd-copy-fallback label { display: block; margin-bottom: 8px; }
.axd-copy-fallback textarea { display: block; width: 100%; min-height: 180px; padding: 14px; border: 2px solid #9aa899; border-radius: 4px; background: #fff; color: var(--axd-ink); font-size: 15px; line-height: 1.6; resize: vertical; }

@media (max-width: 600px) {
  .axd-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .axd-shell { max-height: calc(100dvh - 24px); }
  .axd-header { gap: 8px; padding: 12px 18px; }
  .axd-brand { font-size: 14px; }
  .axd-scroll { padding: 22px 20px 24px; }
  .axd-progress-wrap { margin: 20px 0 24px; }
  .axd-title { font-size: 25px; }
  .axd-options { gap: 9px; margin-top: 22px; }
  .axd-option { gap: 12px; padding: 13px 12px; }
  .axd-option small { line-height: 1.5; }
  .axd-actions { gap: 8px; }
  .axd-actions .axd-button { padding-right: 16px; padding-left: 16px; }
  .axd-time-block { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .axd-dialog *, .axd-dialog *::before, .axd-dialog *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
