:root {
  --bg: #f5f5f1;
  --card: #ffffff;
  --ink: #111111;
  --muted: #686868;
  --border: #ddddd8;
  --blue: #19a7e6;
  --blue-soft: #e8f8ff;
  --lime: #cfff3f;
  --lime-soft: #f1ffd1;
  --charcoal: #111315;
  --warm: #f8f8f5;
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  --accent-ink: #07161e;
  --ring: rgba(25, 167, 230, 0.22);
  --radius-lg: 20px;
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-button: 14px;
  --radius-pill: 999px;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

body[data-theme="quote"] {
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  --accent-ink: #07161e;
  --ring: rgba(25, 167, 230, 0.22);
}

body[data-theme="layout"] {
  --accent: var(--lime);
  --accent-soft: var(--lime-soft);
  --accent-ink: #172008;
  --ring: rgba(207, 255, 63, 0.32);
}

body[data-theme="permit"] {
  --accent: var(--charcoal);
  --accent-soft: #efefec;
  --accent-ink: #ffffff;
  --ring: rgba(17, 19, 21, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-input);
  color: #ffffff;
  background: var(--charcoal);
  font-weight: 800;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.15;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: rgba(17, 17, 17, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(320px, 34%) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.tool-selector,
.input-panel,
.result-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.tool-selector {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

.mini-hero {
  display: grid;
  gap: 10px;
  padding: 15px;
  border-radius: var(--radius-card);
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 10%, rgba(207, 255, 63, 0.38), transparent 22%),
    linear-gradient(145deg, #0878b7, #19a7e6);
}

.section-kicker,
.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-kicker {
  color: rgba(255, 255, 255, 0.76);
}

.eyebrow {
  color: var(--muted);
}

.hero-title {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(34px, 2.7vw, 44px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
}

.hero-title span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
}

.mini-hero p:last-child {
  max-width: 360px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.5;
}

.selector-group {
  display: grid;
  gap: 12px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-card {
  --card-color: var(--blue);
  --card-soft: var(--blue-soft);
  --card-text: var(--ink);
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px 14px;
  width: 100%;
  min-height: 188px;
  padding: 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: var(--card-soft);
  color: var(--card-text);
  text-align: left;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.service-eyebrow {
  grid-column: 1 / -1;
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.68;
}

.service-card:hover {
  border-color: #d6d6d2;
  transform: translateY(-1px);
}

.service-card.is-unavailable,
.service-card.is-unavailable:hover {
  cursor: default;
  opacity: 0.62;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.service-card.is-unavailable:hover .arrow-icon {
  opacity: 0.45;
  transform: none;
}

.service-card.is-active {
  border-width: 2px;
  border-color: var(--charcoal);
  background: var(--card-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.service-card:not(.is-active) {
  background: rgba(255, 255, 255, 0.48);
  box-shadow: none;
}

.service-card:not(.is-active) .service-icon {
  background: var(--card-soft);
}

.service-card:not(.is-active) small {
  opacity: 0.58;
}

.service-card:not(.is-active) .use-if {
  opacity: 0.54;
}

.service-card:not(.is-active) em {
  opacity: 0.5;
}

.service-card:not(.is-active) em span {
  opacity: 0.45;
}

.service-quote {
  --card-color: var(--blue);
  --card-soft: var(--blue-soft);
}

.service-layout {
  --card-color: var(--lime);
  --card-soft: var(--lime-soft);
}

.service-permit {
  --card-color: var(--charcoal);
  --card-soft: #efefec;
}

.service-permit.is-active {
  color: #ffffff;
}

.service-quote.is-active {
  background: var(--blue);
}

.service-layout.is-active {
  background: var(--lime);
}

.service-permit.is-active {
  background: var(--charcoal);
}

.service-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-input);
  background: #ffffff;
  color: var(--charcoal);
  font-weight: 800;
}

.service-icon svg {
  width: 20px;
  height: 20px;
}

.service-copy {
  min-width: 0;
}

.service-card strong {
  display: block;
  max-width: 17ch;
  padding-right: 72px;
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.service-card small {
  display: block;
  color: currentColor;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0.72;
}

.service-card .use-if {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(17, 17, 17, 0.14);
  font-size: 0.78rem;
}

.service-card .use-if b {
  font-weight: 800;
}

.service-permit.is-active .use-if {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.service-card em {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: currentColor;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0.82;
}

.arrow-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  opacity: 0.45;
  transition: opacity 160ms ease, transform 160ms ease;
}

.service-card:hover .arrow-icon {
  opacity: 1;
  transform: translateX(2px);
}

.service-card.is-active .arrow-icon {
  opacity: 0.9;
}

.service-card.is-active::after {
  content: "Selected";
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  background: var(--charcoal);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.service-permit.is-active::after {
  color: var(--charcoal);
  background: var(--lime);
}

.support-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(221, 221, 216, 0.8);
  border-radius: 0;
  background: transparent;
}

.support-panel h2 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.support-panel ol {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.support-panel li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.78rem;
  line-height: 1.35;
}

.support-panel li span {
  color: rgba(17, 17, 17, 0.42);
  font-size: 0.72rem;
  font-weight: 800;
}

.support-panel p {
  margin: 0;
  color: rgba(17, 17, 17, 0.56);
  font-size: 0.74rem;
  line-height: 1.35;
}

.guide-links {
  display: grid;
  gap: 7px;
}

.guide-links a {
  color: #0878b7;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.guide-links a:hover {
  color: #065d8d;
}

.trust-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--warm);
}

.trust-bar span {
  color: rgba(17, 17, 17, 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.trust-bar span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.08em;
}

.sample-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-card);
  background: var(--warm);
}

.sample-panel h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.sample-panel ul {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sample-panel li,
.faq-panel p {
  margin: 0;
  color: rgba(17, 17, 17, 0.66);
  font-size: 13px;
  line-height: 1.4;
}

.sample-panel li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--charcoal);
}

.workspace-panel {
  display: grid;
  grid-template-rows: 78px auto 1fr;
  border: 1px solid rgba(221, 221, 216, 0.5);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.tool-banner {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 78px;
  background: var(--accent);
}

.banner-graphic {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  opacity: 0.16;
}

.banner-graphic svg {
  width: min(520px, 76%);
  height: 100%;
  stroke-width: 2;
}

.tool-badge {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: grid;
  gap: 3px;
  max-width: 250px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.tool-badge span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tool-badge strong {
  font-size: 0.86rem;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.workspace-header {
  padding: 18px 24px 4px;
}

.workspace-header h2 {
  max-width: 18ch;
  margin: 6px 0 10px;
  font-size: clamp(32px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
}

.workspace-header p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.tool-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.4fr) minmax(420px, 0.6fr);
  gap: 16px;
  padding: 12px 24px 24px;
  align-items: start;
}

.input-panel,
.result-panel {
  padding: 18px;
}

.input-panel h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.step-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.checker-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 8px;
}

.field-label {
  color: rgba(17, 17, 17, 0.8);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dadada;
  border-radius: var(--radius-input);
  outline: none;
  background: var(--warm);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input,
select {
  padding: 0 14px;
}

textarea {
  resize: vertical;
  min-height: 100px;
  padding: 12px 14px;
}

.field-hint {
  color: rgba(17, 17, 17, 0.5);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.privacy-note {
  color: rgba(17, 17, 17, 0.56);
  font-size: 12px;
  line-height: 1.35;
}

.privacy-note strong {
  color: var(--ink);
}

.checkbox-field {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--warm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.checkbox-pill input {
  width: 14px;
  min-height: 14px;
  margin: 0 7px 0 0;
  accent-color: var(--accent);
}

.upload-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 80px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--accent-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--accent);
  filter: saturate(1.05);
}

.upload-zone.has-error {
  border-color: #c74646;
  background: #fff2f0;
}

.upload-zone.has-file {
  background: #ffffff;
}

.upload-icon,
.file-pill {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius-input);
  color: var(--accent-ink);
  background: #ffffff;
  font-weight: 800;
}

body[data-theme="permit"] .upload-icon,
body[data-theme="permit"] .file-pill {
  color: #ffffff;
  background: var(--charcoal);
}

.file-pill {
  width: auto;
  min-width: 42px;
  padding: 0 9px;
  font-size: 0.72rem;
}

.upload-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.upload-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.browse-pill,
.remove-file {
  display: inline-grid;
  flex: 0 0 auto;
  min-height: 32px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.browse-pill {
  padding: 0 12px;
}

.remove-file {
  width: 32px;
}

.field-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.field-svg {
  width: 18px;
  height: 18px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--ring);
}

.primary-action,
.secondary-action,
.copy-button {
  font-weight: 800;
  line-height: 1;
}

.primary-action {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-button);
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: filter 160ms ease, transform 160ms ease;
}

body[data-theme="permit"] .primary-action {
  color: #ffffff;
}

.primary-action:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

.primary-action:active {
  transform: translateY(0);
}

.primary-action:disabled {
  cursor: wait;
  filter: saturate(0.85);
  opacity: 0.72;
  transform: none;
}

.secondary-action {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  color: var(--ink);
  background: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.secondary-action,
.copy-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.button-svg,
.copy-svg {
  width: 15px;
  height: 15px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.upload-zone:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.result-panel {
  display: grid;
  gap: 14px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.copy-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  background: #ffffff;
  font-size: 0.72rem;
}

.preview-helper {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.result-content {
  display: grid;
  gap: 16px;
  max-width: 700px;
}

.result-summary {
  display: grid;
  gap: 8px;
  min-height: 200px;
  padding: 18px;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--accent-soft);
}

.compact-summary {
  min-height: auto;
}

.result-summary p {
  margin: 0;
  color: rgba(17, 17, 17, 0.58);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.result-summary h3 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.result-summary span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.result-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.result-section h3,
.disclaimer-box h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.numbered-list,
.action-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.numbered-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}

.numbered-list span {
  color: #8a8a86;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.numbered-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.25;
}

.numbered-list p,
.action-list li,
.input-note,
.disclaimer-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.action-list li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  padding-left: 0;
}

.action-list li::before {
  content: "";
  align-self: start;
  margin-top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.input-note {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.disclaimer-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-left: 3px solid var(--charcoal);
  border-radius: var(--radius-input);
  color: var(--ink);
  background: #f2f2ef;
}

.disclaimer-box p {
  color: var(--muted);
  font-size: 12px;
}

.disclaimer-box h3 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-upgrade {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}

.result-upgrade div {
  display: grid;
  gap: 5px;
}

.result-upgrade h3,
.result-upgrade p {
  margin: 0;
}

.result-upgrade h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.result-upgrade p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.result-upgrade strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.refund-notice {
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.72rem !important;
  line-height: 1.4 !important;
}

.refund-notice a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.result-upgrade .secondary-action {
  min-height: 38px;
  border-color: rgba(17, 17, 17, 0.12);
  background: var(--accent-soft);
}

body[data-theme="permit"] .result-upgrade .secondary-action {
  color: #ffffff;
  background: var(--charcoal);
}

.risk-report {
  display: grid;
  gap: 16px;
}

.score-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--accent-soft);
}

.score-card p,
.score-card span,
.score-card small {
  margin: 0;
}

.score-card p {
  color: rgba(17, 17, 17, 0.58);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.score-card div {
  display: flex;
  gap: 12px;
  align-items: end;
}

.score-card strong {
  font-size: clamp(42px, 4vw, 58px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.9;
}

.score-card strong span {
  margin-left: 2px;
  color: rgba(17, 17, 17, 0.45);
  font-size: 0.36em;
}

.score-card small {
  padding-bottom: 5px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-transform: capitalize;
}

.score-card > span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.report-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.report-metric {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-input);
  background: var(--warm);
}

.report-metric span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.report-metric strong {
  font-size: 1.15rem;
  line-height: 1;
}

.quote-health {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-card);
  background: var(--warm);
}

.quote-health h3,
.locked-report h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.quote-health dl,
.direction-grid dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.quote-health dl div,
.direction-grid dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quote-health dt,
.direction-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.quote-health dd,
.direction-grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}

.finding-list,
.clearance-list {
  display: grid;
  gap: 10px;
}

.finding-card,
.clearance-item,
.direction-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(221, 221, 216, 0.8);
  border-radius: var(--radius-input);
  background: #ffffff;
}

.finding-head {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.severity-badge,
.confidence-badge,
.clearance-item em {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: #eeeeea;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.severity-high {
  color: #8f1d1d;
  background: #fff0ee;
}

.severity-medium,
.severity-moderate {
  color: #735400;
  background: #fff5d7;
}

.severity-low {
  color: #4b4b46;
  background: #eeeeea;
}

.finding-card h4,
.direction-grid h4,
.clearance-item strong {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.25;
}

.finding-card p,
.direction-grid p,
.clearance-item span {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.locked-report {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-card);
  background: #111315;
  color: #ffffff;
}

.locked-report .eyebrow {
  color: rgba(255, 255, 255, 0.58);
}

.report-access {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--accent-soft);
}

.report-access h3,
.report-access p {
  margin: 0;
}

.report-access h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.report-access > div:first-child {
  display: grid;
  gap: 5px;
}

.report-access > div:first-child p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.report-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.report-access-actions .secondary-action {
  min-height: 38px;
}

.text-action {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-action svg {
  width: 14px;
  height: 14px;
}

.report-access-warning {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.report-link-error {
  margin-top: 16px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.evidence-grid span {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.2;
}

.direction-grid {
  display: grid;
  gap: 10px;
}

.check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  padding: 10px 12px;
  border-radius: var(--radius-input);
  background: var(--warm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.check-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.loading-state {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--warm);
}

.loading-state.error-state {
  grid-template-columns: minmax(0, 1fr);
}

.error-state > div {
  min-width: 0;
}

.loading-state span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent),
    var(--accent);
  background-size: 200% 100%, 100% 100%;
  animation: shimmer 900ms linear infinite;
}

.loading-state h3,
.loading-state p {
  margin: 0;
}

.loading-state h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.loading-state p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.loading-state ul {
  display: grid;
  gap: 5px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.loading-state li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.loading-state li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10;
  transform: translateX(-50%);
  padding: 11px 14px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  background: var(--charcoal);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.legal-shell {
  width: min(980px, calc(100% - 32px));
}

.legal-content {
  display: grid;
  gap: 22px;
  margin-top: 16px;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.legal-heading {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-heading h1 {
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.legal-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.legal-lede {
  margin: 0;
  color: rgba(17, 17, 17, 0.78);
  font-size: 1.05rem;
  line-height: 1.65;
}

.legal-section {
  display: grid;
  gap: 9px;
}

.legal-section h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.legal-section p,
.legal-section ul {
  margin: 0;
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.9rem;
  line-height: 1.65;
}

.legal-section ul {
  display: grid;
  gap: 6px;
  padding-left: 1.2rem;
}

.legal-section ol {
  display: grid;
  gap: 8px;
  padding-left: 1.2rem;
  margin: 0;
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.9rem;
  line-height: 1.65;
}

.guide-callout {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(25, 167, 230, 0.25);
  border-radius: var(--radius-card);
  background: var(--blue-soft);
}

.guide-callout p {
  color: var(--accent-ink);
}

.guide-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 11px 15px;
  border-radius: var(--radius-button);
  color: #ffffff !important;
  background: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none !important;
}

.guide-cta:hover {
  color: #ffffff !important;
  background: #2b3033;
}

.calculator-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--warm);
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calculator-card label {
  display: grid;
  gap: 6px;
  color: rgba(17, 17, 17, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
}

.calculator-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #ffffff;
}

.calculator-card button,
.print-button {
  width: fit-content;
  padding: 11px 15px;
  border: 0;
  border-radius: var(--radius-button);
  color: #ffffff;
  background: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 800;
}

.calculator-result {
  min-height: 48px;
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-input);
  color: var(--accent-ink);
  background: #ffffff;
  font-weight: 700;
  line-height: 1.45;
}

.checklist {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}

.checklist input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.legal-section a,
.site-footer a {
  color: #0878b7;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-section a:hover,
.site-footer a:hover {
  color: #065d8d;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 20px 4px 8px;
  border-top: 1px solid var(--border);
}

.site-footer-brand {
  display: grid;
  gap: 4px;
}

.site-footer-brand strong {
  color: var(--charcoal);
  font-size: 0.8rem;
}

.site-footer-brand span {
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 0.72rem;
}

@keyframes shimmer {
  to {
    background-position: -200% 0, 0 0;
  }
}

@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: minmax(280px, 32%) minmax(0, 1fr);
  }

  .tool-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 20px, 680px);
    margin: 10px auto;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .tool-selector {
    gap: 14px;
  }

  .mini-hero {
    padding: 18px;
  }

  .hero-title {
    max-width: 10ch;
    font-size: clamp(34px, 9vw, 40px);
  }

  .service-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .service-card {
    flex: 0 0 270px;
    min-height: 210px;
    scroll-snap-align: start;
  }

  .workspace-panel {
    grid-template-rows: 78px auto 1fr;
  }

  .workspace-header,
  .tool-workspace {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 14px, 520px);
    margin: 7px auto;
  }

  .tool-selector,
  .workspace-panel,
  .input-panel,
  .result-panel {
    border-radius: var(--radius-card);
  }

  .form-fields {
    grid-template-columns: 1fr;
  }

  .service-icon {
    width: 36px;
    height: 36px;
  }

  .service-icon svg {
    width: 18px;
    height: 18px;
  }

  .result-header {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: fit-content;
  }

  .result-summary {
    min-height: 170px;
  }

  .report-strip,
  .check-list,
  .evidence-grid,
  .trust-bar {
    grid-template-columns: 1fr;
  }

  .result-upgrade {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .browse-pill,
  .remove-file {
    width: fit-content;
  }

  .calculator-fields {
    grid-template-columns: 1fr;
  }
}

@media print {
  .no-print,
  .site-header,
  .site-footer {
    display: none !important;
  }

  .page-shell {
    width: 100%;
    margin: 0;
  }

  .legal-content {
    padding: 0;
    border: 0;
  }

  .legal-heading h1 {
    font-size: 30px;
  }
}
