/* Pinpoint — Daily Performance Board
   Ported 1:1 from the Claude Design source "Notice Board.dc.html".
   Board is a fixed 1080x1920 signage canvas; .board-fit scales it to the screen. */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #080e26;
  font-family: 'Hanken Grotesk', sans-serif;
  overflow: hidden;
}
ul { margin: 0; padding: 0; list-style: none; }
li { list-style: none; }

@keyframes ppPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes ppSheen { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* Fit the fixed board to the viewport (scale set by js/notice.js) */
.board-fit {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.board {
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  font-family: 'Hanken Grotesk', sans-serif;
  background:
    radial-gradient(1200px 900px at 50% -220px, rgba(255,81,0,0.16), rgba(255,81,0,0) 60%),
    radial-gradient(900px 900px at 100% 100%, rgba(23,42,120,0.55), rgba(11,20,54,0) 65%),
    linear-gradient(180deg, #0c1533 0%, #0a1230 60%, #080e26 100%);
  color: #eaf0ff;
  padding: 56px 56px 48px 56px;
  display: flex;
  flex-direction: column;
  transform-origin: center center;
}

/* faint grid texture */
.board-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(1000px 1000px at 50% 30%, #000 40%, transparent 85%);
  mask-image: radial-gradient(1000px 1000px at 50% 30%, #000 40%, transparent 85%);
  pointer-events: none;
}

/* HEADER */
.pp-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pp-logo { height: 58px; display: block; }
.pp-tagline { text-align: right; line-height: 1.1; }
.pp-tagline-main {
  font-size: 22px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #ffffff;
}
.pp-tm { color: #FF5100; }
.pp-tagline-sub {
  font-size: 17px; font-weight: 500; letter-spacing: 0.06em;
  color: #8ea0cf; margin-top: 4px;
}

/* TITLE STRIP */
.pp-titlestrip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 34px 0 26px 0;
}
.pp-live { display: flex; align-items: center; gap: 12px; }
.pp-live-dot {
  width: 13px; height: 13px; border-radius: 50%; background: #FF5100;
  box-shadow: 0 0 0 5px rgba(255,81,0,0.22);
  animation: ppPulse 1.8s ease-in-out infinite;
  display: inline-block;
}
.pp-live-label {
  font-size: 20px; font-weight: 700; letter-spacing: 0.22em;
  color: #FF5100; text-transform: uppercase;
}
.pp-title {
  margin: 0; font-size: 40px; font-weight: 800; letter-spacing: 0.02em;
  text-transform: uppercase; color: #ffffff;
}
.pp-title-rule {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.28), rgba(255,255,255,0));
}

/* HERO: Monthly Target */
.pp-hero {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), 0 24px 60px rgba(0,0,0,0.35);
  padding: 34px 40px 38px 40px;
  overflow: hidden;
}
.pp-hero-glow {
  position: absolute; right: -60px; top: -80px; width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,81,0,0.22), rgba(255,81,0,0) 70%);
}
.pp-hero-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.pp-hero-label {
  font-size: 22px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: #8ea0cf;
}
.pp-hero-figure { display: flex; align-items: flex-end; gap: 14px; line-height: 0.85; }
.pp-hero-pct {
  font-size: 96px; font-weight: 800; color: #FF5100;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 32px rgba(255,81,0,0.45);
}
.pp-hero-togoal {
  font-size: 22px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #8ea0cf; padding-bottom: 12px;
}
.pp-hero-track {
  position: relative; margin-top: 30px; height: 26px; border-radius: 999px;
  background: rgba(0,0,0,0.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
}
.pp-hero-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF5100, #ff8a4c);
  box-shadow: 0 0 24px rgba(255,81,0,0.6);
}
.pp-hero-sheenwrap { position: absolute; inset: 0; overflow: hidden; border-radius: 999px; }
.pp-hero-sheen {
  position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.5), rgba(255,255,255,0));
  animation: ppSheen 2.8s ease-in-out infinite;
}

/* GRID: 8 stat tiles */
.pp-grid {
  position: relative;
  flex: 1;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* First 3 rows share the space equally; the last row (Orders Raised /
     Despatches) hugs its content since those rarely exceed ~3 entries. */
  grid-template-rows: repeat(3, 1fr) auto;
  gap: 22px;
}
.pp-tile {
  position: relative;
  background: rgba(255,255,255,0.035);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  padding: 22px 24px 20px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pp-tile-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pp-tile-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(255,81,0,0.14);
  box-shadow: inset 0 0 0 1px rgba(255,81,0,0.35);
  display: flex; align-items: center; justify-content: center;
  color: #FF7a3c; flex-shrink: 0;
}
.pp-tile-icon svg { display: flex; width: 22px; height: 22px; }
.pp-tile-title {
  font-size: 27px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: #ffffff;
}
.pp-tile-unit {
  margin-left: auto; font-size: 16px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: #6f80ad;
}
.pp-tile-rows { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pp-row { display: flex; align-items: center; gap: 14px; padding: 5px 0; }
.pp-rank {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: #8ea0cf;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pp-rank.is-top {
  background: transparent; color: transparent;
  box-shadow: inset 0 0 0 4px #FFFFFF, 0 0 0 4px rgba(255,255,255,0.22);
  font-size: 0; position: relative;
}
.pp-rank-dot { width: 8px; height: 8px; border-radius: 50%; background: #FFFFFF; }
.pp-name {
  flex: 1; min-width: 0;
  font-size: 28px; font-weight: 600; color: #dfe6fb;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-value {
  font-size: 28px; font-weight: 800; color: #FF7a3c;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.pp-row-empty .pp-name { color: #6f80ad; font-weight: 500; }

/* ==========================================================================
   MOBILE ( <= 768px )
   The 1080x1920 signage canvas doesn't belong on a phone — scaled down it's
   tiny and gets clipped. Here we drop the fixed size and the JS scale transform
   entirely and re-flow the board into a fluid, single-column layout that fills
   the screen and scrolls vertically. Everything reads at a comfortable size.
   ========================================================================== */
@media (max-width: 768px) {
  body { overflow-x: hidden; overflow-y: auto; }

  /* Let the page flow and scroll instead of a centred fixed stage */
  .board-fit {
    position: static;
    inset: auto;
    display: block;
    overflow: visible;
  }

  .board {
    width: 100%;
    height: auto;
    min-height: 100vh;
    transform: none !important;          /* override the JS scale() */
    padding: 22px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    background:
      radial-gradient(600px 500px at 50% -160px, rgba(255,81,0,0.18), rgba(255,81,0,0) 60%),
      radial-gradient(700px 700px at 100% 100%, rgba(23,42,120,0.55), rgba(11,20,54,0) 65%),
      linear-gradient(180deg, #0c1533 0%, #0a1230 60%, #080e26 100%);
  }

  .board-grid { background-size: 34px 34px; }

  /* HEADER */
  .pp-header { gap: 12px; }
  .pp-logo { height: 34px; }
  .pp-tagline-main { font-size: 12px; letter-spacing: 0.1em; }
  .pp-tagline-sub { font-size: 10px; margin-top: 2px; }

  /* TITLE STRIP */
  .pp-titlestrip {
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 20px 0 16px 0;
  }
  .pp-live { gap: 8px; }
  .pp-live-dot { width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(255,81,0,0.22); }
  .pp-live-label { font-size: 13px; letter-spacing: 0.18em; }
  .pp-title { font-size: 23px; width: 100%; order: 3; }
  .pp-title-rule { display: none; }

  /* HERO */
  .pp-hero {
    border-radius: 16px;
    padding: 18px 18px 20px 18px;
  }
  .pp-hero-glow { width: 200px; height: 200px; right: -40px; top: -50px; }
  .pp-hero-label { font-size: 13px; letter-spacing: 0.14em; }
  .pp-hero-figure { gap: 8px; }
  .pp-hero-pct { font-size: 52px; text-shadow: 0 0 20px rgba(255,81,0,0.45); }
  .pp-hero-togoal { font-size: 13px; padding-bottom: 7px; }
  .pp-hero-track { margin-top: 18px; height: 16px; }

  /* GRID -> single column */
  .pp-grid {
    margin-top: 16px;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 12px;
  }

  .pp-tile { border-radius: 14px; padding: 16px 16px 14px 16px; }
  .pp-tile-head { gap: 10px; padding-bottom: 12px; margin-bottom: 10px; }
  .pp-tile-icon { width: 34px; height: 34px; border-radius: 9px; }
  .pp-tile-icon svg { width: 19px; height: 19px; }
  .pp-tile-title { font-size: 18px; letter-spacing: 0.04em; }
  .pp-tile-unit { font-size: 12px; }

  .pp-row { gap: 12px; padding: 6px 0; }
  .pp-rank { width: 23px; height: 23px; font-size: 14px; }
  .pp-rank.is-top { box-shadow: inset 0 0 0 3px #FFFFFF, 0 0 0 3px rgba(255,255,255,0.22); }
  .pp-rank-dot { width: 7px; height: 7px; }
  .pp-name { font-size: 18px; }
  .pp-value { font-size: 18px; }
}

/* Very small phones — trim a touch more so nothing crowds the edges. */
@media (max-width: 360px) {
  .pp-hero-pct { font-size: 44px; }
  .pp-title { font-size: 20px; }
  .pp-tile-title { font-size: 16px; }
  .pp-name, .pp-value { font-size: 16px; }
}
