@font-face {
  font-family: Archivo;
  src: url("/assets/fonts/archivo-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url("/assets/fonts/archivo-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("/assets/fonts/fraunces-regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #142d48;
  --muted: #4d5b66;
  --paper: #f6f1e8;
  --card: #fffcf7;
  --line: #d9cebf;
  --ochre: #b47b3e;
  --ochre-dark: #83501f;
  --page-gutter: clamp(16px, 4vw, 56px);
  font: 16px/1.6 Archivo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; overflow-wrap: anywhere; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0 0 .55em; font-family: Fraunces, Georgia, serif; font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -.035em; }
h2 { font-size: clamp(23px, 2.8vw, 32px); }
h3 { font-size: 22px; }
small { display: block; font-size: .875rem; }
:where(a, button, input, select, summary, .table-wrap):focus-visible { outline: 3px solid var(--ochre-dark); outline-offset: 3px; }

.cp-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.cp-header-inner {
  max-width: 1440px;
  min-height: 82px;
  margin-inline: auto;
  padding: 12px var(--page-gutter);
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 30px);
}
.cp-brand { display: flex; flex-shrink: 0; align-items: center; min-height: 44px; }
.cp-brand img { display: block; width: clamp(144px, 16vw, 220px); height: auto; }
.cp-header-title {
  border-left: 1px solid var(--line);
  padding-left: clamp(12px, 2vw, 24px);
  color: var(--muted);
}
.cp-header-link {
  color: var(--ink);
  margin-left: auto;
  padding: 8px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}
.cp-header-link:hover { background: var(--paper); }

.cp-layout {
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 52px) var(--page-gutter) clamp(36px, 6vw, 76px);
}
main { min-width: 0; }
.cp-layout-private { display: grid; align-items: start; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(22px, 4vw, 58px); }
.cp-layout-private h1 { font-size: clamp(33px, 4.2vw, 56px); }
.cp-nav-shell {
  position: sticky;
  top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
}
.cp-nav-shell summary { display: none; }
.cp-nav {
  display: grid;
  padding: 6px;
}
.cp-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.cp-nav a:hover { background: var(--paper); }
.cp-nav a[aria-current="page"] { background: var(--ink); color: var(--card); border-color: var(--ochre); font-weight: 600; }

.cp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  background: var(--ink);
  color: var(--paper);
  min-height: 360px;
}
.cp-hero-copy { align-self: center; padding: clamp(26px, 5vw, 75px); }
.cp-hero h1 { max-width: 17ch; margin-bottom: .35em; text-wrap: balance; }
.cp-hero p { max-width: 45ch; font-size: clamp(16px, 1.5vw, 19px); color: #f1e6d8; }
.cp-hero img { display: block; width: 100%; height: 100%; max-height: 570px; object-fit: cover; object-position: 63% center; }
.cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 26px; }
.cp-button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 10px 18px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--card);
  font: 600 1rem/1.4 Archivo, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.cp-button:hover, button:hover { background: #254762; }
.cp-hero .cp-button { background: #edcfaa; border-color: #edcfaa; color: #162a41; }
.cp-hero .cp-button:hover { background: #fff1df; }
.cp-hero :focus-visible { outline-color: #edcfaa; }
.cp-secondary { padding-block: 9px; font-weight: 600; }

.cp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.cp-steps .card { margin: 0; border-top: 3px solid var(--ochre); }
.cp-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  border-block: 1px solid var(--line);
  padding-block: 18px;
}
.cp-next p { margin: 0; flex: 1 1 35rem; }
.cp-next a, .cp-login-help a { color: var(--ochre-dark); font-weight: 600; }
.cp-intro { color: var(--muted); font-size: 1.125rem; max-width: 65ch; }
.cp-languages { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cp-languages a { color: var(--muted); display: inline-flex; min-height: 44px; align-items: center; }
.cp-languages a[aria-current] { color: var(--ink); font-weight: 600; }
.cp-view-guide .cp-layout:not(.cp-layout-private) { max-width: 1160px; }

.cp-guide-index {
  margin: 26px 0;
  padding: clamp(18px, 3.5vw, 32px);
  background: var(--ink);
  color: var(--paper);
  border-top: 4px solid var(--ochre);
}
.cp-guide-index ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 6px 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.cp-guide-index a { display: inline-flex; min-height: 44px; align-items: center; }
.cp-guide-index :focus-visible { outline-color: #edcfaa; }
.cp-guide-chapters { display: grid; gap: 18px; }
.cp-guide-chapter {
  scroll-margin-top: 24px;
  padding: clamp(18px, 4vw, 42px);
  margin: 0;
  border-top: 3px solid var(--ochre);
}
.cp-guide-chapter:target { outline: 2px solid var(--ochre-dark); outline-offset: 2px; }
.cp-guide-steps { max-width: 76ch; padding-left: 1.6em; margin: 0; }
.cp-guide-steps li { padding-left: .28em; }
.cp-guide-steps li + li { margin-top: .65em; }
.cp-guide-steps li::marker { color: var(--ochre-dark); font-weight: 600; }
.cp-guide-figure { margin: clamp(18px, 4vw, 30px) 0 0; }
.cp-guide-image { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--paper); }
.cp-guide-figure figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--muted);
  font-size: .9375rem;
  padding-top: 10px;
}
.cp-guide-figure figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ochre-dark);
  font-weight: 600;
}


.cp-view-login .cp-layout, .cp-view-activation .cp-layout { max-width: 900px; }
.cp-login-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; }
.cp-login-layout .card { margin: 0; border-top: 3px solid var(--ochre); }
.cp-login-help {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 24px;
  min-height: 210px;
  background: linear-gradient(transparent, #142d48 85%), url("/assets/market-strategy-hero.webp") 75% center / cover, var(--ink);
}
.cp-login-help a { color: var(--paper); width: fit-content; }
.cp-login-help a:focus-visible { outline-color: #edcfaa; }
.cp-view-activation .login { max-width: 560px; }

.company { color: var(--ochre-dark); font-weight: 600; margin-top: -.5em; }
.card {
  padding: clamp(17px, 3vw, 30px);
  margin: 18px 0;
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
  overflow-wrap: anywhere;
}
form { display: grid; gap: 14px; max-width: 42rem; margin: 18px 0; }
form:last-child { margin-bottom: 0; }
form:first-child { margin-top: 0; }
label { display: grid; gap: 6px; font-weight: 600; }
label:has(input[type="checkbox"]) { display: flex; align-items: start; gap: 10px; font-weight: 400; }
input, select {
  font: inherit;
  border: 1px solid #a99e90;
  color: var(--ink);
  background: #fff;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
}
input[type="checkbox"] { width: 20px; min-height: 20px; flex: 0 0 20px; accent-color: var(--ink); }
fieldset { border: 1px solid var(--line); display: grid; gap: 12px; min-width: 0; }
summary { font-weight: 600; cursor: pointer; }
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  max-width: none;
  padding: 14px;
  background: #efe6d9;
  border: 1px solid var(--line);
}
.filters label { min-width: 0; max-width: 100%; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stats .card { display: grid; gap: 5px; align-content: start; margin: 0; border-top: 3px solid var(--ochre); }
.stats strong { font-family: Fraunces, Georgia, serif; font-size: clamp(24px, 4vw, 42px); font-weight: 400; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats .card > span, .stats small { color: var(--muted); }
.cp-quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.cp-quick-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}
.cp-quick-links a:hover { border-color: var(--ochre-dark); }
.cp-quick-links span { color: var(--ochre-dark); }
.cp-invoice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px clamp(12px, 3vw, 32px);
  align-items: center;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.cp-invoice a { color: var(--ochre-dark); font-weight: 600; }
.cp-invoice small { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; padding: 14px 0; font-weight: 600; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead, tfoot { background: #efe6d9; }
td:nth-child(3) { white-space: pre-line; }
.cp-table-detail td:nth-child(3) { min-width: 180px; }
.chart { display: flex; align-items: end; height: 174px; gap: clamp(3px, 1vw, 13px); border-bottom: 1px solid var(--line); margin: 18px 0; }
.column { flex: 1; min-width: 0; text-align: center; font-size: .875rem; }
.column a { display: block; text-decoration: none; }
.bar { display: block; background: #91602c; min-width: 4px; }
.column a:hover .bar { background: var(--ink); }
.board { display: grid; grid-template-columns: repeat(5, minmax(165px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board > section { min-width: 0; background: #efe6d9; border-top: 2px solid var(--ochre); padding: 10px; }
.board h2 { font-size: 20px; }
.board .card { padding: 12px; }
.success, [role="alert"] { padding: 12px 14px; border-left: 3px solid; }
.success { background: #e3eee6; color: #234d36; }
[role="alert"] { background: #f6e6cf; color: #663912; }

.cp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px var(--page-gutter);
  background: var(--ink);
  color: var(--paper);
}
.cp-footer a { font-weight: 600; }
.cp-footer :focus-visible { outline-color: #edcfaa; }

@media (max-width: 920px) {
  .cp-layout-private { display: block; }
  .cp-nav-shell { position: static; margin-bottom: 22px; }
  .cp-nav-shell summary { display: list-item; padding: 12px; }
  .cp-nav { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--line); }
  .cp-nav a { min-height: 44px; }
  .cp-hero-copy { padding: 28px; }
}

@media (max-width: 640px) {
  .cp-header-inner { min-height: 66px; flex-wrap: wrap; }
  .cp-header-title { border: 0; padding: 0; }
  .cp-header-link { padding-inline: 10px; }
  .cp-header-inner:has(.cp-header-link) .cp-header-title { order: 1; width: 100%; }
  .cp-layout { padding-top: 18px; }
  .cp-hero, .cp-steps, .cp-login-layout { grid-template-columns: minmax(0, 1fr); }
  .cp-hero img { max-height: 210px; aspect-ratio: 16 / 8; }
  .cp-hero-copy { padding: 26px 20px; }
  .cp-hero h1 { font-size: clamp(33px, 9vw, 46px); }
  .cp-login-help { min-height: 164px; }
  .filters label { flex: 1 1 120px; }
  .filters label:first-of-type { flex-basis: 100%; }
  .filters input, .filters select { width: 100%; }
  .board { grid-template-columns: repeat(5, minmax(75%, 1fr)); }
  th, td { padding: 8px; }
}

@media print {
  .cp-header, .cp-nav-shell, .cp-footer, .filters, button { display: none !important; }
  body { display: block; background: white; color: black; }
  .cp-layout, .cp-layout-private { display: block; padding: 0; max-width: none; }
  .card { background: none; border: 0; padding: 0; }
  .table-wrap { overflow: visible; }
  table { font-size: 12px; }
  .cp-table-detail td:nth-child(3) { min-width: 0; }
  .stats strong { font-size: 20px; }
}
