:root {
  color-scheme: light;
  --ink: #202728;
  --text: #202728;
  --muted: #687476;
  --paper: #f5f7f7;
  --card-bg: #fff;
  --line: #dce3e3;
  --border: #dce3e3;
  --accent: #086f67;
  --accent-dark: #05544e;
}
* { letter-spacing: 0 !important; }
body { background: var(--paper); font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, select, textarea { font-family: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { min-height: 44px; }
.shell { width: min(1180px, calc(100% - 48px)); padding: 24px 0 32px; }
.shell > header { margin: 0 0 20px; }
h1 { font-family: inherit; font-size: 26px; line-height: 1.3; margin: 0; }
h2 { font-size: 17px; line-height: 1.4; margin: 0 0 16px; }
.eyebrow, .lede, .step-badge { display: none; }
.app-nav { background: #fff; border-bottom: 1px solid var(--line); }
.navigation-status { padding: 10px 16px; background: #eaf0ff; color: #1a3780; font-size: 13px; overflow-wrap: anywhere; }
.nav-inner { max-width: 1228px; margin: auto; padding: 0 24px; display: flex; align-items: center; gap: 36px; min-height: 64px; }
.app-brand { display: flex; align-items: center; gap: 9px; font-weight: 750; color: var(--ink); text-decoration: none; white-space: nowrap; }
.app-brand img { width: 24px; height: 24px; }
.app-nav nav { display: flex; gap: 8px; align-self: stretch; }
.app-nav nav a { display: flex; gap: 7px; align-items: center; justify-content: center; padding: 0 18px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; font-size: 14px; font-weight: 650; }
.app-nav nav a[aria-current=page] { color: var(--accent); border-color: var(--accent); background: #f0f8f6; }
.app-nav img, .tool-icon { width: 18px; height: 18px; flex-shrink: 0; }
.subnav { display: flex; gap: 20px; margin-top: 12px; }
.subnav a { color: var(--muted); font-size: 13px; text-decoration: none; padding: 5px 0; }
.subnav a[aria-current=page] { color: var(--accent); font-weight: 700; border-bottom: 2px solid var(--accent); }
.workspace-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 32px; align-items: start; }
.workspace-aside, .workspace-main { min-width: 0; }
.workspace-aside { border-right: 1px solid var(--line); padding-right: 28px; }
.card { background: none; border: 0; box-shadow: none; border-radius: 0; margin: 0; padding: 0; }
.card + .card { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.workspace-main > .card + .card { margin-top: 20px; }
label { margin-bottom: 12px; font-size: 13px; font-weight: 600; }
input, select, textarea { margin-top: 5px; padding: 10px 11px; font-size: 15px; border-radius: 6px; min-width: 0; }
input, select { min-height: 42px; }
textarea { font-size: 13px; line-height: 1.5; min-height: 80px; }
#session { height: 96px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.two-cols > label:only-child { grid-column: 1 / -1; }
.billing-address { margin-top: 16px; padding-top: 14px; }
.billing-address > label, .billing-address > .two-cols, .billing-address > .three-cols { margin-top: 0; }
.billing-address legend { font-size: 14px; margin-bottom: 12px; }
.billing-autofill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.billing-autofill select { flex: 0 0 auto; width: auto; min-height: 40px; padding: 8px 10px; font-size: 13px; }
.billing-autofill .plain-button { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.billing-autofill-hint { flex: 1 1 180px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.billing-autofill-hint.is-error { color: #b42318; }
.session-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.session-actions .auto-fetch, .session-link { flex: initial; min-height: 40px; height: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font-size: 12px; white-space: normal; }
.session-actions #autoFetch { width: 100%; }
.session-actions #copySession { width: 42px; font-size: 0; background: url('/static/icons/copy.svg') center / 17px no-repeat; }
.session-actions .session-link { gap: 6px; }
.auto-fetch { border-radius: 6px; }
.account-summary { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.account-summary img { width: 20px; height: 20px; margin-top: 2px; }
.account-summary > div { min-width: 0; }
.account-email { display: block; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.account-plan { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.account-plan:empty { display: none; }
.login-modes { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.login-modes button { flex: 1; min-width: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font-size: 13px; padding: 8px 4px; }
.login-modes button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
.email-login [hidden], .email-login[hidden], .manual-session[hidden] { display: none !important; }
.email-login form { margin: 0; }
.email-login input { width: 100%; box-sizing: border-box; }
.email-login .plain-button { max-width: 100%; white-space: normal; }
.email-login img { width: 17px; height: 17px; }
.login-progress, .login-profile, .login-error { font-size: 13px; line-height: 1.5; margin-top: 10px; overflow-wrap: anywhere; }
.login-profile { color: var(--muted); font-size: 12px; }
.login-error { color: #a52b36; }
.login-progress:empty, .login-profile:empty, .login-error:empty { display: none; }
.login-password { padding-top: 12px; }
.login-cancel { margin-top: 12px; }
.account-editor { border-top: 1px solid var(--line); padding-top: 10px; }
.account-editor > summary { color: var(--accent); font-size: 13px; padding: 4px 0 12px; cursor: pointer; }
.account-error { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; margin-top: 10px; }
.section-button, .plain-button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; min-height: 44px; padding: 10px 14px; font-size: 14px; cursor: pointer; }
.section-button:hover, .plain-button:hover { background: #edf4f3; }
.plain-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.plain-button:disabled { opacity: .5; cursor: not-allowed; }
#pay-button, #upgrade-button, #query-button, #bind-button {
  background: var(--accent); box-shadow: none; border-radius: 6px; margin-top: 16px;
  font-size: 15px; padding: 12px 20px; min-height: 46px; line-height: 1.35;
}
#pay-button:hover, #upgrade-button:hover, #query-button:hover, #bind-button:hover { transform: none; background: var(--accent-dark); box-shadow: none; }
.app-actions { position: sticky; bottom: 0; margin-top: 24px; padding: 14px 0; background: var(--paper); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; z-index: 20; }
.action-context { min-width: 0; flex: 1; }
.action-context strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.action-context span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.action-buttons { display: flex; gap: 10px; align-items: stretch; }
.app-actions #pay-button, .app-actions #upgrade-button, .app-actions #query-button, .app-actions #bind-button { width: auto; min-width: 180px; margin: 0; }
.app-actions #wizard-next { background: var(--accent); color: #fff; min-width: 180px; border: 0; }
.wizard-back { width: 46px; padding: 10px; }
.stepper, .checkout-review, #wizard-next, #wizard-back { display: none; }
.review-grid { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px 10px; margin: 0; font-size: 14px; }
.review-grid dt { color: var(--muted); }
.review-grid dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.review-note { color: var(--muted); font-size: 12px; margin: 18px 0 0; }
.secondary-actions { display: none; }
.privacy-note { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.privacy-note > summary { cursor: pointer; }
.notice { padding: 10px 0; margin: 0; background: none; border: 0; color: var(--muted); font-size: 12px; }
.new-card-panel { background: none; border: 0; padding: 0; margin-top: 16px; border-radius: 0; }
.element-loading { font-size: 13px; }
.result { border-radius: 6px; padding: 14px 16px; margin-top: 16px; font-size: 14px; scroll-margin: 16px; }
.result:empty { display: none; }
.progress-log { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; }
.progress-log > summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.steps { background: none; border: 0; border-radius: 0; margin: 0; padding: 10px 0 0; }
.step-body { min-width: 0; }
.step-item { font-size: 13px; }
.step-detail { font-size: 12px; overflow-wrap: anywhere; word-break: normal; }
.pm-item, .invoice-item, .sub-card, .renew-card { border-radius: 6px !important; background: #fff !important; box-shadow: none !important; padding: 14px !important; }
.pm-item .info, .invoice-item .info { min-width: 0; overflow-wrap: anywhere; }
.pm-item .meta { font-size: 12px; }
.pm-item button { min-height: 44px; border-radius: 6px; font-size: 13px; padding: 10px 12px; }
.pm-actions { flex-shrink: 0; }
.methods-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.methods-toolbar h2 { margin: 0; }
#add-card-section { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.manage-page .app-actions #bind-button { display: none; }
.manage-page.bind-open .app-actions #bind-button { display: block; }
.manage-page.bind-open .app-actions #query-button { display: none; }
.upgrade-summary { margin-bottom: 16px; }
.summary-item { padding: 12px; }
.payment-source span { min-height: 68px; }
.sub-card .plan-name { font-size: 20px !important; }
.plan-meta { overflow-wrap: anywhere; }
.empty { padding: 28px 12px; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 28px); padding: 18px 0 calc(116px + env(safe-area-inset-bottom)); }
  .nav-inner { padding: 0 10px; min-height: 56px; gap: 0; }
  .app-brand { display: none; }
  .app-nav nav { width: 100%; gap: 0; min-height: 56px; }
  .app-nav nav a { flex: 1; padding: 0 7px; font-size: 13px; gap: 5px; }
  .app-nav nav img { width: 16px; height: 16px; }
  h1 { font-size: 22px; }
  .shell > header { margin-bottom: 18px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .workspace-aside { padding: 0; border: 0; }
  .card { padding: 0; }
  input, select, textarea { font-size: 16px; }
  input, select, textarea, .result { scroll-margin-bottom: calc(126px + env(safe-area-inset-bottom)); }
  input, select { min-height: 44px; }
  #session { font-size: 14px; }
  .two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .billing-address > .two-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .billing-address > .three-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-address > .three-cols > label:first-child { grid-column: 1 / -1; }
  .session-actions { flex-direction: row; }
  .session-actions #autoFetch { width: auto; flex: 1; }
  .session-actions .session-link { flex: 1; }
  .session-actions #copySession { flex: 0 0 42px; }
  .app-actions { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; gap: 6px; display: block; box-shadow: 0 -3px 12px #20272808; }
  .action-context { display: flex; gap: 8px; align-items: baseline; margin-bottom: 7px; }
  .action-context strong { font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .action-context span { font-size: 11px; margin: 0; }
  .action-buttons { width: 100%; gap: 10px; }
  .app-actions #pay-button, .app-actions #upgrade-button, .app-actions #query-button, .app-actions #bind-button, .app-actions #wizard-next { flex: 1; width: auto; min-width: 0; }
  body.keyboard-open .app-actions { visibility: hidden; pointer-events: none; }
  .keyboard-open input, .keyboard-open textarea { scroll-margin-bottom: 32px; }
  .stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
  .stepper li { padding: 10px 0; border-bottom: 2px solid var(--line); font-size: 13px; color: var(--muted); }
  .stepper li[aria-current=step] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
  .checkout-page[data-payment-step='0'] .checkout-fields,
  .checkout-page[data-payment-step='0'] .checkout-review,
  .checkout-page[data-payment-step='1'] .checkout-account,
  .checkout-page[data-payment-step='1'] .checkout-review,
  .checkout-page[data-payment-step='2'] .checkout-account,
  .checkout-page[data-payment-step='2'] .checkout-fields { display: none; }
  .checkout-page[data-payment-step='2'] .checkout-review { display: block; }
  .checkout-page:not([data-payment-step='2']) #pay-button { display: none; }
  .checkout-page:not([data-payment-step='2']) #wizard-next { display: inline-flex; }
  .checkout-page:not([data-payment-step='0']) #wizard-back { display: inline-flex; }
  .checkout-page .workspace-grid { gap: 0; }
  .pm-item, .invoice-item { flex-wrap: wrap; }
  .pm-actions { width: 100%; justify-content: flex-end; }
  .upgrade-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-item { padding: 10px 8px; }
  .summary-value { font-size: 13px; }
  .payment-source { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.login-account-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 0; }
.login-account-actions[hidden] { display:none; }
.login-retention { color:var(--muted); font-size:12px; flex:1 1 220px; overflow-wrap:anywhere; }
.login-account-actions .plain-button { font-size:12px; min-height:36px; white-space:normal; }
@media (max-width:600px) { .login-retention { flex-basis:100%; } .login-account-actions .plain-button { flex:1 1 140px; } }
