/* connect.css: Bring to Local page. Tokens only. Flat surfaces, hairlines, square corners. DOM order equals reading order. */

/* ---------- Hero ---------- */
.cn-lede { max-width: 46ch; }
.cn-trust { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: var(--space-6); color: var(--text-faint); font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* The product moment: client area tile row, the file it hands over, the terminal that reads it */
.cn-vis { gap: 10px; }
.cn-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.cn-panel__head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-dim); font-size: 0.875rem; font-weight: 600; }
.cn-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2.3fr); gap: 8px; padding: 12px; }
.cn-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; padding: 8px 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--text-dim); text-align: center; }
.cn-tile .i { width: 24px; height: 24px; }
.cn-tile b { display: none; font-size: 0.75rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.cn-tile--on { color: var(--text); border-color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.cn-tile--on b { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; }
@media (min-width: 640px) {
  .cn-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cn-tile b { display: block; }
}
.cn-drop { display: flex; justify-content: center; color: var(--text-dim); }
.cn-drop .i { transform: rotate(90deg); width: 22px; height: 22px; }
.cn-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.cn-file__ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text); }
.cn-file__txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.cn-file__txt b { font-family: var(--font-mono); font-weight: 600; color: var(--text); }
.cn-file__txt span { color: var(--text-dim); font-size: 0.875rem; line-height: 1.35; }
.cn-file__ok { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--ok); font-weight: 700; font-size: 0.875rem; }
.cn-file__ok .i { width: 18px; height: 18px; }
.cn-term .c-frame__body { gap: 8px; padding: 16px 18px; font-size: 0.8125rem; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes cn-in { from { opacity: 0.01; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .cn-drop { animation: cn-in 400ms var(--ease-out) 900ms backwards; }
  .cn-file { animation: cn-in 500ms var(--ease-out) 1050ms backwards; }
  .cn-term .c-frame__body > * { animation: cn-in 400ms var(--ease-out) backwards; }
  .cn-term .c-frame__body > :nth-child(1) { animation-delay: 1500ms; }
  .cn-term .c-frame__body > :nth-child(2) { animation-delay: 1750ms; }
  .cn-term .c-frame__body > :nth-child(3) { animation-delay: 2050ms; }
  .cn-term .c-frame__body > :nth-child(4) { animation-delay: 2350ms; }
  .cn-term .c-frame__body > :nth-child(5) { animation-delay: 2600ms; }
}

@media (max-width: 999px) { .cn-vis { justify-self: start; } }

/* ---------- Three steps: large numerals ---------- */
.cn-steps { display: grid; gap: var(--space-7); }
.cn-step { display: grid; gap: var(--space-3); align-content: start; border-top: 1px solid var(--text); padding-top: var(--space-5); }
.cn-step__n { font-family: var(--font-display); font-weight: 600; font-size: clamp(4.5rem, 3rem + 7vw, 9rem); line-height: 0.85; letter-spacing: -0.05em; margin-bottom: var(--space-4); font-variant-numeric: tabular-nums; }
.cn-step h3 { font-size: var(--step-2); }
.cn-step p { color: var(--text-dim); line-height: 1.55; max-width: 42ch; }
.cn-chip { display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-height: 40px; margin-top: var(--space-3); padding: 0 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; }
.cn-chip .i { width: 18px; height: 18px; }
@media (min-width: 900px) { .cn-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); } }

.cn-works { margin-top: var(--space-9); }
.cn-works__list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.cn-works__list li { padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.cn-works__list b { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.015em; }
.cn-works__list span { color: var(--text-dim); font-size: 0.9375rem; line-height: 1.45; }
.cn-works code, .cn-block code { font-family: var(--font-mono); font-size: 0.875rem; background: var(--surface-2); padding: 1px 6px; border-radius: var(--radius-xs); color: var(--text); }
.cn-works__note { margin-top: var(--space-5); color: var(--text-dim); max-width: 62ch; }
@media (min-width: 900px) {
  .cn-works__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cn-works__list li { border-bottom: 0; border-left: 1px solid var(--line); padding-left: var(--space-5); }
  .cn-works__list li:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- Where the file lives ---------- */
.cn-map__grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); align-items: center; }
.cn-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.cn-box__h { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.cn-box__h .i { width: 20px; height: 20px; }
.cn-box li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cn-box li:last-child { border-bottom: 0; }
.cn-box li > .i { margin-top: 2px; color: var(--text-dim); }
.cn-box li b { display: block; color: var(--text); }
.cn-box li span { color: var(--text-dim); font-size: 0.9375rem; line-height: 1.4; }
.cn-box__file { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand); }
.cn-box__file b { font-family: var(--font-mono); font-weight: 600; }
.cn-arrow { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); text-align: center; }
.cn-arrow svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cn-arrow path { vector-effect: non-scaling-stroke; }
.cn-arrow__h { display: none; width: 100%; height: 24px; }
.cn-arrow__v { display: block; width: 24px; height: 56px; }
.cn-arrow span { font-weight: 600; font-size: 0.9375rem; line-height: 1.35; max-width: 18ch; color: var(--text-dim); }
.cn-map figcaption { margin-top: var(--space-5); color: var(--text-dim); max-width: 62ch; }
@media (min-width: 900px) {
  .cn-map__grid { grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) minmax(0, 1fr); gap: var(--space-5); }
  .cn-arrow__h { display: block; }
  .cn-arrow__v { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    @keyframes cn-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .cn-arrow__h { transform-origin: 0 50%; animation: cn-draw linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  }
}

/* ---------- What is in the file ---------- */
.cn-contents { display: grid; gap: var(--space-8); }
.cn-contents .c-sechead { margin-bottom: var(--space-6); }
.cn-list { border-top: 1px solid var(--text); }
.cn-list li { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cn-list h3 { font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.015em; }
.cn-list p { color: var(--text-dim); line-height: 1.55; }
@media (min-width: 640px) { .cn-list li { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-5); } }
@media (min-width: 1000px) {
  .cn-contents { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-9); align-items: start; }
  .cn-contents__ui { position: sticky; top: calc(var(--nav-h) + 32px); }
}
.cn-contents__ui .c-frame__body { gap: 4px; font-size: 0.8125rem; }
.cn-contents__ui .t-gap { margin-top: 14px; }
.cn-contents__ui figcaption { margin-top: var(--space-4); color: var(--text-faint); font-size: var(--step--1); }

/* ---------- Safety ---------- */
.cn-safety { display: grid; gap: var(--space-7); }
.cn-safety .c-sechead { margin-bottom: 0; }
.cn-rules { border-top: 1px solid var(--text); }
.cn-rules li { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cn-rules .i { width: 28px; height: 28px; margin-top: 2px; }
.cn-rules h3 { font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.015em; }
.cn-rules p { color: var(--text-dim); line-height: 1.5; margin-top: 4px; }
.cn-note { display: flex; gap: 16px; align-items: flex-start; margin-top: var(--space-6); padding: 20px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.cn-note .i { margin-top: 2px; }
.cn-note p { color: var(--text-dim); line-height: 1.55; }
.cn-note b { color: var(--text); }
@media (min-width: 1000px) { .cn-safety { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-9); align-items: start; } }

/* ---------- Comparison table ---------- */
.cn-table { width: 100%; border-collapse: collapse; text-align: left; }
.cn-table th, .cn-table td { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; text-align: left; }
.cn-table thead th { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.015em; padding-bottom: 16px; border-bottom: 1px solid var(--text); }
.cn-table tbody th { width: 18%; color: var(--text); font-weight: 700; }
.cn-table td { color: var(--text-dim); }
.cn-table thead .cn-table__on { box-shadow: inset 0 2px 0 var(--brand); }
.cn-table th:last-child, .cn-table td:last-child { background: var(--surface); padding-left: 20px; padding-right: 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.cn-table td:last-child { color: var(--text); }
.cn-table tbody tr:last-child td:last-child { border-bottom: 1px solid var(--line); }
.cn-after { margin-top: var(--space-6); }
@media (max-width: 767px) {
  .cn-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cn-table, .cn-table tbody, .cn-table tr, .cn-table th, .cn-table td { display: block; }
  .cn-table tr { padding: 20px 0; border-bottom: 1px solid var(--line); }
  .cn-table th, .cn-table td { padding: 0; border: 0; }
  .cn-table tbody th { width: auto; font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 10px; }
  .cn-table td { padding: 8px 0; }
  .cn-table td::before { content: attr(data-label); display: block; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--text-faint); margin-bottom: 2px; }
  .cn-table th:last-child, .cn-table td:last-child { border: 0; background: transparent; padding: 8px 0; }
  .cn-table td:last-child { border-left: 2px solid var(--brand); padding-left: 12px; margin-top: 4px; }
  .cn-table tbody tr:last-child td:last-child { border-bottom: 0; }
}

/* ---------- Quick start ---------- */
.cn-guide { max-width: 64rem; }
.cn-guide .c-sechead { margin-bottom: 0; }
.cn-block { margin-top: var(--space-8); }
.cn-block h3 { font-size: var(--step-2); }
.cn-block > p { color: var(--text-dim); margin-top: var(--space-2); }
.cn-cmds { display: grid; gap: 8px; margin-top: var(--space-5); }
@media (min-width: 700px) { .cn-cmds { grid-template-columns: 1fr 1fr; } }
.cn-cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; width: 100%; min-height: 60px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); text-align: left; color: var(--text); touch-action: manipulation; transition: border-color var(--dur-2) var(--ease-out); }
.cn-cmd:hover { border-color: var(--text-faint); }
.cn-cmd__label { flex: 0 0 100%; font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.cn-cmd code { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 0.875rem; color: var(--text); overflow-wrap: anywhere; background: none; padding: 0; }
.cl-copy-btn { flex: none; min-width: 64px; text-align: center; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 700; font-size: 0.8125rem; color: var(--text); }
.cn-prompt { margin-top: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; transition: border-color var(--dur-2) var(--ease-out); }
.cn-prompt:hover { border-color: var(--text-faint); }
.cn-prompt__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--line); color: var(--text-dim); font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; }
.cn-prompt__btn { min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0; text-transform: none; color: var(--text); touch-action: manipulation; }
.cn-prompt__btn:hover { border-color: var(--text); }
.cn-prompt p { padding: 20px; font-size: 0.9375rem; line-height: 1.7; color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; max-width: none; }
.cn-prompt strong { color: var(--text); }
.cn-asks { display: grid; gap: 0 var(--space-6); margin-top: var(--space-5); border-top: 1px solid var(--line); }
.cn-asks li { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-dim); line-height: 1.5; }
.cn-cat { font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
@media (min-width: 700px) { .cn-asks { grid-template-columns: 1fr 1fr; } }

/* ---------- FAQ layout ---------- */
.cn-faq-grid { display: grid; gap: var(--space-7); }
@media (min-width: 1000px) {
  .cn-faq-grid { grid-template-columns: 4fr 8fr; gap: var(--space-9); }
  .cn-faq-grid .c-sechead { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
}

/* ---------- Finale: type led ---------- */
.cn-finale { background: var(--bg); border-top: 1px solid var(--line); padding-block: var(--section-y); }
.cn-finale h2 { font-size: var(--step-4); line-height: 1.04; max-width: 20ch; }
.cn-finale p { color: var(--text-dim); font-size: var(--step-1); line-height: 1.5; max-width: 48ch; margin-top: var(--space-5); }
.cn-finale .c-finale__ctas { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 700px) { .cn-finale .c-finale__ctas { flex-direction: row; flex-wrap: wrap; } }
