/* ============================================================================
   AI CAPABILITIES — three tabs: reading text / reading photos / instant judgement
   Data: assets/ai-caps-data.js (captured model output, see docs/source/)
   ============================================================================ */
.aic{ margin-top:26px; }

/* ---------------- tab bar ---------------- */
.aic-tabs{
  display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px;
  border-bottom:1px solid var(--line); padding-bottom:14px;
}
.aic-tab{
  display:flex; align-items:center; gap:9px;
  background:var(--paper); border:1px solid var(--line); border-radius:999px;
  padding:10px 17px; cursor:pointer; font:inherit; font-size:.88rem; font-weight:650;
  color:var(--ink); transition:border-color .15s, background .15s, color .15s;
}
.aic-tab:hover{ border-color:var(--teal); }
.aic-tab[aria-selected="true"]{
  background:var(--ink); color:#fff; border-color:var(--ink);
}
.aic-tab .n{
  font-size:.68rem; font-weight:800; letter-spacing:.06em; opacity:.55;
  font-variant-numeric:tabular-nums;
}
.aic-tab[aria-selected="true"] .n{ opacity:.7; }

/* panel */
.aic-panel[hidden]{ display:none; }

.aic-lede{
  font-size:.92rem; color:var(--muted); line-height:1.6; margin:0 0 6px; max-width:70ch;
}
.aic-speed{
  display:inline-flex; align-items:center; gap:7px; margin:0 0 20px;
  font-size:.72rem; font-weight:700; letter-spacing:.03em;
  color:var(--muted); background:var(--paper-2); border-radius:999px; padding:5px 12px;
}
.aic-speed b{ color:var(--ink); }
.aic-speed .d{ width:6px; height:6px; border-radius:50%; background:var(--teal); }

/* two-column body */
.aic-body{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
  gap:24px; align-items:start;
}
@media (max-width:900px){ .aic-body{ grid-template-columns:minmax(0,1fr); gap:16px; } }

/* pickers (left column) */
.aic-list{ display:flex; flex-direction:column; gap:8px; }
.aic-pick{
  display:block; width:100%; text-align:left; font:inherit; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-radius:14px;
  padding:13px 15px; cursor:pointer;
  transition:border-color .15s, background .15s, transform .15s;
}
.aic-pick:hover{ border-color:var(--teal); transform:translateX(3px); }
.aic-pick[aria-pressed="true"]{
  border-color:var(--teal); background:rgba(14,124,134,.06);
  box-shadow:inset 3px 0 0 var(--teal);
}
.aic-pick .t{ font-size:.84rem; line-height:1.45; display:block; }
.aic-pick .m{
  display:block; margin-top:4px; font-size:.72rem; color:var(--muted);
  font-variant-numeric:tabular-nums;
}

/* photo thumbnails inside pickers */
.aic-thumb{
  width:100%; border-radius:9px; border:1px solid var(--line);
  background:#fff; display:block; margin-bottom:8px;
  max-height:150px; object-fit:cover; object-position:top;
}

/* right column: the result panel */
.aic-out{
  background:var(--ink); color:#e9f6f0; border-radius:var(--radius);
  padding:20px; position:relative; overflow:hidden;
}
.aic-out::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(560px 220px at 84% -14%, var(--teal-glow), transparent 70%);
}
.aic-badge{
  position:relative; display:inline-flex; align-items:center; gap:6px;
  font-size:.63rem; font-weight:750; letter-spacing:.08em; text-transform:uppercase;
  color:#7fe3b0; background:rgba(127,227,176,.1);
  border:1px solid rgba(127,227,176,.28); border-radius:999px; padding:4px 10px;
}
.aic-badge .dot{
  width:6px; height:6px; border-radius:50%; background:#7fe3b0;
  animation:aiPulse 2.2s infinite;
}
@keyframes aiPulse{
  0%{ box-shadow:0 0 0 0 rgba(127,227,176,.55);}
  70%{ box-shadow:0 0 0 7px rgba(127,227,176,0);}
  100%{ box-shadow:0 0 0 0 rgba(127,227,176,0);}
}

.aic-src{
  position:relative; background:rgba(255,255,255,.05); border-left:2px solid rgba(127,227,176,.4);
  border-radius:0 10px 10px 0; padding:11px 14px; margin:14px 0 15px;
  font-size:.8rem; line-height:1.55; color:#cfe6dc; max-height:190px; overflow:auto;
  white-space:pre-wrap;
}
.aic-src::-webkit-scrollbar{ width:4px; }
.aic-src::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.16); border-radius:4px; }

.aic-rows{ position:relative; display:flex; flex-direction:column; gap:1px; }
.aic-row{
  background:rgba(255,255,255,.045); padding:12px 15px;
  animation:aiIn .32s cubic-bezier(.2,.7,.3,1) backwards;
}
.aic-row:first-child{ border-radius:12px 12px 0 0; animation-delay:.04s; }
.aic-row:last-child{ border-radius:0 0 12px 12px; animation-delay:.1s; }
.aic-row:only-child{ border-radius:12px; }
@keyframes aiIn{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;} }
.aic-row .k{
  font-size:.64rem; font-weight:750; letter-spacing:.09em; text-transform:uppercase;
  color:#7fa99a; display:block; margin-bottom:6px;
}
.aic-row .v{ font-size:.88rem; line-height:1.55; color:#fff; }

/* plain-language confidence pill */
.conf{
  display:inline-flex; align-items:baseline; gap:5px; margin-left:8px;
  font-size:.68rem; font-weight:700; letter-spacing:.02em;
  padding:2px 8px; border-radius:999px; white-space:nowrap;
  background:rgba(255,255,255,.09); color:#9fd9c6;
}
.conf b{ font-variant-numeric:tabular-nums; font-size:.72rem; }
.conf.hi{ color:#7fe3b0; background:rgba(127,227,176,.14); }
.conf.mid{ color:#ffcf7a; background:rgba(255,207,122,.14); }

/* issue chips */
.chips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:3px; }
.chip{
  font-size:.73rem; padding:4px 10px; border-radius:999px;
  background:rgba(255,255,255,.09); color:#e9f6f0;
}
/* replies */
.reply{
  white-space:pre-wrap; font-size:.84rem; line-height:1.65; color:#eaf6f1;
  background:rgba(127,227,176,.07); border-left:2px solid rgba(127,227,176,.5);
  border-radius:0 9px 9px 0; padding:11px 13px;
}

/* extracted table (photos tab) */
.xlist{ width:100%; border-collapse:collapse; font-size:.83rem; }
.xlist td{ padding:7px 0; border-bottom:1px dotted rgba(255,255,255,.13); }
.xlist tr:last-child td{ border-bottom:0; }
.xlist td:last-child{
  text-align:right; font-variant-numeric:tabular-nums; font-weight:700; color:#fff; white-space:nowrap;
}
.xlist .tot td{ border-top:1px solid rgba(255,255,255,.22); border-bottom:0; padding-top:10px; font-weight:800; }

/* the source photo displayed in the panel */
.aic-photo{
  position:relative; display:block; width:100%; border-radius:11px;
  border:1px solid rgba(255,255,255,.14); margin:14px 0 15px; background:#fff;
}

/* meter */
.meter{ height:4px; border-radius:99px; background:rgba(255,255,255,.1); overflow:hidden; margin-top:8px; }
.meter i{ display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#7fe3b0,var(--teal-bright)); transition:width .5s cubic-bezier(.2,.7,.3,1); }
.meter.warm i{ background:linear-gradient(90deg,#ffcf7a,#e8912a); }
.meter.hot i{ background:linear-gradient(90deg,#f0a08a,#c0564d); }

.aic-foot{
  position:relative; margin-top:15px; padding-top:13px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:.72rem; color:#7fa99a; line-height:1.6;
}
.aic-foot a{ color:#7fe3b0; }
.aic-note{
  position:relative; font-size:.68rem; color:#6d9b88; margin-top:11px; font-style:italic;
}


/* ============================================================
   compact three-capability strip (homepage)
   A single example would imply a single capability — this shows all three.
   ============================================================ */
.aic-three{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px; margin-top:26px;
}
@media (max-width:1080px){ .aic-three{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px){ .aic-three{ grid-template-columns:minmax(0,1fr); gap:12px; } }

.aic-card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:20px 20px 19px; position:relative;
  transition:border-color .16s, transform .16s;
}
.aic-card:hover{ border-color:var(--teal); transform:translateY(-2px); }
.aic-card .aic-cn{
  display:block; font-size:.68rem; font-weight:800; letter-spacing:.09em;
  color:var(--teal); margin-bottom:10px;
  font-variant-numeric:tabular-nums;
}
.aic-card h4{
  font-size:1rem; font-weight:750; margin:0 0 8px; color:var(--ink); line-height:1.3;
}
.aic-card p{
  font-size:.85rem; line-height:1.6; color:var(--muted); margin:0;
}
.aic-more{ margin:22px 0 0; }

/* the two-column aic-body needs a little air below the tab bar on wide screens */
@media (min-width:901px){
  .aic-tabs{ margin-bottom:24px; }
}

/* open-ended note — these tabs/cards are the parts we can show, not the whole layer.
   Deliberately NOT a bordered pull-quote: as a quote block it read as an orphan
   floating under the grid instead of a line about the whole section. */
.aic-open{
  font-size:.8rem; color:var(--muted); line-height:1.65;
  margin:14px 0 0; max-width:70ch;
}
.aic-open::before{ content:"+ "; color:var(--teal); font-weight:800; }
.aic-card p{ font-size:.82rem; }


/* ============================================================
   INLINE SWITCHER (homepage) — the cards ARE the control.
   The first example is already on screen at load; clicking another card
   swaps the panel. No click-through to find out what the thing does.
   ============================================================ */
.ail{ margin-top:28px; }

.ail-cards{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
@media (max-width:1080px){ .ail-cards{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px){ .ail-cards{ grid-template-columns:minmax(0,1fr); gap:9px; } }

.ail-card{
  display:block; width:100%; text-align:left; font:inherit; cursor:pointer;
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 17px 15px; position:relative; color:var(--ink);
  transition:border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.ail-card:hover{ border-color:var(--teal); transform:translateY(-2px); }
.ail-card:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
/* selected card reads as "you are looking at this one" — not just a hover */
.ail-card[aria-selected="true"]{
  border-color:var(--teal); background:rgba(14,124,134,.07);
  box-shadow:inset 0 3px 0 var(--teal);
}
.ail-card .ail-t{
  display:block; font-size:.98rem; font-weight:750; line-height:1.3; margin-bottom:6px;
}
.ail-card .ail-tag{
  display:block; font-size:.8rem; color:var(--muted); line-height:1.5;
}
.ail-card .ail-time{
  display:inline-block; margin-top:11px; font-size:.68rem; font-weight:750;
  letter-spacing:.04em; color:var(--muted); background:var(--paper-2);
  border-radius:999px; padding:3px 9px; font-variant-numeric:tabular-nums;
}
.ail-card[aria-selected="true"] .ail-time{ color:var(--ink); }
.ail-card[aria-selected="true"] .ail-time::before{
  content:""; display:inline-block; width:5px; height:5px; border-radius:50%;
  background:var(--teal); margin-right:6px; vertical-align:middle;
}

.ail-live{ margin-top:16px; animation:ailSwap .3s cubic-bezier(.2,.7,.3,1); }
@keyframes ailSwap{ from{ opacity:.4; transform:translateY(5px);} to{ opacity:1; transform:none;} }
.ail-live .aic-out{ padding:22px; }
.ail-live .aic-src{ max-height:none; }

/* the voice card plays the actual audio */
.ail-audio{
  position:relative; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:rgba(255,255,255,.05); border-radius:11px; padding:12px 14px; margin:14px 0 15px;
}
.ail-audio-k{
  font-size:.64rem; font-weight:750; letter-spacing:.09em; text-transform:uppercase;
  color:#7fa99a;
}
.ail-audio audio{ height:34px; max-width:100%; flex:1 1 240px; }

.ail-foot{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  flex-wrap:wrap; margin-top:14px;
}
.ail-sample{ font-size:.7rem; color:var(--muted); font-style:italic; }
.ail-cta{
  font-size:.82rem; font-weight:700; color:var(--teal);
  text-decoration:none; border-bottom:1px solid rgba(14,124,134,.35);
  padding-bottom:2px; transition:border-color .18s, color .18s;
}
.ail-cta:hover{ color:var(--ink); border-bottom-color:var(--ink); }
/* label-only source line (photo) — no fake "text that arrived", just what was handed over */
.aic-src-label{ font-style:italic; color:#9fc4b6; }
