.fees-hero {
  padding-block-end: clamp(2.6rem, 5.1vw, 4.8rem);
  background: linear-gradient(125deg, var(--ink-deep), var(--ink));
}

.fees-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, .8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block-start: clamp(1.25rem, 3vw, 2.6rem);
}

.fees-hero-copy h1 { max-width: 19ch; }
.fees-hero-intro {
  max-width: 39rem;
  margin-block-start: .9rem;
  color: #e7eef1;
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem);
}
.fees-hero-note { max-width: 39rem; margin-block-start: .7rem; color: #d9e5e9; }
.fees-hero-copy .button { margin-block-start: 1.3rem; }

.fees-spotlight {
  width: min(100%, 26rem);
  justify-self: end;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border-block-start: 3px solid #cf9879;
  background: var(--paper);
  color: var(--ink);
}

.fees-spotlight .eyebrow { color: var(--copper); }
.fees-spotlight-price,
.fees-routine-price,
.fees-example-price,
.fees-preview-grid strong {
  font-family: var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 400;
  line-height: 1.1;
}
.fees-spotlight-price { margin-block: .5rem; color: var(--ink); font-size: clamp(3.15rem, 5.5vw, 5rem); }
.fees-spotlight p:not(.eyebrow, .fees-spotlight-price) { max-width: 25ch; color: var(--muted); }
.fees-spotlight .text-link { margin-block-start: .75rem; }

.fees-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  padding-block: 1rem;
  border-block-end: 1px solid var(--line);
}
.fees-section-nav a { padding-block: .2rem; }

.fees-schedule, .fees-planning { padding-block: clamp(2.75rem, 5.4vw, 4.8rem); }
.fees-table-section + .fees-table-section { margin-block-start: clamp(2.25rem, 4vw, 3.3rem); }
.fees-table-section h2, .fees-planning h2, .fees-routine h2 {
  font-size: clamp(2rem, 3.3vw, 3rem);
}

.fees-table {
  width: 100%;
  margin-block-start: 1rem;
  border-collapse: collapse;
  border-block-start: 2px solid #c38a70;
}
.fees-table thead { background: var(--pale); }
.fees-table th, .fees-table td {
  padding: .85rem clamp(.7rem, 2.1vw, 1.5rem);
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}
.fees-table thead th { color: var(--ink); font-size: .9375rem; }
.fees-table thead th:last-child, .fees-table .fees-table-price { text-align: end; }
.fees-entry-compare thead th:last-child { text-align: start; }
.fees-service-name { display: block; color: var(--ink); font-size: 1.05rem; }
.fees-service-scope { display: block; max-width: 67ch; color: var(--muted); font-weight: 400; line-height: 1.5; }
.fees-table-price { color: var(--ink); font-size: clamp(1rem, 1.9vw, 1.2rem); font-weight: 700; }
.fees-table-price bdi, .fees-preview-grid bdi, .fees-example-price bdi { white-space: nowrap; }

.fees-routine { padding-block: clamp(2.4rem, 5vw, 4rem); background: var(--pale); }
.fees-routine-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 1rem clamp(1.25rem, 5vw, 5rem);
}
.fees-routine-price { margin-block-end: .38rem; color: var(--copper); font-size: clamp(2.5rem, 4.6vw, 4.25rem); }
.fees-routine h2 + p, .fees-planning h2 + p { margin-block-start: .65rem; color: var(--muted); }
.fees-routine ul { margin-block: .2rem 0; padding-inline-start: 1.2rem; color: var(--muted); }
.fees-routine li + li { margin-block-start: .45rem; }
.fees-routine li::marker { color: var(--copper); }

.fees-planning {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(15rem, .9fr);
  align-items: start;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}
.fees-examples-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-block-start: 1rem; }
.fees-example { padding: clamp(1rem, 1.8vw, 1.35rem); border: 1px solid var(--line); }
.fees-example h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); }
.fees-example-price { margin-block: .46rem; color: var(--copper); font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
.fees-example p:last-child { color: var(--muted); }
.fees-post-grant .fees-example p:not(.fees-example-price) { color: var(--muted); margin-block-start: .55rem; }
.fees-post-grant .fees-example h3:not(:first-child) { margin-block-start: 1rem; }
.fees-post-grant > .button { margin-block-start: 1rem; }
.fees-post-grant > .fees-table-scroll { margin-block-start: 1rem; }
.fees-ipr-note { margin-block-start: 1rem; }
.fees-task-table { padding-block-end: .15rem; }
.fees-task-table .fees-table { margin-block-start: 0; }
.fees-table .fees-activity-heading { background: var(--pale); }
.fees-official { padding: clamp(1.2rem, 2.5vw, 1.8rem); border-block-start: 3px solid #c38a70; background: var(--pale); }
.fees-official h2 { font-size: clamp(1.6rem, 2.25vw, 2rem); }
.fees-official .text-link { display: block; width: fit-content; margin-block-start: .7rem; }

.fees-detail-section {
  padding-block: clamp(2.75rem, 5.4vw, 4.8rem);
  border-block-start: 1px solid var(--line);
}
.fees-detail-section > h2 { margin-block-end: .7rem; }
.fees-detail-lead, .fees-government-block > p, .fees-detail-toggle > p {
  max-width: 75ch;
  color: var(--muted);
}
.fees-government-block { margin-block-start: 1.7rem; }
.fees-detail-section > h3, .fees-government-block h3, .fees-detail-toggle h3, .fees-compare-block h3 {
  font-size: clamp(1.45rem, 2.45vw, 2.1rem);
}
.fees-government-block h3 + p { margin-block-start: .5rem; }
.fees-detail-section > h3 { margin-block-start: 1.65rem; }
.fees-detail-toggle { margin-block-start: 1.3rem; border: 1px solid var(--line); }
.fees-detail-toggle > summary {
  padding: .9rem clamp(.85rem, 2.5vw, 1.5rem);
  background: var(--pale);
  font-weight: 700;
  cursor: pointer;
}
.fees-detail-toggle > summary:hover { color: var(--copper); }
.fees-detail-toggle[open] > :not(summary) { margin-inline: clamp(.65rem, 2.5vw, 1.5rem); }
.fees-detail-toggle[open] > summary + * { margin-block-start: 1rem; }
.fees-detail-toggle[open] > :last-child { margin-block-end: 1rem; }
.fees-detail-toggle > h3:not(:first-of-type) { margin-block-start: 1.3rem; }
.fees-compare-block { margin-block: 1.6rem 1.15rem; }
.fees-table-scroll { overflow-x: auto; overscroll-behavior-inline: contain; margin-block-start: .65rem; }
.fees-table-scroll .fees-table { margin-block-start: 0; }
.fees-entry-compare { min-width: 29rem; }
.fees-entry-compare td { vertical-align: top; }
.fees-entry-compare td:nth-child(2) { white-space: nowrap; }
.fees-our-rate { background: #f9f7f1; }
.fees-budget-methods { margin-block: .8rem 1rem; }
.fees-budget-methods dt { font-weight: 700; }
.fees-budget-methods dd { margin-inline-start: 0; margin-block: .2rem .9rem; max-width: 75ch; color: var(--muted); }
.fees-formula { width: fit-content; margin-block-end: .25rem; color: var(--ink); font-weight: 650; }
.fees-formula bdi { white-space: nowrap; }
.fees-scroll-tip { display: none; margin-block-start: .55rem; color: var(--muted); font-size: .875rem; }
.fees-entity-table { min-width: 20rem; }
.fees-entity-table th:not(:first-child), .fees-entity-table td { text-align: end; }
.fees-entity-table td { white-space: nowrap; }
.fees-entity-table tfoot { background: var(--pale); font-weight: 700; }
.fees-government-block .fees-table-scroll + p { margin-block-start: .65rem; }

.fees-preview { padding-block: clamp(2.75rem, 5.2vw, 4.5rem); background: var(--paper); }
.fees-preview-head { display: flex; align-items: end; justify-content: space-between; gap: .9rem 2rem; }
.fees-preview-head h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
.fees-preview-head p { margin-block-start: .55rem; color: var(--muted); }
.fees-model { max-width: 72ch; }
.fees-preview-note { margin-block-start: .6rem; color: var(--muted); font-size: .9rem; }
.fees-preview-scope { font-size: .9rem; }
.fees-preview-head .button { flex-shrink: 0; }
.fees-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 1.3rem 0;
  padding: 0;
  border-block: 1px solid var(--line);
  list-style: none;
}
.fees-preview-grid li { display: grid; gap: .45rem; align-content: start; padding: 1rem clamp(.85rem, 2.6vw, 2.2rem); }
.fees-preview-grid li:first-child { padding-inline-start: 0; }
.fees-preview-grid li + li { border-inline-start: 1px solid var(--line); }
.fees-preview-grid li strong { color: var(--copper); font-size: clamp(1.65rem, 3vw, 2.65rem); }
.fees-preview-grid li span { line-height: 1.4; }

.preliminary-scope { border-inline-start: 3px solid var(--copper); padding-inline-start: 1.15rem; }
.preliminary-scope p { max-width: 78ch; margin-block-start: .65rem; color: var(--muted); }
.preliminary-scope ul { padding-inline-start: 1.25rem; }
.preliminary-scope li + li { margin-block-start: .35rem; }

.patent-budget { padding-block: clamp(2rem, 4.6vw, 3.75rem); }
.patent-budget h2 { font-size: clamp(1.95rem, 3.1vw, 2.9rem); }
#budget-estimator { scroll-margin-top: 6rem; }
.budget-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  margin-block-start: 1rem;
  border: 1px solid var(--line);
}
.budget-controls, .budget-panel { padding: clamp(1rem, 3vw, 2rem); }
.budget-controls { display: grid; gap: .8rem; align-content: start; }
.budget-entity, .budget-count {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5rem, 6rem);
  align-items: center;
  gap: .3rem .9rem;
  font-weight: 600;
  line-height: 1.35;
}
.budget-entity { grid-template-columns: minmax(0, 1fr); margin-block-end: .35rem; }
.budget-controls input, .budget-controls select {
  inline-size: 100%;
  min-block-size: 2.6rem;
  padding: .45rem .55rem;
  border: 1px solid #71828b;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.budget-controls input[aria-invalid="true"] { border-color: var(--copper); }
.budget-error { color: #8e391e; font-size: .95rem; }
.budget-panel { background: var(--pale); border-inline-start: 1px solid var(--line); }
.budget-panel h3 { margin-block-end: .75rem; font-size: 1.4rem; }
.budget-results { margin-block: 0 1.1rem; }
.budget-results > div { padding-block: .6rem; border-block-start: 1px solid var(--line); }
.budget-results dd { margin: .1rem 0 0; color: var(--copper); font-size: clamp(1.32rem, 2vw, 1.75rem); font-weight: 700; overflow-wrap: anywhere; }
.budget-results > div:last-child dd { color: var(--ink); }
.budget-panel .button { white-space: normal; text-align: center; }
.budget-assumptions { max-width: 78ch; color: var(--muted); }
.budget-assumptions p { margin-block-start: .65rem; }
@media (max-width: 720px) {
  .budget-grid { grid-template-columns: minmax(0, 1fr); }
  .budget-panel { border-inline-start: 0; border-block-start: 1px solid var(--line); }
}

@media (max-width: 850px) {
  .fees-planning { grid-template-columns: minmax(0, 1fr); }
  .fees-scroll-tip { display: block; }
}
@media (max-width: 660px) {
  .fees-hero-grid, .fees-routine-grid { grid-template-columns: minmax(0, 1fr); }
  .fees-hero-grid { gap: 1.5rem; }
  .fees-hero-copy h1 { font-size: clamp(2.55rem, 9.5vw, 4rem); }
  .fees-spotlight { justify-self: start; }
  .fees-preview-head { flex-direction: column; align-items: start; }
  .fees-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .fees-preview-grid li { padding-inline: 0; }
  .fees-preview-grid li + li { border-inline-start: 0; border-block-start: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .fees-table th, .fees-table td { padding: .65rem .55rem; }
  .fees-table thead th { font-size: .875rem; }
  .fees-entity-table th, .fees-entity-table td { padding-inline: .35rem; }
  .fees-service-name { font-size: 1rem; }
  .fees-examples-grid { grid-template-columns: minmax(0, 1fr); }
}
