/* Shared action controls for the marketing pages, forms and workspaces. */
:root {
 --button-surface:#faf7ef;
 --button-text:#18332e;
 --button-border:#a08b62;
 --button-hover:#f0e7d3;
 --button-primary:#21463d;
 --button-primary-text:#fff8e8;
 --button-primary-hover:#17352e;
 --button-selected:#eadbb9;
 --button-selected-text:#18332e;
 --button-focus:#8e6b2d;
 --button-danger:#872e27;
}
:root[data-theme=dark] {
 --button-surface:#233b36;
 --button-text:#fff4dc;
 --button-border:#a99061;
 --button-hover:#314943;
 --button-primary:#e4c890;
 --button-primary-text:#152c26;
 --button-primary-hover:#efd8aa;
 --button-selected:#e4c890;
 --button-focus:#e4c890;
 --button-danger:#ffb7a9;
}

/* Leave navigation, progress indicators, and content cards in their own layouts. */
html:root body :is(button,.btn,[role=button],input[type=button],input[type=submit],input[type=reset],.partner-link,.buttonfile,a.action,a.button,a.progress-button,a.feature-link):not(:where(.home-main-nav > button,.sidebar nav button,.steps button,.edit,.footer-bottom button,.theme-toggle,.metric,.typecard,.issue-row)) {
 box-sizing:border-box;
 min-block-size:44px;
 max-inline-size:100%;
 padding:9px 15px;
 border:1px solid var(--control-border,var(--button-border));
 border-radius:10px;
 background:var(--control-surface,var(--button-surface));
 color:var(--control-text,var(--button-text));
 font-family:inherit;
 font-size:.875rem;
 font-weight:600;
 line-height:1.35;
 gap:8px;
 white-space:normal;
 overflow-wrap:anywhere;
 text-shadow:none;
 box-shadow:none;
 cursor:pointer;
}
html:root body :is(.btn.green,button.primary,button.gold,button[type=submit],input[type=submit],.partner-link,a.progress-button,a.feature-primary,.hero-actions .btn.cream) {
 --control-surface:var(--button-primary);
 --control-text:var(--button-primary-text);
 --control-border:var(--button-primary);
 --control-hover:var(--button-primary-hover);
}
html:root body .hero .hero-actions .hero-secondary {
 --control-surface:#17332f;
 --control-text:#fff8e8;
 --control-border:#d5bb83;
 --control-hover:#25463d;
 background:var(--control-surface);
 color:var(--control-text);
 border-color:var(--control-border);
}
html:root body :is(button,.btn,[role=button]):not(:where(.theme-toggle,.steps button,.metric,.typecard,.issue-row)):is(.active,.selected,[aria-pressed=true],[aria-selected=true],[aria-checked=true]),
html:root body details[open] > summary.btn {
 --control-surface:var(--button-selected);
 --control-text:var(--button-selected-text);
 --control-border:var(--button-border);
 --control-hover:var(--button-selected);
}
html:root body :is(button.danger,button.remove,button.remove-item) {
 --control-text:var(--button-danger);
 --control-border:var(--button-danger);
}
html:root body .buttonfile { border-style:dashed; }

@media(hover:hover) {
 html:root body :is(button,.btn,[role=button],input[type=button],input[type=submit],input[type=reset],.partner-link,.buttonfile,a.action,a.button,a.progress-button,a.feature-link):not(:where(.home-main-nav > button,.sidebar nav button,.steps button,.edit,.footer-bottom button,.theme-toggle,.metric,.typecard,.issue-row)):not(:disabled):not([aria-disabled=true]):hover {
  background:var(--control-hover,var(--button-hover));
 }
}

html:root body :is(button,.btn,[role=button],input[type=button],input[type=submit],input[type=reset],summary,.partner-link,a.action,a.button,a.progress-button,a.feature-link):focus-visible,
html:root body .buttonfile:focus-within {
 outline:2px solid var(--button-focus);
 outline-offset:2px;
}
html:root body :is(button,.btn,[role=button],input[type=button],input[type=submit],input[type=reset]):is(:disabled,[aria-disabled=true]) {
 opacity:.6;
 cursor:not-allowed;
}

/* Icon controls keep a compact shape and a full touch target. */
html:root body :is(.add-toggle,.qty button,.modal-top button,#closePreview) {
 display:inline-flex;
 align-items:center;
 justify-content:center;
 flex:none;
 inline-size:44px;
 block-size:44px;
 padding:0;
 font-size:1.125rem;
}
html:root body .add-toggle { border-radius:50%; }
html:root body .theme-toggle { min-block-size:44px; min-inline-size:44px; border-radius:999px; }
html:root body .qty button {
 border:0;
 border-radius:0;
 background:transparent;
}
html:root body .qty span { font-size:.875rem; }
html:root body :is(.edit,.footer-bottom button) {
 min-block-size:44px;
 font-family:inherit;
 font-size:.875rem;
 line-height:1.35;
}
html:root body summary:not(.btn):not(:where(.home-services > summary)) {
 min-block-size:44px;
 padding-block:10px;
 font-size:.9375rem;
 line-height:1.4;
 cursor:pointer;
}
html:root body .sidebar nav button { min-block-size:44px; }
html:root body .faq summary { align-items:center; gap:12px; }
html:root body .steps li { min-width:0; }
html:root body .steps button {
 min-block-size:44px;
 width:100%;
 padding:0 4px 5px 0;
 font-size:.75rem;
 line-height:1.25;
 white-space:normal;
}

@media (max-width:760px) {
 html:root body .segmented { grid-template-columns:repeat(2,minmax(0,1fr)); }
 html:root body .steps button { overflow-wrap:anywhere; }
}
@media (max-width:540px) {
 #stepContent .actions {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
  gap:10px;
 }
 #stepContent .actions .btn {
  width:100%;
  margin:0;
  justify-content:center;
 }
}
@media (forced-colors:active) {
 html:root body :is(.btn,button,summary):focus-visible,
 html:root body .buttonfile:focus-within { outline-color:Highlight; }
}
@media (prefers-reduced-motion:reduce) {
 html:root body :is(button,.btn,[role=button],summary,input[type=submit]) { transition:none; }
}
