/* ===== HIXOR Cyber Threat Forecast — homepage KPI panel =====
   Visual refinement v2 (2026-11-15): a calm, enterprise dashboard
   treatment replacing the v1 neon-glow design. Flat dark surfaces,
   1px low-alpha borders, accent colour (gold for Japan, cyan for
   the World) used sparingly as a border tint and small highlights,
   a strict 4/8 spacing rhythm, one radius system (panel 16px /
   cards 12px / chips + CTA pill), and a quiet type hierarchy with
   tabular figures. No glows, no filter:blur layers, no
   mix-blend-mode (iOS Safari drawing bug). Loaded only by
   templates/home.html, after home-v5.css. The level area is filled
   by forecast-badge-v3.js from the live feed; until then it stays
   hidden (never a guessed or stale level). */

.tfk-panel{
  margin-top:1.25rem;
  padding:20px 20px 22px;
  border-radius:16px;
  background:#0a1830;
  border:1px solid rgba(147,183,229,.14);
  color:#d7e4f4;
}
.tfk-head{
  margin:12px 0 0;
  color:#e8f1fc;
  font-size:15px;
  font-weight:600;
  line-height:1.65;
}
.tfk-hl{color:#efc65c;font-weight:700}

/* --- gauge cards --- */
.tfk-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.tfk-cards[hidden]{display:none}
.tfk-card{
  border-radius:12px;
  padding:16px 14px 14px;
  background:#0f2140;
  border:1px solid rgba(147,183,229,.12);
}
.tfk-jp{border-color:rgba(232,184,75,.38)}
.tfk-wd{border-color:rgba(94,196,245,.34)}
.tfk-card-h{display:flex;align-items:center;gap:8px;min-height:20px}
.tfk-card-t{
  color:#c7d8ee;font-weight:600;font-size:12px;
  letter-spacing:.09em;text-transform:uppercase;line-height:1.4;text-align:left;
}
html[lang="en"] .tfk-word{font-size:14px;letter-spacing:.08em;margin-right:-.08em}
/* The EN level word is wide: the centre stack sits lower in the
   bowl so the word clears the arc at both ends. */
html[lang="en"] .tfk-center{top:37%}
.tfk-flag{
  width:22px;height:16px;border-radius:3px;background:#f4f7fb;position:relative;flex:none;
  box-shadow:0 0 0 1px rgba(255,255,255,.18);
}
.tfk-flag::after{
  content:"";position:absolute;left:50%;top:50%;width:7.5px;height:7.5px;border-radius:50%;
  background:#d93a3a;transform:translate(-50%,-50%);
}
.tfk-globe{width:19px;height:19px;flex:none;color:#7fb8e8}

.tfk-main{display:flex;flex-direction:column;margin-top:12px}
.tfk-gauge{position:relative;width:100%;max-width:168px;margin:0 auto}
.tfk-gauge svg{display:block;width:100%;height:auto}
.tfk-center{
  position:absolute;left:0;right:0;top:33%;
  display:flex;flex-direction:column;align-items:center;gap:2px;
  pointer-events:none;text-align:center;
}
.tfk-word{font-weight:700;font-size:16px;line-height:1.3;letter-spacing:.14em;margin-right:-.14em}
.tfk-numrow{display:flex;align-items:baseline;gap:5px;line-height:1}
.tfk-num{font-weight:700;font-size:34px;line-height:1;color:#fff;font-variant-numeric:tabular-nums}
.tfk-of{font-weight:500;font-size:13px;color:#8499b5;font-variant-numeric:tabular-nums}

.tfk-trend{
  display:flex;align-items:baseline;justify-content:space-between;gap:8px;
  margin-top:12px;padding-top:11px;border-top:1px solid rgba(147,183,229,.10);
}
.tfk-trend[hidden]{display:none}
.tfk-trend-lab{font-size:11px;color:#8499b5;letter-spacing:.06em;line-height:1.4}
.tfk-trend-val{font-weight:600;font-size:12.5px;line-height:1.4;white-space:nowrap}
.tfk-up{color:#e8934a}
.tfk-down{color:#3ecf8e}
.tfk-flat{color:#a9bed8}

/* --- confirmation time --- */
.tfk-time{
  display:flex;align-items:flex-start;gap:7px;
  margin:14px 0 0;color:#93a9c6;font-size:12.5px;line-height:1.5;
}
.tfk-time[hidden]{display:none}
.tfk-time svg{width:14px;height:14px;flex:none;color:#6e87a8;margin-top:2px}

/* --- quick-link chips --- */
.tfk-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.tfk-chip{
  display:inline-flex;align-items:center;gap:7px;
  padding:7px 12px;border:1px solid rgba(147,183,229,.20);border-radius:999px;
  color:#b9cfea;font-size:12.5px;font-weight:500;line-height:1.35;text-decoration:none;
}
.tfk-chip svg{width:14px;height:14px;flex:none;color:#7fb8e8}
.tfk-chip:hover{background:rgba(147,183,229,.08);border-color:rgba(147,183,229,.38);color:#e8f1fc}

/* --- CTA --- */
.tfk-cta{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin-top:16px;padding:13px 20px;border-radius:999px;
  background:linear-gradient(180deg,#0c6cb4,#095b9e);
  color:#fff;font-weight:600;font-size:15px;letter-spacing:.02em;text-decoration:none;
}
.tfk-cta:hover{filter:brightness(1.08)}
.tfk-cta-arrow{font-weight:400}

/* Narrow phones: the two cards stay side by side (as in the owner's
   reference); paddings tighten one step, the gauge type steps down
   with the card width. */
@media (max-width:560px){
  .tfk-panel{padding:18px 16px 20px}
  .tfk-card{padding:14px 10px 12px}
  .tfk-card-h{gap:6px}
  .tfk-flag{width:20px;height:14px}
  .tfk-globe{width:17px;height:17px}
  .tfk-card-t{font-size:11.5px;letter-spacing:.06em}
  .tfk-word{font-size:15px}
  .tfk-num{font-size:30px}
  .tfk-center{top:31%}
  .tfk-cta{font-size:14.5px}
  /* EN card titles are long ("JAPAN THREAT LEVEL"): stack the mark
     above the title so the title gets the card's full width and
     stays on one line at phone widths. */
  html[lang="en"] .tfk-card-h{flex-direction:column;align-items:flex-start;gap:6px}
  html[lang="en"] .tfk-card-t{font-size:11px;letter-spacing:.03em}
  html[lang="en"] .tfk-word{font-size:12.5px;letter-spacing:.04em;margin-right:-.04em}
  html[lang="en"] .tfk-center{top:38%}
}
