:root {
  --ink: #173e36;
  --muted: #556860;
  --paper: #f7f7ef;
  --white: #fffef9;
  --line: #d5ddd1;
  --accent: #dbe8a4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button, .button {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--ink);
  color: var(--white);
  padding: .85rem 1.35rem;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
button:hover, .button:hover { background: #28594a; }
button.secondary { background: transparent; color: var(--ink); }
button.secondary:hover { background: #e8edde; }
.small { padding: .45rem .8rem; font-size: .9rem; }
.link { border: 0; padding: 0; color: inherit; background: none; }
.link:hover { background: none; text-decoration: underline; }
:focus-visible { outline: 3px solid #a85b23; outline-offset: 4px; }
.shell { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }
.topbar {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 750; font-size: 1.25rem; text-decoration: none; }
.radar-mark { font-size: 1.8rem; vertical-align: middle; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.3rem; }
nav a { font-size: .9rem; }
.inline { display: inline; margin: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { line-height: 1.12; font-weight: 500; letter-spacing: -.035em; }
h1 { font-family: Georgia, serif; font-size: clamp(2.3rem, 5vw, 4.5rem); }
h2 { font-family: Georgia, serif; font-size: clamp(1.8rem, 3vw, 2.7rem); }
h3 { line-height: 1.3; font-size: 1.2rem; }
h1 em { font-weight: 400; color: #4f6e46; }
.hero {
  padding: 6rem 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 5rem;
}
.eyebrow { font-size: .72rem; letter-spacing: .14em; font-weight: 750; }
.lead { font-size: 1.15rem; max-width: 49ch; margin-bottom: 1.8rem; }
.hero .muted { margin-top: 1rem; }
.muted { color: var(--muted); font-size: .85rem; }
.email-preview {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 12px 14px 0 #e6ebda;
  padding: 2rem;
  transform: rotate(1deg);
}
.email-preview h2 { font-size: 1.7rem; }
.preview-meta { display: flex; justify-content: space-between; font-size: .7rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.badge {
  display: inline-block;
  background: var(--accent);
  border-radius: 3px;
  padding: .22rem .6rem;
  font-size: .75rem;
  font-weight: 700;
}
.email-preview h3 { margin-top: 1rem; }
.section { padding: 4rem 0; border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.step-number { font-family: Georgia, serif; font-size: 2.8rem; color: #728966; }
.steps p { max-width: 33ch; }
.comparison, .pricing {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 1rem; }
thead { background: #e8edde; }
.price-card { border: 1px solid var(--ink); padding: 2.5rem; background: #edf1e3; }
.price { font-family: Georgia, serif; font-size: 3.7rem; margin-bottom: 1rem; }
.price span { font-family: sans-serif; font-size: 1rem; }
.price-card ul { padding-left: 1.2rem; margin: 1.5rem 0 2rem; }
.price-card .muted { margin: 1rem 0 0; }
.faq { max-width: 800px; }
details { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
summary { font-weight: 650; cursor: pointer; }
details p { margin-top: 1rem; }
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer nav { margin-bottom: 1rem; }
.narrow { max-width: 730px; margin-inline: auto; }
.narrow h1 { font-size: clamp(2.3rem, 4vw, 3.5rem); }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.stack label, legend { font-weight: 650; }
input, textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid #899c90;
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
}
textarea { resize: vertical; }
.checkbox { display: flex; align-items: baseline; gap: .7rem; font-size: .9rem; }
.checkbox input { width: auto; accent-color: var(--ink); }
fieldset { border: 1px solid var(--line); padding: 1.5rem; margin: 1rem 0; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.notice { background: #e5edcd; border-left: 4px solid #607a3a; padding: 1rem; }
.notice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.notice-grid, .empty-state { margin-top: 2rem; }
.notice-card { border: 1px solid var(--line); padding: 1.8rem; background: white; }
.notice-card h2 { font-family: inherit; font-size: 1.3rem; letter-spacing: 0; }
.notice-card h2 a { text-decoration: none; }
.notice-card h2 a:hover { text-decoration: underline; }
.card-heading { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.facts { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .85rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.feedback { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.feedback span { font-size: .85rem; }
.empty-state { border: 1px dashed #899c90; padding: 3rem; text-align: center; }
.legal h2 { font-family: inherit; font-size: 1.35rem; letter-spacing: 0; }
.legal p { margin-bottom: 2rem; }
.skip { position: absolute; left: -10000px; }
.skip:focus { left: 1rem; top: 1rem; background: white; padding: 1rem; z-index: 1; }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 0; gap: 2rem; }
  .email-preview { transform: none; }
  .comparison, .pricing { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps { gap: 1.5rem; }
  .notice-grid { grid-template-columns: 1fr; }
  .topbar { padding: 1rem 0; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 2rem); }
  .steps, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
  nav { gap: .85rem; }
  .email-preview, .price-card, .notice-card { padding: 1.3rem; }
  .empty-state { padding: 1.5rem; }
}
.preview-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: .6rem;
  border: 2px solid var(--muted);
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: middle;
  animation: preview-spin 1s linear infinite;
}
@keyframes preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .preview-spinner { animation: none; }
}
/* App only: the public landing keeps its own layout and visual rules. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+1E00-1EFF,U+2020,U+20A0-20AB;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.app-ui {
  --paper: #eef1ec;
  --band: #dce6d8;
  --ink: #2430a8;
  --text: #1c2320;
  --muted: #4e5e53;
  --line: #b7c2b6;
  --white: #f8faf6;
  --accent: #dce6d8;
  --deadline: #c8262b;
  font-family: "Bricolage Grotesque", sans-serif;
  font-optical-sizing: auto;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
}
.app-ui .shell { width: min(1120px, calc(100% - 64px)); }
.app-ui h1, .app-ui h2, .app-ui h3, .app-ui .price {
  font-family: inherit;
  font-weight: 650;
  letter-spacing: -.035em;
}
.app-ui h1 { font-size: clamp(36px, 4vw, 56px); }
.app-ui a { color: var(--ink); }
.app-ui :focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.app-ui input, .app-ui textarea {
  color: var(--text);
  border: 1px solid #71806f;
  border-radius: 2px;
  background: var(--white);
  padding: 12px 14px;
  min-width: 0;
}
.app-ui input::placeholder, .app-ui textarea::placeholder {
  color: #5b675d;
  opacity: 1;
}
.app-ui input[type="checkbox"] { accent-color: var(--ink); }
.app-ui button, .app-ui .button {
  border-radius: 2px;
  min-height: 44px;
  padding: 11px 20px;
  font-weight: 650;
  line-height: 1.4;
}
.app-ui button:hover, .app-ui .button:hover { background: #192382; }
.app-ui button.secondary { color: var(--ink); border-color: var(--ink); }
.app-ui button.secondary:hover { background: var(--band); }
.app-ui .button { color: var(--white); }
.app-ui .muted { font-size: 14px; }
.app-ui .app-header { background: var(--band); border-bottom: 1px solid var(--line); }
.app-ui .topbar { border: 0; min-height: 88px; }
.app-ui .brand { font-size: 24px; font-weight: 750; letter-spacing: -.06em; }
.app-ui .radar-mark { font-size: 32px; margin-right: 5px; }
.app-ui .topbar nav { gap: 28px; }
.app-ui .topbar nav a, .app-ui .topbar .link { font-size: 16px; }
.app-ui .topbar nav a { text-decoration: none; padding-block: 10px; }
.app-ui .topbar nav a[aria-current="page"] {
  border-bottom: 2px solid var(--ink);
  font-weight: 700;
}
.app-ui .topbar nav a:hover { text-decoration: underline; }
.app-ui .topbar .link { min-height: 44px; padding: 10px 0; color: var(--muted); }
.app-ui .topbar .link:hover { background: transparent; }
.app-ui .footer { margin-top: 64px; padding: 32px 0; color: var(--muted); }
.app-ui .footer p { font-size: 16px; margin-bottom: 16px; }
.app-ui .footer small { display: block; max-width: 75ch; font-size: 13px; }
.app-ui .notice { background: var(--band); border-left: 3px solid var(--ink); }
.app-ui .section { border-top: 0; }
/* A continuous dossier, with rules instead of separate cards. */
.profile-sheet { max-width: 720px; margin: 52px auto 0; border-top: 3px solid var(--ink); }
.profile-heading { padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.app-ui .profile-heading h1 { font-size: clamp(34px, 4vw, 46px); margin-bottom: 14px; }
.profile-heading p { margin: 0; max-width: 58ch; color: var(--muted); }
.profile-section { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 28px 0; min-width: 0; }
fieldset.profile-section { padding-top: 20px; }
.profile-section legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; }
.profile-section legend + * { clear: both; }
.profile-section legend, .section-label { font-size: 23px; font-weight: 650; letter-spacing: -.025em; }
.section-label { display: block; margin-bottom: 8px; }
.field-hint { color: var(--muted); font-size: 15px; line-height: 1.5; margin-bottom: 16px; }
.profile-form textarea { display: block; min-height: 160px; }
.propose-row { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.profile-form .propose-row button { font-size: 16px; }
.combobox { position: relative; }
.combobox input { padding-right: 36px; }
.combobox::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}
.combobox::before {
  content: "";
  position: absolute;
  right: 13px;
  top: 28px;
  width: 7px;
  border-top: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  padding: 4px;
  margin: 4px 0 0;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.suggestions li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 12px; cursor: pointer; font-size: 16px; }
.suggestions li[aria-selected="true"] { background: var(--band); color: var(--ink); outline: 1px solid var(--ink); outline-offset: -1px; }
.suggestions small { flex-shrink: 0; font-size: 12px; color: var(--muted); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.filter-chips:empty { margin: 0; }
.filter-chip { display: flex; align-items: center; max-width: 100%; border: 1px solid var(--line); background: var(--band); font-size: 16px; }
.filter-chip label { display: flex; align-items: center; gap: 9px; padding: 8px 12px; overflow-wrap: anywhere; }
.filter-chip input { width: auto; }
.filter-chip small { color: var(--muted); font-size: 12px; }
.filter-chip .chip-name { padding: 8px 0 8px 12px; overflow-wrap: anywhere; }
.filter-chip > small { padding-left: 8px; }
.app-ui .filter-chip button { background: transparent; color: var(--ink); border: 0; padding: 8px 12px; min-width: 44px; min-height: 44px; font-size: 16px; flex-shrink: 0; }
.app-ui .filter-chip button:hover { background: #c8d7c2; }
.selection-empty { display: inline-block; color: var(--muted); font-size: 15px; margin: 12px 0 0; padding: 6px 0; }
.search-fallback { margin-top: 16px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #71806f; border-radius: 2px; overflow: clip; }
.segment { position: relative; cursor: pointer; border-right: 1px solid #71806f; }
.segment:last-child { border-right: 0; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment span { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 48px; font-size: 16px; }
.segment input:checked + span, .segment input:indeterminate + span { color: var(--paper); background: var(--ink); }
.segment input:checked + span::before { content: "✓" / ""; font-size: 14px; }
.segment input:indeterminate + span::before { content: "−" / ""; }
.segment input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: -5px; }
.segment input:checked:focus-visible + span { outline-color: var(--paper); }
.segment:hover span { text-decoration: underline; }
.other-contracts { margin-top: 16px; }
.amount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.amount-row label { font-size: 16px; font-weight: 550; }
.amount-input { position: relative; }
.app-ui .amount-input input { padding-right: 38px; }
.amount-input span { position: absolute; right: 15px; top: 12px; color: var(--muted); }
.switch-label { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 21px; font-weight: 600; cursor: pointer; }
.app-ui .switch-label input {
  appearance: none;
  width: 48px;
  height: 28px;
  min-width: 48px;
  margin: 0;
  padding: 3px;
  border-radius: 20px;
  border: 1px solid #71806f;
  background: #c1cbbf;
  cursor: pointer;
}
.switch-label input::before { content: ""; display: block; width: 20px; height: 20px; background: var(--paper); border: 1px solid #71806f; border-radius: 50%; }
.app-ui .switch-label input:checked { background: var(--ink); border-color: var(--ink); }
.switch-label input:checked::before { transform: translateX(19px); border-color: var(--paper); }
.grants-section .field-hint { margin: 8px 70px 0 0; }
.keyword-section label { font-size: 17px; font-weight: 550; }
html { scroll-padding-bottom: 120px; }
.profile-save { position: sticky; z-index: 3; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; background: var(--paper); border-top: 2px solid var(--ink); }
.profile-save span { color: var(--muted); font-size: 14px; max-width: 26ch; }
.profile-save button { white-space: nowrap; }
/* Dashboard uses the same ink, ruled paper and type scale. */
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
.dashboard-heading h1 { margin-bottom: 16px; }
.dashboard-heading .lead { margin: 0; }
.profile-link { white-space: nowrap; padding-bottom: 4px; }
.app-ui .empty-state { text-align: left; border: 0; border-block: 1px solid var(--line); background: var(--band); padding: 44px; }
.app-ui .empty-state h2 { font-size: 32px; }
.app-ui .empty-state p { max-width: 60ch; }
.opportunities { margin-top: 48px; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.app-ui .results-heading h2 { font-size: 28px; margin: 0; }
.results-heading > span { color: var(--muted); font-size: 15px; }
.app-ui .notice-grid { display: block; margin: 0; }
.app-ui .notice-card { border: 0; border-bottom: 1px solid var(--line); padding: 28px 24px; background: transparent; }
.app-ui .notice-card:nth-child(odd) { background: var(--band); }
.app-ui .notice-card h2 { max-width: 48ch; font-size: 25px; letter-spacing: -.025em; }
.app-ui .notice-card > p { max-width: 72ch; }
.app-ui .card-heading { align-items: center; }
.app-ui .badge { background: transparent; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); font-size: 14px; }
.app-ui .facts { gap: 40px; font-size: 16px; }
.app-ui .facts > div:last-child dd { color: var(--deadline); }
.app-ui .feedback { margin-top: 20px; }
.app-ui .feedback button { font-size: 14px; }
@media (max-width: 700px) {
  .app-ui .shell { width: calc(100% - 40px); }
  .app-ui .topbar { padding: 14px 0 0; gap: 6px; }
  .app-ui .topbar nav { width: 100%; justify-content: space-between; gap: 10px; }
  .app-ui .topbar nav a, .app-ui .topbar .link { font-size: 15px; }
  .app-ui .brand { font-size: 22px; }
  .profile-sheet { margin-top: 30px; }
  .profile-heading { padding: 22px 0 26px; }
  .profile-heading p { font-size: 16px; }
  .profile-section { padding-block: 24px; }
  .profile-section legend, .section-label { font-size: 22px; }
  .propose-row { flex-wrap: wrap; gap: 10px; }
  .propose-row small { width: 100%; }
  .combobox input { font-size: 16px; }
  .segment span { font-size: 14px; gap: 3px; }
  .amount-row { gap: 14px; }
  .switch-label { font-size: 19px; }
  .profile-save { gap: 14px; padding: 16px 0; }
  .profile-save span { font-size: 12px; max-width: 17ch; }
  .profile-save button { padding-inline: 16px; font-size: 16px; }
  .app-ui .footer { margin-top: 40px; }
  .app-ui .section { padding-block: 32px; }
  .dashboard-heading { align-items: start; flex-direction: column; gap: 18px; }
  .app-ui .empty-state { padding: 24px; }
  .app-ui .empty-state h2 { font-size: 26px; }
  .results-heading { align-items: start; flex-direction: column; gap: 8px; }
  .app-ui .notice-card { padding: 24px 16px; }
  .app-ui .notice-card h2 { font-size: 22px; }
  .app-ui .facts { gap: 16px; }
}
@media (forced-colors: active) {
  .segment input { position: static; opacity: 1; width: auto; height: auto; }
  .segment { display: flex; align-items: center; justify-content: center; }
  .app-ui .switch-label input { appearance: auto; }
}

/* Pliego brief, similar awards and sector insights */
.brief { margin: 16px 0; padding: 16px 18px; background: var(--band);
         border-left: 3px solid var(--ink); }
.brief p { margin: 6px 0; }
.brief-heading { font-weight: 600; display: flex; gap: 10px;
                 align-items: center; flex-wrap: wrap; }
.apto { font-size: 14px; padding: 2px 10px; border: 1.5px solid currentColor; }
.apto-si { color: var(--ink); }
.apto-depende { color: #6B5A10; }
.apto-dificil { color: var(--deadline); }
.alerts { margin: 8px 0; padding-left: 20px; color: var(--deadline); }
.brief details { margin-top: 8px; }
.brief summary { cursor: pointer; color: var(--ink); }
.brief h3 { font-size: 16px; margin: 12px 0 4px; }
.similar { margin: 12px 0; font-size: 15px; }
.similar-heading { font-weight: 600; margin: 0 0 4px; }
.similar ul { margin: 0; padding-left: 20px; }
.insights { margin-top: 48px; padding-top: 24px;
            border-top: 2px solid var(--ink); }
.insights-grid { display: grid; gap: 32px;
                 grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.insights ol { padding-left: 20px; }
.insights li { margin: 0 0 10px; }

/* Public SEO pages */
.seo { max-width: 860px; }
.seo-grid { list-style: none; padding: 0; display: grid; gap: 10px 24px;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.seo-list { list-style: none; padding: 0; }
.seo-item { padding: 16px 0; border-bottom: 1px solid var(--band); }
.seo-item h3 { font-size: 18px; margin: 0 0 4px; }
.seo-item p { margin: 2px 0; }
.seo-cta { margin: 32px 0; padding: 20px 24px; background: var(--band);
           border-left: 3px solid var(--ink); }
.topbar nav a { margin-left: 12px; }

/* Loading state while the profile form is submitted */
.form-status { margin: 12px 0 0; padding: 10px 14px; background: var(--band);
               border-left: 3px solid var(--ink); display: flex; gap: 10px;
               align-items: center; }
.form-status[hidden] { display: none; }
.form-status::before { content: ""; width: 16px; height: 16px; flex: none;
                       border: 2px solid var(--ink);
                       border-right-color: transparent; border-radius: 50%;
                       animation: spin .8s linear infinite; }
button.is-loading { opacity: .7; cursor: progress; }
button:disabled { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .form-status::before { animation: none; border-right-color: var(--ink); }
}
