:root {
  --ink: #24171f;
  --muted: #756873;
  --paper: #fffdf9;
  --canvas: #f6f1ed;
  --plum: #4b163b;
  --plum-2: #6c2455;
  --magenta: #d92578;
  --coral: #f36f70;
  --lavender: #eee7f1;
  --lavender-2: #dac9e1;
  --line: #e6ddd9;
  --green: #16825d;
  --danger: #ad2943;
  --shadow: 0 28px 70px rgba(65, 24, 49, 0.12);
  --shadow-soft: 0 10px 30px rgba(65, 24, 49, 0.07);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(217, 37, 120, 0.08), transparent 28rem),
    linear-gradient(180deg, #fbf8f5 0, var(--canvas) 36rem);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  right: -160px;
  top: 80px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(108, 36, 85, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(108, 36, 85, 0.025), 0 0 0 160px rgba(108, 36, 85, 0.018);
  content: "";
}

button,
input,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(217, 37, 120, 0.28);
  outline-offset: 3px;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.svg-defs,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(89, 49, 73, 0.08);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(1240px, calc(100% - 40px));
  min-height: 76px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px 14px 14px 4px;
  color: white;
  background: linear-gradient(145deg, var(--magenta), var(--plum));
  box-shadow: 0 7px 18px rgba(217, 37, 120, 0.2);
}

.brand-mark span {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions,
.icon-button {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 10px;
}

.account-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.account-bar-inner,
.account-bar nav,
.account-admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.account-bar-inner {
  padding-block: 9px;
  justify-content: space-between;
}

.account-bar p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.account-bar p strong {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--plum);
  background: var(--lavender);
  font-size: 0.72rem;
}

.account-screen {
  display: grid;
  min-height: 100vh;
  padding: 32px 16px;
  place-items: center;
}

.account-card {
  width: min(100%, 460px);
  padding: clamp(22px, 5vw, 36px);
}

.account-screen-wide .account-card {
  width: min(100%, 820px);
}

.account-card h1 {
  margin: 24px 0 10px;
  color: var(--plum);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.15;
}

.account-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.account-card .account-email {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--lavender);
  color: var(--plum);
  font-weight: 720;
  overflow-wrap: anywhere;
}

.account-card .account-note {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.account-primary {
  width: 100%;
  margin-bottom: 14px;
}

.account-link {
  color: var(--plum-2);
  font-size: 0.83rem;
  font-weight: 720;
}

.account-admin-actions {
  margin-block: 15px;
}

.account-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.account-table th,
.account-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.account-table th {
  background: var(--lavender);
  color: var(--plum);
}

.account-table td:first-child {
  overflow-wrap: anywhere;
}

.account-table tr:last-child td {
  border-bottom: 0;
}

.account-pagination {
  font-size: 0.82rem;
}

.icon-button,
.icon-only {
  border: 0;
  cursor: pointer;
  background: transparent;
}

.icon-button {
  position: relative;
  min-height: 42px;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 750;
}

.icon-button:hover {
  background: var(--lavender);
}

.count-badge {
  display: grid;
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--plum);
  font-size: 0.66rem;
}

.hero {
  display: grid;
  padding-block: 72px 56px;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 80px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--magenta);
  font-size: 0.75rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow svg {
  width: 17px;
  height: 17px;
}

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

h1 {
  max-width: 720px;
  margin: 18px 0 22px;
  font-size: clamp(2.6rem, 5vw, 5.35rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.97;
}

h1 em {
  color: var(--magenta);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-copy > p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid rgba(108, 36, 85, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, 0.68);
  box-shadow: var(--shadow-soft);
}

.note-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: var(--plum);
  background: var(--lavender);
}

.hero-note div {
  display: grid;
  gap: 3px;
}

.hero-note strong {
  font-size: 0.86rem;
}

.hero-note span:last-child {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.mobile-panel-switch {
  display: none;
}

.mobile-panel-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-panel-options {
  display: grid;
  padding: 3px;
  border: 1px solid rgba(108, 36, 85, 0.1);
  border-radius: 12px;
  background: var(--lavender);
  grid-template-columns: 1fr 1fr;
}

.mobile-panel-option {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 780;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mobile-panel-option.is-active {
  color: var(--plum);
  background: var(--paper);
  box-shadow: 0 3px 10px rgba(65, 24, 49, 0.1);
}

.workspace {
  display: grid;
  padding-bottom: 80px;
  align-items: start;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 44px;
}

.form-column {
  min-width: 0;
}

.section-heading {
  display: flex;
  min-height: 42px;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}

.step {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--lavender-2);
  border-radius: 50%;
  color: var(--plum-2);
  background: white;
  font-size: 0.72rem;
  font-weight: 800;
}

.text-button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 6px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  color: var(--plum-2);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.text-button:hover {
  color: var(--magenta);
}

.card,
.details-card {
  border: 1px solid rgba(95, 61, 80, 0.11);
  background: rgba(255, 253, 249, 0.86);
  box-shadow: var(--shadow-soft);
}

.card {
  border-radius: var(--radius-lg);
}

.form-card {
  display: grid;
  padding: 26px;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}

.field {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  padding: 0;
  color: #4d4049;
  font-size: 0.77rem;
  font-weight: 760;
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
}

.optional {
  margin-left: 5px;
  color: #9e9099;
  font-weight: 550;
}

.field small,
.helper {
  color: #91838d;
  font-size: 0.7rem;
}

.input-shell {
  display: flex;
  height: 52px;
  align-items: center;
  gap: 10px;
  padding-inline: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
}

.input-shell:focus-within {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(217, 37, 120, 0.1);
}

.input-shell svg {
  color: #a08f9b;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.age-control {
  display: grid;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  grid-template-columns: 48px 1fr 48px;
}

.age-control > button {
  border: 0;
  color: var(--plum);
  background: #f6f0f5;
  cursor: pointer;
  font-size: 1.25rem;
}

.age-control > button:hover {
  background: #eee2ec;
}

.age-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.age-input-wrap input {
  width: 34px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-weight: 800;
  -moz-appearance: textfield;
}

.age-input-wrap input::-webkit-outer-spin-button,
.age-input-wrap input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.age-input-wrap span {
  color: var(--muted);
  font-size: 0.74rem;
}

.segmented-control {
  display: grid;
  height: 52px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8f4f6;
  grid-template-columns: 1fr 1fr;
}

.segmented-control label {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label > span {
  display: grid;
  height: 100%;
  padding: 0 8px;
  place-items: center;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 730;
  text-align: center;
  transition: 160ms ease;
}

.segmented-control input:checked + span {
  color: var(--plum);
  background: white;
  box-shadow: 0 3px 10px rgba(58, 20, 46, 0.1);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgba(217, 37, 120, 0.25);
}

.smoking-control {
  height: 64px;
}

.smoking-control label > span {
  align-content: center;
  gap: 1px;
}

.smoking-control b {
  font-size: 0.78rem;
}

.smoking-control small {
  font-size: 0.65rem;
  font-weight: 550;
}

.term-card {
  margin: 0;
  padding: 18px;
  min-width: 0;
}

.segmented-control.term-control {
  height: auto;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.term-control label > span {
  min-height: 76px;
  padding: 10px 6px;
  align-content: center;
  gap: 4px;
  text-align: center;
}

.term-control b {
  font-size: 0.78rem;
  line-height: 1.3;
}

.term-control small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.term-hint {
  margin: 12px 3px 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.plan-heading {
  margin-top: 38px;
}

.plan-grid {
  display: grid;
  margin: 0;
  padding: 0;
  border: 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.plan-option {
  cursor: pointer;
}

.plan-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card {
  position: relative;
  display: grid;
  min-height: 128px;
  padding: 17px 14px;
  align-content: end;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.78);
  box-shadow: 0 6px 18px rgba(65, 24, 49, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.plan-option:hover .plan-card {
  transform: translateY(-2px);
  border-color: #cdb7c7;
  box-shadow: var(--shadow-soft);
}

.plan-kicker {
  position: absolute;
  top: 14px;
  left: 14px;
  color: #8e7e89;
  font-size: 0.6rem;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-card strong {
  font-size: 1.26rem;
  letter-spacing: -0.04em;
}

.plan-card small {
  color: var(--muted);
  font-size: 0.67rem;
}

.plan-check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #d9ccd4;
  border-radius: 50%;
  color: transparent;
  background: white;
  font-size: 0.68rem;
}

.plan-option input:checked + .plan-card {
  border-color: var(--plum-2);
  background: linear-gradient(145deg, #fffafe, #f3eaf2);
  box-shadow: 0 11px 28px rgba(75, 22, 59, 0.12);
}

.plan-option input:checked + .plan-card::after {
  position: absolute;
  right: -32px;
  bottom: -45px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(217, 37, 120, 0.08);
  content: "";
}

.plan-option input:checked + .plan-card .plan-check {
  z-index: 1;
  color: white;
  border-color: var(--magenta);
  background: var(--magenta);
}

.plan-option input:focus-visible + .plan-card {
  outline: 3px solid rgba(217, 37, 120, 0.25);
  outline-offset: 3px;
}

.details-card {
  margin-top: 18px;
  border-radius: 16px;
}

.details-card summary {
  display: flex;
  min-height: 54px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 750;
}

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

.details-card summary svg {
  transition: transform 180ms ease;
}

.details-card[open] summary svg {
  transform: rotate(90deg);
}

.details-content {
  display: grid;
  padding: 4px 18px 18px;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.details-content input,
.details-content textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: white;
}

.details-content input {
  height: 46px;
  padding-inline: 12px;
}

.details-content textarea {
  padding: 11px 12px;
  resize: vertical;
}

.details-content input:focus,
.details-content textarea:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(217, 37, 120, 0.08);
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
}

.button.compact {
  min-height: 40px;
  padding-inline: 13px;
  font-size: 0.76rem;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--magenta), #a41c68);
  box-shadow: 0 8px 18px rgba(217, 37, 120, 0.2);
}

.button-primary:hover {
  filter: saturate(1.08) brightness(1.02);
}

.button-ghost {
  border-color: var(--line);
  color: var(--plum);
  background: rgba(255, 255, 255, 0.7);
}

.button-light {
  min-height: 52px;
  padding: 0 12px;
  color: white;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.73rem;
}

.button-light:hover {
  background: rgba(255, 255, 255, 0.17);
}

.mobile-calculate {
  display: none;
  width: 100%;
  margin-top: 18px;
}

.result-column {
  position: sticky;
  top: 100px;
}

.quote-card {
  position: relative;
  overflow: clip;
  padding: 30px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 105% -5%, rgba(255, 154, 174, 0.38), transparent 17rem),
    radial-gradient(circle at -5% 48%, rgba(168, 96, 178, 0.25), transparent 16rem),
    linear-gradient(150deg, #61174a 0%, #421433 58%, #2e1026 100%);
  box-shadow: 0 32px 70px rgba(64, 15, 48, 0.24);
}

.quote-card::after {
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(255, 255, 255, 0.025), 0 0 0 100px rgba(255, 255, 255, 0.018);
  content: "";
  pointer-events: none;
}

.quote-card > * {
  position: relative;
  z-index: 1;
}

.quote-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-label {
  color: #f2cedf;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.quote-ref {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.58rem;
  font-weight: 720;
  letter-spacing: 0.06em;
}

.premium-display {
  display: flex;
  margin-top: 18px;
  align-items: baseline;
  gap: 6px;
}

.premium-display > span {
  color: #ff95be;
  font-size: 1.55rem;
  font-weight: 700;
}

.premium-display strong {
  font-size: clamp(3.8rem, 7vw, 5.7rem);
  font-weight: 760;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.premium-display small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.coverage-line {
  margin: 13px 0 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.coverage-line strong {
  color: white;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-chips span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.65rem;
  font-weight: 660;
}

.coverage-period {
  display: flex;
  margin-top: 20px;
  padding: 14px 16px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
}

.coverage-period > svg {
  flex: 0 0 auto;
  color: #ff98bd;
}

.coverage-period > div {
  display: grid;
  gap: 3px;
}

.coverage-period span {
  color: #e5b9ce;
  font-size: 0.65rem;
}

.coverage-period strong {
  font-size: 0.9rem;
}

.coverage-period small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.65rem;
}

.benefit-panel {
  margin-top: 25px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.benefit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.benefit-heading > div {
  display: grid;
  gap: 2px;
}

.benefit-heading span {
  color: #e5b9ce;
  font-size: 0.62rem;
  font-weight: 700;
}

.benefit-heading strong {
  font-size: 0.8rem;
}

.benefit-heading > svg {
  color: #ff98bd;
}

.benefit-list {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.benefit-item {
  display: flex;
  min-height: 58px;
  padding: 10px 0;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.benefit-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: #ff9abe;
  background: rgba(255, 255, 255, 0.09);
}

.benefit-icon svg {
  width: 17px;
  height: 17px;
}

.benefit-item > div {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.benefit-item span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.67rem;
}

.benefit-item strong {
  font-size: 0.76rem;
  text-align: right;
}

.quote-person {
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.7rem;
}

.quote-person strong {
  color: white;
}

.quote-actions {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quote-actions svg {
  width: 17px;
  height: 17px;
}

.disclaimer {
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.59rem;
  line-height: 1.55;
}

.source-note {
  display: flex;
  margin-top: 13px;
  padding: 14px 17px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(95, 61, 80, 0.1);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.68);
}

.source-note > svg {
  color: var(--magenta);
}

.source-note div {
  display: grid;
  gap: 2px;
}

.source-note strong {
  font-size: 0.72rem;
}

.source-note span {
  color: var(--muted);
  font-size: 0.63rem;
}

.app-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.7);
}

.app-footer .shell {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.69rem;
}

.app-footer span:first-child {
  color: var(--plum);
  font-weight: 760;
}

.history-dialog {
  width: min(650px, calc(100% - 30px));
  max-height: min(790px, calc(100vh - 34px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 25px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 35px 100px rgba(43, 12, 34, 0.28);
}

.history-dialog::backdrop {
  background: rgba(31, 10, 25, 0.55);
  backdrop-filter: blur(5px);
}

.dialog-head,
.dialog-toolbar,
.dialog-foot {
  display: flex;
  align-items: center;
}

.dialog-head {
  padding: 24px 25px 17px;
  justify-content: space-between;
}

.dialog-head h2 {
  margin: 5px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.045em;
}

.icon-only {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f3edef;
}

.dialog-toolbar {
  padding: 0 25px 17px;
  gap: 8px;
}

.search-field {
  flex: 1;
}

.search-field input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: white;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.history-list {
  min-height: 220px;
  max-height: calc(100vh - 245px);
  padding: 5px 25px 18px;
  overflow-y: auto;
}

.history-empty {
  display: grid;
  min-height: 250px;
  padding: 28px;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #d8cbd2;
  border-radius: 17px;
  background: #fbf7f8;
  text-align: center;
}

.history-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--plum);
}

.history-empty span {
  font-size: 0.78rem;
}

.history-item {
  display: grid;
  padding: 16px 4px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr auto;
  gap: 16px;
}

.history-item-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.history-item-main span:first-child {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 770;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item-main strong {
  color: var(--plum);
  font-size: 1.05rem;
}

.history-meta {
  color: var(--muted);
  font-size: 0.67rem;
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-item-actions button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
}

.history-item-actions button:hover {
  border-color: #cbb7c3;
}

.history-item-actions .delete-quote {
  width: 36px;
  padding: 0;
  color: var(--danger);
}

.history-item-actions svg {
  width: 15px;
  height: 15px;
}

.dialog-foot {
  min-height: 74px;
  padding: 13px 25px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: #fbf7f8;
}

.danger {
  color: var(--danger);
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  max-width: calc(100% - 32px);
  padding: 12px 17px;
  transform: translate(-50%, 20px);
  border-radius: 999px;
  color: white;
  background: #25161f;
  box-shadow: 0 14px 38px rgba(31, 10, 25, 0.25);
  font-size: 0.76rem;
  font-weight: 680;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.print-only {
  display: none;
}

@media (max-width: 960px) {
  .hero {
    padding-block: 55px 42px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-note {
    max-width: 440px;
  }

  .mobile-panel-switch {
    position: sticky;
    z-index: 45;
    top: 86px;
    display: flex;
    min-height: 52px;
    margin-bottom: 22px;
    padding: 7px 8px 7px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(89, 49, 73, 0.1);
    border-radius: 16px;
    background: rgba(255, 253, 249, 0.92);
    box-shadow: 0 9px 28px rgba(65, 24, 49, 0.1);
    backdrop-filter: blur(16px);
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .form-column,
  .result-column {
    scroll-margin-top: 158px;
  }

  body[data-mobile-panel="form"] .result-column,
  body[data-mobile-panel="result"] .form-column {
    display: none;
  }

  .result-column {
    position: static;
  }

  .quote-card {
    max-width: 650px;
    margin-inline: auto;
  }

  .source-note {
    max-width: 650px;
    margin-inline: auto;
    margin-top: 13px;
  }

  .mobile-calculate {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .shell,
  .header-inner {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 67px;
  }

  .mobile-panel-switch {
    top: 76px;
    min-height: 50px;
    margin-bottom: 18px;
    border-radius: 14px;
  }

  .mobile-panel-option {
    min-height: 34px;
    padding-inline: 13px;
    font-size: 0.71rem;
  }

  .form-column,
  .result-column {
    scroll-margin-top: 144px;
  }

  .brand-copy small,
  .history-trigger > span:not(.count-badge) {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px 12px 12px 4px;
  }

  .history-trigger {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .count-badge {
    position: absolute;
    top: 0;
    right: 0;
  }

  .hero {
    padding-block: 42px 32px;
  }

  h1 {
    margin-top: 14px;
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .hero-copy > p {
    font-size: 0.91rem;
  }

  .hero-note {
    padding: 14px;
  }

  .workspace {
    padding-bottom: 52px;
  }

  .form-card {
    padding: 20px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .field-wide {
    grid-column: auto;
  }

  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }

  .plan-card {
    min-height: 116px;
  }

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

  .details-content .field-wide {
    grid-column: auto;
  }

  .quote-card {
    padding: 24px 20px;
    border-radius: 25px;
  }

  .premium-display strong {
    font-size: clamp(3.9rem, 19vw, 5.2rem);
  }

  .quote-ref {
    max-width: 120px;
    text-align: right;
  }

  .benefit-item > div {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  .benefit-item strong {
    text-align: left;
  }

  .quote-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .button-light {
    min-height: 58px;
    flex-direction: column;
    gap: 4px;
  }

  .app-footer .shell {
    padding-block: 21px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .history-dialog {
    width: 100%;
    max-height: calc(100vh - 28px);
    margin: auto 0 0;
    border-radius: 25px 25px 0 0;
  }

  .dialog-head,
  .dialog-toolbar,
  .dialog-foot {
    padding-inline: 18px;
  }

  .dialog-toolbar {
    flex-wrap: wrap;
  }

  .search-field {
    flex: 1 0 100%;
  }

  .history-list {
    padding-inline: 18px;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .history-item-actions {
    justify-content: flex-end;
  }
}

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

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  body {
    color: #22181f;
    background: white;
    font-size: 11pt;
  }

  body::before,
  .app-header,
  .account-bar,
  body > main,
  .app-footer,
  .history-dialog,
  .toast {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .print-sheet {
    width: 100%;
  }

  .print-header {
    display: flex;
    padding-bottom: 16px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd2d8;
  }

  .print-header > div:last-child {
    display: grid;
    text-align: right;
  }

  .print-header > div:last-child span,
  .print-grid span,
  .print-notes > span {
    color: #756873;
    font-size: 8pt;
    text-transform: uppercase;
  }

  .print-title {
    display: grid;
    padding: 28px 24px;
    margin: 24px 0;
    border-radius: 15px;
    color: white;
    background: #4b163b;
  }

  .print-title > span {
    font-size: 9pt;
    text-transform: uppercase;
  }

  .print-title > strong {
    margin-top: 4px;
    font-size: 34pt;
    letter-spacing: -0.04em;
  }

  .print-title > small {
    color: #e9cedd;
  }

  .print-grid {
    display: grid;
    margin-bottom: 24px;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #ddd2d8;
    border-radius: 12px;
  }

  .print-grid > div {
    display: grid;
    min-height: 68px;
    padding: 13px;
    border-right: 1px solid #ddd2d8;
    border-bottom: 1px solid #ddd2d8;
  }

  .print-grid > div:nth-child(3n) {
    border-right: 0;
  }

  .print-grid > div:nth-last-child(-n + 3) {
    border-bottom: 0;
  }

  .print-grid strong {
    margin-top: 5px;
    font-size: 10pt;
  }

  .print-benefits {
    width: 100%;
    border-collapse: collapse;
  }

  .print-benefits th,
  .print-benefits td {
    padding: 12px 10px;
    border-bottom: 1px solid #ddd2d8;
    text-align: left;
  }

  .print-benefits th {
    color: #756873;
    font-size: 8pt;
    text-transform: uppercase;
  }

  .print-benefits th:last-child,
  .print-benefits td:last-child {
    text-align: right;
  }

  .print-benefits td:last-child {
    color: #4b163b;
    font-weight: 750;
  }

  .print-notes {
    min-height: 78px;
    padding: 14px;
    margin-top: 22px;
    border: 1px solid #ddd2d8;
    border-radius: 10px;
  }

  .print-notes p {
    margin: 7px 0 0;
    white-space: pre-wrap;
  }

  .signature-row {
    display: grid;
    margin-top: 55px;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }

  .signature-row div {
    padding-top: 8px;
    border-top: 1px solid #756873;
  }

  .signature-row span {
    color: #756873;
    font-size: 8pt;
  }

  .print-footer {
    margin-top: 36px;
    color: #756873;
    font-size: 7.5pt;
    line-height: 1.45;
  }

  .print-footer span {
    display: block;
    margin-top: 10px;
    color: #4b163b;
    font-weight: 700;
  }
}
