/* policy area styles (owned by the policy builder). Use app.css tokens; keep the restrained house style. */

/* ---------------------------------------------------------------- meter */
.pol-meter { display: inline-flex; align-items: center; width: 64px; flex: none; }
.pol-meter.wide { width: 100%; }
.pol-meter .track { position: relative; display: block; width: 100%; height: 6px; border-radius: 99px; background: var(--surface-3); }
.pol-meter.wide .track { height: 8px; }
.pol-meter .track > i { display: block; height: 100%; border-radius: inherit; background: var(--ink-2); transform-origin: left; animation: polFill .42s var(--ease) both; }
.pol-meter .track > b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.pol-meter .track > b.warnline { background: var(--line-2); width: 1px; }
.pol-meter.lv-ok .track > i { background: var(--ink-2); }
.pol-meter.lv-warning .track > i { background: var(--warn); }
.pol-meter.lv-below .track > i { background: var(--bad); }
.pol-meter.lv-early .track > i { background: var(--line-2); }
.pol-meter.none .track { background: var(--surface-2); }
@keyframes polFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pol-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pol-cell .num { min-width: 42px; font-weight: 550; }
.pol-bad { color: var(--bad); }
.pol-warn { color: var(--warn); }
.pol-scale { position: relative; height: 16px; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.pol-scale span { position: absolute; top: 0; }
.pol-scale span:first-child { left: 0; }
.pol-scale span:last-child { right: 0; }
.pol-scale span[style] { transform: translateX(-50%); color: var(--ink-2); font-weight: 550; }

/* ---------------------------------------------------------- maths panel */
.pol-panel { display: flex; flex-direction: column; gap: 10px; }
.pol-big { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pol-big > div { display: flex; flex-direction: column; gap: 2px; }
.pol-pct { font: 650 34px/1.05 var(--font-display, var(--font-ui)); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pol-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin: 4px 0 0; }
.pol-counts > div { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--surface); }
.pol-counts dt { font-size: 11.5px; color: var(--ink-3); }
.pol-counts dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.pol-outlook { font-size: 14px; color: var(--ink); }
.pol-formula { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pol-formula p { margin: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pol-formula p > span:first-child { display: inline-block; min-width: 86px; font-weight: 600; }
.pol-formula ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.pol-days { max-height: 340px; overflow: auto; }
.pol-days td, .pol-days th { white-space: nowrap; }

/* ----------------------------------------------------- student home card */
.pol-home-grid { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(200px, 1fr) minmax(220px, 1.3fr); gap: 20px; align-items: center; }
.pol-home-figure { display: flex; flex-direction: column; gap: 6px; }
.pol-home .pol-counts { margin: 0; }
.pol-home-msg .callout { margin: 0; }
.pol-home-below { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.pol-home-warning { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.pol-home .link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
@media (max-width: 900px) { .pol-home-grid { grid-template-columns: 1fr; gap: 14px; } }
.pol-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pol-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); vertical-align: middle; margin-left: 4px; }

/* -------------------------------------------------------- announcements */
.pol-compose .seg { flex-wrap: wrap; }
.pol-centres { max-height: 220px; margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.pol-two { gap: 12px; }
.pol-target { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 30px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.pol-target-chip { max-width: 100%; white-space: normal; text-align: left; line-height: 1.35; height: auto; padding-top: 3px; padding-bottom: 3px; }
.pol-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pol-filters .input { width: auto; min-width: 0; max-width: 100%; flex: 0 1 190px; }
.pol-filters .pol-search { flex: 1 1 180px; min-width: 150px; }
.pol-filters .pol-search .input { width: 100%; flex: 1; }
.pol-ann { padding: 16px 18px; }
.pol-ann.pinned { border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--ink); }
.pol-ann.expired { opacity: .72; }
.pol-ann-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pol-ann h3 { font-size: 15.5px; margin: 8px 0 2px; overflow-wrap: anywhere; }
.pol-ann-body { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.pol-ann-actions { flex: none; }
.pol-reads { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pol-ann { position: relative; }
.pol-flash::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--ink); opacity: 0; pointer-events: none; animation: polFlash 1.6s var(--ease) 1; }
@keyframes polFlash { 0% { opacity: 0; } 25% { opacity: .55; } 100% { opacity: 0; } }
.pol-ann-li .main b { display: block; }

/* -------------------------------------------------------- upload rules */
.pol-narrow { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin: 0; min-width: 0; }
.pol-narrow legend { padding: 0 6px; }
.pol-types { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: 260px; }
.pol-filter-label { font-size: 12px; color: var(--ink-3); }

/* --------------------------------------------------------- staff lists */
.cg-kpis-9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cg-kpis-9 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cg-kpis-9 > :last-child:nth-child(odd) { grid-column: span 2; } }
.pol-elig { display: block; margin-top: 3px; white-space: normal; font-size: 11.5px; line-height: 1.3; }
.pol-elig.bad { color: var(--bad); }
.cg-cov th.pol-col, .cg-cov td.pol-col { box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--ink) 5%, transparent); }

@media (prefers-reduced-motion: reduce) { .pol-meter .track > i, .pol-flash::after { animation: none; } }
