/* =============================================================
   DIP — Horizon → Iteration 2 · polish layer
   polish.css — loaded after app.css / landing.css / product.css.
   Everything the "premium portal" pass changes lives here so the three
   forked Horizon files still diff cleanly against the originals.
   Rules: no gradients anywhere on a light band (the Home hero is locked
   and untouched); one decorative motif — the DIP "rings", nested facing
   arcs drawn from the two D-arcs in the logo mark — used sparingly.
   ============================================================= */

/* =============================================================
   1. MOTIF — facing arcs, teal-ink hairlines, baked into a data URI.
      Each ring is two 40% arcs with 10% gaps at top and bottom, so the
      pattern reads as the logo's "( )" rather than a target.
   ============================================================= */
.horizon {
  --motif-rings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800' fill='none' stroke='%2303576c' stroke-width='1.1' stroke-linecap='round'%3E%3Cg transform='rotate(-90 400 400)'%3E%3Ccircle cx='400' cy='400' r='70' pathLength='100' stroke-dasharray='40 10'/%3E%3Ccircle cx='400' cy='400' r='130' pathLength='100' stroke-dasharray='40 10'/%3E%3Ccircle cx='400' cy='400' r='190' pathLength='100' stroke-dasharray='40 10'/%3E%3Ccircle cx='400' cy='400' r='250' pathLength='100' stroke-dasharray='40 10'/%3E%3Ccircle cx='400' cy='400' r='310' pathLength='100' stroke-dasharray='40 10'/%3E%3Ccircle cx='400' cy='400' r='370' pathLength='100' stroke-dasharray='40 10'/%3E%3C/g%3E%3C/svg%3E");
  --motif-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%2303576c'/%3E%3C/svg%3E");
}
.motif { position: relative; overflow: hidden; }
.motif::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: var(--motif-size, 640px);
  aspect-ratio: 1;
  right: var(--motif-right, -180px);
  top: var(--motif-top, 50%);
  transform: translateY(-50%);
  background: var(--motif-rings) center / contain no-repeat;
  opacity: var(--motif-opacity, 0.16);
}
.motif > .band__inner { position: relative; z-index: 1; }
.motif--left::before { right: auto; left: var(--motif-left, -220px); }
.motif--bottom::before { top: auto; bottom: var(--motif-bottom, -260px); transform: none; }

/* =============================================================
   2. BAND RHYTHM — portal bands breathe a little more; sections are
      separated by tint changes, so no extra rules are needed.
   ============================================================= */
.band--tight { padding-block: clamp(2.2rem, 1.5rem + 2.4vw, 3.4rem); }
.sec-head { margin-bottom: 1.3rem; }
.sec-head h2 { font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); letter-spacing: -0.015em; }
.sec-head p { margin-top: 0.35rem; }

/* =============================================================
   3. PAGE HEAD — Horizon's aurora bloom plus the rings, bigger title, a real
      lede, the meta facts as hairline chips, a hairline at the base.
   ============================================================= */
.page-head { padding-top: calc(88px + clamp(1.6rem, 1rem + 2vw, 2.8rem)); padding-bottom: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); }
.page-head .aurora { z-index: 0; }
.page-head.motif { --motif-size: 720px; --motif-right: -200px; --motif-top: 46%; --motif-opacity: 0.13; }
.page-head::after { opacity: 1; inset: auto 0 0 0; height: 1px; background: var(--line); mix-blend-mode: normal; }
.page-head .breadcrumb { margin-bottom: 1.1rem; }
.page-head__row { align-items: flex-end; }
.page-head__title {
  font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.6rem);
  letter-spacing: -0.024em;
  line-height: 1.04;
}
.page-head__sub { font-size: 1rem; margin-top: 0.6rem; max-width: 58ch; line-height: 1.55; }
.page-head__meta { margin-top: 1rem; gap: 0.45rem 0.5rem; }
.page-head__meta > span {
  padding: 0.32em 0.75em 0.32em 0.6em;
  border: 1px solid var(--line-2);
  border-radius: var(--pill);
  background: color-mix(in srgb, #fff 55%, transparent);
  font-size: 0.8rem;
  gap: 0.4em;
}
.page-head__meta .status { font-size: 0.66rem; padding: 0.25em 0.6em 0.25em 0.5em; margin-left: 0.15em; }
.page-head__actions .btn { font-size: 0.92rem; }

/* =============================================================
   4. SURFACES — one radius per hierarchy level (tile 14 · panel 18 · hero
      card 22+), a quieter shadow, tinted panel heads so the head/body
      split reads without a heavy rule.
   ============================================================= */
.page--light {
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(6, 33, 42, 0.05), 0 12px 32px -22px rgba(6, 33, 42, 0.22);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 4px rgba(6, 33, 42, 0.05), 0 40px 70px -40px rgba(6, 33, 42, 0.3);
}
.panel { border-radius: 18px; }
.panel__head {
  padding: 0.85rem 1.2rem;
  background: color-mix(in srgb, var(--text) 2.6%, transparent);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.panel__title { font-size: 1rem; }
.panel__foot { background: color-mix(in srgb, var(--text) 1.6%, transparent); border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.panel__foot a:not(.btn) { color: var(--accent); font-weight: 540; }

/* tiles: taller value, label above, rule stays; the badge sits in a soft well */
.tiles { gap: 1rem; }
.tile { border-radius: 14px; padding: 1.05rem 1.2rem 1rem; }
.tile__label { font-size: 0.8rem; }
.tile__value { font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.95rem); margin-top: 0.45rem; }
.tile__value small { font-size: 0.55em; }
.tile__note { margin-top: 0.5rem; }
.tile__note::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--tc, var(--faint)); flex: none; }

/* dashboard tables are narrow: keep cells on one line and let the wrap scroll */
.dash-grid .data-table td { white-space: nowrap; }

/* data tables: tinted header row, roomier cells, the first column carries the weight */
.data-table th { padding: 0.7rem 1.2rem; background: color-mix(in srgb, var(--text) 2%, transparent); font-size: 0.64rem; letter-spacing: 0.12em; }
.data-table td { padding: 0.85rem 1.2rem; }
.data-table--compact td { padding: 0.65rem 1.2rem; }
.data-table .glyph { border-radius: 8px; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.data-table .cell-sub { margin-top: 0.2rem; }

/* status chips: a touch smaller and tighter so tables stay calm */
.status { font-size: 0.7rem; padding: 0.34em 0.75em 0.34em 0.62em; }

/* schedule / activity rows: the "next" row is marked by a left rule, not a fill */
.sched li.is-next { background: color-mix(in srgb, var(--accent) 5%, transparent); box-shadow: inset 3px 0 0 var(--teal); }

/* badges +30 %: the glyph was timid next to the headings; inline glyphs stay at 1em */
.ic { width: 46px; height: 46px; border-radius: 13px; }
.ic svg { width: 24px; height: 24px; }
.ic--sm { width: 36px; height: 36px; border-radius: 10px; }
.ic--sm svg { width: 20px; height: 20px; }
.ic--xs { width: 28px; height: 28px; border-radius: 8px; }
.ic--xs svg { width: 16px; height: 16px; }
.tile__ic { top: 0.85rem; right: 0.9rem; }
.tile--teal, .tile--green, .tile--amber, .tile--violet { padding-right: 1.2rem; }
.tile__label, .tile__value { padding-right: 3.4rem; }
.seal .ic { width: 28px; height: 28px; }
.seal .ic svg { width: 15px; height: 15px; }
.activity__ic, .sched__ic { margin-top: 0; }
.sched li, .activity li { align-items: center; }
.activity li { align-items: start; }
.activity__ic { margin-top: -0.05rem; }

/* =============================================================
   5. GRADIENT REMOVAL on light pages (the hero keeps its own)
   ============================================================= */
.page--light .opp-card__rate .big,
.band--sage .opp-card__rate .big,
.band--sand .opp-card__rate .big,
.band--paper .opp-card__rate .big { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
.page--light .opp-card::before, .band--sage .opp-card::before, .band--sand .opp-card::before, .band--paper .opp-card::before, .open-card::before { display: none; }
.status-strip__bar > span { background: var(--teal); }
.nav-user__avatar { background: var(--teal-ink); color: #fff; }
.nav .nav-user__avatar { background: var(--teal); color: #042027; }
.page--light .nav .nav-user__avatar, .nav.is-past-hero .nav-user__avatar { background: var(--teal-ink); color: #fff; }
.ob-band__icon { background: var(--teal-ink); color: #fff; }
.ob-band__bar > span { background: var(--teal); }
.photo--tint::after, .about-grid .photo--tint::after { background: color-mix(in srgb, var(--teal-ink) 10%, transparent); }
.opp-card__media::after { background: color-mix(in srgb, var(--teal-ink) 8%, transparent); }
.featured__media::after { background: color-mix(in srgb, var(--teal-ink) 10%, transparent); }
.featured__media { border-right: 1px solid var(--line); }
.cta-final::before, .coming__glow { display: none; }
.chart__area { fill: color-mix(in srgb, var(--teal) 14%, transparent); }
.portal .pstep__n { background: var(--c-teal-bg); }

/* =============================================================
   6. EMPTY / GUEST STATE — a ringed glyph, one line of direction, one
      action. Replaces the plain "sign in" panel and the bare add card.
   ============================================================= */
.empty {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 2.4rem 1.4rem 2.2rem;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
  background: color-mix(in srgb, #fff 55%, transparent);
}
.empty::before {
  content: "";
  position: absolute;
  width: 420px; aspect-ratio: 1;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--motif-rings) center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.empty > * { position: relative; }
.empty__glyph {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent);
  margin-bottom: 0.6rem;
}
.empty__glyph svg { width: 24px; height: 24px; }
.empty__title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.empty__text { color: var(--muted); font-size: 0.9rem; max-width: 46ch; line-height: 1.55; }
.empty .btn-row { justify-content: center; margin-top: 0.9rem; }
.empty--compact { padding: 1.4rem 1rem 1.3rem; gap: 0.2rem; }
.empty--compact .empty__glyph { width: 42px; height: 42px; margin-bottom: 0.3rem; }
.empty--compact .empty__glyph svg { width: 18px; height: 18px; }
.empty--compact .empty__title { font-size: 0.92rem; }
.empty--compact .empty__text { font-size: 0.82rem; }
.empty--compact::before { width: 260px; }
.panel .empty { border-radius: 0 0 18px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; }

/* =============================================================
   7. SEAL — the regulated-by badge (footer, About, Profile KYC)
   ============================================================= */
.seal {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.85rem 0.45rem 0.5rem;
  border-radius: var(--pill);
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, #fff 60%, transparent);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.seal b { color: var(--text); font-weight: 560; }
.seal .ic { width: 26px; height: 26px; border-radius: 50%; }
.seal .ic svg { width: 14px; height: 14px; }
.seal .num { color: var(--text); }

/* =============================================================
   8. FOOTER — a contact row above the columns, rings watermark,
      licence seal beside the © line.
   ============================================================= */
.footer.motif { --motif-size: 760px; --motif-right: -260px; --motif-top: 62%; --motif-opacity: 0.09; }
.footer__contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 0 2.4rem;
  margin-bottom: 2.6rem;
  border-bottom: 1px solid var(--line);
}
.footer__contact a, .footer__contact > div {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  min-width: 0;
  transition: border-color 0.2s;
}
.footer__contact a:hover { border-color: var(--accent); }
.footer__contact strong { display: block; font-size: 0.92rem; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer__contact span { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.1rem; }
.footer__top { padding-bottom: 2.6rem; }
.footer__col h4 { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 600; }
.footer__bottom { align-items: center; gap: 1rem 1.5rem; }
.footer__bottom .seal { margin-right: auto; }

/* =============================================================
   9. HOME BELOW THE FOLD — the onboarding strip, the "set up once"
      composition, the coming-soon band and the warm CTA.
   ============================================================= */
/* onboarding strip: solid badges, the strip itself sits a little higher over the seam */
.ob-band { border-radius: 18px; }
.ob-band__icon { width: 44px; height: 44px; font-size: 0.86rem; }

/* "your account" mini composition under the sky copy */
.account-preview {
  margin-top: 2.2rem;
  display: grid;
  gap: 0.6rem;
  max-width: 400px;
}
.account-preview__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.8rem; align-items: center;
  padding: 0.75rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.account-preview__row:nth-child(2) { margin-left: 1.4rem; }
.account-preview__row:nth-child(3) { margin-left: 2.8rem; }
.account-preview__row strong { display: block; font-weight: 560; font-size: 0.92rem; }
.account-preview__row small { display: block; color: var(--faint); font-family: var(--mono); font-size: 0.72rem; margin-top: 0.1rem; }
.account-preview__row .num { font-family: var(--mono); font-weight: 500; }
.account-preview__cap { font-size: 0.78rem; color: var(--faint); margin-top: 0.4rem; padding-left: 0.2rem; }

/* steps in the sky band: a connecting rule turns the list into a path */
.horizon-split .portal-steps { position: relative; }
.horizon-split .portal-steps::before {
  content: ""; position: absolute; left: 19px; top: 38px; bottom: 38px; width: 1px;
  background: var(--line-2);
}
.horizon-split .pstep__n { background: var(--surface); border-color: var(--line-2); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--bg); }

/* coming-soon band: rings low on the left, behind the timeline */
.coming.motif { --motif-size: 640px; --motif-left: -300px; --motif-top: 60%; --motif-opacity: 0.12; }
.htl__marker { background: var(--surface); }

/* final CTA: left-aligned copy + a "what you'll need" card, rings on the right */
.cta-final.motif { --motif-size: 820px; --motif-right: -240px; --motif-top: 50%; --motif-opacity: 0.14; }
.cta-final .band__inner { text-align: left; }
.cta-final__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.cta-final h2 { margin: 0; max-width: 16ch; }
.cta-final .lede { margin: 1.2rem 0 0; }
.cta-final .btn-row { justify-content: flex-start; margin-top: 2rem; }
.cta-final .trust-row { justify-content: flex-start; margin-top: 2rem; }
.checklist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem 1.3rem;
}
.checklist h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.checklist > p { color: var(--muted); font-size: 0.88rem; margin-top: 0.3rem; }
.checklist ul { list-style: none; margin: 1.1rem 0 0; display: grid; gap: 0.75rem; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.85rem; align-items: center; font-size: 0.92rem; }
.checklist li small { display: block; color: var(--faint); font-size: 0.8rem; margin-top: 0.05rem; }
.checklist__foot { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.checklist__foot .ic-inline { color: var(--accent); margin: 0; }

/* =============================================================
   10. PROFILE — completion ring above the rail, seal on the KYC state
   ============================================================= */
.completion {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem; align-items: center;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.completion__ring { width: 56px; height: 56px; position: relative; }
.completion__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.completion__ring circle { fill: none; stroke-width: 5; }
.completion__ring .track { stroke: color-mix(in srgb, var(--text) 8%, transparent); }
.completion__ring .fill { stroke: var(--teal); stroke-linecap: round; }
.completion__ring .completion__pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--text);
}
.completion strong { display: block; font-size: 0.9rem; font-weight: 560; }
.completion span { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.1rem; }
.rail-side { position: sticky; top: 96px; }
.section-rail { position: static; gap: 0.2rem; }
.section-rail a { padding: 0.6rem 0.85rem; }
.section-rail a.is-active { border-left-color: var(--teal); }

/* =============================================================
   11. TRADE — readiness steps as a path; watch cards with a rule
   ============================================================= */
.readiness { position: relative; }
.readiness::before { content: ""; position: absolute; left: 19px; top: 38px; bottom: 38px; width: 1px; background: var(--line-2); }
.readiness .pstep { grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; }
.readiness .pstep__n { background: var(--surface); border: 1px solid var(--line-2); color: var(--accent); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--surface); }
.readiness .status { margin-top: 0.45rem; }
.watch { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.watch__item { border-radius: 14px; padding: 0.9rem 1rem; }
.watch__glyph { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 8px; }
.watch__item--add { border-radius: 14px; }

/* =============================================================
   12. ABOUT — licence facts as chips, the contact band carries rings
   ============================================================= */
.reg-block { border-radius: 18px; padding: 1.4rem 1.5rem; }
.reg-block dl { gap: 0.5rem; margin-top: 1rem; }
.reg-block dl > div {
  display: inline-flex; align-items: center; gap: 0.45em;
  padding: 0.35em 0.75em; border-radius: var(--pill);
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--text) 2.5%, transparent);
  font-size: 0.8rem;
}
.reg-block dd { margin-left: 0; }
.reg-block > div:not(.ic) { display: flex; flex-direction: column; min-height: 100%; }
.reg-block > .ic { align-self: start; }
.reg-block__link { margin-top: auto; padding-top: 1.2rem; font-size: 0.88rem; }
.about-grid .photo { border-radius: 18px; }
.photo--stack .photo + .photo { border-radius: 14px; }
.contact-band.motif { --motif-size: 620px; --motif-left: -240px; --motif-top: 50%; --motif-opacity: 0.13; }

/* =============================================================
   13. RESPONSIVE
   ============================================================= */
@media (max-width: 1040px) {
  .watch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .rail-side { position: static; }
  .completion { max-width: 380px; }
  .page-head.motif { --motif-size: 520px; --motif-right: -260px; --motif-opacity: 0.1; }
  .cta-final__grid { grid-template-columns: 1fr; }
  .footer__contact { grid-template-columns: 1fr; gap: 0.6rem; }
  .footer__bottom .seal { margin-right: 0; }
  .account-preview__row:nth-child(2), .account-preview__row:nth-child(3) { margin-left: 0; }
}
@media (max-width: 640px) {
  .seal { white-space: normal; }
  .watch { grid-template-columns: 1fr; }
  .empty { padding: 1.8rem 1rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .horizon .btn:hover { transform: none; }
}
