/* ==========================================================================
   Pling: team chat as an occupational hazard. A site safety board: safety
   yellow, sign black, the standard sign family, hazard stripes as borders.
   ========================================================================== */

:root {
  --yellow: #ffd100;
  --ink: #141414;
  --paper: #f4f1e8;
  --white: #ffffff;
  --text-2: #4a463d;          /* 8.1:1 on paper */
  --on-yellow-2: #3b3300;     /* 9.6:1 on yellow */
  --on-ink-2: #cfcabb;        /* 11:1 on ink */
  --red: #d42a20;
  --blue: #1f5fae;
  --green: #0f8a4b;
  --line: #141414;
  --font: "Archivo", "Arial Narrow", sans-serif;
  --stripes: repeating-linear-gradient(-45deg, var(--ink) 0 16px, var(--yellow) 16px 32px);
  --lift: 0 8px 18px -8px rgb(0 0 0 / .45);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.5 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
::selection { background: var(--yellow); color: var(--ink); }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
svg { display: block; }

/* Signage lettering */
h1, h2, h3, .brand, .btn, .board-num, .verdict-num, .verdict-band, .tag-band, .tag-dnd, .plan-band, .price {
  font-stretch: 68%; font-weight: 900; text-transform: uppercase; letter-spacing: .005em; line-height: .95;
}
h2 { font-size: clamp(2.6rem, 7vw, 5rem); text-wrap: balance; }
.sub { margin-top: 1rem; max-width: 42rem; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.45; color: var(--text-2); }
section { padding: clamp(4rem, 9vw, 6.5rem) 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: 0 1.4rem;
  border: 3px solid var(--ink); font-size: 1.15rem; text-decoration: none; background: transparent;
  transition: translate .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s;
}
.btn:hover { translate: 0 -2px; box-shadow: var(--lift); }
.btn:active { translate: 0 0; box-shadow: none; }
.btn-dark { background: var(--ink); color: var(--yellow); }
.btn-line { color: var(--ink); }
.btn-small { min-height: 2.5rem; padding: 0 1rem; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.status-line { margin-top: 1rem; min-height: 1.5em; font-weight: 600; }

/* ---------- Parody bar + hero ---------- */
.parody { background: var(--ink); color: var(--yellow); text-align: center; font-size: .88rem; font-weight: 600; padding: .55rem 1rem; }
.hero { background: var(--yellow); position: relative; padding-bottom: 16px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 16px; background: var(--stripes); }
.hero-in { width: min(100% - 2.5rem, 72rem); margin-inline: auto; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem); }
.hero-sign svg { width: 100%; max-width: 24rem; margin-inline: auto; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .22)); }
.brand { font-size: 1.6rem; letter-spacing: .06em; }
.hero h1 { margin-top: .6rem; font-size: clamp(3.2rem, 9vw, 6rem); line-height: .9; text-wrap: balance; }
.lede { margin-top: 1.25rem; max-width: 34rem; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.4; color: var(--on-yellow-2); font-weight: 500; }
@media (max-width: 48rem) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-sign svg { max-width: 9rem; margin: 0; }
}

.board {
  width: min(100% - 2.5rem, 72rem); margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); background: var(--white); border: 4px solid var(--ink);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; padding: 1rem 1.25rem; text-align: center;
  font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.3rem); box-shadow: var(--lift);
}
.board-num { min-width: 4.5ch; padding: .15rem .5rem; background: var(--green); color: var(--white); font-size: clamp(2.2rem, 5vw, 3rem); font-variant-numeric: tabular-nums; transition: background-color .6s; }
.board-num.reset { background: var(--red); transition: none; }
.board-last { flex-basis: 100%; font-weight: 500; font-size: .92rem; color: var(--text-2); }

/* ---------- Hazard signs ---------- */
.signs { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem); }
.sign { display: grid; align-content: start; justify-items: start; gap: 1rem; }
.sign svg { width: 7.5rem; height: 7.5rem; }
.plate { width: 100%; border: 3px solid var(--ink); background: var(--white); padding: .8rem .9rem 1rem; }
.plate h3 { font-size: 1.45rem; }
.plate p { margin-top: .45rem; font-size: .98rem; line-height: 1.4; color: var(--text-2); }
@media (max-width: 60rem) { .signs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .signs { grid-template-columns: minmax(0, 1fr); } .sign { grid-template-columns: 5rem 1fr; align-items: start; } .sign svg { width: 5rem; height: 5rem; } }

/* ---------- Training ---------- */
.training { background: var(--ink); color: var(--white); position: relative; padding-top: calc(clamp(4rem, 9vw, 6.5rem) + 16px); }
.stripe { position: absolute; inset: 0 0 auto; height: 16px; background: var(--stripes); }
.training .sub { color: var(--on-ink-2); }
.training :focus-visible { outline-color: var(--yellow); }
.training .btn-dark { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.training .btn-line { border-color: var(--white); color: var(--white); }
.drill { margin-top: clamp(2rem, 5vw, 3rem); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; }
.task { position: relative; background: var(--paper); color: var(--ink); padding: 1.25rem; display: grid; gap: 1rem; align-content: start; }
.task-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; font-weight: 700; }
.task-time { font-variant-numeric: tabular-nums; }
.drill[data-state="running"] .task-time { color: var(--red); }
textarea { width: 100%; resize: vertical; min-height: 13rem; padding: .9rem 1rem; border: 3px solid var(--ink); background: var(--white); line-height: 1.55; caret-color: var(--red); }
textarea:focus { outline: none; border-color: var(--blue); }
textarea::placeholder { color: #6b675c; }
textarea:disabled { background: #ebe7da; }
.task-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.task .btn-line { border-color: var(--ink); color: var(--ink); }
.task .btn-dark { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.count { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.huddle { position: absolute; inset: auto 1rem 1rem; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); padding: 1rem; display: grid; gap: .8rem; box-shadow: 0 18px 30px -12px rgb(0 0 0 / .55); }
.huddle p { font-weight: 700; }
.huddle div { display: flex; gap: .6rem; }

.feed { background: #1f1f1d; border: 1px solid #34342f; display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.feed-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid #34342f; font-weight: 700; }
.unread { border: 0; background: var(--red); color: var(--white); font-weight: 700; font-size: .85rem; padding: .3rem .7rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.unread:hover { filter: brightness(1.1); }
.msgs { height: 26rem; overflow-y: auto; padding: .5rem 0; scrollbar-color: #55554d #1f1f1d; }
.msgs-empty { padding: 1rem; color: var(--on-ink-2); }
.msg { display: grid; grid-template-columns: 2.2rem 1fr; gap: .7rem; padding: .55rem 1rem; animation: arrive .45s cubic-bezier(.16, 1, .3, 1); }
.msg.mention { background: rgb(255 209 0 / .13); }
.av { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--c); color: var(--white); font-weight: 800; border-radius: 6px; }
.bot .av { border-radius: 50%; }
.who { font-weight: 700; font-size: .92rem; }
.who time { font-weight: 400; color: #a9a597; margin-left: .35rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.txt { color: #ecebe4; line-height: 1.4; overflow-wrap: anywhere; }
@keyframes arrive { from { opacity: 0; translate: 0 10px; } }
@media (max-width: 56rem) { .drill { grid-template-columns: minmax(0, 1fr); } .msgs { height: 18rem; } }

.report { margin-top: 1.25rem; background: var(--yellow); color: var(--ink); border: 4px solid var(--ink); padding: clamp(1.25rem, 3vw, 2rem); outline: none; }
.report h3 { font-size: clamp(2rem, 4vw, 2.8rem); }
.report dl { margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 0 2rem; }
.report dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 2px solid var(--ink); }
.report dt { color: var(--on-yellow-2); }
.report dd { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.report .note { margin-top: 1.1rem; max-width: 60ch; font-size: 1.1rem; font-weight: 600; }
.report .btn { margin-top: 1.25rem; }
.report .btn-dark { background: var(--ink); color: var(--yellow); border-color: var(--ink); }

/* ---------- Cost ---------- */
.cost-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.sliders { margin-top: 2rem; display: grid; gap: .5rem; }
.sliders label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; margin-top: .9rem; }
.sliders output { font-weight: 800; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 2.4rem; margin: 0; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 6px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 1.5rem; height: 1.5rem; margin-top: calc(3px - .75rem); background: var(--yellow); border: 3px solid var(--ink); }
input[type="range"]::-moz-range-thumb { width: 1.5rem; height: 1.5rem; background: var(--yellow); border: 3px solid var(--ink); border-radius: 0; }
.fine { margin-top: 1.5rem; font-size: .9rem; color: var(--text-2); max-width: 55ch; }
.verdict { background: var(--white); border: 4px solid var(--ink); text-align: center; box-shadow: var(--lift); }
.verdict-band { padding: .6rem; font-size: 2rem; letter-spacing: .08em; background: var(--red); color: var(--white); transition: background-color .3s, color .3s; }
.verdict[data-sign="warning"] .verdict-band { background: var(--yellow); color: var(--ink); }
.verdict[data-sign="safe"] .verdict-band { background: var(--green); }
.verdict-lead { font-weight: 600; font-size: 1.1rem; }
.verdict-lead:first-of-type { margin-top: 1.5rem; }
.verdict-num { font-size: clamp(3.5rem, 9vw, 5.5rem); margin: .3rem 0 .2rem; font-variant-numeric: tabular-nums; }
.verdict-more { margin: 1rem auto 1.75rem; max-width: 30ch; color: var(--text-2); text-wrap: balance; padding-inline: 1rem; }
@media (max-width: 52rem) { .cost-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Lockout tag ---------- */
.tagout { background: var(--yellow); }
.tagout .sub { color: var(--on-yellow-2); }
.field { display: grid; gap: .4rem; margin-top: 2rem; font-weight: 700; max-width: 22rem; }
.field input { min-height: 3rem; padding: 0 .9rem; border: 3px solid var(--ink); background: var(--white); font-weight: 500; }
.field input:focus { outline: none; border-color: var(--blue); }
.tag-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.tag {
  justify-self: center; width: min(100%, 19rem); position: relative; transform-origin: 50% 1.6rem;
  background: var(--white); border-radius: 22px 22px 6px 6px; padding: 3.4rem 0 1.5rem; text-align: center;
  box-shadow: 0 22px 34px -16px rgb(0 0 0 / .5);
}
.tag-hole { position: absolute; top: 1rem; left: 50%; width: 1.3rem; height: 1.3rem; translate: -50% 0; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 4px #b9b9b9; }
.tag-band { margin: 0 0 1.25rem; padding: .55rem 0; background: var(--ink); font-size: 1.9rem; letter-spacing: .12em; color: var(--white); }
.tag-band::before { content: ""; }
.tag-dnd { font-size: 2.4rem; padding-inline: 1rem; }
.tag-status { margin: 1rem 1.25rem 0; min-height: 3.2em; font-size: 1.25rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.tag-meta { margin: 1.25rem 1.25rem 0; display: grid; gap: .5rem; text-align: left; }
.tag-meta div { border-top: 2px solid var(--ink); padding-top: .35rem; }
.tag-meta dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.tag-meta dd { font-weight: 600; }
@media (max-width: 52rem) { .tag-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Plans ---------- */
.plan-row { margin-top: clamp(2rem, 5vw, 3rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.plan { border: 4px solid var(--ink); background: var(--white); }
.plan-band { padding: .55rem 1rem; font-size: 1.6rem; letter-spacing: .1em; }
.plan-safe .plan-band { background: var(--green); color: var(--white); }
.plan-warning .plan-band { background: var(--yellow); }
.plan-danger .plan-band { background: var(--red); color: var(--white); }
.plan-warning { translate: 0 -.75rem; box-shadow: var(--lift); }
.plan-body { padding: 1.25rem; display: grid; gap: 1rem; }
.plan h3 { font-size: 2.2rem; }
.price { font-size: 2rem; }
.price span { display: block; margin-top: .3rem; font: 500 .92rem/1.3 var(--font); font-stretch: 100%; text-transform: none; color: var(--text-2); }
.plan ul { display: grid; gap: .6rem; }
.plan li { position: relative; padding-left: 1.2rem; line-height: 1.4; }
.plan li::before { content: ""; position: absolute; left: 0; top: .5em; width: .55rem; height: .55rem; background: var(--ink); }
@media (max-width: 56rem) { .plan-row { grid-template-columns: minmax(0, 1fr); } .plan-warning { translate: none; } }

/* ---------- Quotes ---------- */
.quotes { background: var(--white); }
.quote-list { margin-top: clamp(2rem, 5vw, 3rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.quote-list li { padding: 1.75rem 0; border-top: 4px solid var(--ink); }
.quote-list blockquote { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; font-stretch: 80%; line-height: 1.15; text-wrap: balance; }
.quote-list p { margin-top: .75rem; color: var(--text-2); }
@media (max-width: 44rem) { .quote-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--on-ink-2); padding: 2.75rem 0 3.5rem; font-size: .95rem; }
.foot strong { color: var(--yellow); }
.foot p { max-width: 70ch; }
.foot p + p { margin-top: .8rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
