/* ═══════════════════════════════════════════════════════
   CLIP™ Core PRD — details.html specific styles
   ═══════════════════════════════════════════════════════ */

/* ── Workflow steps ── */
.workflow {
  display: flex; gap: 0; align-items: stretch;
  flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px;
}
.workflow-step {
  flex: 1; min-width: 158px;
  background: var(--card); border: 1px solid var(--border);
  padding: 20px 16px 16px; position: relative; text-align: center;
  transition: background .15s;
}
.workflow-step:first-child { border-radius: 12px 0 0 12px; }
.workflow-step:last-child  { border-radius: 0 12px 12px 0; }
.workflow-step:not(:last-child)::after {
  content: '▶';
  position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  color: var(--accent1); font-size: 16px; z-index: 2;
}
.workflow-step:hover { background: rgba(37,99,235,.04); }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}
.step-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.step-desc  { font-size: 11px; color: var(--muted); line-height: 1.5; }
.step-icon  { font-size: 22px; margin-bottom: 8px; }

/* ── Term year timeline ── */
.tl-items {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin-top: 16px;
}
.tl-item { padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; }
.tl-item .ty-label { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.tl-item .ty-dates { font-size: 10px; color: var(--muted); }
.tl-item .ty-type  { font-size: 10px; margin-top: 4px; }
.timeline-bar {
  height: 8px; background: var(--surface); border-radius: 99px;
  display: flex; overflow: hidden; margin-bottom: 8px;
}
.tl-seg {
  height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 9px; font-weight: 700;
}
.tl-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }

/* ── Category grid ── */
.cat-grid { display: grid; gap: 10px; }
.cat-row {
  display: grid; grid-template-columns: 40px 1fr 1fr 1fr 80px;
  gap: 12px; align-items: start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; transition: background .15s;
}
.cat-row:hover { background: rgba(37,99,235,.03); }
.cat-row.header {
  background: var(--surface); color: var(--muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
  padding: 10px 16px; border-radius: 8px 8px 0 0;
}
.cat-num {
  width: 28px; height: 28px; border-radius: 8px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px;
}
.cat-name { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.cat-desc { font-size: 11px; color: var(--muted); }
.cat-qualifier, .cat-window { font-size: 11px; }
.cat-cap { font-size: 12px; font-weight: 700; color: var(--accent4); }

/* ── 4 Segments ── */
.segments-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 14px; }
.seg-card {
  border-radius: var(--radius); padding: 20px;
  border: 1px solid transparent; transition: transform .18s, box-shadow .18s;
}
.seg-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(30,35,64,.1); }
.seg-card.qualifiers { background: linear-gradient(135deg, rgba(37,99,235,.07), rgba(37,99,235,.02)); border-color: rgba(37,99,235,.18); }
.seg-card.startdate  { background: linear-gradient(135deg, rgba(13,148,136,.07), rgba(13,148,136,.02)); border-color: rgba(13,148,136,.18); }
.seg-card.caps       { background: linear-gradient(135deg, rgba(217,119,6,.07),  rgba(217,119,6,.02));  border-color: rgba(217,119,6,.18); }
.seg-card.ratecards  { background: linear-gradient(135deg, rgba(124,58,237,.07), rgba(124,58,237,.02)); border-color: rgba(124,58,237,.18); }
.seg-icon { font-size: 28px; margin-bottom: 10px; }
.seg-name { font-size: 15px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.2px; }
.seg-qualifiers { color: var(--accent1); }
.seg-startdate  { color: var(--accent3); }
.seg-caps       { color: var(--accent4); }
.seg-ratecards  { color: var(--accent2); }
.seg-desc { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.55; }
.seg-rules { display: flex; flex-direction: column; gap: 3px; }
.seg-rule { font-size: 11px; color: var(--text); display: flex; align-items: flex-start; gap: 5px; }
.seg-rule::before { content: '→'; color: var(--muted); flex-shrink: 0; }

/* ── Example cards (rule explorer) ── */
.example-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ex-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.ex-header {
  padding: 11px 16px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.ex-cat-badge { font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.ex-body { padding: 16px; }
.ex-english {
  background: rgba(13,148,136,.06); border: 1px solid rgba(13,148,136,.18);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 12px;
  font-size: 12px; line-height: 1.7;
}
.ex-english strong { color: var(--accent3); }
.ex-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 6px; font-weight: 600;
}

/* ── Caps section ── */
.cap-num  { font-size: 38px; font-weight: 900; color: var(--accent4); line-height: 1; margin-bottom: 4px; }
.cap-unit { font-size: 10.5px; color: var(--muted); margin-bottom: 6px; }
.cap-cat  { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.cap-sort { font-size: 10px; color: var(--muted); }
.cap-sort span { color: var(--accent3); font-weight: 600; }

/* ── Start Date window visualisation ── */
.window-viz { display: grid; gap: 10px; }
.wv-row { display: grid; grid-template-columns: 160px 1fr 72px; gap: 12px; align-items: center; }
.wv-cat { font-size: 12px; font-weight: 600; }
.wv-bar-wrap { height: 30px; }
.wv-offset {
  height: 100%; background: rgba(217,119,6,.14); border-radius: 6px 0 0 6px;
  display: flex; align-items: center; padding: 0 7px;
  font-size: 10px; color: var(--accent4); flex-shrink: 0; font-family: var(--mono);
}
.wv-window {
  height: 100%; border-radius: 0 6px 6px 0;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 10px; font-weight: 700;
}
.wv-dur { font-size: 12px; font-weight: 700; color: var(--accent3); text-align: right; }

/* ── Conditions sub-title ── */
.cond-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); margin: 14px 0 7px;
}

/* ── Bottom back link ── */
.back-link-wrap { text-align: center; margin-top: 48px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent1); text-decoration: none; font-weight: 700;
  font-size: 13px; border: 1px solid rgba(37,99,235,.25);
  padding: 10px 24px; border-radius: 10px;
  background: rgba(37,99,235,.05); transition: background .15s;
}
.back-link:hover { background: rgba(37,99,235,.1); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .example-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .workflow { flex-direction: column; }
  .workflow-step:first-child { border-radius: 12px 12px 0 0; }
  .workflow-step:last-child  { border-radius: 0 0 12px 12px; }
  .workflow-step:not(:last-child)::after {
    content: '▼'; right: 50%; top: unset; bottom: -12px; transform: none;
  }
  .cat-row { grid-template-columns: 36px 1fr; }
  .cat-row .cat-qualifier,
  .cat-row .cat-window,
  .cat-row .cat-cap { display: none; }
  .cat-row.header { display: none; }
  .wv-row { grid-template-columns: 90px 1fr 56px; }
}
