/* Interactive components: helper, patent journey, scenarios, myth cards, deadline tools, glossary tips. */
:root { --cpi-card: #fff; --cpi-line: color-mix(in oklab, var(--cpi-ink) 13%, transparent); }
:root[data-theme="dark"] { --cpi-card: #232a30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cpi-card: #232a30; } }

/* Scroll progress */
.cpi-progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 60; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--cpi-blue), var(--cpi-lime), var(--cpi-gold, #ecb439)); pointer-events: none; }

.cpi-ghost-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid color-mix(in oklab, var(--cpi-blue) 45%, transparent); border-radius: 2px; background: transparent; color: var(--cpi-blue-ink, var(--cpi-blue)); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.cpi-ghost-btn:hover { background: color-mix(in oklab, var(--cpi-blue) 10%, transparent); border-color: var(--cpi-blue); }
.cpi-cta-band button.cpi-button-lime { font: inherit; font-size: 13px; font-weight: 700; }
button.cpi-text-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }

/* Patent journey */
.cpi-journey-sec { position: relative; padding-block: 84px 92px; background: var(--cpi-paper); border-top: 1px solid var(--cpi-line); }
.cpi-journey { --j-progress: 0; margin-top: 44px; }
.cpi-j-tabs { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cpi-j-tabs::before { content: ""; position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 21px; height: 3px; background: var(--cpi-line); border-radius: 2px; }
.cpi-j-tabs::after { content: ""; position: absolute; left: calc(100% / 12); top: 21px; height: 3px; width: calc((100% - 100% / 6) * var(--j-progress)); background: linear-gradient(90deg, var(--cpi-blue), var(--cpi-lime)); border-radius: 2px; transition: width .45s ease; }
.cpi-j-tabs button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; padding: 0 4px; border: 0; background: none; color: color-mix(in oklab, var(--cpi-ink) 62%, transparent); font: inherit; cursor: pointer; }
.cpi-j-no { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--cpi-card); border: 2px solid var(--cpi-line); color: color-mix(in oklab, var(--cpi-ink) 60%, transparent); font-weight: 700; font-size: 14px; transition: all .25s ease; }
.cpi-j-label { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.25; }
.cpi-j-tabs button:hover .cpi-j-no { border-color: var(--cpi-blue); color: var(--cpi-blue-ink, var(--cpi-blue)); }
.cpi-j-tabs button.done .cpi-j-no { border-color: var(--cpi-blue); background: color-mix(in oklab, var(--cpi-blue) 14%, var(--cpi-card)); color: var(--cpi-blue-ink, var(--cpi-blue)); }
.cpi-j-tabs button[aria-selected="true"] { color: var(--cpi-ink); }
.cpi-j-tabs button[aria-selected="true"] .cpi-j-no { background: var(--cpi-blue); border-color: var(--cpi-blue); color: #fff; transform: scale(1.12); box-shadow: 0 10px 24px rgb(20 129 196 / .35); }
.cpi-j-panels { margin-top: 34px; }
.cpi-j-panel { display: grid; grid-template-columns: 1.5fr .5fr; gap: 40px; padding: 34px 36px; background: var(--cpi-card); border: 1px solid var(--cpi-line); border-radius: 8px; box-shadow: 0 18px 50px color-mix(in oklab, var(--cpi-ink) 8%, transparent); position: relative; overflow: hidden; }
.cpi-j-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--cpi-blue), var(--cpi-lime)); }
.cpi-j-panel[hidden], .cpi-scn-panel[hidden], .cpi-helper-panel[hidden] { display: none; }
.cpi-j-panel:not([hidden]) { animation: cpi-j-in .35s ease both; }
@keyframes cpi-j-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cpi-j-step { color: var(--cpi-blue-ink, var(--cpi-blue)); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.cpi-j-panel h3 { margin: 10px 0 8px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; line-height: 1.12; }
.cpi-j-lead { max-width: 620px; color: color-mix(in oklab, var(--cpi-ink) 74%, transparent); font-size: 15px; line-height: 1.75; }
.cpi-j-panel dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 26px 0 0; }
.cpi-j-panel dt { color: var(--cpi-blue-ink, var(--cpi-blue)); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cpi-j-panel dd { margin: 6px 0 0; color: color-mix(in oklab, var(--cpi-ink) 72%, transparent); font-size: 13px; line-height: 1.7; }
.cpi-j-side { display: grid; align-content: center; justify-items: start; gap: 14px; }

/* Scenario cards */
.cpi-scenarios { padding-block: 84px 20px; }
.cpi-scn-head h2 { margin: 18px 0 0; font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; line-height: 1.04; }
.cpi-scn-head h2 em { color: var(--cpi-blue-ink, var(--cpi-blue)); font-family: Georgia, serif; font-weight: 400; }
.cpi-scn-head p { margin-top: 14px; max-width: 520px; color: color-mix(in oklab, var(--cpi-ink) 68%, transparent); font-size: 14px; line-height: 1.8; }
.cpi-scn-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 34px; }
.cpi-scn { display: grid; justify-items: start; align-content: space-between; gap: 18px; min-height: 130px; padding: 18px; background: var(--cpi-card); border: 1px solid var(--cpi-line); border-radius: 6px; color: var(--cpi-ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; text-align: left; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.cpi-scn:hover { transform: translateY(-3px); border-color: var(--cpi-blue); box-shadow: 0 14px 34px rgb(20 129 196 / .14); }
.cpi-scn.on { background: var(--cpi-blue); border-color: var(--cpi-blue); color: #fff; }
.cpi-scn-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in oklab, var(--cpi-blue) 12%, transparent); color: var(--cpi-blue-ink, var(--cpi-blue)); }
.cpi-scn.on .cpi-scn-ic { background: rgb(255 255 255 / .2); color: #fff; }
.cpi-site .cpi-scn-ic svg.i { width: 17px; height: 17px; stroke-width: 1.7; }
.cpi-scn-panels { margin-top: 18px; }
.cpi-scn-panel { padding: 26px 28px; background: linear-gradient(160deg, var(--cpi-card), color-mix(in oklab, var(--cpi-mist) 70%, var(--cpi-card))); border: 1px solid var(--cpi-line); border-left: 4px solid var(--cpi-blue); border-radius: 6px; }
.cpi-scn-panel:not([hidden]) { animation: cpi-j-in .3s ease both; }
.cpi-scn-panel ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.7; color: color-mix(in oklab, var(--cpi-ink) 78%, transparent); }
.cpi-scn-panel li strong { color: var(--cpi-ink); }
.cpi-scn-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 18px; }
.cpi-scn-links .cpi-text-link { margin-top: 0; }

/* Myth or fact */
.cpi-myths { padding-block: 64px 24px; }
.cpi-myths-head h2 { margin: 16px 0 0; font-size: clamp(28px, 3vw, 40px); font-weight: 600; line-height: 1.1; }
.cpi-myths-head h2 em { color: var(--cpi-blue-ink, var(--cpi-blue)); font-family: Georgia, serif; font-weight: 400; }
.cpi-myth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 26px; }
.cpi-myth { position: relative; display: block; min-height: 190px; padding: 0; border: 0; background: none; perspective: 900px; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.cpi-myth-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 6px; border: 1px solid var(--cpi-line); backface-visibility: hidden; transition: transform .55s cubic-bezier(.3, .7, .2, 1); font-size: 14px; line-height: 1.55; font-weight: 600; }
.cpi-myth-face small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.cpi-myth-front { background: var(--cpi-card); box-shadow: 0 8px 24px color-mix(in oklab, var(--cpi-ink) 6%, transparent); }
.cpi-myth-front small { color: oklch(0.55 0.18 27); }
.cpi-myth-front i { margin-top: auto; color: color-mix(in oklab, var(--cpi-ink) 50%, transparent); font-size: 11px; font-style: normal; font-weight: 500; }
.cpi-myth-back { background: var(--cpi-blue); border-color: var(--cpi-blue); color: #fff; transform: rotateY(180deg); font-weight: 500; }
.cpi-myth-back small { color: #bfeaff; }
.cpi-myth.flipped .cpi-myth-front { transform: rotateY(-180deg); }
.cpi-myth.flipped .cpi-myth-back { transform: rotateY(0); }
.cpi-myths-compact { padding-block: 44px 0; }

/* Deadline tools */
.cpi-tool-wrap { padding-block: 56px 80px; }
.cpi-tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cpi-tool { display: grid; align-content: start; gap: 12px; padding: 28px; background: var(--cpi-card); border: 1px solid var(--cpi-line); border-radius: 8px; box-shadow: 0 12px 34px color-mix(in oklab, var(--cpi-ink) 7%, transparent); }
.cpi-tool-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--cpi-blue), var(--cpi-lime)); color: #fff; }
.cpi-site .cpi-tool-ic svg.i { width: 21px; height: 21px; stroke-width: 1.6; }
.cpi-tool h2 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.cpi-tool > p { color: color-mix(in oklab, var(--cpi-ink) 68%, transparent); font-size: 13.5px; line-height: 1.7; }
.cpi-tool label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.cpi-tool input[type="date"] { min-height: 46px; padding: 0 12px; border: 1px solid color-mix(in oklab, var(--cpi-ink) 28%, transparent); border-radius: 4px; background: var(--cpi-paper); color: var(--cpi-ink); font: inherit; font-size: 14px; }
.cpi-tool input[type="date"]:focus-visible { outline: 2px solid var(--cpi-blue); }
.cpi-tool-out { display: grid; gap: 12px; margin-top: 4px; }
.cpi-result { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--cpi-line); border-radius: 6px; background: color-mix(in oklab, var(--cpi-mist) 55%, var(--cpi-card)); }
.cpi-result.key { border-color: var(--cpi-blue); box-shadow: 0 8px 22px rgb(20 129 196 / .12); }
.cpi-result-label { color: var(--cpi-blue-ink, var(--cpi-blue)); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cpi-result-date { font-size: 19px; line-height: 1.25; }
.cpi-result-rel { font-size: 12px; font-weight: 600; color: color-mix(in oklab, var(--cpi-ink) 70%, transparent); }
.cpi-result-note { font-size: 12.5px; line-height: 1.65; color: color-mix(in oklab, var(--cpi-ink) 66%, transparent); }
.cpi-result .cpi-ghost-btn { justify-self: start; margin-top: 6px; min-height: 34px; }
.cpi-tool-ask { justify-self: start; }
.cpi-tool-note { max-width: 780px; margin-top: 26px; }

/* Glossary */
.cpi-gloss { display: grid; gap: 0; margin: 0; }
.cpi-gloss-item { padding: 20px 0; border-bottom: 1px solid var(--cpi-line); }
.cpi-gloss dt { font-size: 18px; font-weight: 650; }
.cpi-gloss dd { margin: 6px 0 0; max-width: 640px; color: color-mix(in oklab, var(--cpi-ink) 74%, transparent); font-size: 14.5px; line-height: 1.75; }
.cpi-term { border-bottom: 1.5px dotted var(--cpi-blue); cursor: help; }
.cpi-term:hover, .cpi-term:focus-visible { background: color-mix(in oklab, var(--cpi-blue) 12%, transparent); outline: none; }
.cpi-tip { position: absolute; z-index: 70; width: min(320px, calc(100vw - 24px)); display: grid; gap: 4px; padding: 14px 16px; background: var(--cpi-ink); color: var(--cpi-paper); border-radius: 6px; box-shadow: 0 16px 40px rgb(0 0 0 / .28); font-size: 12.5px; line-height: 1.6; pointer-events: none; }
.cpi-tip[hidden] { display: none; }
.cpi-tip strong { color: var(--cpi-lime); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

/* Helper */
.cpi-helper, .cpi-tip, .cpi-progress { font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
.cpi-helper { position: fixed; right: 20px; bottom: 20px; z-index: 50; opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease, bottom .25s ease; }
.cpi-helper.ready { opacity: 1; transform: none; }
body:has(#cookie-banner:not([hidden])) .cpi-helper { bottom: 118px; }
.cpi-helper-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--cpi-blue-deep, #0f6ca8); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 12px 30px rgb(15 108 168 / .4); transition: transform .2s ease, box-shadow .2s ease; }
.cpi-helper-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgb(15 108 168 / .5); }
.cpi-site .cpi-helper-btn svg.i, .cpi-helper-btn svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cpi-helper.nudge .cpi-helper-btn { animation: cpi-nudge 1.4s ease 2; }
@keyframes cpi-nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-6px); } 60% { transform: translateY(-2px); } }
.cpi-helper-panel { position: absolute; right: 0; bottom: 60px; width: min(360px, calc(100vw - 32px)); max-height: min(78vh, 640px); overflow: auto; padding: 22px; background: var(--cpi-card); color: var(--cpi-ink); border: 1px solid var(--cpi-line); border-radius: 14px; box-shadow: 0 24px 70px rgb(0 0 0 / .28); }
.cpi-helper-panel:not([hidden]) { animation: cpi-j-in .25s ease both; }
.cpi-helper-x { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: color-mix(in oklab, var(--cpi-ink) 60%, transparent); cursor: pointer; }
.cpi-helper-x:hover { background: color-mix(in oklab, var(--cpi-ink) 8%, transparent); }
.cpi-helper-x svg.i { width: 16px; height: 16px; }
.cpi-helper-view { display: grid; gap: 10px; }
.cpi-helper-view[hidden] { display: none; }
.cpi-helper-hi { margin: 0; padding-right: 28px; font-size: 20px; font-weight: 650; line-height: 1.2; }
.cpi-helper-sub { margin: 0 0 6px; color: color-mix(in oklab, var(--cpi-ink) 66%, transparent); font-size: 13px; line-height: 1.6; }
.cpi-helper-action { display: grid; grid-template-columns: 20px 1fr 16px; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--cpi-line); border-radius: 8px; background: var(--cpi-paper); color: var(--cpi-ink); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.cpi-helper-action:hover { border-color: var(--cpi-blue); transform: translateX(2px); }
.cpi-helper-action svg.i { width: 18px; height: 18px; color: var(--cpi-blue-ink, var(--cpi-blue)); stroke-width: 1.7; }
.cpi-helper-action.primary { background: var(--cpi-blue-deep, #0f6ca8); border-color: var(--cpi-blue-deep, #0f6ca8); color: #fff; }
.cpi-helper-action.primary svg.i { color: #fff; }
.cpi-helper-back { justify-self: start; padding: 0; border: 0; background: none; color: var(--cpi-blue-ink, var(--cpi-blue)); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cpi-helper-view label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; }
.cpi-helper-view label.opt span::after { content: ""; }
.cpi-helper-view textarea, .cpi-helper-view input:not([type="hidden"]) { width: 100%; padding: 10px 12px; border: 1px solid color-mix(in oklab, var(--cpi-ink) 28%, transparent); border-radius: 6px; background: var(--cpi-paper); color: var(--cpi-ink); font: inherit; font-size: 14px; }
.cpi-helper-view textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.cpi-helper-fine { margin: 0; color: color-mix(in oklab, var(--cpi-ink) 62%, transparent); font-size: 11.5px; line-height: 1.6; }
.cpi-helper-send { min-height: 46px; border: 0; border-radius: 6px; background: var(--cpi-gold, #ecb439); color: #212529; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.cpi-helper-send:disabled { opacity: .6; cursor: progress; }
.cpi-helper-status { margin: 0; min-height: 0; font-size: 12px; line-height: 1.5; }
.cpi-helper-status.err { color: oklch(0.5 0.2 27); }

@media (max-width: 1100px) {
  .cpi-scn-grid { grid-template-columns: repeat(3, 1fr); }
  .cpi-j-panel { grid-template-columns: 1fr; }
  .cpi-j-side { justify-items: start; grid-auto-flow: column; justify-content: start; }
}
@media (max-width: 760px) {
  .cpi-journey-sec { padding-block: 58px 62px; }
  .cpi-j-tabs { grid-template-columns: repeat(6, minmax(64px, 1fr)); overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
  .cpi-j-panel { padding: 24px 22px; }
  .cpi-j-panel dl { grid-template-columns: 1fr; gap: 16px; }
  .cpi-j-side { grid-auto-flow: row; }
  .cpi-scn-grid { grid-template-columns: 1fr 1fr; }
  .cpi-scenarios { padding-block: 58px 10px; }
  .cpi-tool-grid { grid-template-columns: 1fr; }
  .cpi-helper { right: 12px; bottom: 12px; }
  .cpi-helper-btn span { display: none; }
  .cpi-helper-btn { width: 52px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cpi-j-panel:not([hidden]), .cpi-scn-panel:not([hidden]), .cpi-helper-panel:not([hidden]), .cpi-helper.nudge .cpi-helper-btn { animation: none; }
  .cpi-myth-face, .cpi-j-tabs::after, .cpi-helper { transition: none; }
}

/* Booking: time zone control and the manage page */
.cpi-tz { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; }
.cpi-tz > p { margin: 0; }
.cpi-tz-change { padding: 0; border: 0; background: none; color: var(--cpi-blue-ink, var(--cpi-blue)); font: inherit; font-size: 12px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.cpi-tz-panel { flex: 1 1 100%; display: grid; gap: 10px; justify-items: start; padding: 14px 16px; margin-top: 6px; background: var(--cpi-card); border: 1px solid var(--cpi-line); border-radius: 8px; }
.cpi-tz-panel[hidden] { display: none; }
.cpi-tz-panel label { display: grid; gap: 6px; width: min(100%, 380px); font-size: 12px; font-weight: 600; }
.cpi-tz-panel input { min-height: 42px; padding: 0 12px; border: 1px solid color-mix(in oklab, var(--cpi-ink) 28%, transparent); border-radius: 4px; background: var(--cpi-paper); color: var(--cpi-ink); font: inherit; font-size: 14px; }
.cpi-manage-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding-block: 56px 80px; align-items: start; }
.cpi-manage { display: grid; gap: 22px; }
.cpi-manage h2 { font-size: 22px; font-weight: 600; margin: 0; }
.cpi-manage [hidden] { display: none !important; }
.cpi-manage > div:not([hidden]) { display: grid; gap: 18px; }
.cpi-manage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cpi-manage-join { display: flex; }
.cpi-manage button:disabled { opacity: .55; cursor: not-allowed; }
.cpi-tile { display: flex; align-items: center; gap: 20px; padding: 18px 20px; background: color-mix(in oklab, var(--cpi-mist) 70%, var(--cpi-card)); border: 1px solid var(--cpi-line); border-radius: 12px; }
.cpi-tile-cal { flex: none; width: 76px; overflow: hidden; border: 1px solid var(--cpi-line); border-radius: 10px; background: var(--cpi-card); text-align: center; }
.cpi-tile-mon { background: var(--cpi-blue); color: #fff; padding: 5px 0; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cpi-tile-day { padding: 6px 0 8px; font-size: 32px; font-weight: 700; line-height: 1; }
.cpi-tile-date { font-size: 18px; font-weight: 650; }
.cpi-tile-time { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--cpi-blue-ink, var(--cpi-blue)); }
.cpi-tile-zone { margin-top: 2px; font-size: 12px; color: color-mix(in oklab, var(--cpi-ink) 62%, transparent); }
@media (max-width: 900px) { .cpi-manage-wrap { grid-template-columns: 1fr; gap: 40px; } }
