:root {
  /* Light-only product. Root authority (not only mobile MQ). */
  color-scheme: only light;
  --bg: #f7f3ea;
  --surface: #fffdfc;
  --surface-soft: #f3eee3;
  --ink: #17211d;
  --muted: #64716b;
  --line: #e2d8c8;
  --accent: #0f766e;
  --gold: #c7a15a;
  --gold-strong: #b88735;
  --danger: #b91c1c;
  --shadow: 0 16px 40px rgba(42, 31, 15, 0.08);
  --save-add-button-width: 96px;
  /*
   * general-mobile-intro-left-align-to-s01-border-001
   * Cream-zone / detailed-calculator intro inset = module CONTENT left
   * (1px card border + QHC/entry panel pad), same as .homepage-product-lead
   * and Services Colaboradores body text — not the deeper DPC number column.
   */
  --smp-module-content-inset: 13px; /* 1 + 12 (.qhc-panel) */
}

[hidden] {
  display: none !important;
}

@media (min-width: 901px) {
  :root {
    --smp-module-content-inset: 15px; /* 1 + 14 */
  }
}

@media (max-width: 480px) {
  :root {
    --smp-module-content-inset: 10px; /* 1 + 9 (phone QHC / Services entry) */
  }
}

/* V2 Phase A: product-save workspace. */








































































* {
  box-sizing: border-box;
}

/* global-mobile-force-dark-light-theme-hardening-001
   Same cream canvas at every width. Do not leave html/app-shell transparent. */
html {
  background: var(--bg);
  color: var(--ink);
  color-scheme: only light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  color-scheme: only light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  color-scheme: light;
  font: inherit;
}

.app-shell {
  background: var(--bg);
  color: var(--ink);
  color-scheme: only light;
  min-height: 100vh;
  padding: 10px;
}

.page-layout {
  align-items: start;
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  /* Main column flexes so 1280–1360 viewports do not clip; ad rail stays fixed. */
  grid-template-columns: minmax(0, 1fr) 300px;
  margin: 0 auto;
  max-width: 1400px;
  width: 100%;
}

.workspace {
  max-width: none;
  min-width: 0;
  width: 100%;
}

/* homepage-introduction-and-quick-assessment-final-001: ordinary body intro, not a heading
   homepage-positioning-lead-qhc-title-left-align-001: left inset matches QHC title
   (module border 1px + .qhc-panel padding-left). */
.homepage-product-lead {
  box-sizing: border-box;
  margin: 0 0 10px;
  max-width: 100%;
  /* default / tablet: .qhc-panel padding-left 12px + border 1px */
  padding-left: 13px;
}

.homepage-product-intro,
p.homepage-product-intro {
  color: var(--muted);
  font-size: clamp(0.9375rem, 0.88rem + 0.35vw, 1.1875rem);
  font-weight: 400;
  height: auto;
  letter-spacing: normal;
  line-height: 1.45;
  margin: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (min-width: 901px) {
  .homepage-product-lead {
    /* desktop: .qhc-panel padding-left 14px + border 1px */
    padding-left: 15px;
  }
}

@media (max-width: 720px) {
  .homepage-product-lead {
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .homepage-product-lead {
    /* phone: #quick-health-check panel padding-left 9px + border 1px */
    padding-left: 10px;
  }
}

.legacy-section-title {
  font: inherit;
  font-weight: 650;
  margin: 0;
}

.single-column-grid {
  width: 100%;
}

.topbar {
  align-items: center;
  display: grid;
  gap: 6px 12px;
  grid-template-columns: minmax(0, 1fr) max-content;
  justify-content: start;
  margin-bottom: 2px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1400px;
  position: relative;
  width: 100%;
  z-index: 50;
}

.brand-lockup {
  display: grid;
  gap: 2px;
  grid-column: 1;
  justify-self: center;
  justify-items: center;
  min-width: 0;
}

.brand-logo-picture {
  background: transparent;
  display: block;
  line-height: 0;
  max-width: min(560px, 92vw);
  width: 100%;
}

.brand-logo {
  background: transparent;
  color-scheme: light;
  display: block;
  height: auto;
  /* brand-logo-responsive-size-final-polish-001: desktop >900px homepage cap */
  max-height: 60px;
  max-width: min(560px, 92vw);
  object-fit: contain;
  width: 100%;
}

/* restaurant-calculation-logic-deep-audit-and-public-open-001 — legacy text-link sector entry (kept for historical pin tests) */
.homepage-sector-nav {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  max-width: 52rem;
}

.homepage-sector-entry {
  color: #165536;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: fit-content;
}

.homepage-sector-entry:hover,
.homepage-sector-entry:focus-visible {
  color: #0f3f28;
}

.homepage-sector-entry-hint {
  color: #64716b;
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0;
  max-width: 40rem;
}

/*
 * homepage-industry-navigation-fixed-card-system-001
 * + homepage-industry-entry-within-business-management-001
 *
 * Industry entry is secondary/compact inside Daily Business Management.
 * Two equal columns on phone+; auto height for five-language wrap; no truncation.
 * Incomplete industries stay out of the DOM (config gate unchanged).
 */
.homepage-industry-nav {
  align-content: start;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-auto-rows: min-content;
  height: auto;
  margin: 8px 0 16px;
  max-width: 52rem;
  min-height: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .homepage-industry-nav {
    padding-left: var(--smp-module-content-inset);
    padding-right: var(--smp-module-content-inset);
  }
}

.homepage-industry-nav__hint {
  color: #64716b;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0;
  max-width: 40rem;
}

.homepage-industry-nav__grid {
  align-content: start;
  display: grid;
  gap: 8px;
  grid-auto-rows: min-content;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: auto;
  justify-content: start;
  margin: 0;
  min-height: 0;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.homepage-industry-nav__grid[hidden] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.homepage-industry-card {
  align-items: center;
  background: #f7faf8;
  border: 1px solid #d5e0db;
  border-radius: 8px;
  box-sizing: border-box;
  color: #3a564c;
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  font-weight: 600;
  height: auto;
  justify-content: center;
  line-height: 1.3;
  max-height: none;
  max-width: none;
  min-height: 40px;
  min-width: 0;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.homepage-industry-card:hover,
.homepage-industry-card:focus-visible {
  background: #eef6f4;
  border-color: #9fb5a8;
  color: #0f3f28;
  outline: none;
}

.homepage-industry-card:focus-visible {
  box-shadow: 0 0 0 2px rgba(22, 85, 54, 0.22);
}

/* general-business-context-label-and-description-001: current General identity on this page */
.homepage-industry-card--current {
  background: #e8f2ed;
  border-color: #7a9f8c;
  color: #0f3f28;
  cursor: default;
  font-weight: 700;
}

.homepage-industry-card--current:hover,
.homepage-industry-card--current:focus-visible {
  background: #e8f2ed;
  border-color: #7a9f8c;
  color: #0f3f28;
}

.homepage-industry-card__label {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0;
  text-align: center;
  white-space: normal;
  width: 100%;
  word-break: normal;
}

@media (max-width: 360px) {
  .homepage-industry-nav__grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: start;
  }
}

@media (min-width: 720px) {
  .homepage-industry-nav__grid {
    grid-template-columns: repeat(3, minmax(0, 200px));
    width: auto;
  }

  .homepage-industry-card {
    max-width: 200px;
  }
}


.topbar-tools {
  align-self: end;
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  grid-column: 2;
  isolation: isolate;
  justify-self: end;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.topbar-settings {
  position: relative;
  z-index: 40;
}

.account-panel {
  position: relative;
  z-index: 39;
}

.global-currency-field {
  align-items: center;
  display: grid;
  flex: 0 0 auto;
  max-width: min(100%, 14rem);
  min-width: 0;
  position: relative;
  width: fit-content;
  z-index: 30;
}

.currency-field.global-currency-field > select {
  background-color: var(--surface);
  color: transparent;
  grid-area: 1 / 1;
  height: 38px;
  max-width: 100%;
  min-height: 38px;
  /* Native <select> min-content follows longest option — do not let that stretch the control. */
  min-width: 100%;
  overflow: hidden;
  padding-bottom: 8px;
  padding-top: 8px;
  pointer-events: auto;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 0;
  z-index: 1;
}

.currency-field.global-currency-field > select option {
  color: var(--ink);
}

.currency-selected-label {
  align-items: center;
  align-self: stretch;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 0.35em;
  grid-area: 1 / 1;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0 24px 0 9px;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: max-content;
  z-index: 2;
}

.currency-selected-region {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency-selected-code {
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.currency-selected-label.is-currency-unset .currency-selected-placeholder {
  font-weight: 600;
}

.language-field,
.country-field {
  display: grid;
  gap: 6px;
}

.language-field span,
.country-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-field select,
.country-field input,
.country-combobox-toggle {
  background-color: var(--surface);
  min-height: 38px;
  padding: 8px 32px 8px 10px;
}

.language-support-list {
  background: rgba(243, 238, 227, 0.46);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 3px;
  line-height: 1.35;
  max-height: 72px;
  overflow: auto;
  padding: 8px;
}

.language-support-list strong {
  color: var(--muted);
  font-size: 11px;
}

.country-field input {
  padding-right: 10px;
}

.country-combobox {
  position: relative;
}

.country-combobox-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  padding-left: 2px;
  padding-right: 22px;
  text-align: left;
  width: 100%;
}

.country-combobox-toggle::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  content: "";
  position: absolute;
  right: 2px;
  top: 16px;
}

.country-combobox-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  left: 0;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
}

/* Author display:grid must not override HTML [hidden] — residual panel intercepts clicks. */
.country-combobox-panel[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* Closed Language/Country details: no residual popover hit-target over page content. */
.topbar-settings:not([open]) > .settings-popover {
  display: none !important;
  pointer-events: none !important;
}

.topbar-settings:not([open]) .country-combobox-panel {
  display: none !important;
  pointer-events: none !important;
}

/* Closed Account panel: visibility:hidden can still intercept in some engines. */
.account-panel:not([open]) > .account-popover {
  display: none !important;
  pointer-events: none !important;
}

.country-list {
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}

.country-option {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  min-height: 34px;
  padding: 7px 8px;
  text-align: left;
}

.country-option:hover,
.country-option.is-highlighted {
  background: var(--surface-soft);
}

.country-option[aria-selected="true"] {
  color: var(--accent);
  font-weight: 900;
}

.topbar-settings summary,
.account-panel summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  height: 38px;
  list-style: none;
  min-height: 38px;
  padding: 9px 12px;
  white-space: nowrap;
  word-break: keep-all;
}

.topbar-settings summary::-webkit-details-marker,
.account-panel summary::-webkit-details-marker {
  display: none;
}

.topbar-settings summary#settings-summary {
  max-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

.settings-popover {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  max-height: min(70vh, 520px);
  max-width: min(300px, calc(100vw - 24px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(300px, calc(100vw - 24px));
  z-index: 5;
}

.account-popover {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  display: grid;
  gap: 0;
  left: auto;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  max-width: calc(100vw - 24px);
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: fixed;
  right: auto;
  top: 0;
  visibility: hidden;
  white-space: normal;
  width: min(420px, calc(100vw - 24px));
  z-index: 80;
}

.account-panel[open] > .account-popover,
.account-panel[open] .account-popover.is-positioned {
  display: grid !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.account-close-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  height: 30px;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 30px;
  z-index: 2;
}

.account-close-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.account-popover-scroll {
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  max-height: inherit;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 8px;
  white-space: normal;
  width: 100%;
}

.account-auth-fields,
.account-signed-out-state,
.account-signed-in-state,
.account-decision {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-signed-in-state {
  gap: 10px;
}

.account-signed-in-heading {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.account-section {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-section-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.account-subsection-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.account-section-value,
.account-section-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.account-section-value {
  color: var(--ink);
  font-weight: 800;
}

.account-identity-section {
  gap: 1px;
}

.account-data-sync {
  gap: 6px;
}

.account-data-sync-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.account-data-sync-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-cloud-section {
  gap: 6px;
}

.account-sync-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.account-sync-actions .account-action {
  min-height: 40px;
}

.account-sign-out-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  justify-self: start;
  min-height: 36px;
  padding: 6px 12px;
  width: auto;
}

.account-action--compact {
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
  max-width: 100%;
  min-width: 0;
  padding: 4px 10px;
  white-space: normal;
  width: auto;
}

.account-business-summary {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.account-business-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-business-profile-editor {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  min-width: 0;
}

.account-business-profile-editor[hidden] {
  display: none !important;
}

.account-business-profile-form {
  display: grid;
  gap: 6px;
}

.account-business-profile-form-status {
  color: var(--danger, #b91c1c);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-business-profile-form-status[hidden] {
  display: none !important;
}

.account-business-profile-form-status.is-warning {
  color: var(--muted);
}

.account-business-field-error {
  color: var(--danger, #b91c1c);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin: 2px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.account-business-field-error[hidden] {
  display: none !important;
}

.account-business-profile-form .field.is-invalid input,
.account-business-profile-form .field.is-invalid select,
.account-business-profile-form [aria-invalid="true"] {
  border-color: var(--danger, #b91c1c);
}

.account-business-profile-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-business-location-section {
  border: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.account-business-location-section > legend {
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 2px;
  padding: 0;
}

.account-business-location-fields {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-business-location-section--registered {
  gap: 4px;
}

.account-business-registered-custom:empty,
.account-business-registered-custom[hidden] {
  display: none !important;
  margin: 0;
  min-height: 0;
  padding: 0;
}

.account-business-formal-locale {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-business-formal-locale p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 430px) {
  .account-business-summary {
    grid-template-columns: 1fr;
  }

  .account-business-summary [data-account-edit-business] {
    justify-self: stretch;
    text-align: center;
  }
}

.account-collapsible-section {
  border-top: 1px solid var(--line);
  min-width: 0;
  padding-top: 4px;
}

.account-collapsible-section > .account-collapsible-summary,
.account-data-management > summary,
.auth-linked-methods > summary {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: auto;
  justify-content: space-between;
  line-height: 1.35;
  list-style: none;
  min-height: 36px;
  min-width: 0;
  padding: 4px 0;
  white-space: normal;
}

.account-collapsible-section > .account-collapsible-summary::-webkit-details-marker,
.account-data-management > summary::-webkit-details-marker,
.auth-linked-methods > summary::-webkit-details-marker {
  display: none;
}

.account-collapsible-section > .account-collapsible-summary::after,
.account-data-management > summary::after,
.auth-linked-methods > summary::after {
  color: var(--muted);
  content: "›";
  flex: 0 0 auto;
  font-weight: 700;
  margin-left: 8px;
}

.account-collapsible-section[open] > .account-collapsible-summary::after,
.account-data-management[open] > summary::after,
.auth-linked-methods[open] > summary::after {
  transform: rotate(90deg);
}

.account-data-management {
  border-top: 1px solid var(--line);
  min-width: 0;
  padding-top: 4px;
}

.account-data-management-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 6px;
}

.account-danger-zone {
  border-top: 1px solid rgba(194, 65, 65, 0.28);
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-top: 8px;
}

.account-danger-zone-label {
  color: #9f1f1f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.account-danger-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.account-danger-btn {
  background: transparent;
  border: 1px solid #c24141;
  border-radius: 8px;
  color: #9f1f1f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  justify-self: start;
  min-height: 36px;
  padding: 7px 12px;
  width: auto;
}

.account-danger-btn--final {
  margin-top: 2px;
}

.account-action--tertiary {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  justify-self: start;
  min-height: 34px;
  padding: 6px 0;
  text-decoration: underline;
  width: auto;
}

.account-action--half {
  min-width: 0;
  width: 100%;
}

.account-auth-fields .field,
.account-auth-fields input,
.account-auth-fields button,
.account-decision button,
.account-data-management-body button,
.account-sync-actions button,
.account-action {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.account-danger-btn,
.account-action--tertiary,
.account-sign-out-btn,
.account-action--compact {
  width: auto;
}

@media (max-width: 720px) {
  .account-data-sync-grid {
    grid-template-columns: 1fr;
  }
}

.account-intro,
.account-sync-meta,
.account-local-meta,
.account-summary-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.account-decision {
  background: rgba(243, 238, 227, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.account-decision p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
}

.account-action {
  min-height: 40px;
}

.account-signed-in-state > strong,
.account-signed-out-state > strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
  padding-right: 28px;
}

.account-unavailable-state strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.account-unavailable-state p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.account-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.account-status[hidden] {
  display: none !important;
}

.account-display-name-view {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.account-display-name-view span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-inline-action {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.account-signed-in-email,
.account-save-mode {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.account-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.account-popover [hidden] {
  display: none !important;
}

.account-profile-group {
  background: rgba(244, 238, 227, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.account-profile-grid,
.account-profile-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.account-profile-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-profile-field .account-profile-view-value {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--ink);
  display: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  min-height: 40px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  width: 100%;
}

.account-field-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.account-profile-field input,
.account-profile-field select,
.account-profile-field textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 40px;
  min-width: 0;
  padding: 9px 10px;
  width: 100%;
}

.account-profile-field textarea {
  line-height: 1.4;
  min-height: 74px;
  resize: vertical;
}

.account-profile-field input:disabled,
.account-profile-field input:read-only,
.account-profile-field select:disabled,
.account-profile-field textarea:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  opacity: 1;
}

.account-profile-view-mode .account-profile-field input,
.account-profile-view-mode .account-profile-field select,
.account-profile-view-mode .account-profile-field textarea {
  display: none;
}

.account-profile-view-mode .account-profile-field .account-profile-view-value {
  display: flex;
}

.account-profile-view-mode .account-field-note {
  display: none;
}

.account-profile-edit-mode .account-profile-field input,
.account-profile-edit-mode .account-profile-field select,
.account-profile-edit-mode .account-profile-field textarea {
  display: block;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  min-height: 40px;
  padding: 9px 10px;
  pointer-events: auto;
}

.account-profile-edit-mode .account-profile-field .account-profile-view-value {
  display: none;
}

.account-profile-edit-mode .account-profile-field textarea {
  min-height: 74px;
  resize: vertical;
}

.account-profile-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.account-profile-actions button {
  justify-content: center;
  min-height: 40px;
  width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04;
  margin-bottom: 0;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 0;
}

#pricing-title {
  text-align: center;
}

h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

h4 {
  font-size: 15px;
  line-height: 1.25;
  margin: 0 0 12px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
  padding: 12px 14px;
  white-space: nowrap;
}

.status-pill {
  background: var(--surface-soft);
}

.section-panel {
  display: block;
  width: 100%;
}

.section-panel + .section-panel {
  margin-top: 9px;
}

#period-gross + #operating-expenses {
  margin-top: 9px;
}

.ad-rail {
  display: block;
  position: sticky;
  top: 24px;
}

.ad-rail-card {
  align-items: center;
  background: rgba(255, 253, 252, 0.72);
  border: 1px dashed rgba(199, 161, 90, 0.58);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
}

.ad-rail-card {
  min-height: 280px;
  padding: 18px;
}

.content-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 55fr) minmax(360px, 45fr);
}

.input-panel,
.result-panel,
.placeholder-section {
  background: var(--surface);
  border: 1px solid rgba(199, 161, 90, 0.42);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px;
  width: 100%;
}

.section-heading {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  margin-bottom: 7px;
  padding-bottom: 7px;
  text-align: center;
}

.section-title-line {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.section-heading-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.section-toggle-indicator {
  display: none;
}

.section-number {
  background: linear-gradient(180deg, #17352b 0%, #10231d 100%);
  border: 1px solid rgba(199, 161, 90, 0.82);
  border-radius: 7px;
  color: #e2bd6b;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  padding: 5px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 253, 252, 0.16), 0 1px 2px rgba(23, 33, 29, 0.12);
}

.section-heading h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.section-heading p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

#period-gross .section-heading,
#operating-expenses .section-heading,
#daily-break-even .section-heading {
  align-items: center;
  grid-template-columns: auto minmax(0, auto);
  justify-content: center;
  text-align: left;
}

#period-gross .section-heading-copy,
#operating-expenses .section-heading-copy,
#daily-break-even .section-heading-copy {
  justify-items: start;
}

.section-body {
  display: grid;
  gap: 5px;
}

.compact-note {
  background: rgba(243, 238, 227, 0.52);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  padding: 5px 6px;
}

#period-gross .inbound-outbound-rule-note,
#period-gross .non-calculation-reminder {
  justify-self: center;
  max-width: 820px;
  text-align: center;
  width: min(100%, 820px);
}

#period-gross .amount-entry-note {
  justify-self: stretch;
  margin: 0;
  max-width: none;
  text-align: left;
  width: 100%;
}

.period-amount-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr;
}

.period-total-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.period-total-card {
  background: rgba(255, 253, 252, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0;
  padding: 6px;
}

.period-amount-card .period-total-card {
  align-content: start;
  display: grid;
  gap: 4px;
  min-height: auto;
  padding: 6px;
}

.period-total-card .period-amount-total[readonly] {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 900;
}

.period-amount-card {
  background: rgba(243, 238, 227, 0.34);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 6px;
}

.period-amount-header {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr);
}

.period-amount-header h3 {
  margin: 0;
}

.period-settlement-note {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
}

.period-detail-panel {
  display: grid;
  gap: 4px;
  width: 100%;
}

.period-detail-save-row {
  display: flex;
  justify-content: flex-end;
  padding: 1px 0 2px;
}

.period-detail-save-row .save-period-detail {
  min-height: 42px;
  white-space: nowrap;
  width: auto;
}

.period-detail-header,
.period-detail-row {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(120px, 1fr) minmax(96px, 0.7fr) 36px;
}

.period-detail-header--with-date,
.period-detail-row--with-date {
  grid-template-columns: minmax(110px, 1fr) minmax(168px, 0.85fr) minmax(104px, 0.7fr) 40px;
}

.period-detail-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 2px;
}

.period-detail-rows {
  display: grid;
  gap: 4px;
}

.validation-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  padding: 5px 6px;
}

.field-row {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.period-date-row {
  align-items: end;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(120px, 1fr);
}

.field-row.break-even-summary-row {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-row.break-even-summary-row[hidden] {
  display: none;
}

.field-row.break-even-summary-row .field {
  align-content: start;
  grid-template-rows: auto auto auto;
}

.break-even-status-note,
.break-even-method-note {
  background: rgba(243, 238, 227, 0.42);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  margin: 5px 0 0;
  padding: 4px 5px;
}

.break-even-status-note {
  background: #fff7ef;
  border-color: rgba(199, 104, 65, 0.45);
  color: #8a3b1f;
}

.break-even-status-note[hidden] {
  display: none;
}

.average-margin-panel {
  background: rgba(255, 253, 250, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  margin-bottom: 6px;
  padding: 6px;
}

.average-margin-copy {
  display: grid;
  gap: 2px;
}

.average-margin-copy h3,
.average-margin-copy p,
.average-margin-copy small,
.average-margin-product-status,
.average-margin-help,
.average-margin-current {
  margin: 0;
}

.average-margin-copy h3 {
  color: var(--ink);
  font-size: 18px;
}

.average-margin-copy p,
.average-margin-copy small,
.average-margin-product-status,
.average-margin-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.average-margin-control {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1.4fr) minmax(130px, 0.5fr) minmax(130px, 0.5fr);
}

.average-margin-window-field {
  min-width: 0;
}

.percent-input-shell {
  align-items: center;
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  width: 100%;
}

.percent-input-shell input {
  background: transparent;
  border: 0;
  box-shadow: none;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  width: var(--average-margin-input-width, 3ch);
}

.percent-input-shell input[type="number"] {
  -moz-appearance: textfield;
}

.percent-input-shell input[type="number"]::-webkit-inner-spin-button,
.percent-input-shell input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.percent-input-suffix {
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  visibility: hidden;
}

.percent-input-shell.has-value .percent-input-suffix {
  visibility: visible;
}

.percent-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199, 161, 90, 0.2);
}

.average-margin-window-field input[readonly] {
  background: #f3eee4;
  color: #0d6b4c;
  font-weight: 900;
}

.margin-source-button {
  align-items: center;
  background: #fffdfa;
  border: 1px solid rgba(199, 161, 90, 0.45);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  min-width: 0;
  padding: 0 14px;
  white-space: nowrap;
}

.margin-source-button.is-selected {
  background: rgba(13, 107, 76, 0.08);
  border-color: rgba(13, 107, 76, 0.65);
  box-shadow: inset 0 -3px 0 #0d6b4c;
  color: #0d6b4c;
}

.margin-source-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.average-margin-current {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.average-margin-current.is-ready {
  color: #0d6b4c;
}

.section-body .field {
  margin-bottom: 0;
}



.currency-field select {
  min-width: 120px;
}

.money-input-shell {
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.money-input-shell > input {
  border: 0;
  border-radius: 0;
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

/*
 * FND-411 — shared formal money display.
 * Full currency+amount, tabular nums, no ellipsis / mid-number wrap / clip.
 * Extreme overflow: local horizontal scroll on the amount only (never page-level).
 */
.smp-money {
  box-sizing: border-box;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.money-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.money-input-shell:focus-within > input {
  box-shadow: none;
  outline: 0;
}

.resolved-currency-code {
  align-items: center;
  align-self: stretch;
  border-left: 1px solid var(--line);
  box-sizing: border-box;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  justify-content: center;
  letter-spacing: .04em;
  min-width: 62px;
  padding: 0 8px;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 4px;
  margin-bottom: 5px;
}

.field span,
.segmented-field legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.field small {
  color: var(--muted);
}

input,
select,
textarea,
.readonly-value {
  appearance: none;
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  color-scheme: light;
  min-height: 46px;
  outline: none;
  padding: 12px;
  width: 100%;
}

/* Native compact radios: must win over the global input shell above. */
.account-business-choice-row {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 0;
}

.account-business-choice {
  align-items: center;
  background: none;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  line-height: 1.35;
  margin: 0;
  max-width: 100%;
  min-height: 0;
  padding: 2px 0;
  width: auto;
}

.account-business-choice input[type="radio"] {
  -webkit-appearance: radio !important;
  appearance: auto !important;
  accent-color: var(--ink, #17211d);
  background: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  flex: 0 0 16px;
  height: 16px !important;
  margin: 0 !important;
  max-width: 16px !important;
  min-height: 0 !important;
  min-width: 16px !important;
  padding: 0 !important;
  width: 16px !important;
}

.mobile-field {
  display: contents;
  min-width: 0;
}

.mobile-field-label {
  display: none;
}

.readonly-value {
  align-items: center;
  background: var(--surface-soft);
  display: flex;
  font-weight: 900;
}

.date-input-shell {
  position: relative;
}

.date-display-input {
  padding-right: 52px;
}

.native-date-input {
  height: 1px;
  left: 12px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 38px;
  width: 1px;
}

.date-picker-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 2px;
  width: 42px;
}

.date-picker-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.period-detail-date-shell {
  min-width: 168px;
}

.period-detail-date-display {
  padding-right: 42px;
}

.period-detail-date-button {
  right: 6px;
  width: 34px;
}

.operating-expense-panel {
  display: grid;
  gap: 5px;
}

.operating-expense-panel h3 {
  margin-bottom: 0;
}

.operating-expense-header,
.operating-expense-row {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(118px, 0.9fr) minmax(120px, 1fr) minmax(116px, 0.9fr) minmax(96px, 0.75fr) minmax(160px, 1fr) minmax(130px, 0.95fr) 40px;
}

.operating-expense-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 2px;
}

.operating-expense-rows {
  display: grid;
  gap: 4px;
}

.operating-expense-period-amount,
.operating-expense-date-placeholder {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  font-weight: 900;
  min-height: 46px;
  padding: 10px 12px;
}

.operating-expense-date-display {
  padding-right: 42px;
}

.operating-expense-date-button {
  right: 6px;
  width: 34px;
}

.period-detail-editor,
.operating-expense-editor,
.saved-detail-header,
.saved-detail-row,
.saved-expense-header,
.saved-expense-row {
  align-items: end;
  display: grid;
  gap: 4px;
}

.period-detail-editor {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 260px);
}

.period-detail-editor--with-date {
  grid-template-columns: minmax(220px, 1.4fr) minmax(168px, 0.8fr) minmax(180px, 0.9fr);
}

.desktop-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.desktop-field > span:first-child {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.operating-expense-editor .save-operating-expense {
  align-self: end;
  justify-self: stretch;
  min-height: 46px;
  width: 100%;
}

.saved-detail-list,
.saved-expense-list {
  display: grid;
  gap: 3px;
}

.saved-detail-header,
.saved-detail-row {
  grid-template-columns: 36px minmax(180px, 1fr) minmax(160px, 220px) 42px;
}

.saved-detail-header--with-date,
.saved-detail-row--with-date {
  grid-template-columns: 36px minmax(180px, 1fr) minmax(140px, 180px) minmax(140px, 180px) 42px;
}

.saved-expense-header,
.saved-expense-row {
  grid-template-columns: 34px minmax(220px, 1fr) minmax(170px, 0.72fr) minmax(170px, 0.62fr) 42px;
}

.saved-detail-header,
.saved-expense-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 4px;
}

.saved-detail-row,
.saved-expense-row {
  background: rgba(255, 253, 252, 0.78);
  border: 1px solid rgba(199, 161, 90, 0.34);
  border-radius: 8px;
  cursor: pointer;
  min-height: 42px;
  padding: 6px 8px;
}

.saved-detail-row.is-selected,
.saved-expense-row.is-selected {
  border-color: rgba(13, 107, 76, 0.62);
  box-shadow: inset 3px 0 0 #0d6b4c;
}

.saved-detail-row span,
.saved-expense-row span,
.saved-detail-row strong,
.saved-expense-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-detail-name {
  display: grid;
  gap: 1px;
}

.saved-detail-name small {
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-detail-row .icon-action,
.saved-expense-row .icon-action {
  min-height: 34px;
  width: 34px;
}

.empty-detail-note {
  background: rgba(243, 238, 227, 0.34);
  border: 1px dashed rgba(199, 161, 90, 0.46);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  padding: 4px 5px;
}

.saved-expense-list .empty-detail-note {
  background: rgba(255, 253, 250, 0.7);
  border-style: solid;
  color: var(--muted);
}

.desktop-detail-error {
  padding: 8px 10px;
}

.operating-expense-editor {
  align-items: end;
  grid-template-columns: 130px minmax(180px, 1fr) 110px minmax(150px, 0.8fr) minmax(130px, 0.7fr) var(--save-add-button-width);
  gap: 5px;
}

.operating-expense-period-summary {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
}

.operating-expense-period-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.operating-expense-period-summary strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  min-width: 0;
  text-align: right;
}

.operating-expense-editor .save-operating-expense {
  grid-column: 6;
  grid-row: 1;
  min-width: 0;
  min-height: 46px;
}

@media (max-width: 1300px) and (min-width: 901px) {
  .operating-expense-editor {
    grid-template-columns: 118px minmax(150px, 1fr) 100px minmax(132px, 0.8fr) minmax(118px, 0.7fr) var(--save-add-button-width);
    gap: 8px;
  }

  .saved-expense-header,
  .saved-expense-row {
    grid-template-columns: 34px minmax(180px, 1fr) minmax(150px, 0.68fr) minmax(150px, 0.58fr) 38px;
  }
}

@media (min-width: 901px) {
  .topbar-tools {
    max-width: min(100%, 430px);
  }

  .global-currency-field {
    flex: 0 0 auto;
    max-width: min(100%, 14rem);
    min-width: 0;
    width: fit-content;
  }

  .currency-field.global-currency-field > select {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 100%;
    padding-right: 32px;
    width: 0;
  }

  .currency-selected-label {
    box-sizing: border-box;
    font-size: 13px;
    max-width: 100%;
    overflow: hidden;
    padding-right: 32px;
    text-overflow: ellipsis;
    width: max-content;
  }

  .currency-selected-region {
    display: inline;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .currency-selected-code {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
  }

  #period-gross .period-amount-grid {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #period-gross .period-amount-card {
    align-content: start;
    align-self: start;
    justify-content: stretch;
  }

  #period-gross .period-detail-editor:not(.period-detail-editor--with-date) {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.72fr);
  }

  #period-gross .period-detail-editor--with-date {
    gap: 8px 10px;
    grid-template-columns:
      minmax(0, 1.6fr)
      minmax(142px, 1.18fr)
      minmax(116px, 0.92fr);
  }

  #period-gross .period-detail-editor--with-date .desktop-field {
    min-width: 0;
    width: 100%;
  }

  #period-gross .period-detail-editor--with-date .desktop-field > span:first-child {
    display: block;
    line-height: 1.25;
    min-height: 16px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  #period-gross .period-detail-editor--with-date .desktop-field input,
  #period-gross .period-detail-editor--with-date .period-detail-date-shell {
    min-width: 0;
    width: 100%;
  }

  #period-gross .period-detail-editor--with-date .desktop-field:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  #period-gross .period-detail-editor--with-date .desktop-field:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  #period-gross .period-detail-editor--with-date .desktop-field:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  #period-gross .saved-detail-header:not(.saved-detail-header--with-date),
  #period-gross .saved-detail-row:not(.saved-detail-row--with-date) {
    grid-template-columns: 34px minmax(0, 1fr) minmax(118px, 0.62fr) 38px;
  }

  #period-gross .saved-detail-header--with-date,
  #period-gross .saved-detail-row--with-date {
    grid-template-columns: 34px minmax(0, 1fr) 90px 86px 38px;
  }

  #period-gross .period-settlement-note {
    grid-column: 1 / -1;
  }

  #period-gross .period-total-grid {
    display: none;
  }
}

@media (min-width: 901px) {
  #operating-expense-details-title,
  #operating-expenses .operating-expense-header,
  #add-operating-expense {
    display: none;
  }
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199, 161, 90, 0.2);
}

.segmented-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
}

.segmented-field label {
  align-items: center;
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
}

.segmented-field input {
  min-height: auto;
  width: auto;
}

.subsection {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 18px;
}













#product-margin #material-cost-title {
  display: none;
}



















































































































.icon-action {
  align-items: center;
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 46px;
}

.icon-action svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.icon-action:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
}

.secondary-action {
  align-items: center;
  background: var(--surface-soft);
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  text-align: center;
}

.primary-action {
  align-items: center;
  background: linear-gradient(180deg, #17352b 0%, #10231d 100%);
  border: 1px solid rgba(199, 161, 90, 0.62);
  border-radius: 8px;
  color: #fffdf8;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
}

button.primary-action:disabled,
button.primary-action[aria-disabled="true"] {
  background: #d9dfdc;
  border-color: #c4ccc8;
  box-shadow: none;
  color: #68736e;
  opacity: 1;
}

.compact-action {
  justify-self: start;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 10px;
}

.action-plus {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.inline-action {
  justify-self: start;
}

































.result-field {
  margin-bottom: 0;
}

.result-field .readonly-value {
  min-height: 46px;
  padding: 10px;
}

#margin-selling-price {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.metric-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-metrics {
  margin-top: 2px;
}

.metric-card {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-height: 0;
  padding: 6px;
}

.main-metric {
  border-color: rgba(199, 161, 90, 0.72);
}

.metric-card.focus {
  background: var(--surface-soft);
  border-color: rgba(15, 118, 110, 0.32);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  font-size: 25px;
  line-height: 1;
}

.result-details {
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 5px;
}

.result-details summary {
  cursor: pointer;
  font-weight: 800;
}

.detail-list {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.detail-row {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.notice-list {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.import-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-action {
  cursor: pointer;
}

.file-action input {
  display: none;
}

.import-summary,
.import-preview,
.import-issues {
  display: grid;
  gap: 8px;
}

.import-summary span,
.import-issues li {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.import-preview pre {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.data-tools-card {
  background: rgba(255, 253, 252, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 0;
}

.data-tools-card summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
}

.data-tools-card summary:hover {
  background: var(--surface-soft);
}

.data-tools-card summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

.data-tools-card summary::-webkit-details-marker {
  display: none;
}

.data-tools-card summary span {
  display: grid;
  gap: 3px;
}

.data-tools-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.data-tools-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.data-tools-card em {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
  gap: 7px;
  line-height: 1.2;
  padding: 0;
  white-space: nowrap;
}

.data-tools-card em::before {
  color: var(--accent);
  content: "▶";
  font-size: 12px;
  line-height: 1;
}

.data-tools-card[open] em::before {
  content: "▼";
}

.data-tools-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
}

.local-save-panel {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  grid-column: 1;
  justify-self: center;
  line-height: 1.45;
  margin-top: 12px;
  max-width: 760px;
  text-align: center;
}

.local-save-panel[hidden] {
  display: none !important;
}

.local-save-panel strong {
  color: var(--deep-green);
  font-weight: 900;
}

.local-save-panel strong[data-status="saving"] {
  color: var(--muted);
}

.local-save-panel strong[data-status="failed"] {
  color: var(--danger);
}

.subtle-note {
  background: rgba(243, 238, 227, 0.34);
  font-size: 12px;
  padding: 8px 10px;
}

.notice {
  border-radius: 8px;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.notice.important {
  background: #fef2f2;
  color: var(--danger);
}

.site-footer {
  align-items: center;
  background: var(--bg);
  color: var(--muted);
  display: grid;
  gap: 8px;
  line-height: 1.45;
  margin: 22px auto 0;
  max-width: 1040px;
  text-align: center;
}

.site-footer-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
}

.site-footer-links a {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

@media (max-width: 430px) {
  .site-footer-links {
    gap: 6px 10px;
  }
}

@media (max-width: 390px) {
  .site-footer-links a {
    line-height: 1.25;
  }
}

@media (max-width: 305px) {
  .site-footer-links {
    width: 100%;
  }
}

@media (min-width: 1280px) {
  .site-footer-links {
    gap: 8px 18px;
  }
}

.site-footer a {
  color: #0b3f2a;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer p {
  font-size: 12px;
  margin: 0;
}

/* homepage-copy-three-layer-finalization-001
   + homepage-dpc-description-and-about-layout-polish-001
   About reuses homepage-guide chrome; tighter spacing; body not capped at 40rem. */
.homepage-about.homepage-guide {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  width: 100%;
}

.homepage-about .homepage-guide-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(100%, 42rem);
  padding: 12px 16px 14px;
}

.homepage-about .homepage-about-overview {
  margin: 0 0 2px;
}

.homepage-about .homepage-guide-h3 {
  margin: 6px 0 0;
}

.homepage-about .homepage-guide-body > p {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
  margin: 0;
}

.homepage-about .homepage-guide-body > p.homepage-about-overview {
  color: var(--ink, #17211d);
}

@media (min-width: 901px) {
  .homepage-about .homepage-guide-body {
    max-width: min(100%, 48rem);
  }
}

/* Homepage five-language profit calculator guide
   Inside .workspace after Import/export so desktop centering is relative to the
   main content column (not the full page + ad rail). Mobile width unchanged. */
.homepage-guide {
  background: rgba(255, 253, 252, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--ink);
  display: block;
  margin: 18px auto 0;
  max-width: 1040px;
  min-width: 0;
  opacity: 1;
  padding: 0;
  visibility: visible;
  width: calc(100% - 8px);
}

/* Desktop with ad rail: stay in the left column; never span into .ad-rail. */
@media (min-width: 1181px) {
  .workspace > .homepage-guide {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    width: calc(100% - 8px);
  }
}

.homepage-guide-summary {
  align-items: start;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  list-style: none;
  min-height: 48px;
  opacity: 1;
  padding: 14px 16px;
  visibility: visible;
  width: 100%;
}

.homepage-guide-summary::-webkit-details-marker {
  display: none;
}

.homepage-guide-summary::marker {
  content: "";
  display: none;
}

.homepage-guide-summary:hover {
  background: var(--surface-soft);
}

.homepage-guide-summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

.homepage-guide-summary::after {
  color: var(--accent);
  content: "▶";
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  margin-top: 0.2em;
}

.homepage-guide[open] > .homepage-guide-summary::after {
  content: "▼";
}

.homepage-guide-title {
  color: var(--ink, #17211d);
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0;
  max-width: none;
  min-width: 0;
  opacity: 1;
  overflow-wrap: anywhere;
  visibility: visible;
}

.homepage-guide-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  max-width: 40rem;
  min-width: 0;
  padding: 14px 16px 16px;
}

/* Only the body is hidden when collapsed — never the summary/title/container. */
.homepage-guide:not([open]) > .homepage-guide-body {
  display: none;
}

.homepage-guide:not([open]) > .homepage-guide-summary,
.homepage-guide:not([open]) > .homepage-guide-summary > .homepage-guide-title {
  display: grid;
  visibility: visible;
  opacity: 1;
}

.homepage-guide:not([open]) > .homepage-guide-summary > .homepage-guide-title {
  display: block;
}

.homepage-guide-article-title {
  color: var(--ink, #17211d);
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.homepage-guide-intro,
.homepage-guide-section,
.homepage-guide-closing {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.homepage-guide-section {
  border-top: 1px solid rgba(226, 216, 200, 0.78);
  padding-top: 14px;
}

.homepage-guide-h3 {
  color: var(--ink, #17211d);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.homepage-guide-body p {
  color: var(--ink, #17211d);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}

.homepage-guide-formula {
  background: var(--surface-soft, #f3eee4);
  border-radius: 8px;
  margin: 0;
  max-width: 100%;
  padding: 10px 12px;
}

.homepage-guide-formula strong {
  color: var(--ink, #17211d);
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.homepage-guide-disclaimer {
  color: var(--muted, #64716b) !important;
  font-size: 0.8rem !important;
  font-style: italic;
  line-height: 1.5;
}

.homepage-guide-missing {
  color: var(--danger, #b42318);
}

.legal-card .homepage-guide.support-how-it-works {
  margin: 4px 0 12px;
  max-width: 100%;
  width: 100%;
}

.homepage-guide-steps {
  display: grid;
  gap: 14px;
  margin: 12px 0 16px;
  min-width: 0;
}

.homepage-guide-step {
  min-width: 0;
}

.homepage-guide-industry {
  margin: 0 0 16px;
}

.homepage-guide-save {
  margin: 0;
  min-width: 0;
}

.support-contact {
  margin: 0 0 8px;
  min-width: 0;
}

.support-contact-fallback {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.support-feedback-form {
  display: grid;
  gap: 8px;
  margin: 0 0 8px;
  max-width: 36rem;
  min-width: 0;
  width: 100%;
}

.support-feedback-message {
  box-sizing: border-box;
  font: inherit;
  max-width: 100%;
  min-height: 6.5rem;
  min-width: 0;
  padding: 8px 10px;
  resize: vertical;
  width: 100%;
}

.support-feedback-hp {
  height: 0;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.support-feedback-send {
  justify-self: start;
  margin-top: 0;
  padding: 8px 16px;
}

.support-feedback-status[data-kind="success"] {
  color: #17663a;
}

.support-feedback-status[data-kind="error"] {
  color: var(--danger, #b42318);
}

.support-contact-fallback a {
  overflow-wrap: anywhere;
}

@media (max-width: 430px) {
  .homepage-guide-h3,
  .homepage-guide-title {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* mobile-long-content-layout-normalization-001 — homepage data tools + guide */
@media (max-width: 699px) {
  .data-tools-card summary {
    align-items: start;
    column-gap: 8px;
    display: grid;
    grid-template-areas:
      "title chevron"
      "desc desc";
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .data-tools-card summary > span {
    display: contents;
  }

  .data-tools-card summary strong {
    grid-area: title;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .data-tools-card summary small {
    grid-area: desc;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .data-tools-card summary em {
    align-items: flex-start;
    grid-area: chevron;
    justify-self: end;
    margin-top: 0.15em;
    padding: 0;
  }

  /* Mobile only: hide duplicate visible label; keep text for accessible name. */
  .data-tools-card summary em .data-tools-expand-label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .data-tools-body > .import-export-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
  }

  .data-tools-body > .import-export-actions .secondary-action,
  .data-tools-body > .import-export-actions .compact-action,
  .data-tools-body > .import-export-actions .file-action {
    box-sizing: border-box;
    justify-content: center;
    justify-self: stretch;
    min-height: 44px;
    padding: 10px 12px;
    text-align: center;
    width: 100%;
  }

  /* Light separator between import/export tools and destructive clear/delete. */
  .data-tools-body > .import-export-actions:last-child {
    border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    margin-top: 2px;
    padding-top: 10px;
  }

  .data-tools-body > .compact-note.subtle-note {
    background: rgba(243, 238, 227, 0.28);
    border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    padding: 6px 8px;
  }

  .data-tools-body {
    gap: 6px;
  }

  .homepage-guide-summary {
    align-items: start;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .homepage-guide-summary::after {
    align-self: start;
    margin-top: 0.2em;
  }

  .homepage-guide-title {
    font-size: clamp(1.375rem, 5.8vw, 1.5rem); /* ~22–24px */
    line-height: 1.25;
  }

  .homepage-guide-article-title {
    font-size: clamp(1.125rem, 4.6vw, 1.25rem);
    line-height: 1.3;
  }

  .homepage-guide-body {
    gap: 14px;
    max-width: none;
    padding: 12px 14px 14px;
  }

  .homepage-guide-body p {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.55;
  }

  .homepage-guide-intro,
  .homepage-guide-section,
  .homepage-guide-closing {
    gap: 10px;
  }
}

.legal-page {
  background: var(--bg);
}

.legal-shell {
  background: var(--bg);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 980px;
  min-height: 100vh;
  padding: 24px;
}

.legal-topbar {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.legal-back-link {
  align-items: center;
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
  justify-self: start;
  min-height: 44px;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.legal-back-link:hover {
  border-color: var(--accent);
  color: #0b3f2a;
}

.legal-logo-link {
  justify-self: center;
  min-width: 0;
}

.legal-logo-link .brand-logo-picture,
.legal-logo-link .brand-logo {
  max-height: 78px;
  max-width: min(420px, 72vw);
}

.legal-language-field {
  display: grid;
  gap: 6px;
  justify-self: end;
  min-width: 150px;
}

.legal-language-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.legal-language-field select {
  background-color: var(--surface);
  min-height: 40px;
  padding: 8px 34px 8px 10px;
}

.legal-card {
  background: rgba(255, 253, 252, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 28px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-nav a {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #0b3f2a;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 10px;
  text-decoration: none;
}

.legal-nav a[aria-current="page"] {
  background: var(--surface-soft);
  border-color: rgba(15, 118, 110, 0.38);
}

.legal-card h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
}

.legal-updated {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.legal-content {
  display: grid;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
}

.legal-content--about {
  gap: 20px;
  max-width: 40rem;
}

.legal-section {
  border-top: 1px solid rgba(226, 216, 200, 0.78);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 16px;
}

.legal-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.legal-section h2 {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0;
}

.legal-section p,
.legal-section li {
  color: #2d3834;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.legal-section p {
  margin: 0;
}

.legal-section ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
}

.legal-closing {
  color: #1a2a24;
  font-weight: 700;
  margin-top: 4px;
}

.legal-missing {
  color: #9a3412;
  font-weight: 700;
  margin: 0;
}

.legal-footer {
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .brand-lockup,
  .topbar-tools {
    grid-column: 1;
  }

  .page-layout {
    display: block;
    max-width: 100%;
  }

  .ad-rail {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    color-scheme: only light;
    --save-add-button-width: 102px;
    /*
     * brand-logo-responsive-size-final-polish-001
     * Absolute mobile brand caps (not stacked % on prior sizes).
     */
    --smp-mobile-brand-logo-max-height: 36px;
    --smp-mobile-brand-logo-max-width: min(186px, 68vw);
  }

  html,
  body {
    background: #fbf6ed !important;
    color: var(--ink) !important;
    color-scheme: only light;
    /* OS forced-colors (Windows High Contrast), not Samsung auto-dark. */
    forced-color-adjust: none;
    max-width: 100%;
  }

  *,
  *::before,
  *::after {
    forced-color-adjust: none;
  }

  .app-shell {
    background: #fbf6ed;
    color: var(--ink);
    color-scheme: only light;
    /* Tighten cream padding around the smaller brand header. */
    padding: 0 2px 2px;
  }

  .site-footer {
    background: #fbf6ed;
    margin-top: 8px;
    padding: 0 8px 10px;
  }

  .site-footer-links {
    gap: 8px 12px;
  }

  .site-footer a {
    min-height: 34px;
    padding: 6px 2px;
  }

  .legal-shell {
    gap: 14px;
    padding: 12px;
  }

  .legal-topbar {
    align-items: center;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .legal-back-link {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
  }

  .legal-logo-link {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .legal-logo-link .brand-logo-picture,
  .legal-logo-link .brand-logo {
    max-height: 56px;
    max-width: min(252px, 70vw);
  }

  .legal-language-field {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: min(180px, 42vw);
  }

  .legal-card {
    gap: 12px;
    padding: 18px;
  }

  .legal-nav {
    justify-content: center;
  }

  .legal-section h2 {
    font-size: 18px;
  }

  .legal-section p,
  .legal-section li {
    font-size: 15px;
    line-height: 1.65;
  }

  .topbar {
    align-items: center;
    display: grid;
    /* brand-logo-responsive-size-final-polish-001: tighten brand chrome with smaller logo */
    gap: 2px 4px;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    margin-bottom: 0;
    max-width: 100%;
  }

  .brand-lockup {
    gap: 0;
    grid-column: 1 / -1;
    justify-self: center;
    justify-items: center;
    width: 100%;
  }

  .brand-logo-picture {
    margin-inline: auto;
    max-width: var(--smp-mobile-brand-logo-max-width);
    width: auto;
  }

  .brand-logo {
    display: block;
    height: auto;
    max-height: var(--smp-mobile-brand-logo-max-height);
    max-width: var(--smp-mobile-brand-logo-max-width);
    object-fit: contain;
    width: auto;
  }

  /* Same absolute mobile brand caps on Attendance (workforce). */
  .workforce-standalone__topbar {
    min-height: 0;
    padding-block: 2px;
  }

  .workforce-standalone__topbar .brand-logo-picture {
    margin-inline: auto;
    max-width: var(--smp-mobile-brand-logo-max-width);
    width: auto;
  }

  .workforce-standalone__topbar .brand-logo {
    display: block;
    height: auto;
    max-height: var(--smp-mobile-brand-logo-max-height);
    max-width: var(--smp-mobile-brand-logo-max-width);
    object-fit: contain;
    width: auto;
  }

  .topbar-tools {
    box-sizing: border-box;
    display: grid;
    gap: 3px 4px;
    grid-column: 1 / -1;
    /* Language + Account + Country/Currency are all content-sized — no 1fr stretch. */
    grid-template-columns: max-content max-content max-content;
    justify-content: end;
    justify-self: stretch;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .account-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .global-currency-field {
    align-items: center;
    display: grid;
    grid-column: 3;
    grid-row: 1;
    height: 34px;
    justify-self: end;
    max-width: min(100%, 11.5rem);
    min-width: 0;
    width: fit-content;
  }

  .currency-field.global-currency-field > select {
    box-sizing: border-box;
    height: 34px;
    max-width: 100%;
    min-height: 34px;
    min-width: 100%;
    padding-bottom: 6px;
    padding-top: 6px;
    width: 0;
  }

  .currency-selected-label {
    box-sizing: border-box;
    font-size: 12px;
    gap: 0.25em;
    height: 34px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-left: 7px;
    padding-right: 22px;
    width: max-content;
  }

  .currency-selected-label.is-currency-unset .currency-selected-placeholder {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .currency-selected-region {
    display: inline;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .currency-selected-code {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
  }

  .topbar-settings summary,
  .account-panel summary {
    align-items: center;
    border-radius: 7px;
    display: flex;
    font-size: 12px;
    height: 34px;
    justify-content: center;
    line-height: 1.1;
    max-width: 100%;
    min-height: 34px;
    overflow: hidden;
    padding: 6px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-settings summary {
    max-width: none;
    width: auto;
  }

  .account-panel summary {
    max-width: none;
    overflow-wrap: normal;
  }

  .topbar-settings {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .settings-popover {
    left: 0;
    right: auto;
    transform: none;
    width: min(220px, calc(100vw - 28px));
  }

  .account-sync-actions {
    grid-template-columns: 1fr;
  }

  .account-popover {
    box-sizing: border-box;
    max-height: calc(100dvh - 24px);
    max-width: calc(100vw - 24px);
    min-width: 0;
    width: min(420px, calc(100vw - 24px));
  }

  .account-popover,
  .account-popover *,
  .account-auth-fields,
  .account-auth-fields label {
    min-width: 0;
  }

  .account-auth-fields,
  .account-auth-fields label,
  .account-auth-fields input,
  .account-auth-fields button {
    box-sizing: border-box;
    width: 100%;
  }

  .local-save-panel {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding: 0 4px;
  }

  .content-grid,
.field-row,
.three-column-row,
.metric-grid,
.period-total-grid,
.period-amount-grid,
.period-amount-header,
.period-detail-header,
.period-detail-row,
.operating-expense-row {
    grid-template-columns: 1fr;
  }

  .page-layout,
.workspace,
.section-panel,
.input-panel,
.result-panel,
.placeholder-section,
.period-amount-card,
.period-total-card,
.operating-expense-panel,
.data-tools-card {
    max-width: 100%;
    min-width: 0;
  }

  .section-panel *,
.input-panel *,
.result-panel *,
.period-amount-card *,
.period-detail-panel *,
.operating-expense-panel *,
.average-margin-panel * {
    box-sizing: border-box;
    min-width: 0;
  }

  .field-row.break-even-summary-row {
    grid-template-columns: 1fr;
  }

  .period-detail-header,
.operating-expense-header {
    display: none;
  }

  .input-panel,
  .result-panel,
  .placeholder-section {
    background: rgba(255, 253, 250, 0.94);
    border-color: rgba(199, 161, 90, 0.58);
    padding: 4px;
  }

  #product-margin.input-panel,
  #product-margin .section01-flow,
  .input-panel.section01-flow {
    padding: 4px;
  }

  .section-panel {
    margin-bottom: 0;
  }

  .section-panel + .section-panel {
    margin-top: 8px;
  }

  #period-gross + #operating-expenses {
    margin-top: 5px;
  }

  .section-heading {
    gap: 2px;
    margin-bottom: 4px;
    padding-bottom: 4px;
    text-align: center;
  }

  #product-margin .section-heading {
    gap: 2px;
    margin-bottom: 2px;
    padding-bottom: 4px;
    text-align: left;
  }

  #product-margin .section-title-line {
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
  }

  #product-margin .section-title-line h2 {
    font-size: 20px;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: normal;
    text-wrap: balance;
    word-break: normal;
  }

  #product-margin .section-heading p {
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
  }

  #product-margin .section-number,
  .business-section-title-line > .section-number {
    font-size: 14px;
    padding: 4px 7px;
  }

  .s02-section > summary.business-section-heading,
  .s03-section > summary.business-section-heading {
    align-items: center;
    box-sizing: border-box;
    column-gap: 10px;
    display: grid;
    gap: 2px 8px;
    /* Geometry finalized in dpcSectionHeader.css (3-col operational grid). */
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
    margin-bottom: 4px;
    margin-inline: 0;
    max-width: none;
    padding: 4px 16px;
    text-align: left;
    width: 100%;
  }

  .business-section-title-line {
    /* Shared 02/03 alignment comes from dpcSectionHeader.css; keep responsive type only. */
    min-width: 0;
  }

  .s02-section > summary.business-section-heading > .business-section-title-line,
  .s03-section > summary.business-section-heading > .business-section-title-line {
    /* Deprecated centered width slot — replaced by dpcSectionHeader.css left grid. */
    width: auto;
  }

  .business-section-heading h2 {
    font-size: 20px;
    line-height: 1.2;
    margin: 0;
    text-align: left;
  }

  .business-section-heading .section-subtitle {
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
    text-align: left;
    width: 100%;
  }

  #period-gross.progressive-section .section-heading,
  #operating-expenses.progressive-section .section-heading,
  #daily-break-even.progressive-section .section-heading {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 3px 5px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-content: stretch;
    padding-right: 0;
    position: static;
    text-align: left;
  }

  .progressive-section .section-number {
    flex-shrink: 0;
  }

  .progressive-section .section-heading-copy {
    display: grid;
    gap: 2px;
    justify-items: start;
    min-width: 0;
    width: 100%;
  }

  .progressive-section .section-heading-copy h2,
  .progressive-section .section-heading-copy .section-subtitle {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .progressive-section .section-heading-copy .section-subtitle {
    margin: 0;
  }

  .progressive-section .section-toggle-indicator {
    align-items: center;
    border: 1px solid rgba(199, 161, 90, 0.46);
    border-radius: 999px;
    color: var(--green);
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    line-height: 1;
    min-width: 28px;
    place-self: center end;
    width: 28px;
  }

  .progressive-section .section-heading::after,
  .progressive-section.is-progress-collapsed .section-heading::after {
    content: none;
    display: none;
  }

  .progressive-section .section-heading:focus-visible {
    border-radius: 8px;
    outline: 2px solid rgba(13, 107, 76, 0.36);
    outline-offset: 4px;
  }

  .progressive-section.is-progress-collapsed {
    padding-bottom: 6px;
  }

  .progressive-section.is-progress-collapsed .section-heading {
    margin-bottom: 0;
  }

  .progressive-section.is-progress-collapsed .section-body {
    display: none;
  }

  .section-title-line {
    gap: 5px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 17px;
    margin-bottom: 4px;
  }

  .field {
    gap: 2px;
    margin-bottom: 4px;
  }

  .mobile-field {
    display: block;
  }

  .field span,
  .segmented-field legend,
  .mobile-field-label {
    color: var(--ink);
    display: block;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 2px;
  }

  input,
select,
textarea,
.readonly-value,
.operating-expense-period-amount,
.operating-expense-date-placeholder {
    background-color: #fffdfa;
    border-color: rgba(199, 161, 90, 0.42);
    color: var(--ink);
    color-scheme: light;
    -webkit-text-fill-color: currentColor;
    font-size: 16px;
    min-height: 40px;
    padding: 8px 10px;
    width: 100%;
  }

  select {
    background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
    font-size: 16px;
    line-height: 1.2;
    min-height: 44px;
    padding-bottom: 9px;
    padding-right: 34px;
    padding-top: 9px;
  }

  option {
    line-height: 1.2;
    margin: 0;
    padding: 8px 10px;
  }

  optgroup {
    line-height: 1.2;
    margin: 0;
    padding: 8px 10px;
  }

  .country-option {
    line-height: 1.2;
    margin: 0;
    min-height: 44px;
    padding: 8px 14px;
  }

  .date-display-input,
  .period-detail-date-display,
  .operating-expense-date-display {
    padding-right: 42px;
    text-overflow: ellipsis;
  }

  .date-picker-button {
    height: 38px;
    right: 4px;
    top: 2px;
    width: 38px;
  }

  .period-detail-date-shell {
    min-width: 0;
  }

  .period-detail-row,
.operating-expense-row {
    background: #fffdfa;
    border: 1px solid var(--line);
    border-radius: 8px;
    gap: 4px;
    padding: 4px;
  }

  .period-detail-rows,
.operating-expense-rows {
    gap: 3px;
  }

  .icon-action {
    justify-self: end;
    min-height: 36px;
    padding: 0;
    width: 42px;
  }

  .icon-action svg {
    height: 18px;
    width: 18px;
  }

  .secondary-action {
    min-height: 38px;
    padding: 8px 12px;
  }

  .compact-note,
  .validation-note {
    font-size: 13px;
    line-height: 1.45;
    padding: 4px;
  }

  .metric-grid {
    gap: 4px;
  }

  .metric-card {
    background: #fbfdfb;
    gap: 3px;
    min-height: 0;
    padding: 5px;
  }

  .metric-card span {
    font-size: 12px;
    line-height: 1.25;
  }

  .metric-card strong {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .section-body,
  .period-detail-panel,
  .operating-expense-panel {
    gap: 4px;
  }

  .period-total-card,
  .period-amount-card {
    padding: 4px;
  }

  .period-amount-header h3 {
    font-size: 17px;
    line-height: 1.3;
  }

  .period-settlement-note {
    text-align: left;
  }

  .result-field .readonly-value {
    min-height: 40px;
    padding: 8px 10px;
  }















  #product-margin .subsection {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  #product-margin #material-cost-title {
    display: none;
  }



  #period-gross .period-detail-panel {
    gap: 4px;
  }











































































































  #product-margin .inline-action,
  #period-gross .add-period-detail {
    background: #fffdfa;
    border: 1px dashed rgba(199, 161, 90, 0.72);
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }













  #product-margin #pricing-title {
    margin-bottom: 8px;
  }























  #period-gross .period-total-grid,
  #period-gross .period-amount-grid {
    gap: 4px;
  }

  #period-gross .section-heading {
    text-align: left;
  }

  #period-gross .section-title-line {
    justify-content: flex-start;
  }

  #period-gross .section-heading p {
    max-width: 100%;
  }

  #period-gross .period-date-row {
    align-items: end;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(82px, 0.52fr);
  }

  #period-gross .period-date-row .field:last-child {
    grid-column: auto;
  }

  #period-gross .period-date-row .field span {
    min-height: 18px;
    white-space: nowrap;
  }

  #period-gross .period-date-row .readonly-value,
  #period-gross .period-date-row input {
    min-height: 42px;
  }

  #period-gross .period-date-row .readonly-value {
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
  }

  #period-gross .date-display-input,
  #period-gross .period-detail-date-display {
    font-size: 14px;
    padding-left: 8px;
    padding-right: 34px;
  }

  #period-gross .date-picker-button {
    height: 34px;
    width: 34px;
  }

  #period-gross .compact-note {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr);
    justify-self: stretch;
    max-width: none;
    text-align: left;
    width: 100%;
  }

  #period-gross .compact-note::before {
    align-items: center;
    background: #0d6b4c;
    border-radius: 999px;
    color: #fffdf8;
    content: "i";
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    line-height: 1;
    width: 18px;
  }

  #period-gross .period-total-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #period-gross .period-amount-grid {
    grid-template-columns: 1fr;
  }

  #period-gross .period-total-card,
  #period-gross .period-amount-card {
    background: rgba(255, 253, 252, 0.76);
  }

  #period-gross .period-total-card {
    border-color: rgba(199, 161, 90, 0.44);
    padding: 4px;
  }

  #period-gross .period-total-card span {
    min-height: 18px;
  }

  #period-gross .period-total-card input {
    font-weight: 800;
  }

  #period-gross .period-amount-card {
    border-color: rgba(199, 161, 90, 0.5);
    gap: 4px;
    padding: 4px;
  }

  #period-gross .period-amount-header h3 {
    font-size: 18px;
    font-weight: 900;
  }

  #period-gross .period-detail-row {
    align-items: end;
    background: #fffdfa;
    border-color: rgba(199, 161, 90, 0.5);
    box-shadow: 0 10px 26px rgba(28, 45, 39, 0.05);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  #period-gross .period-detail-row .mobile-field:first-child {
    grid-column: 1 / -1;
  }

  #period-gross .period-detail-row:not(.period-detail-row--with-date) .mobile-field {
    grid-column: auto;
  }

  #period-gross .period-detail-row:not(.period-detail-row--with-date) {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 42px;
  }

  #period-gross .period-detail-row:not(.period-detail-row--with-date) .mobile-field:first-child {
    grid-column: auto;
  }

  #period-gross .period-detail-row:not(.period-detail-row--with-date) .icon-action {
    grid-column: auto;
  }

  #period-gross .period-detail-row--with-date {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  }

  #period-gross .period-detail-row--with-date .mobile-field:nth-child(2),
  #period-gross .period-detail-row--with-date .mobile-field:nth-child(3) {
    grid-column: auto;
  }

  #period-gross .period-detail-row .icon-action {
    grid-column: 2;
    justify-self: end;
    min-height: 42px;
    width: 46px;
  }

  #period-gross .period-detail-row:not(.period-detail-row--with-date) .icon-action {
    width: 42px;
  }

  #period-gross .period-detail-row--with-date .icon-action {
    grid-column: 3;
    width: 42px;
  }

  #period-gross .period-detail-editor,
  #period-gross .period-detail-editor--with-date {
    align-items: stretch;
    background: #fffdfa;
    border: 1px solid rgba(199, 161, 90, 0.5);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(28, 45, 39, 0.05);
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1fr);
    padding: 4px;
  }

  #period-gross .period-detail-editor .desktop-field {
    grid-column: 1 / -1;
    min-width: 0;
  }

  #period-gross .period-detail-save-row {
    padding-bottom: 2px;
  }

  #period-gross .period-detail-save-row .save-period-detail {
    font-size: 14px;
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
  }

  #period-gross .saved-detail-header {
    display: none;
  }

  #period-gross .saved-detail-row,
  #period-gross .saved-detail-row--with-date {
    align-items: center;
    display: grid;
    gap: 3px 4px;
    grid-template-columns: 28px minmax(0, 1fr) 42px;
    min-height: 0;
    padding: 4px;
  }

  #period-gross .saved-detail-row > span:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  #period-gross .saved-detail-row .saved-detail-name {
    grid-column: 2;
    grid-row: 1;
  }

  #period-gross .saved-detail-row > span:not(:first-child):not(.saved-detail-name) {
    color: var(--muted);
    font-size: 12px;
    grid-column: 2;
    grid-row: 2;
  }

  #period-gross .saved-detail-row strong {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  #period-gross .saved-detail-row--with-date strong {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  #period-gross .saved-detail-row .icon-action {
    grid-column: 3;
    grid-row: 1 / 3;
    justify-self: end;
    width: 42px;
  }

  #period-gross .saved-detail-row--with-date .icon-action {
    grid-row: 1 / 4;
  }

  #period-gross .section-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #period-gross .section-metrics .metric-card {
    min-height: 0;
  }

  #operating-expenses .section-heading {
    text-align: left;
  }

  #operating-expenses .section-title-line {
    justify-content: flex-start;
  }

  #operating-expenses .compact-note {
    align-items: center;
    display: grid;
    gap: 4px;
    grid-template-columns: auto minmax(0, 1fr);
    text-align: left;
  }

  #operating-expenses .compact-note::before {
    align-items: center;
    background: #0d6b4c;
    border-radius: 999px;
    color: #fffdf8;
    content: "i";
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    line-height: 1;
    width: 18px;
  }

  #operating-expenses .operating-expense-panel {
    background: transparent;
    border: 0;
    padding: 0;
  }

  #operating-expense-details-title,
  #operating-expenses .operating-expense-header,
  #add-operating-expense {
    display: none;
  }

  #operating-expenses .operating-expense-rows {
    gap: 4px;
  }

  #operating-expenses .desktop-operating-expense-panel {
    display: grid;
    gap: 4px;
  }

  #operating-expenses .operating-expense-editor {
    align-items: end;
    background: #fffdfa;
    border: 1px solid rgba(199, 161, 90, 0.5);
    border-radius: 8px;
    border-color: rgba(199, 161, 90, 0.5);
    box-shadow: 0 10px 26px rgba(28, 45, 39, 0.05);
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) var(--save-add-button-width);
    padding: 4px;
  }

  #operating-expenses .operating-expense-editor .desktop-field:nth-child(1),
  #operating-expenses .operating-expense-editor .desktop-field:nth-child(3) {
    grid-column: 1 / -1;
  }

  #operating-expenses .operating-expense-editor .desktop-field:nth-child(1) {
    grid-row: 1;
  }

  #operating-expenses .operating-expense-editor .desktop-field:nth-child(3) {
    grid-row: 2;
  }

  #operating-expenses .operating-expense-editor .desktop-field:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  #operating-expenses .operating-expense-editor .desktop-field:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  #operating-expenses .operating-expense-editor .desktop-field:nth-child(5) {
    grid-column: 1;
    grid-row: 5;
  }

  #operating-expenses .operating-expense-period-summary {
    grid-column: 1 / -1;
  }

  #operating-expenses .operating-expense-period-summary {
    grid-row: 6;
    min-height: 48px;
  }

  #operating-expenses .save-operating-expense {
    align-self: end;
    font-size: 14px;
    grid-column: 3;
    grid-column: 2;
    grid-row: 5;
    height: 44px;
    min-height: 44px;
    padding-bottom: 0;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 0;
    width: 100%;
  }

  #operating-expenses .desktop-field > span:first-child {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
  }

  #operating-expenses .operating-expense-period-amount,
  #operating-expenses .operating-expense-date-placeholder {
    background: var(--surface-soft);
    color: var(--ink);
    font-weight: 900;
  }

  #operating-expenses .operating-expense-date-display {
    font-size: 14px;
    padding-left: 8px;
    padding-right: 34px;
  }

  #operating-expenses .date-picker-button {
    height: 34px;
    width: 34px;
  }

  #operating-expenses .saved-expense-header {
    display: none;
  }

  #operating-expenses .saved-expense-row {
    align-items: center;
    grid-template-columns: 30px minmax(0, 1fr) 42px;
    padding: 4px;
  }

  #operating-expenses .saved-expense-row > span:first-child {
    grid-column: 1;
    grid-row: 1 / 4;
  }

  #operating-expenses .saved-expense-row .saved-detail-name {
    grid-column: 2;
    grid-row: 1;
  }

  #operating-expenses .saved-expense-row > span:nth-child(3) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    grid-column: 2;
    grid-row: 2;
  }

  #operating-expenses .saved-expense-row > strong {
    grid-column: 2;
    grid-row: 3;
  }

  #operating-expenses .remove-operating-expense {
    grid-column: 3;
    grid-row: 1 / 4;
    justify-self: end;
    min-height: 42px;
    width: 42px;
  }

  #operating-expenses .expense-formula-note {
    background: rgba(243, 238, 227, 0.42);
  }

  #operating-expenses .section-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #operating-expenses .section-metrics .metric-card {
    min-height: 0;
  }

  #daily-break-even .section-heading {
    text-align: left;
  }

  #daily-break-even .section-title-line {
    justify-content: flex-start;
  }

  #daily-break-even .section-heading p {
    max-width: 100%;
  }

  #daily-break-even .break-even-summary-row {
    background: #fffdfa;
    border: 1px solid rgba(199, 161, 90, 0.5);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(28, 45, 39, 0.04);
    gap: 4px;
    grid-template-columns: 1fr;
    padding: 5px;
  }

  #daily-break-even .break-even-summary-row .field {
    align-items: center;
    background: rgba(255, 253, 250, 0.72);
    border: 1px solid rgba(199, 161, 90, 0.28);
    border-radius: 8px;
    display: grid;
    gap: 4px 5px;
    grid-template-columns: 34px minmax(0, 1fr) minmax(94px, 118px);
    margin-bottom: 0;
    padding: 4px;
  }

  #daily-break-even .break-even-summary-row .field::before {
    align-items: center;
    background: linear-gradient(180deg, #0d6b4c 0%, #08432f 100%);
    border-radius: 7px;
    color: #fffdf8;
    content: "•";
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    grid-column: 1;
    grid-row: 1;
    height: 30px;
    justify-content: center;
    line-height: 1;
    width: 30px;
  }

  #daily-break-even .break-even-summary-row .field:nth-child(1)::before {
    content: "•";
    font-size: 18px;
  }

  #daily-break-even .break-even-summary-row .field:nth-child(2)::before {
    content: "•";
    font-size: 18px;
  }

  #daily-break-even .break-even-summary-row .field:nth-child(3)::before {
    content: "%";
    font-size: 15px;
  }

  #daily-break-even .break-even-summary-row .field span {
    color: var(--ink);
    grid-column: 2;
    margin-bottom: 0;
  }

  #daily-break-even .break-even-summary-row input,
  #daily-break-even .break-even-summary-row .readonly-value {
    grid-column: 3;
    min-height: 38px;
    text-align: center;
  }

  #daily-break-even .average-margin-panel {
    gap: 4px;
    padding: 5px;
  }

  #daily-break-even .average-margin-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #daily-break-even .average-margin-window-field {
    grid-column: 1 / -1;
  }

  #daily-break-even .margin-source-button {
    font-size: 13px;
    line-height: 1.15;
    min-height: 44px;
    padding-inline: 8px;
    text-align: center;
    white-space: normal;
  }

  #daily-break-even .section-metrics,
  #daily-break-even .break-even-metrics {
    box-sizing: border-box;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  #daily-break-even .section-metrics > *,
  #daily-break-even .break-even-metrics > * {
    box-sizing: border-box;
    min-width: 0;
  }

  #daily-break-even .main-metric,
  #daily-break-even .break-even-metrics .main-metric {
    background: linear-gradient(180deg, #17352b 0%, #10231d 100%);
    border-color: rgba(199, 161, 90, 0.78);
    color: #fffdf8;
    grid-column: 1 / -1;
    min-height: 120px;
    overflow: hidden;
    position: relative;
  }

  #daily-break-even .main-metric span {
    color: rgba(255, 253, 248, 0.82);
    font-size: 14px;
    position: relative;
    z-index: 1;
  }

  #daily-break-even .main-metric strong {
    color: #fffdf8;
    font-size: 36px;
    line-height: 1.08;
    position: relative;
    z-index: 1;
  }

  #daily-break-even .section-metrics .metric-card {
    min-height: 104px;
  }

  #daily-break-even .break-even-metrics .metric-card:nth-child(5) {
    grid-column: 1 / -1;
  }

  #daily-break-even .break-even-metrics .break-even-method-note {
    grid-column: 1 / -1;
  }

  #daily-break-even .break-even-method-note {
    grid-column: 1 / -1;
  }

  #daily-break-even .main-metric::before {
    background: rgba(255, 253, 248, 0.08);
    border-radius: 999px;
    content: "";
    height: 118px;
    position: absolute;
    right: -34px;
    top: 18px;
    width: 118px;
  }

  #daily-break-even .break-even-status-note,
  #daily-break-even .break-even-method-note {
    background: rgba(243, 238, 227, 0.42);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    margin: 0;
    padding: 10px;
  }

  #daily-break-even .break-even-status-note {
    background: #fff7ef;
    border-color: rgba(199, 104, 65, 0.45);
    color: #8a3b1f;
  }

  #daily-break-even .break-even-status-note[hidden] {
    display: none;
  }

  @media (max-width: 410px) {
    #period-gross .period-date-row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #period-gross .period-date-row .field:last-child {
      grid-column: 1 / -1;
    }

    #daily-break-even .break-even-summary-row {
      grid-template-columns: 1fr;
    }

    #daily-break-even .break-even-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #daily-break-even .break-even-metrics .main-metric {
      grid-column: 1 / -1;
    }

  }

  @media (max-width: 380px) {
    #daily-break-even .average-margin-control {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  #period-gross .period-detail-save-row .save-period-detail,
#operating-expenses .save-operating-expense {
    box-sizing: border-box;
    font-size: 13px;
    height: 40px;
    line-height: 1;
    max-height: 40px;
    min-height: 40px;
    padding-bottom: 0;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 0;
    white-space: nowrap;
  }

  .data-tools-card {
    margin-bottom: 2px;
    margin-top: 4px;
    border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    border-radius: 8px;
  }

  .data-tools-card summary {
    gap: 6px;
    min-height: 40px;
    padding: 6px 8px;
  }

  .data-tools-card strong {
    font-size: 14px;
  }

  .data-tools-card small {
    font-size: 11px;
    line-height: 1.3;
  }

  .data-tools-body {
    gap: 8px;
    padding: 8px 10px 10px;
  }
}

/* Must follow the broad desktop/mobile blocks above so its shrink rules win at 1280px. */
@media (min-width: 1181px) and (max-width: 1460px) {
  .topbar { gap:6px 8px; }
  .topbar-tools { gap:2px; max-width:400px; }
  .topbar-settings summary,
  .account-panel summary { padding-left:9px; padding-right:9px; }
  .global-currency-field { max-width:min(100%,12rem); min-width:0; width:fit-content; }
  .currency-selected-label { max-width:100%; overflow:hidden; padding-left:7px; padding-right:26px; text-overflow:ellipsis; width:max-content; }
  .currency-selected-region { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .currency-selected-code { flex:0 0 auto; overflow:visible; text-overflow:clip; }
}
