/* ==========================================================================
   AMI Deal Room v2 – design system
   Patterns follow the GOV.UK Design System (question pages, error summary,
   check answers, confirmation panel, task list, summary list, tags).
   Layout follows property-portal conventions (single search hero, filter
   bar, result cards, details page with sticky contact panel).
   Branding is ABTA's own. No GOV.UK crown, logotype or typeface is used.
   ========================================================================== */

:root {
  --ink: #1a1208;
  --secondary: #505a5f;
  --page: #ffffff;
  --page-alt: #f3f2f1;
  --brand: #1e6b3c;
  --brand-hover: #14532d;
  --brand-tint: #e8f1ec;
  --header: #0a1a10;
  --gold: #c9a84c;        /* ABTA gold: button hover, banners, icons; 8.1:1 with --ink text */
  --gold-light: #f9c53d;  /* button fill, 11.5:1 with --ink text */
  --gold-dark: #7a5f1a;   /* 6.0:1 on white; use for gold text on white */
  --border: #b1b4b6;
  --border-light: #d8dadc;
  --input: #1a1208;
  --error: #d4351c;
  --focus: #ffdd00;
  --focus-text: #0b0c0c;
  --white: #ffffff;
  --radius: 4px;
  --width: 1200px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.1875rem; /* 19px */
  line-height: 1.4;
  color: var(--ink);
  background: var(--page);
}
@media (max-width: 640px) { body { font-size: 1.0625rem; } }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Focus: yellow fill with dark underline, as GOV.UK ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid transparent;
  background-color: var(--focus) !important;
  color: var(--focus-text) !important;
  box-shadow: 0 -2px var(--focus), 0 4px var(--focus-text);
  text-decoration: none;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--focus-text);
}

/* ---------- Typography ---------- */
h1, .dr-h1 { font-size: 2.25rem; line-height: 1.15; font-weight: 700; margin: 0 0 1.25rem; }
h2, .dr-h2 { font-size: 1.6rem; line-height: 1.2; font-weight: 700; margin: 2rem 0 1rem; }
h3, .dr-h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 700; margin: 1.5rem 0 .75rem; }
@media (max-width: 640px) {
  h1, .dr-h1 { font-size: 1.75rem; }
  h2, .dr-h2 { font-size: 1.375rem; }
}
p { margin: 0 0 1rem; }
.dr-lead { font-size: 1.375rem; line-height: 1.35; }
.dr-secondary { color: var(--secondary); }
.dr-small { font-size: 1rem; }
.dr-caption { display: block; font-size: 1.1875rem; color: var(--secondary); margin-bottom: .25rem; }
.dr-caption-l { display: block; font-size: 1.375rem; color: var(--secondary); margin-bottom: .25rem; }
ul.dr-list, ol.dr-list { margin: 0 0 1rem; padding-left: 1.25rem; }
ul.dr-list li, ol.dr-list li { margin-bottom: .4rem; }
ul.dr-list--plain { list-style: none; padding-left: 0; }

a, .dr-link { color: var(--brand); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: max(1px, .0625rem); }
a:hover, .dr-link:hover { color: var(--brand-hover); text-decoration-thickness: max(3px, .1875rem); }
.dr-link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--brand); text-decoration: underline; text-underline-offset: .15em; }

.dr-visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: 0 !important; padding: 0 !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important;
}

/* ---------- Layout ---------- */
.dr-width { max-width: var(--width); margin: 0 auto; padding-inline: var(--gutter); }
@media (min-width: 641px) { :root { --gutter: 30px; } }
.dr-main { padding-block: 2rem 3.5rem; display: block; }
.dr-grid { display: grid; gap: 30px; }
@media (min-width: 900px) {
  .dr-grid--two-thirds { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .dr-grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dr-narrow { max-width: 760px; }
}
.dr-section-alt { background: var(--page-alt); }
.dr-rule { border: 0; border-top: 1px solid var(--border-light); margin: 2rem 0; }

/* ---------- Skip link ---------- */
.dr-skip { position: absolute; left: -9999px; top: 0; padding: .6rem 1rem; background: var(--focus); color: var(--focus-text); z-index: 100; }
.dr-skip:focus { left: 0; }

/* ---------- Review banner (draft build only) ---------- */
.dr-review-banner { background: #fff7bf; color: #594d00; border-bottom: 1px solid #e0cf6b; font-size: 1rem; }
.dr-review-banner .dr-width { padding-block: .5rem; }
.dr-review-banner strong { color: var(--ink); }

/* ---------- Header (white, portal style) ---------- */
.dr-header { background: var(--white); border-bottom: 4px solid var(--brand); }
.dr-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; }
.dr-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.25rem; padding: .25rem 0; }
.dr-logo:hover { color: var(--ink); }
.dr-logo__sub { display: block; font-weight: 400; font-size: 1rem; color: var(--secondary); }
@media (max-width: 480px) { .dr-logo__sub { display: none; } }
.dr-mobile-only { display: block; }
@media (min-width: 900px) { .dr-mobile-only { display: none !important; } }
.dr-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.dr-nav a { display: inline-block; padding: .6rem .55rem; color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 600; border-bottom: 3px solid transparent; }
.dr-nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.dr-nav a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--brand); }
.dr-nav__account { margin-left: .5rem; }
.dr-nav__toggle { display: none; }
@media (max-width: 820px) {
  .js .dr-nav__toggle { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 2px solid var(--ink); border-radius: 999px; padding: .4rem .9rem; font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer; }
  .dr-nav { width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .75rem; }
  .js .dr-nav { display: none; }
  .js .dr-nav.is-open { display: flex; }
  .dr-nav a { border-bottom: 1px solid var(--border-light); }
  .dr-nav__account { margin-left: 0; }
}

/* ---------- Breadcrumbs / back link ---------- */
.dr-breadcrumbs { font-size: 1rem; margin: 1rem 0 0; }
.dr-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.dr-breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: .4rem; color: var(--secondary); }
.dr-back { display: inline-block; position: relative; padding: .2rem 0 .2rem 1rem; font-size: 1rem; margin-top: 1rem; }
.dr-back::before { content: ""; position: absolute; left: 2px; top: .65em; width: .45em; height: .45em; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg); }

/* ---------- Buttons ---------- */
.dr-button {
  display: inline-block; position: relative; margin: 0 .75rem 1rem 0; padding: .55rem 1.5rem .5rem;
  font: inherit; font-weight: 600; font-size: 1.1875rem; line-height: 1.2; text-align: center; text-decoration: none;
  color: var(--ink); background: var(--gold-light); border: 2px solid transparent; border-radius: 999px;
  box-shadow: none; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.dr-button:hover { background: var(--gold); color: var(--ink); }
.dr-button:active { top: 1px; }
/* Pill buttons: keyboard focus is yellow with a 3px black ring all round (19.6:1 on white) */
.dr-button:focus-visible, .dr-save:focus-visible, .dr-nav__toggle:focus-visible { background: var(--focus) !important; color: var(--focus-text) !important; border-color: var(--focus-text); box-shadow: 0 0 0 3px var(--focus-text); outline: 3px solid transparent; }
.dr-button--secondary { background: var(--page-alt); color: var(--ink); border-color: var(--secondary); }
.dr-button--secondary:hover { background: #dbdad9; color: var(--ink); }
.dr-button--warning { background: var(--error); color: var(--white); border-color: #55150b; }
.dr-button--warning:hover { background: #aa2a16; color: var(--white); }
.dr-button--start { font-size: 1.375rem; padding: .7rem 1.75rem .65rem; display: inline-flex; align-items: center; gap: .5rem; }
.dr-button--full { width: 100%; margin-right: 0; }
.dr-button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.dr-button-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; }
.dr-button-group .dr-button { margin-right: 0; }

/* ---------- Hero with single search (portal home) ---------- */
.dr-hero { background: var(--header); color: var(--white); position: relative; overflow: hidden; }
.dr-hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(circle at 85% 20%, rgba(201,168,76,.22), transparent 40%),
  radial-gradient(circle at 10% 90%, rgba(30,107,60,.55), transparent 45%); }
.dr-hero__inner { position: relative; padding-block: 3.5rem 4rem; }
.dr-hero h1 { color: var(--white); font-size: 2.75rem; max-width: 22ch; margin-bottom: .75rem; }
.dr-hero__sub { font-size: 1.375rem; max-width: 46ch; margin-bottom: 2rem; color: #e9efe9; }
@media (max-width: 640px) { .dr-hero h1 { font-size: 2rem; } .dr-hero__sub { font-size: 1.125rem; } }
.dr-searchcard { background: var(--white); color: var(--ink); border-radius: 8px; max-width: 860px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.dr-searchcard__tabs { display: flex; border-bottom: 1px solid var(--border-light); }
.dr-searchcard__tabs a { flex: 1 1 0; text-align: center; padding: .9rem .5rem; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 4px solid transparent; }
.dr-searchcard__tabs a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--brand); }
.dr-searchcard__body { padding: 1.25rem; }
.dr-searchcard__row { display: grid; gap: .75rem; }
@media (min-width: 760px) { .dr-searchcard__row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; } }
.dr-searchcard .dr-form-group { margin-bottom: 0; }
.dr-searchcard .dr-button { margin: 0; height: 48px; }
.dr-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; font-size: 1rem; color: #e9efe9; }
.dr-trust li { display: inline-flex; align-items: center; gap: .5rem; }
.dr-trust svg { flex: none; width: 24px; height: 24px; color: var(--gold); }

/* ---------- Forms (GOV.UK patterns) ---------- */
.dr-form-group { margin-bottom: 1.75rem; }
/* Errors are shown by the red message and red field border (no red bar on the left) */
.dr-form-group--error { }
.dr-label { display: block; font-weight: 600; margin-bottom: .35rem; }
.dr-label--l { font-size: 2.25rem; line-height: 1.15; font-weight: 700; margin-bottom: .9rem; }
@media (max-width: 640px) { .dr-label--l { font-size: 1.75rem; } }
.dr-hint { display: block; color: var(--secondary); margin-bottom: .6rem; }
.dr-error-message { display: block; color: var(--error); font-weight: 700; margin-bottom: .6rem; }
.dr-input, .dr-select, .dr-textarea {
  display: block; width: 100%; min-height: 48px; padding: .4rem .5rem; font: inherit; color: var(--ink);
  background: var(--white); border: 2px solid var(--input); border-radius: 0;
}
.dr-select { -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.dr-textarea { min-height: 9rem; resize: vertical; }
/* Curved fields everywhere: single-line fields and dropdowns are pill-shaped, text boxes have 16px corners */
.dr-input, .dr-select { border-radius: 999px; padding-left: 1rem; padding-right: 1rem; }
.dr-select { padding-right: 2.6rem; background-position: calc(100% - 24px) 55%, calc(100% - 18px) 55%; }
.dr-textarea { border-radius: 16px; padding: .6rem 1rem; }
.dr-input--error, .dr-select--error, .dr-textarea--error { border-color: var(--error); }
.dr-input--w10 { max-width: 23ex; } .dr-input--w20 { max-width: 41ex; } .dr-input--w30 { max-width: 59ex; }
.dr-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.dr-fieldset__legend { display: table; max-width: 100%; white-space: normal; font-weight: 600; margin-bottom: .5rem; padding: 0; }
.dr-fieldset__legend--l { font-size: 2.25rem; line-height: 1.15; font-weight: 700; margin-bottom: .9rem; }
.dr-fieldset__legend--m { font-size: 1.5rem; font-weight: 700; margin-bottom: .75rem; }
@media (max-width: 640px) { .dr-fieldset__legend--l { font-size: 1.75rem; } }
.dr-fieldset__heading { font: inherit; margin: 0; }

.dr-choice { position: relative; display: block; min-height: 44px; padding-left: 54px; margin-bottom: .6rem; clear: left; }
.dr-choice__input { position: absolute; top: -2px; left: -2px; width: 48px; height: 48px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.dr-choice__label { display: inline-block; padding: .55rem .75rem .35rem; cursor: pointer; touch-action: manipulation; }
.dr-choice__label::before { content: ""; position: absolute; top: 2px; left: 2px; width: 40px; height: 40px; border: 2px solid var(--input); background: var(--white); }
.dr-choice--radio .dr-choice__label::before { border-radius: 50%; }
.dr-choice--radio .dr-choice__label::after { content: ""; position: absolute; top: 12px; left: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); opacity: 0; }
.dr-choice--checkbox .dr-choice__label::after { content: ""; position: absolute; top: 13px; left: 11px; width: 23px; height: 12px; border: solid var(--ink); border-width: 0 0 5px 5px; transform: rotate(-45deg); border-top-color: transparent; opacity: 0; }
.dr-choice__input:checked + .dr-choice__label::after { opacity: 1; }
.dr-choice__input:focus-visible + .dr-choice__label::before { border-width: 4px; outline: 3px solid transparent; box-shadow: 0 0 0 4px var(--focus); }
.dr-choice__hint { display: block; padding-left: .75rem; color: var(--secondary); margin-top: -.2rem; }
.dr-choices--inline .dr-choice { display: inline-block; margin-right: 1.25rem; }
.dr-choices__divider { width: 40px; text-align: center; margin-bottom: .6rem; }
.dr-conditional { margin: 0 0 .8rem 18px; padding-left: 33px; border-left: 4px solid var(--border); }

.dr-character-count { margin-top: .4rem; color: var(--secondary); }
.dr-character-count--over { color: var(--error); font-weight: 700; }

.dr-details { margin-bottom: 1.5rem; }
.dr-details__summary { display: inline-block; cursor: pointer; color: var(--brand); text-decoration: underline; padding-left: 1.3rem; position: relative; }
.dr-details__summary::before { content: ""; position: absolute; left: 0; top: .4em; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
.dr-details[open] > .dr-details__summary::before { border-width: 12px 7px 0 7px; border-color: currentColor transparent transparent transparent; }
.dr-details__summary::-webkit-details-marker { display: none; }
.dr-details__text { padding: .9rem 0 .9rem 1rem; border-left: 5px solid var(--border); margin-top: .5rem; }

/* ---------- Error summary ---------- */
.dr-error-summary { padding: 1.25rem; margin-bottom: 2rem; border: 5px solid var(--error); border-radius: 8px; }
.dr-error-summary:focus { outline: 3px solid var(--focus); }
.dr-error-summary__title { font-size: 1.5rem; margin: 0 0 1rem; }
.dr-error-summary__list { margin: 0; padding: 0; list-style: none; }
.dr-error-summary__list li { margin-bottom: .4rem; }
.dr-error-summary__list a { color: var(--error); font-weight: 700; }

/* ---------- Notification banner, inset text, warning text ---------- */
.dr-banner { border: 5px solid var(--brand); background: var(--brand); border-radius: 8px; margin-bottom: 2rem; }
.dr-banner__title { color: var(--white); font-size: 1.1875rem; font-weight: 700; margin: 0; padding: .2rem .9rem .3rem; }
.dr-banner__content { background: var(--white); border-radius: 3px; padding: 1rem 1.2rem; }
.dr-banner__content > :last-child { margin-bottom: 0; }
/* Important: ABTA gold with dark title text (8.1:1). Success stays ABTA green. */
.dr-banner--important { border-color: var(--gold); background: var(--gold); }
.dr-banner--important .dr-banner__title { color: var(--ink); }
.dr-inset { padding: 1rem; margin: 1.5rem 0; border-left: 10px solid var(--border); }
.dr-inset > :last-child { margin-bottom: 0; }
.dr-warning { position: relative; padding: .6rem 0 .6rem 3.2rem; font-weight: 700; margin-bottom: 1.25rem; }
.dr-warning::before { content: "!"; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 35px; height: 35px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 1.6rem; line-height: 35px; text-align: center; }

/* ---------- Draft legal notice ---------- */
.dr-draft { border: 3px dashed #8c3a1f; border-radius: 8px; background: #fcede8; color: #5c2412; padding: 1rem 1.25rem; margin: 1.25rem 0 2rem; }
.dr-draft strong { color: #3d1809; }
.dr-placeholder { background: #fff7bf; color: #3d3400; padding: 0 .2em; border-bottom: 2px solid #b39b00; font-weight: 600; }

/* ---------- Panel (confirmation) ---------- */
.dr-panel { background: var(--brand); color: var(--white); text-align: center; padding: 2rem 1.5rem; margin-bottom: 2rem; border-radius: 8px; }
.dr-panel h1 { color: var(--white); margin-bottom: 1rem; }
.dr-panel__body { font-size: 1.5rem; }
.dr-panel__body strong { display: block; font-size: 1.75rem; letter-spacing: .02em; margin-top: .25rem; word-break: break-word; }

/* ---------- Summary list (check answers) ---------- */
.dr-summary-list { margin: 0 0 2rem; }
.dr-summary-list__row { border-bottom: 1px solid var(--border-light); padding: .75rem 0; display: grid; gap: .25rem 1.25rem; }
@media (min-width: 641px) { .dr-summary-list__row { grid-template-columns: 30% 1fr auto; } }
.dr-summary-list__key { font-weight: 700; margin: 0; }
.dr-summary-list__value { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.dr-summary-list__actions { margin: 0; text-align: right; }
@media (max-width: 640px) { .dr-summary-list__actions { text-align: left; } }

/* ---------- Tags ---------- */
.dr-tag { display: inline-block; padding: .15rem .5rem .1rem; font-size: 1rem; font-weight: 600; line-height: 1.25; border-radius: 2px; background: #e6e8ea; color: var(--ink); white-space: nowrap; }
.dr-tag--green { background: #cce2d8; color: #005a30; }
.dr-tag--yellow { background: #fff7bf; color: #594d00; }
.dr-tag--red { background: #f4cdc6; color: #2a0b06; }
.dr-tag--blue { background: #bbd4ea; color: #0c2d4a; }
.dr-tag--grey { background: #e6e8ea; color: #262c2f; }

/* ---------- Task list ---------- */
.dr-task-list { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--border-light); }
.dr-task-list__item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--border-light); position: relative; }
.dr-task-list__item:hover { background: var(--page-alt); }
.dr-task-list__name a::after { content: ""; position: absolute; inset: 0; }
.dr-task-list__hint { display: block; color: var(--secondary); font-size: 1rem; }

/* ---------- Tables ---------- */
.dr-table-wrap { overflow-x: auto; margin-bottom: 2rem; }
.dr-table { width: 100%; border-collapse: collapse; }
.dr-table caption { text-align: left; font-weight: 700; font-size: 1.375rem; margin-bottom: .75rem; }
.dr-table th, .dr-table td { text-align: left; padding: .7rem 1.25rem .7rem 0; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.dr-table th { font-weight: 700; }

/* ---------- Results page: filter bar ---------- */
.dr-filterbar { background: var(--page-alt); border-bottom: 1px solid var(--border-light); }
.dr-filterbar__form { padding-block: 1.25rem; }
.dr-filterbar__grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .dr-filterbar__grid { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto; align-items: end; } }
.dr-filterbar__grid .dr-form-group { margin: 0; }
.dr-filterbar__grid .dr-form-group--keywords { grid-column: 1 / -1; }
@media (min-width: 760px) { .dr-filterbar__grid .dr-form-group--keywords { grid-column: auto; } }
.dr-filterbar__grid .dr-label { font-size: 1rem; }
.dr-filterbar__grid .dr-button { margin: 0; height: 48px; }
.dr-filterbar__actions { grid-column: 1 / -1; }
@media (min-width: 760px) { .dr-filterbar__actions { grid-column: auto; } }

.dr-results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-block: 1.25rem .5rem; }
.dr-results-count { font-size: 1.5rem; font-weight: 700; margin: 0; }
.dr-results-bar__tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.dr-results-bar__tools .dr-button { margin: 0; }
.dr-sort { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 100%; }
.dr-sort .dr-label { margin: 0; font-weight: 400; }
.dr-sort .dr-select { width: auto; min-width: 0; max-width: 100%; }
@media (min-width: 641px) { .dr-sort .dr-select { min-width: 12rem; } }
.dr-active-filters { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .25rem 0 1rem; }
.dr-active-filters a { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem; background: var(--white); border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 1rem; }
.dr-active-filters a::after { content: "×"; font-size: 1.2rem; line-height: 1; }

/* ---------- Opportunity card (portal list card) ---------- */
.dr-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.dr-card { position: relative; display: grid; background: var(--white); border: 1px solid var(--border-light); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.dr-card:hover { border-color: var(--border); box-shadow: 0 3px 10px rgba(0,0,0,.1); }
@media (min-width: 700px) { .dr-card { grid-template-columns: 260px minmax(0, 1fr); } }
.dr-card__visual { position: relative; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; color: var(--white); background: var(--header); }
.dr-card__visual[data-sector] { background: var(--sector-bg, var(--header)); }
.dr-card__visual svg { width: 56px; height: 56px; color: var(--gold); }
.dr-card__visual-label { font-size: 1rem; font-weight: 600; }
.dr-card__body { padding: 1rem 1.25rem 1rem; display: flex; flex-direction: column; gap: .35rem; }
.dr-card__price { font-size: 1.6rem; font-weight: 700; line-height: 1.15; margin: 0; }
.dr-card__qualifier { font-size: 1rem; font-weight: 400; color: var(--secondary); margin-left: .35rem; }
.dr-card__title { font-size: 1.25rem; font-weight: 700; margin: 0; line-height: 1.3; }
.dr-card__title a { color: var(--ink); text-decoration: none; }
.dr-card__title a:hover { color: var(--brand); text-decoration: underline; }
.dr-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dr-card__facts { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; font-size: 1rem; color: var(--secondary); }
.dr-card__facts li { display: inline-flex; align-items: center; gap: .35rem; }
.dr-card__facts svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.dr-card__snippet { margin: .25rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dr-card__footer { margin-top: auto; padding-top: .6rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; font-size: 1rem; color: var(--secondary); border-top: 1px solid var(--border-light); }
.dr-card__save { position: relative; z-index: 2; }
.dr-save { display: inline-flex; align-items: center; gap: .35rem; background: var(--white); border: 1px solid var(--ink); border-radius: 999px; padding: .3rem .9rem; font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.dr-save svg { width: 18px; height: 18px; }
.dr-save[aria-pressed="true"] { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-hover); }
.dr-save[aria-pressed="true"] svg path { fill: currentColor; }

.dr-card--compact { grid-template-columns: 1fr !important; }
.dr-card--compact .dr-card__visual { min-height: 96px; flex-direction: row; align-items: center; }
.dr-card--compact .dr-card__visual svg { width: 40px; height: 40px; }

/* ---------- Related market intelligence ---------- */
.dr-articles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dr-article { position: relative; border: 1px solid var(--border-light); border-radius: 6px; overflow: hidden; background: var(--white); }
.dr-article:hover { box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.dr-article__img { display: block; width: 100%; height: 130px; object-fit: cover; }
.dr-article__body { padding: .9rem 1rem 1rem; }
.dr-article__kicker { display: block; font-size: 1rem; font-weight: 600; color: var(--brand); margin-bottom: .25rem; }
.dr-article__title { font-size: 1.125rem; margin: 0 0 .4rem; }
.dr-article__title a { color: var(--ink); text-decoration: none; }
.dr-article__title a::after { content: ""; position: absolute; inset: 0; }
.dr-article__title a:hover { text-decoration: underline; }

/* ---------- Pagination ---------- */
.dr-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin: 2rem 0; }
.dr-pagination__list { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.dr-pagination__link { display: inline-block; min-width: 44px; padding: .5rem .75rem; text-align: center; font-weight: 600; }
.dr-pagination__link[aria-current="page"] { background: var(--brand); color: var(--white); text-decoration: none; }

/* ---------- Details page ---------- */
.dr-detail-hero { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
.dr-detail-visual { border-radius: 6px; min-height: 190px; padding: 1.25rem; display: flex; justify-content: space-between; align-items: flex-end; color: var(--white); background: var(--sector-bg, var(--header)); }
.dr-detail-visual svg { width: 88px; height: 88px; color: var(--gold); }
.dr-detail-visual__ref { font-size: 1rem; font-weight: 600; }
.dr-price { font-size: 2.25rem; font-weight: 700; margin: 0; line-height: 1.1; }
.dr-price__qualifier { display: block; font-size: 1.1875rem; font-weight: 400; color: var(--secondary); margin-top: .2rem; }
.dr-keyfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 1.5rem 0 2rem; padding: 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
@media (min-width: 760px) { .dr-keyfacts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dr-keyfacts div { padding: .9rem 1rem .9rem 0; }
.dr-keyfacts dt { font-size: 1rem; color: var(--secondary); margin: 0 0 .25rem; display: flex; align-items: center; gap: .35rem; }
.dr-keyfacts dt svg { width: 18px; height: 18px; color: var(--brand); }
.dr-keyfacts dd { margin: 0; font-weight: 700; }
.dr-features { columns: 1; margin: 0 0 1.5rem; padding-left: 1.25rem; }
@media (min-width: 760px) { .dr-features { columns: 2; column-gap: 2.5rem; } }
.dr-features li { break-inside: avoid; margin-bottom: .5rem; }

.dr-contact-panel { border: 1px solid var(--border-light); border-top: 5px solid var(--brand); border-radius: 6px; padding: 1.25rem; background: var(--white); }
@media (min-width: 900px) { .dr-sticky { position: sticky; top: 1rem; } }
.dr-contact-panel h2 { margin-top: 0; font-size: 1.375rem; }
.dr-steps { list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: step; }
.dr-steps li { counter-increment: step; position: relative; padding: 0 0 .9rem 2.4rem; }
.dr-steps li::before { content: counter(step); position: absolute; left: 0; top: -.05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand-tint); color: var(--brand-hover); font-weight: 700; font-size: 1rem; display: grid; place-items: center; }

/* ---------- Home sections ---------- */
.dr-feature-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .dr-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dr-feature { background: var(--white); border: 1px solid var(--border-light); border-radius: 6px; padding: 1.25rem; }
.dr-feature h3 { margin-top: .5rem; }
.dr-feature svg { width: 36px; height: 36px; color: var(--brand); }
.dr-price-box { background: var(--white); border: 2px solid var(--brand); border-radius: 6px; padding: 1.5rem; }
.dr-price-box__amount { font-size: 2.5rem; font-weight: 700; line-height: 1; margin: .25rem 0 .5rem; }

/* ---------- Account (Your Deal Room) ---------- */
.dr-subnav { list-style: none; margin: 0 0 2rem; padding: 0; border-left: 1px solid var(--border-light); }
.dr-subnav a { display: block; padding: .5rem 1rem; text-decoration: none; color: var(--ink); border-left: 4px solid transparent; margin-left: -1px; }
.dr-subnav a[aria-current="true"] { border-left-color: var(--brand); font-weight: 700; color: var(--brand); }
.dr-subnav a:hover { text-decoration: underline; }
@media (min-width: 900px) { .dr-account-grid { grid-template-columns: 250px minmax(0, 1fr) !important; } }
.dr-status-card { border: 1px solid var(--border-light); border-radius: 6px; padding: 1.25rem; margin-bottom: 1.5rem; }
.dr-status-card h3 { margin-top: 0; }
.dr-tracker { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: .5rem 0 0; font-size: 1rem; }
.dr-tracker li { padding: .2rem .55rem; border-radius: 2px; background: #e6e8ea; color: #262c2f; }
.dr-tracker li[aria-current="step"] { background: var(--brand); color: var(--white); font-weight: 700; }
.dr-tracker li.is-done { background: #cce2d8; color: #005a30; }

/* ---------- File upload ---------- */
.dr-file-upload { display: block; max-width: 100%; font: inherit; padding: .4rem 0; }
.dr-file-list { list-style: none; margin: 1rem 0; padding: 0; border-top: 1px solid var(--border-light); }
.dr-file-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }

/* ---------- Dialog (timeout warning) ---------- */
.dr-dialog-overlay { position: fixed; inset: 0; background: rgba(11,12,12,.75); z-index: 1000; display: grid; place-items: center; padding: 16px; }
.dr-dialog { background: var(--white); max-width: 540px; width: 100%; padding: 1.75rem; border: 5px solid var(--ink); border-radius: 8px; }
.dr-dialog:focus { outline: 3px solid var(--focus); }
.dr-dialog h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.dr-footer { background: var(--page-alt); border-top: 1px solid var(--border); padding-block: 2.5rem; font-size: 1rem; }
.dr-footer__grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .dr-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dr-footer h2 { font-size: 1.125rem; margin: 0 0 .75rem; }
.dr-footer ul { list-style: none; margin: 0; padding: 0; }
.dr-footer li { margin-bottom: .4rem; }
.dr-footer a { color: var(--ink); }
.dr-footer__legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: #383f43; }

/* ---------- Legal document pages ---------- */
.dr-legal h2 { font-size: 1.375rem; margin-top: 2rem; }
.dr-legal ol { padding-left: 1.5rem; }
.dr-legal li { margin-bottom: .5rem; }
.dr-plain-terms { background: var(--brand-tint); border-left: 6px solid var(--brand); padding: 1rem 1.25rem; margin-bottom: 2rem; }
.dr-plain-terms h2 { margin-top: 0; font-size: 1.25rem; }

/* ---------- Loading / empty states ---------- */
.dr-empty { border: 1px dashed var(--border); border-radius: 6px; padding: 2rem 1.25rem; text-align: center; }
.dr-empty > :last-child { margin-bottom: 0; }
.dr-loading { color: var(--secondary); }

@media print {
  .dr-header nav, .dr-footer, .dr-filterbar, .dr-review-banner, .dr-button { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
