/* Inizia subito — in line with the rest of the site (D106): a short opening,
   the steps in a plain bar, fields like the contact form, a compact list of
   plans and the summary in a card on the side. */

.sf { padding: 64px 0 120px; background: var(--ink); }
.sf-head { max-width: 860px; margin-bottom: 44px; }
.sf-head h1 { margin: 0; font-size: clamp(44px, 5vw, 78px) !important; line-height: 1.02 !important; }
.sf .sf-lead { max-width: 620px; margin: 22px 0 0; font-size: 19px !important; line-height: 1.6 !important; color: var(--mist); }

.sf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.sf-main {
  min-width: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #FFFFFF;
  box-shadow: 0 50px 90px -60px rgba(23, 25, 26, .4), 0 0 0 1px var(--hair);
  scroll-margin-top: 100px;
}

/* Steps */
.sf-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border-bottom: 1px solid var(--hair); }
.sf-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 18px 20px;
  border: 0;
  background: none;
  font: inherit;
  text-align: start;
  color: var(--mist);
  cursor: pointer;
}
.sf-steps button + button { border-inline-start: 1px solid var(--hair); }
.sf-steps button:focus:not(:focus-visible) { outline: none; }
.sf-steps__n {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--hair-strong);
  font-family: var(--mono);
  font-size: 12px;
}
.sf-steps__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sf-steps__t b { font-size: 14px; font-weight: 600; color: var(--cream); }
.sf-steps__t span { font-size: 12px; line-height: 1.3; }
.sf-steps .is-on { background: var(--ink-2); }
.sf-steps .is-on .sf-steps__n { background: var(--cream); box-shadow: none; color: #FFFFFF; }
.sf-steps .is-done .sf-steps__n { background: var(--gold); box-shadow: none; color: #FFFFFF; }

/* Panels */
.sf-panel { padding: 40px 44px 44px; animation: sf-in .5s cubic-bezier(.16, 1, .3, 1); }
@keyframes sf-in { from { opacity: 0; transform: translateY(10px); } }
.sf .sf-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 42px) !important; line-height: 1.08 !important; color: var(--cream); }
.sf .sf-text { max-width: 640px; margin: 12px 0 0; font-size: 16px !important; line-height: 1.6 !important; color: var(--mist); }
.sf-link { font-weight: 600; color: var(--gold); text-decoration: none; border-bottom: 1px solid currentColor; }
.sf-alert { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: rgba(181, 92, 77, .08); font-size: 14px; color: #8F3D31; }
.sf .sf-note { margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--ink-2); font-size: 14px !important; line-height: 1.5 !important; color: var(--cream); }
.sf-next { margin-top: 26px; }

/* Fields: the label sits inside and moves up, as in the contact form. */
.sf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.sf-field { position: relative; display: block; }
.sf-field--wide { grid-column: 1 / -1; }
.sf-field input,
.sf-field select {
  width: 100%;
  min-height: 62px;
  padding: 26px 18px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--ink-2);
  font: 400 16px var(--sans);
  color: var(--cream);
  transition: border-color .2s ease, background-color .2s ease;
}
.sf-field select { appearance: none; -webkit-appearance: none; padding-inline-end: 44px; cursor: pointer; }
.sf-field input:hover,
.sf-field select:hover { border-color: var(--hair-strong); }
.sf-field input:focus,
.sf-field select:focus { outline: none; border-color: var(--cream); background: #FFFFFF; }
.sf-field input::placeholder { color: transparent; }
.sf-field input:focus::placeholder { color: var(--mist-2); }
.sf-field__label {
  position: absolute;
  inset-inline-start: 19px;
  top: 21px;
  font-size: 16px;
  color: var(--mist);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .2s ease, color .2s ease;
}
[dir="rtl"] .sf-field__label { transform-origin: right top; }
.sf-field input:focus + .sf-field__label,
.sf-field input:not(:placeholder-shown) + .sf-field__label,
.sf-field--select .sf-field__label { transform: translateY(-12px) scale(.78); color: var(--gold); }
.sf-required { margin-inline-start: 3px; color: var(--gold); }
.sf-field__chevron { position: absolute; inset-inline-end: 20px; top: 50%; margin-top: -7px; color: var(--mist); pointer-events: none; }
.sf-field.is-invalid input { border-color: rgba(181, 92, 77, .6); background: #FFFFFF; }
.sf-field__error { display: block; margin: 6px 4px 0; font-size: 12px; font-weight: 600; color: #8F3D31; }

/* Plans: duration as two buttons, plans as a list to pick from. */
.sf-billing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.sf-billing button,
.sf-plan {
  display: flex;
  border: 0;
  border-radius: 16px;
  background: var(--ink-2);
  font: inherit;
  text-align: start;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.sf-billing button { flex-direction: column; gap: 4px; padding: 14px 18px; }
.sf-billing b { font-size: 15px; font-weight: 600; color: var(--cream); }
.sf-billing span { font-size: 13px; line-height: 1.4; color: var(--mist); }
.sf-billing button[aria-pressed="true"],
.sf-plan.is-on { background: #FFFFFF; box-shadow: inset 0 0 0 2px var(--cream); }
.sf-plans { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.sf-plan { align-items: center; gap: 16px; width: 100%; padding: 18px 20px; }
.sf-plan__dot { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--hair-strong); transition: box-shadow .2s ease; }
.sf-plan.is-on .sf-plan__dot { box-shadow: inset 0 0 0 6px var(--cream); }
.sf-plan__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.sf-plan__name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; line-height: 1.1; color: var(--cream); }
.sf-plan__name em { padding: 3px 10px; border-radius: 999px; background: var(--gold); font: 600 11px var(--sans); font-style: normal; color: #FFFFFF; }
.sf-plan__who { font-size: 14px; line-height: 1.45; color: var(--mist); }
.sf-plan__price { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; text-align: end; }
.sf-plan__price b { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1; color: var(--cream); white-space: nowrap; }
.sf-plan__price span { font-size: 12px; color: var(--mist); }

/* Payment */
.sf-pay { margin-top: 26px; overflow: hidden; border-radius: 18px; box-shadow: 0 0 0 1px var(--hair); }
.sf-pay__head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--ink-2); font-size: 14px; color: var(--mist); }
.sf-pay__head b { color: var(--cream); }
.sf-pay__row { display: flex; justify-content: space-between; gap: 14px; margin: 0 20px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 15px; color: var(--mist); }
.sf-pay__row strong { color: var(--cream); text-align: end; }
.sf-pay .sf-alert,
.sf-pay .sf-note { margin: 16px 20px 0; }
.sf-pay__btn { display: flex !important; justify-content: center; width: calc(100% - 40px); margin: 18px 20px 20px; min-height: 56px; }
.sf .sf-pay__terms { margin: -6px 20px 20px; font-size: 13px !important; line-height: 1.5 !important; color: var(--mist); text-align: center; }

/* After the confirmation */
.sf-check { display: block; width: 64px; height: 64px; margin-bottom: 22px; fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sf-check circle,
.sf-check path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sf-draw .8s cubic-bezier(.65, 0, .35, 1) forwards; }
.sf-check path { animation-delay: .5s; }
@keyframes sf-draw { to { stroke-dashoffset: 0; } }
.sf-after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.sf-after li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; padding: 16px; border-radius: 16px; background: var(--ink-2); }
.sf-after li > span { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px; background: var(--cream); font-family: var(--mono); font-size: 12px; color: #FFFFFF; }
.sf-after b { font-size: 15px; font-weight: 600; color: var(--cream); }
.sf-after em { font-style: normal; font-size: 14px; line-height: 1.45; color: var(--mist); }
.sf .sf-ticket { margin: 18px 0 0; font-family: var(--mono); font-size: 13px !important; color: var(--gold); }

/* Summary */
.sf-summary {
  position: sticky;
  top: 104px;
  padding: 28px;
  border-radius: 28px;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--hair);
}
.sf-summary__k { font-size: 13px; font-weight: 600; color: var(--mist); }
.sf-summary__plan { margin-top: 6px; font-family: var(--serif); font-size: 40px; line-height: 1.05; color: var(--cream); }
.sf-summary__price { margin: 6px 0 18px; font-size: 14px; color: var(--mist); }
.sf-summary__price b { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--cream); }
.sf-summary__row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--hair); font-size: 14px; color: var(--mist); }
.sf-summary__row strong { max-width: 190px; text-align: end; font-weight: 600; color: var(--cream); overflow-wrap: anywhere; }
.sf .sf-summary__help { margin: 14px 0 0; font-size: 13px !important; line-height: 1.5 !important; color: var(--mist); }
.sf-summary__back { display: inline-block; margin-top: 18px; font-size: 14px; }

@media (max-width: 1100px) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); }
  .sf-summary { position: static; }
}

@media (max-width: 760px) {
  .sf { padding: 36px 0 80px; }
  .sf-head { margin-bottom: 28px; }
  .sf-head h1 { font-size: clamp(38px, 10vw, 52px) !important; }
  .sf .sf-lead { font-size: 17px !important; }
  .sf-main,
  .sf-summary { border-radius: 22px; }
  .sf-steps button { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 12px; }
  .sf-steps__t b { font-size: 13px; -webkit-hyphens: auto; hyphens: auto; }
  .sf-steps__t span { display: none; }
  .sf-panel { padding: 26px 18px 30px; }
  .sf-fields,
  .sf-billing,
  .sf-after { grid-template-columns: minmax(0, 1fr); }
  .sf-plan { flex-wrap: wrap; gap: 10px 14px; padding: 16px; }
  .sf-plan__price { flex-direction: row; align-items: baseline; gap: 6px; margin-inline-start: 34px; }
  .sf-next { display: flex !important; justify-content: center; width: 100%; }
  /* The phone rules in responsive-overrides.css widen every button and
     paragraph; inside the trial box they keep its side margins. */
  .sf .sf-pay__btn { width: calc(100% - 40px) !important; }
  .sf .sf-pay__terms { width: auto !important; }
}
