/* Shared readable type scale. Loaded after page styles on every screen. */
:root {
  --ui-font: "Roboto", "Segoe UI", Arial, sans-serif;
  --ui-muted: #4f6076;
}

html[data-theme="dark"] { --ui-muted: #bfccde; }

html,
body,
body *,
body *::before,
body *::after {
  font-family: var(--ui-font) !important;
}

html {
  text-rendering: auto;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { font-size: 15px; font-weight: 400; line-height: 1.6; letter-spacing: 0; }
button, input, select, textarea { letter-spacing: 0; line-height: 1.45; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select, textarea { font-size: 15px !important; }
input::placeholder, textarea::placeholder { color: var(--ui-muted) !important; opacity: 1; }
:is(h1, h2, h3, h4, strong, b) { font-weight: 700; }
:is(label, legend, th) { line-height: 1.5; letter-spacing: .01em; }
small { line-height: 1.6; }

.marketing-page { --studio-muted: #4f6076; }
html[data-theme="dark"] .marketing-page { --studio-muted: #bfccde; }
#authOverlay { --checkout-muted: #4f6076; }
html[data-theme="dark"] #authOverlay { --checkout-muted: #bfccde; }

/* Main copy and controls stay distinct from the smaller, 13px helper tier. */
.marketing-page :is(.feature p, .roadmap-copy p, .security-points p, .faq-item p),
.marketing-page #features :is(.conversion-suite-head p, .conversion-card > p),
#authOverlay :is(.checkout-intro, .auth-view > p, .auth-modal-copy p, .checkout-story > p),
html[data-page="admin"] body.admin-dashboard :is(.heading-row p, .panel-title p, .settings > p) {
  font-size: 15px !important;
  line-height: 1.7 !important;
}
.marketing-page header .header-in > nav,
.marketing-page :is(.btn, .header-actions .btn, .hero-workflow-link, .footer-links a),
#authOverlay :is(.auth-field label, .checkout-coupon > label, .auth-submit, .plan-buy, .checkout-coupon-fields button),
html[data-page="admin"] body.admin-dashboard :is(label, .nav button, .save, .plan-save, .filter-apply, .clear-filters) {
  font-size: 14px !important;
}
.marketing-page .hero-copy h1 { font-size: clamp(36px, 4.3vw, 56px); line-height: 1.12; letter-spacing: -.035em; }
.marketing-page :is(.heading h2, .demo-copy h2, .security h2, .account-band h2) {
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.2;
  letter-spacing: -.025em;
}
#authOverlay :is(.checkout-story h2, .auth-modal-copy h2, .checkout-heading h2, .auth-view h2) {
  font-size: clamp(26px, 2.4vw, 32px) !important;
  line-height: 1.25;
  letter-spacing: -.025em;
}
#authOverlay .plan-allowance strong { font-size: 30px; letter-spacing: -.02em; }
#authOverlay .plan-price { font-size: 26px; letter-spacing: -.02em; }
#authOverlay .plan-name { font-size: 17px; }
#authOverlay .checkout-steps { flex-wrap: wrap; row-gap: 10px; }
#authOverlay .checkout-steps li { white-space: normal; line-height: 1.5; }
#authOverlay .checkout-steps li > span { flex-shrink: 0; width: 24px; height: 24px; }
#authOverlay .plan-card:hover { transform: none; }

/* Allow text to wrap instead of shrinking the illustrative product interface. */
.marketing-page .product-caption { position: static; flex-wrap: wrap; margin-bottom: 12px; }
.marketing-page .product { padding-top: 0; }
.marketing-page .window-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.marketing-page .window .upload { display: none; }
.marketing-page .window .preview { padding: 20px; }
.marketing-page .window :is(.preview-head, .filters) { flex-wrap: wrap; gap: 8px; }
.marketing-page .window .preview-head strong { font-size: 16px !important; }
.marketing-page .window .tr { grid-template-columns: 58px minmax(0, 1fr) 53px 76px; column-gap: 8px; }
.marketing-page .window .tr.row span:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.marketing-page .window .tr.head { text-transform: none; letter-spacing: 0; }
.marketing-page .window .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.marketing-page .window .totals strong { font-size: 14px !important; }
.marketing-page .float-card { position: static; display: none; }
.marketing-page .ribbon-formats { flex-wrap: wrap; }
.marketing-page .trust { flex-wrap: wrap; }
html[data-theme="light"] .marketing-page :is(.type.credit, .amount.credit, .mini-files b) { color: #116c4f !important; }
html[data-theme="light"] .marketing-page :is(.type.debit, .amount.debit) { color: #b73636 !important; }
html[data-theme="light"] .marketing-page .file-format.pdf b { color: #b93131 !important; }
html[data-theme="light"] .marketing-page .file-format.zip b { color: #96550d !important; }
html[data-theme="light"] .marketing-page :is(.integration-mode, .conversion-arrow b) { color: #1d4cbf !important; }
html[data-theme="dark"] .marketing-page .conversion-arrow b { color: var(--studio-blue) !important; }
.marketing-page .demo-list b { color: var(--studio-teal) !important; }
.web-demo-card fieldset:disabled { opacity: 1; }
.web-demo-card fieldset:disabled :is(input, .web-demo-convert) { cursor: not-allowed; }

html[data-page="admin"] body.admin-dashboard { font-size: 15px; font-weight: 400; }
html[data-page="admin"] body.admin-dashboard .heading-row h1 { font-size: clamp(26px, 2.4vw, 32px); letter-spacing: -.02em; }
html[data-page="admin"] body.admin-dashboard :is(.data-table td, .data-table td strong) { font-size: 14px !important; line-height: 1.6; }
html[data-page="admin"] body.admin-dashboard :is(.data-table th, .data-table td small, .stat small) { font-size: 13px !important; line-height: 1.55; }
html[data-page="admin"] body.admin-dashboard .stat strong { font-size: 28px !important; line-height: 1.2 !important; }
html[data-page="admin"] body.admin-dashboard :is(.plan-editor-head small, .plan-updated, .plan-confirm small, .plan-audit-title > span, .group > small) { color: var(--ui-muted) !important; }
html[data-page="admin"] body.admin-dashboard .stat { min-height: 138px !important; }
:is(.auth-head p, .intro, .group small, .secure-note, .security-note, .back) { color: var(--ui-muted); }
.profile .row { flex-wrap: wrap; }
.profile .row strong { overflow-wrap: anywhere; }
:is(.device-row, .history-wrap) { font-size: 14px; }
:is(.history-wrap th, .history-wrap td) { font-size: 14px; line-height: 1.6; }
.balance-grid strong { font-size: 28px; }
.auth-wrap :is(.auth-head p, .group small, .secure-note, .back),
html[data-page="admin"] body.admin-login :is(.intro, .back, .security-note, .first-login small),
body:not(.marketing-page) :is(.profile .row > span, .balance-grid span, .plan-meta, .device-row span, .history-wrap th, .loading-row) { color: var(--ui-muted) !important; }
.visual-copy h1 { font-size: clamp(32px, 3.2vw, 44px) !important; line-height: 1.18 !important; letter-spacing: -.025em !important; }
.auth-head h2, html[data-page="admin"] body.admin-login .card h2 { font-size: 28px !important; letter-spacing: -.02em; }
body:not(.marketing-page) main > .hero h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: -.025em; }

@media (max-height: 800px) and (min-width: 761px) {
  html[data-page="admin"] body.admin-dashboard .sidebar { padding-block: 16px; }
  html[data-page="admin"] body.admin-dashboard .admin-profile { padding-bottom: 18px; margin-bottom: 0; }
  html[data-page="admin"] body.admin-dashboard nav.nav { gap: 4px; }
  html[data-page="admin"] body.admin-dashboard .nav button { min-height: 44px; padding-block: 6px !important; }
}

@media (max-width: 700px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, textarea { font-size: 16px !important; }
  .marketing-page .hero-copy h1 { font-size: clamp(36px, 8vw, 44px); }
  .marketing-page .hero-copy > p { font-size: 16px !important; }
  .marketing-page .actions { flex-wrap: wrap; }
  .marketing-page .actions .btn { flex: 1 1 180px; }
  .marketing-page .window .preview { padding: 16px 12px; }
  .marketing-page .window .tr { grid-template-columns: 47px minmax(0, 1fr) 48px 69px; column-gap: 5px; padding-inline: 6px; }
  .marketing-page .window .tr.row { line-height: 1.5; }
  .marketing-page .window .totals { gap: 5px; }
  .marketing-page .window .totals > span { padding: 8px 6px; }
  .marketing-page .window .status { font-size: 13px !important; }
  #authOverlay .checkout-steps { margin-right: 32px; gap: 10px 14px; }
  #authOverlay[data-view="pricing"] .plan-card { display: flex; gap: 0; }
  #authOverlay .plan-allowance { margin-top: 14px; }
  #authOverlay .plan-side { display: grid; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--checkout-line); text-align: left; }
  #authOverlay .plan-price-caption { margin-top: 5px; }
  #authOverlay .plan-buy { margin-top: 12px; min-height: 44px !important; }
  #authOverlay .checkout-bottom { flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .marketing-page .window .tr { grid-template-columns: 42px minmax(0, 1fr) 45px 67px; gap: 4px; }
  .marketing-page .window .totals { grid-template-columns: minmax(0, 1fr); }
  .marketing-page .window .totals > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
}
