:root {
  --page-bg: #fbf8f7;
  --surface: #ffffff;
  --surface-muted: #f5f0f0;
  --surface-accent: #f7eff2;
  --text-primary: #2d2528;
  --text-secondary: #655b60;
  --text-muted: #81767b;
  --border: #d8cdd1;
  --border-strong: #b9aab0;
  --primary: #7a3e56;
  --primary-hover: #642f45;
  --accent: #305c72;
  --success: #26734d;
  --warning: #946a1c;
  --danger: #b33a3a;
  --success-soft: #edf7f1;
  --warning-soft: #fff8e8;
  --danger-soft: #fff0f0;
  --shadow-sm: 0 8px 24px rgba(77, 48, 58, 0.06);
  --shadow-md: 0 20px 55px rgba(77, 48, 58, 0.1);
  --shadow-focus: 0 0 0 3px rgba(48, 92, 114, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --max-width: 1160px;
  --narrow-width: 900px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

img,
svg {
  display: block;
}

button,
input,
select {
  font: inherit;
}

button,
a,
summary,
select,
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(48, 92, 114, 0.38);
  outline-offset: 2px;
}

.wrap {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.narrow-wrap {
  width: min(calc(100% - 40px), var(--narrow-width));
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: #ffffff;
  font-size: 0.82rem;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid rgba(216, 205, 209, 0.82);
  background: rgba(251, 248, 247, 0.96);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 6px 15px rgba(122, 62, 86, 0.16);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}

.brand-copy > span {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.primary-nav a:hover {
  background: var(--surface-accent);
  color: var(--primary-hover);
}

.mobile-navigation {
  display: none;
  min-width: 0;
}

.mobile-navigation-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  transition: background 180ms ease, border 180ms ease, color 180ms ease, transform 180ms ease;
}

.mobile-navigation-toggle::-webkit-details-marker {
  display: none;
}

.mobile-navigation-toggle:hover,
.mobile-navigation[open] .mobile-navigation-toggle {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.mobile-navigation-toggle:active {
  transform: scale(0.96);
}

.mobile-navigation-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-code {
  display: none;
  color: inherit;
}

.language-name {
  display: inline;
}

.mobile-menu-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-navigation-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: min(320px, calc(100vw - 24px));
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(45, 37, 40, 0.14);
}

.mobile-navigation-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.mobile-navigation-panel a:hover {
  background: var(--surface-accent);
  color: var(--primary-hover);
}

.mobile-navigation-arrow {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.mobile-navigation-panel a:hover .mobile-navigation-arrow {
  transform: translateX(2px) rotate(45deg);
}

.language-switcher {
  position: relative;
  flex: 0 0 auto;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
  list-style: none;
  white-space: nowrap;
}

.language-toggle::-webkit-details-marker {
  display: none;
}

.language-toggle:hover,
.language-switcher[open] .language-toggle {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.language-chevron,
.summary-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.language-switcher[open] .language-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 142px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(45, 37, 40, 0.14);
}

.language-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.language-menu a:hover {
  background: var(--surface-accent);
  color: var(--primary-hover);
}

.hero-section {
  padding: 54px 0 30px;
  background: var(--page-bg);
}

.hero-inner {
  text-align: center;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-section h1 {
  max-width: 840px;
  margin: 10px auto 14px;
  color: var(--text-primary);
  font-size: clamp(2.7rem, 7vw, 5rem);
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-lead {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 21px 0 0;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(38, 115, 77, 0.11);
}

.tool-section {
  padding: 0 0 62px;
  background: var(--page-bg);
}

.tool-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.tool-panel {
  min-width: 0;
  padding: clamp(24px, 3.5vw, 34px);
}

.input-panel {
  border-right: 1px solid var(--border);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.step-index,
.method-number,
.guide-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--surface-accent);
  color: var(--primary-hover);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}

.step-index {
  width: 38px;
  height: 38px;
}

.step-index-accent {
  background: #edf4f6;
  color: var(--accent);
}

.calculator-form {
  display: grid;
  gap: 18px;
}

.choice-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field legend,
.field-group > label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.83rem;
  font-weight: 800;
}

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

.choice-pill {
  position: relative;
  min-width: 0;
}

.choice-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: center;
  transition: border 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.choice-pill input:checked + span {
  border-color: rgba(122, 62, 86, 0.68);
  background: var(--surface-accent);
  color: var(--primary-hover);
}

.choice-pill input:focus-visible + span {
  outline: 3px solid rgba(48, 92, 114, 0.38);
  outline-offset: 2px;
}

.field-group {
  min-width: 0;
}

.sizing-group select {
  width: 100%;
  min-height: 46px;
  padding: 8px 38px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 700;
  appearance: none;
}

.field-help,
.form-note {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

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

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  width: 100%;
  min-height: 50px;
  padding: 8px 48px 8px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1;
}

.input-with-unit input::placeholder {
  color: #b8acb0;
}

.input-with-unit input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
  outline: 0;
}

.input-with-unit input.is-invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.unit-suffix {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  pointer-events: none;
}

.measure-details {
  margin-top: 8px;
  border-top: 1px solid rgba(216, 205, 209, 0.7);
}

.measure-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  color: var(--primary-hover);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
  list-style: none;
}

.measure-details summary::-webkit-details-marker,
.faq-item summary::-webkit-details-marker {
  display: none;
}

.measure-details p {
  margin: 0 0 7px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  line-height: 1.58;
}

.summary-chevron {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.summary-chevron::before,
.summary-chevron::after {
  position: absolute;
  top: 8px;
  left: 4px;
  width: 8px;
  height: 1.5px;
  background: var(--text-muted);
  content: "";
  transition: transform 180ms ease;
}

.summary-chevron::after {
  transform: rotate(90deg);
}

details[open] > summary .summary-chevron::after {
  transform: rotate(0);
}

.field-error {
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: -2px;
}

.info-mark,
.status-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 900;
}

.info-mark {
  width: 17px;
  height: 17px;
  background: #edf4f6;
  color: var(--accent);
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 9px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease, border 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(100, 47, 69, 0.18);
  transform: translateY(-1px);
}

.primary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-button.is-loading {
  background: var(--primary-hover);
}

.primary-button.is-loading::before {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 750ms linear infinite;
  content: "";
}

.secondary-button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.secondary-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text-primary);
}

.error-panel,
.boundary-note,
.brand-reminder {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
}

.error-panel {
  border: 1px solid #efb9b9;
  background: var(--danger-soft);
  color: var(--danger);
}

.error-panel strong,
.brand-reminder strong {
  display: block;
  font-size: 0.79rem;
  line-height: 1.35;
}

.error-panel p,
.brand-reminder p,
.boundary-note p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.55;
}

.status-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.status-icon-error {
  background: #f5caca;
  color: var(--danger);
}

.status-icon-warning {
  background: #f9e5ae;
  color: var(--warning);
}

.status-icon-info {
  background: #dcecf1;
  color: var(--accent);
}

.local-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.local-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  fill: none;
  stroke: var(--success);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.result-panel {
  background: linear-gradient(145deg, #ffffff 0%, #fffafb 100%);
}

.result-card {
  min-height: 456px;
  padding: 18px;
  border: 1px solid #e2d7db;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.result-card[data-state="calculated"] {
  border-color: rgba(38, 115, 77, 0.32);
  box-shadow: 0 10px 30px rgba(38, 115, 77, 0.08);
}

.result-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 25px;
}

.result-mode {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.result-card[data-state="calculated"] .result-badge {
  background: var(--success-soft);
  color: var(--success);
}

.result-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--border);
}

.result-label,
.result-detail-label {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-size {
  display: block;
  margin-top: 3px;
  color: var(--primary-hover);
  font-size: clamp(3.25rem, 8vw, 5rem);
  font-weight: 850;
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.result-subline {
  margin: 9px 0 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.result-ruler {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-accent);
  color: var(--primary);
}

.result-ruler svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.result-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.result-detail {
  min-width: 0;
}

.result-detail > strong {
  display: block;
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.result-detail small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.summary-list {
  display: grid;
  gap: 6px;
  margin: 7px 0 0;
}

.summary-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.summary-list dt,
.summary-list dd {
  margin: 0;
  font-size: 0.75rem;
}

.summary-list dt {
  color: var(--text-muted);
}

.summary-list dd {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 800;
  text-align: right;
}

.boundary-note {
  margin-top: 14px;
  border: 1px solid #efd38d;
  background: var(--warning-soft);
}

.fit-block {
  padding: 17px 0 14px;
}

.fit-block h3 {
  margin: 0 0 9px;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 850;
}

.fit-block ul,
.measure-checklist ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fit-block li,
.measure-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.5;
}

.check-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 900;
}

.check-mark-filled {
  width: 24px;
  height: 24px;
}

.brand-reminder {
  border: 1px solid #d6e6eb;
  background: #f1f8fa;
}

.result-empty {
  display: grid;
  place-items: center;
  min-height: 410px;
  padding: 30px 18px;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--surface-accent);
  color: var(--primary);
}

.empty-mark svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.result-empty h3 {
  margin: 17px 0 6px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 820;
}

.result-empty p {
  max-width: 310px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.noscript-note {
  margin: 14px 0 0;
  padding: 12px 15px;
  border: 1px solid #efd38d;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: #6f5318;
  font-size: 0.8rem;
  line-height: 1.55;
}

.content-section {
  padding: 76px 0;
  border-top: 1px solid rgba(216, 205, 209, 0.66);
  background: var(--surface);
}

.muted-section,
.faq-section {
  background: var(--surface-muted);
}

.section-heading {
  max-width: 790px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-heading h2 {
  margin: 9px 0 12px;
  color: var(--text-primary);
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.section-heading > p:not(.eyebrow) {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.75;
}

.section-heading-left {
  max-width: none;
  margin: 0;
  text-align: left;
}

.section-heading-left h2 {
  max-width: 570px;
}

.section-heading-left > p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 14px;
  font-size: 0.9rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.step-card,
.measure-checklist,
.method-card,
.guide-card,
.comparison-card,
.troubleshooting-card,
.privacy-check-row,
.plain-check-row,
.helpful-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-card {
  position: relative;
  padding: 55px 18px 20px;
}

.step-number {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-accent);
  color: var(--primary-hover);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
}

.step-card h3,
.method-card h3,
.guide-card h3,
.comparison-card h3,
.troubleshooting-card h3 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 820;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.step-card p,
.method-card p,
.guide-card p,
.comparison-card p,
.troubleshooting-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.7;
}

.measurement-callout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  align-items: center;
  gap: 24px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-accent);
  box-shadow: var(--shadow-sm);
}

.measurement-callout-visual {
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #fffafb;
}

.measurement-guide-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.measurement-callout-copy {
  min-width: 0;
  padding: 8px 18px 8px 2px;
  color: var(--text-secondary);
}

.measurement-callout-copy > strong {
  display: block;
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.measurement-callout-copy > p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
}

.measurement-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.measurement-key li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(216, 205, 209, 0.9);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.35;
}

.measurement-key-number {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
}

.measurement-key-number-bust {
  background: var(--accent);
}

.measurement-key-number-underbust {
  background: var(--primary);
}

.measure-checklist {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--surface-accent);
}

.measure-checklist h3 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 820;
  white-space: nowrap;
}

.measure-checklist ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  flex: 1;
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.measure-checklist li {
  min-width: 0;
}

.measurement-callout figcaption {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.method-grid,
.guide-grid,
.comparison-grid,
.troubleshooting-grid,
.helpful-grid {
  display: grid;
  gap: 14px;
}

.method-grid,
.guide-grid,
.comparison-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.method-card,
.guide-card,
.comparison-card {
  padding: 22px;
}

.method-number,
.guide-icon {
  width: 35px;
  height: 35px;
  margin-bottom: 17px;
}

.method-number {
  background: #edf4f6;
  color: var(--accent);
}

.guide-icon {
  background: var(--surface-accent);
  color: var(--primary-hover);
}

.comparison-card {
  padding-top: 20px;
}

.comparison-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-accent);
  color: var(--primary-hover);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.comparison-card h3 {
  margin-top: 13px;
}

.chart-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.size-chart {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.size-chart caption {
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.size-chart th,
.size-chart td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.size-chart thead th {
  background: var(--surface-muted);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.size-chart tbody th {
  min-width: 170px;
  color: var(--text-primary);
  font-weight: 820;
}

.size-chart tbody tr:last-child th,
.size-chart tbody tr:last-child td {
  border-bottom: 0;
}

.chart-footnote {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: center;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: start;
  gap: clamp(30px, 6vw, 72px);
}

.plain-checklist,
.privacy-checklist {
  display: grid;
  gap: 11px;
}

.plain-check-row,
.privacy-check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
}

.plain-check-row p,
.privacy-check-row p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
}

.privacy-section {
  background: #f9f3f4;
}

.privacy-section .eyebrow {
  color: var(--primary-hover);
}

.privacy-check-row strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 820;
}

.troubleshooting-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.troubleshooting-card {
  padding: 20px;
  border-left: 3px solid var(--warning);
}

.fix-line {
  margin-top: 13px !important;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem !important;
}

.fix-line strong {
  color: var(--text-primary);
}

.faq-list {
  display: grid;
  gap: 9px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 59px;
  padding: 15px 17px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 820;
  list-style: none;
}

.faq-item summary:hover {
  color: var(--primary-hover);
}

.faq-item > p {
  margin: 0;
  padding: 0 17px 17px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.72;
}

.helpful-section {
  padding-bottom: 88px;
}

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

.helpful-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 19px;
  color: inherit;
  text-decoration: none;
  transition: border 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.helpful-card:hover {
  border-color: rgba(122, 62, 86, 0.45);
  box-shadow: var(--shadow-md);
  color: inherit;
  transform: translateY(-2px);
}

.helpful-arrow {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-accent);
  color: var(--primary-hover);
  font-size: 1rem;
  font-weight: 800;
}

.helpful-card strong,
.helpful-card span:not(.helpful-arrow):not(.helpful-link) {
  display: block;
}

.helpful-card strong {
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 820;
}

.helpful-card span:not(.helpful-arrow):not(.helpful-link) {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.77rem;
  line-height: 1.55;
}

.helpful-link {
  display: inline-block;
  margin-top: 9px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
}

.site-footer {
  padding: 47px 0 27px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  max-width: 520px;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.footer-logo img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.footer-brand > p {
  margin: 13px 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 750;
  text-decoration: none;
}

.footer-email:hover {
  color: var(--primary-hover);
}

.footer-email svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, auto));
  gap: 38px;
}

.footer-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-group p {
  margin: 0 0 3px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-group a {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-group a:hover {
  color: var(--primary-hover);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.6;
}

.not-found-main {
  display: grid;
  min-height: calc(100vh - 210px);
  place-items: center;
  padding: 70px 0;
}

.not-found-card {
  max-width: 650px;
  padding: 42px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.not-found-code {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.not-found-card h1 {
  margin: 13px 0 11px;
  color: var(--text-primary);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.not-found-card p {
  max-width: 500px;
  margin: 0 auto 23px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.not-found-button {
  display: inline-flex;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .header-inner {
    gap: 16px;
  }

  .primary-nav a {
    padding-inline: 9px;
    font-size: 0.77rem;
  }

  .tool-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .measurement-callout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
    gap: 18px;
  }

  .measure-checklist h3 {
    margin: 0;
  }
}

@media (max-width: 760px) {
  .wrap,
  .narrow-wrap {
    width: min(calc(100% - 28px), 620px);
  }

  .header-inner {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 13px 0 12px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .header-tools {
    position: relative;
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .primary-nav {
    display: none;
  }

  .mobile-navigation {
    display: block;
  }

  .mobile-navigation-toggle {
    min-height: 44px;
    width: 44px;
  }

  .language-code {
    display: inline;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .language-name {
    display: none;
  }

  .language-toggle {
    min-height: 44px;
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .hero-section {
    padding-top: 43px;
  }

  .hero-section h1 {
    font-size: clamp(2.6rem, 14vw, 4.25rem);
  }

  .tool-card {
    grid-template-columns: 1fr;
  }

  .measure-fields {
    grid-template-columns: 1fr;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .result-card {
    min-height: 0;
  }

  .result-empty {
    min-height: 320px;
  }

  .steps-grid,
  .method-grid,
  .guide-grid,
  .comparison-grid,
  .helpful-grid,
  .two-column-layout,
  .troubleshooting-grid {
    grid-template-columns: 1fr;
  }

  .measure-checklist {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .measurement-callout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px;
  }

  .measurement-callout-copy {
    padding: 16px 6px 6px;
  }

  .measurement-callout-visual {
    padding: 8px 12px;
  }

  .measure-checklist ul {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .section-heading-left {
    margin-bottom: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-nav {
    width: 100%;
    justify-content: space-between;
  }
}

@media (min-width: 761px) and (max-height: 800px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero-section {
    padding: 27px 0 15px;
  }

  .hero-section h1 {
    margin: 7px auto 9px;
    font-size: clamp(2.7rem, 6vw, 4.35rem);
  }

  .hero-lead {
    max-width: 880px;
    font-size: 1rem;
    line-height: 1.42;
  }

  .trust-list {
    margin-top: 12px;
  }

  .tool-section {
    padding-bottom: 42px;
  }

  .tool-panel {
    padding: 14px 28px;
  }

  .panel-heading {
    margin-bottom: 14px;
  }

  .calculator-form {
    gap: 10px;
  }

  .sizing-group .field-help,
  .measure-fields .field-help {
    display: none;
  }

  .measure-details {
    margin-top: 3px;
  }

  .measure-details summary {
    min-height: 30px;
  }

  .form-note {
    margin-top: -4px;
  }

  .local-note {
    font-size: 0.69rem;
    line-height: 1.35;
  }
}

@media (max-width: 460px) {
  .wrap,
  .narrow-wrap {
    width: min(calc(100% - 24px), 620px);
  }

  .brand-copy > span {
    font-size: 0.94rem;
  }

  .brand-copy small {
    font-size: 0.54rem;
  }

  .measurement-key {
    grid-template-columns: 1fr;
  }

  .mobile-navigation-toggle {
    width: 44px;
  }

  .hero-lead {
    font-size: 0.95rem;
  }

  .trust-list {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    width: max-content;
    margin-inline: auto;
    text-align: left;
  }

  .tool-panel {
    padding: 22px 15px;
  }

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

  .result-card {
    padding: 14px;
  }

  .result-size-row {
    align-items: flex-start;
  }

  .result-ruler {
    width: 60px;
    height: 60px;
  }

  .result-ruler svg {
    width: 43px;
    height: 43px;
  }

  .result-details-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 57px 0;
  }

  .section-heading {
    margin-bottom: 25px;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .faq-item summary {
    min-height: 55px;
    padding-inline: 14px;
    font-size: 0.83rem;
  }

  .faq-item > p {
    padding-inline: 14px;
  }

  .footer-nav {
    gap: 22px;
  }

  .not-found-card {
    padding-inline: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
