/* ================================================================
   Agentic Frontier — product UI replicas
   ----------------------------------------------------------------
   The marketing site embeds live HTML replicas of real product
   screens (js/screens/*.js). This sheet is the app's own look: a
   dark ground with a blue cast, hairline cards, one blue, green for
   money. Everything inside an .af-screen reads colour from --pd-*
   only. A screen is designed at exactly 1180px wide and scaled to
   fit by js/site.js (transform), so nothing here is responsive.
   ================================================================ */

.af-screen {
  --pd-bg: #0b0e14;
  --pd-card: #10141c;
  --pd-card-2: #151a23;
  --pd-card-3: #1b2130;
  --pd-line: #1f2530;
  --pd-line-2: #2a3140;
  --pd-ink: #e6e9ef;
  --pd-ink-2: #9aa3b2;
  --pd-ink-3: #6b7384;
  --pd-blue: #4f7ce8;
  --pd-blue-2: #8fb0f5;
  --pd-blue-bg: #14213a;
  --pd-blue-line: #243b6b;
  --pd-green: #5fd38d;
  --pd-green-bg: #0f2a1e;
  --pd-green-line: #1f5a3a;
  --pd-yellow: #f0c65a;
  --pd-yellow-bg: #332b12;
  --pd-yellow-line: #5a4a1e;
  --pd-red: #e5766d;
  --pd-purple: #b8a4f5;
  --pd-pink: #e8a6c8;
  --pd-teal: #4fd1c5;
  --pd-grey: #6b7384;
  --pd-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);

  position: relative;
  width: 1180px;
  padding: 20px;
  background: var(--pd-bg);
  color: var(--pd-ink);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  box-sizing: border-box;
  overflow: hidden;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.af-screen *, .af-screen *::before, .af-screen *::after { box-sizing: border-box; }
.af-screen p, .af-screen h1, .af-screen h2, .af-screen h3, .af-screen ul { margin: 0; }
.af-screen ul { padding: 0; list-style: none; }
.af-screen a { color: var(--pd-blue-2); text-decoration: none; }
.af-screen svg { display: block; overflow: visible; }
.af-screen svg text { font-family: var(--font-body); fill: var(--pd-ink-2); }

/* Cards */
.pd-card { background: var(--pd-card); border: 1px solid var(--pd-line); border-radius: 10px; padding: 16px 18px; }
.pd-card-title { font-size: 15px; font-weight: 600; color: var(--pd-ink); }
.pd-card-sub { font-size: 12.5px; color: var(--pd-ink-2); margin-top: 4px; }
.pd-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pd-row { display: flex; align-items: center; gap: 10px; }
.pd-grid { display: grid; gap: 12px; }
.pd-hr { height: 1px; background: var(--pd-line); border: 0; margin: 0; }

/* Type */
.pd-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-ink-2); }
.pd-stat { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: var(--pd-ink); font-variant-numeric: tabular-nums; }
.pd-stat .unit { font-size: 13px; font-weight: 400; color: var(--pd-ink-2); margin-left: 4px; letter-spacing: 0; }
.pd-num { font-variant-numeric: tabular-nums; }
.pd-mono { font-family: var(--font-mono); }
.pd-green { color: var(--pd-green) !important; }
.pd-blue { color: var(--pd-blue-2) !important; }
.pd-yellow { color: var(--pd-yellow) !important; }
.pd-red { color: var(--pd-red) !important; }
.pd-muted { color: var(--pd-ink-2) !important; }
.pd-dim { color: var(--pd-ink-3) !important; }
.pd-strong { font-weight: 600; color: var(--pd-ink); }
.pd-small { font-size: 11.5px; }

/* Chips, buttons, tabs, inputs */
.pd-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; line-height: 1; white-space: nowrap; border: 1px solid var(--pd-line-2); color: var(--pd-ink-2); background: transparent; }
.pd-chip.blue { background: var(--pd-blue-bg); border-color: var(--pd-blue-line); color: var(--pd-blue-2); }
.pd-chip.green { background: var(--pd-green-bg); border-color: var(--pd-green-line); color: var(--pd-green); }
.pd-chip.yellow { background: var(--pd-yellow-bg); border-color: var(--pd-yellow-line); color: var(--pd-yellow); }
.pd-chip.count { font-family: var(--font-mono); font-size: 10px; height: 16px; padding: 0 6px; background: var(--pd-card-3); border-color: transparent; color: var(--pd-ink-2); }
.pd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 6px; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid var(--pd-line-2); background: var(--pd-card-2); color: var(--pd-ink); cursor: default; }
.pd-btn.primary { background: var(--pd-blue); border-color: var(--pd-blue); color: #ffffff; }
.pd-btn.ghost { background: transparent; }
.pd-btn.sm { height: 24px; padding: 0 9px; font-size: 11.5px; }
.pd-btn[disabled], .pd-btn.disabled { opacity: 0.55; }
.pd-tabs { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--pd-card-2); border: 1px solid var(--pd-line); border-radius: 8px; }
.pd-tab { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 6px; font-size: 12.5px; color: var(--pd-ink-2); white-space: nowrap; }
.pd-tab.active { background: var(--pd-card-3); color: var(--pd-ink); }
.pd-input { display: flex; align-items: center; height: 32px; padding: 0 10px; border: 1px solid var(--pd-line-2); border-radius: 6px; background: var(--pd-bg); color: var(--pd-ink); font-size: 13px; }
.pd-input.placeholder, .pd-input .placeholder { color: var(--pd-ink-3); }
.pd-textarea { min-height: 80px; padding: 9px 10px; align-items: flex-start; line-height: 1.5; white-space: pre-wrap; }
.pd-banner { border-radius: 8px; padding: 12px 16px; font-size: 13px; line-height: 1.5; }
.pd-banner.blue { background: var(--pd-blue-bg); border: 1px solid var(--pd-blue-line); color: var(--pd-blue-2); }
.pd-banner.green { background: var(--pd-green-bg); border: 1px solid var(--pd-green-line); color: var(--pd-ink-2); }
.pd-banner.yellow { background: var(--pd-yellow-bg); border: 1px solid var(--pd-yellow-line); color: var(--pd-yellow); }
.pd-check { display: inline-block; width: 13px; height: 13px; border: 1px solid var(--pd-line-2); border-radius: 3px; vertical-align: -2px; margin-right: 8px; }
.pd-circle { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--pd-line-2); border-radius: 50%; flex: none; }
.pd-caret { display: inline-block; width: 1px; height: 1.1em; background: var(--pd-ink); vertical-align: -2px; margin-left: 1px; animation: pd-blink 1s steps(2, start) infinite; }
@keyframes pd-blink { to { visibility: hidden; } }

/* Tables and bars */
.pd-table { width: 100%; border-collapse: collapse; }
.pd-table th { text-align: left; font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pd-ink-3); padding: 8px 10px; border-bottom: 1px solid var(--pd-line); white-space: nowrap; }
.pd-table td { padding: 12px 10px; border-bottom: 1px solid var(--pd-line); font-size: 13px; vertical-align: middle; }
.pd-table td .sub { display: block; margin-top: 3px; font-size: 11px; color: var(--pd-ink-3); }
.pd-table tr:last-child td { border-bottom: 0; }
.pd-bar { position: relative; height: 6px; border-radius: 3px; background: var(--pd-line-2); overflow: hidden; }
.pd-bar > i { display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--pd-green); transform-origin: left center; transform: scaleX(0); }
.pd-bar.blue > i { background: var(--pd-blue); }
.pd-bar.yellow > i { background: var(--pd-yellow); }
.pd-bar.grey > i { background: var(--pd-grey); }
.pd-bar.tall { height: 12px; border-radius: 4px; }
.pd-bar.tall > i { border-radius: 4px; }

/* Charts */
.pd-grid-line { stroke: var(--pd-line-2); stroke-dasharray: 2 4; }
.pd-axis { stroke: var(--pd-line-2); }
.pd-axis-text { font-size: 11px; fill: var(--pd-ink-3); }
.pd-donut { position: relative; display: inline-block; }
.pd-donut .centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.pd-donut circle.seg { fill: none; transform: rotate(-90deg); transform-origin: 50% 50%; }
.pd-donut circle.track { fill: none; stroke: var(--pd-card-3); }
.pd-ring { position: relative; display: inline-block; }
.pd-ring circle.track { fill: none; stroke: var(--pd-card-3); }
.pd-ring circle.seg { fill: none; transform: rotate(-90deg); transform-origin: 50% 50%; stroke-linecap: round; }
.pd-ring .centre { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pd-spark path { fill: none; stroke: var(--pd-green); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.pd-tooltip { position: absolute; width: 270px; padding: 12px 14px; background: var(--pd-card-2); border: 1px solid var(--pd-line-2); border-radius: 8px; box-shadow: var(--pd-shadow); font-size: 12.5px; line-height: 1.55; }
.pd-tooltip .t { font-weight: 600; color: var(--pd-ink); }

/* Legend rows (donuts, cost anatomy) */
.pd-legend { display: grid; gap: 0; }
.pd-legend > div { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--pd-line); font-size: 12.5px; }
.pd-legend > div:first-child { border-top: 0; }
.pd-legend .name { flex: 1; color: var(--pd-ink); }
.pd-legend .val { color: var(--pd-ink-2); font-variant-numeric: tabular-nums; }
.pd-legend .val b { color: var(--pd-ink); font-weight: 600; }

/* Animation helpers: screens toggle these; the site never does. */
.pd-hidden { opacity: 0; }
.pd-rise { opacity: 0; transform: translateY(10px); }
.pd-rise.in, .pd-hidden.in { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pd-grow > i { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pd-grow.in > i { transform: scaleX(1); }
.pd-pop { transform: scale(0); transform-origin: center; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.pd-pop.in { transform: scale(1); }
