/* ============================================================
   LEGACY LAW FIRM LLP — Fee Calculators
   Inherits tokens from legacy.css (--paper, --ink, --green,
   --green-deep, --gold, --serif, --sans, --hairline, --gutter)
   ============================================================ */

/* ---------- hero ---------- */
.fc-hero {
  padding: clamp(120px, 16vw, 200px) var(--gutter) clamp(40px, 5vw, 72px);
  max-width: 1100px;
}
.fc-hero .label { display: block; margin-bottom: clamp(20px, 3vw, 34px); }
.fc-hero-statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.fc-hero-statement em { font-style: italic; color: var(--gold); }
.fc-hero-sub {
  margin-top: clamp(22px, 3vw, 34px);
  max-width: 60ch;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- tab bar ---------- */
.fc-tabs-wrap {
  padding: 0 var(--gutter);
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.fc-tabs {
  display: flex;
  gap: clamp(6px, 1.4vw, 20px);
  max-width: 1280px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.fc-tabs::-webkit-scrollbar { display: none; }
.fc-tab {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: clamp(16px, 1.8vw, 24px) 4px;
  font-family: var(--sans);
  font-size: clamp(12px, 1.05vw, 14px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.fc-tab sup {
  font-size: 0.62em;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
}
.fc-tab:hover { color: var(--ink); }
.fc-tab.is-active { color: var(--green-deep); border-bottom-color: var(--gold); }

/* ---------- panel layout ---------- */
.fc-panels { padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(80px, 10vw, 140px); }
.fc-panel { display: none; max-width: 1180px; margin: 0 auto; }
.fc-panel.is-active { display: block; }

.fc-panel-head { margin-bottom: clamp(32px, 4vw, 56px); max-width: 760px; }
.fc-panel-head .label { display: block; margin-bottom: 16px; }
.fc-panel-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.fc-panel-head h2 em { font-style: italic; color: var(--gold); }
.fc-panel-head p {
  margin-top: 16px;
  font-size: clamp(14px, 1.25vw, 16.5px);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* two-column grid: inputs | result */
.fc-grid {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
@media (max-width: 880px) { .fc-grid { grid-template-columns: 1fr; } }

/* ---------- input card ---------- */
.fc-card {
  background: color-mix(in srgb, var(--paper-deep) 60%, #fff);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: clamp(26px, 3vw, 44px);
}
.fc-card-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.fc-field { margin-bottom: 24px; }
.fc-field:last-child { margin-bottom: 0; }
.fc-field > label {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 9px;
}
.fc-field .fc-sublabel {
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.fc-input-wrap { position: relative; display: flex; align-items: center; }
.fc-input-wrap .fc-prefix {
  position: absolute;
  left: 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  pointer-events: none;
}
.fc-input,
.fc-field input[type="number"],
.fc-field input[type="text"],
.fc-field input[type="date"] {
  width: 100%;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 14px 16px 14px 46px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
}
.fc-input::-webkit-outer-spin-button,
.fc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fc-field input[type="date"] {
  font-family: var(--sans);
  font-size: 16px;
  padding-left: 16px;
}
.fc-input:focus,
.fc-field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent);
}
.fc-field input::placeholder { color: color-mix(in srgb, var(--ink) 28%, transparent); }

.fc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 460px) { .fc-grid-2 { grid-template-columns: 1fr; } }

.fc-hint {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.fc-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.fc-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 13px 22px;
  border-radius: 3px;
  background: var(--green-deep);
  color: var(--paper);
  transition: background 0.22s ease, transform 0.22s ease;
}
.fc-btn:hover { background: var(--green); transform: translateY(-1px); }
.fc-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.fc-btn--ghost:hover { background: transparent; border-color: var(--ink); }

/* ---------- result panel ---------- */
.fc-result {
  background: var(--green-deep);
  color: var(--paper);
  border-radius: 4px;
  padding: clamp(28px, 3.2vw, 46px);
  position: relative;
  overflow: hidden;
}
.fc-result::after {
  content: "L";
  position: absolute;
  right: -10px;
  bottom: -40px;
  font-family: var(--serif);
  font-size: 220px;
  line-height: 1;
  color: rgba(243, 238, 227, 0.05);
  pointer-events: none;
}
.fc-result-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 22px;
}
.fc-result-primary {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.fc-result-primary .fc-cur {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--gold-bright);
  letter-spacing: 0.06em;
  margin-right: 10px;
  vertical-align: middle;
}
.fc-result-primary .fc-amount {
  font-size: clamp(44px, 6.5vw, 80px);
  position: relative;
}
.fc-result-caption {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(243, 238, 227, 0.62);
  margin-bottom: 30px;
  max-width: 42ch;
}

.fc-breakdown {
  border-top: 1px solid rgba(243, 238, 227, 0.16);
  position: relative;
  z-index: 1;
}
.fc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(243, 238, 227, 0.1);
}
.fc-row-key {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(243, 238, 227, 0.74);
  letter-spacing: 0.01em;
}
.fc-row-key small { display: block; font-size: 11px; color: rgba(243,238,227,0.45); margin-top: 2px; letter-spacing: 0; }
.fc-row-val {
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 23px);
  color: var(--paper);
  white-space: nowrap;
}
.fc-row.is-strong .fc-row-key { color: var(--gold-bright); font-weight: 600; }
.fc-row.is-strong .fc-row-val { color: var(--gold-bright); }

/* VAT — four interlinked inputs styled as result-side fields */
.fc-vat-fields .fc-field input { background: #fff; }
.fc-vat-note {
  margin-top: 20px; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft);
}

/* ---------- schedule / reference ---------- */
.fc-ref { margin-top: clamp(40px, 5vw, 72px); }
.fc-ref-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  width: 100%;
  justify-content: space-between;
}
.fc-ref-toggle .fc-chev { transition: transform 0.3s ease; color: var(--gold); }
.fc-ref-toggle[aria-expanded="true"] .fc-chev { transform: rotate(180deg); }
.fc-ref-body {
  display: none;
  padding-top: 24px;
}
.fc-ref-body.is-open { display: block; }
.fc-table { width: 100%; border-collapse: collapse; font-family: var(--sans); }
.fc-table caption {
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  line-height: 1.5;
}
.fc-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--hairline);
}
.fc-table td {
  font-size: 13.5px;
  color: var(--ink);
  padding: 9px 14px;
  border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}
.fc-table th:not(:first-child), .fc-table td:not(:first-child) { text-align: right; }
.fc-table tr.is-current td {
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--green-deep);
  font-weight: 600;
}
.fc-table tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

.fc-disclaimer {
  margin-top: 20px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--gold) 9%, transparent);
  border-left: 2px solid var(--gold);
  border-radius: 2px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.fc-disclaimer strong { color: var(--ink); }

/* misc fee chips (arbitration) */
.fc-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.fc-chip {
  flex: 1 1 160px;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 14px 16px;
  background: #fff;
}
.fc-chip-k { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 6px; }
.fc-chip-v { font-family: var(--serif); font-size: clamp(18px, 1.8vw, 22px); color: var(--green-deep); }
.fc-chip-v small { font-size: 12px; color: var(--ink-soft); font-family: var(--sans); }

/* error / empty state */
.fc-empty { color: rgba(243, 238, 227, 0.5); }
.fc-warn {
  margin-top: 14px; font-size: 12.5px; color: var(--gold-bright);
  display: none;
}
.fc-warn.show { display: block; }

/* ---------- SEO guide / explainer ---------- */
.fc-guide,
.fc-faq {
  padding: clamp(48px, 6vw, 88px) var(--gutter);
  border-top: 1px solid var(--hairline);
}
.fc-guide-inner { max-width: 880px; margin: 0 auto; }
.fc-guide-head { margin-bottom: clamp(28px, 4vw, 48px); }
.fc-guide-head .label { display: block; margin-bottom: 16px; }
.fc-guide-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.fc-guide-head h2 em { font-style: italic; color: var(--gold); }
.fc-guide-head p {
  margin-top: 18px;
  max-width: 64ch;
  font-size: clamp(14px, 1.25vw, 16.5px);
  line-height: 1.65;
  color: var(--ink-soft);
}

.fc-guide-block {
  padding: clamp(22px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--hairline);
}
.fc-guide-block:last-child { border-bottom: none; }
.fc-guide-block h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--green-deep);
  margin-bottom: 12px;
}
.fc-guide-block p {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.68;
  color: var(--ink-soft);
}
.fc-guide-block strong { color: var(--ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.fc-faq-list { border-top: 1px solid var(--hairline); }
.fc-faq-item {
  border-bottom: 1px solid var(--hairline);
}
.fc-faq-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.2vw, 26px) 0;
  font-family: var(--sans);
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--ink);
  transition: color 0.2s ease;
}
.fc-faq-item > summary::-webkit-details-marker { display: none; }
.fc-faq-item > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  color: var(--gold);
  transition: transform 0.3s ease;
}
.fc-faq-item[open] > summary::after { transform: rotate(45deg); }
.fc-faq-item > summary:hover { color: var(--green-deep); }
.fc-faq-item > p {
  padding: 0 0 clamp(20px, 2.4vw, 28px);
  max-width: 68ch;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.68;
  color: var(--ink-soft);
}
.fc-faq-item > p a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 2px; }
.fc-faq-item > p a:hover { color: var(--gold); }
