@import url(/fonts/fonts.css);

/* Fortinet brand palette (as used in the Fortinet integration map): Fortinet Red, black, greys. */
:root {
  --ink: #1A1A1A;          /* Fortinet black */
  --ink-2: #5C5C5C;
  --ink-3: #8A8A8A;
  --paper: #F5F5F5;
  --sheet: #FFFFFF;
  --rule: #D9D9D9;
  --rule-2: #EBEBEB;
  --red: #DA291C;          /* Fortinet Red: the clock, live state, primary actions */
  --red-d: #A81E13;
  --red-ink: #FFFFFF;
  --hivis: #C77A0E;        /* amber: disputes only */
  --hivis-ink: #FFFFFF;
  --green: #2E9E5B;        /* points earned */
  --green-soft: #E7F4EC;
  --red-soft: #FBEAE8;
  --focus: #0E67C7;
  --seg-a: #1A1A1A;
  --seg-b: #464646;        /* Fortinet icon grey */

  --f-ui: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-brief: 'Source Serif 4', Georgia, serif;
  --r-s: 3px;
  --r-m: 6px;
  color-scheme: light;
}

/* Always white: Fortinet material is white-first and the official icons are drawn for white. */

/* One fluid scale: a 1366×768 laptop gets ~15px, 1920×1080 ~20px, big screens cap at 24px.
   Everything is sized in rem, so the whole layout grows with the screen. */
html { font-size: clamp(13px, calc(0.5vw + 0.55vh + 4px), 24px); -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-ui); font-size: 1rem; line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 2.5rem; padding: 0 1rem; border-radius: var(--r-s);
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.btn-primary:hover:not(:disabled) { background: var(--red-d); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); }
.btn-quiet { border-color: transparent; }
.btn-sm { min-height: 2rem; padding: 0 .65rem; font-size: .875rem; }
.btn-big { min-height: 3.25rem; padding: 0 1.5rem; font-size: 1.0625rem; }

/* ---------- forms ---------- */
.field { display: grid; gap: .25rem; }
.field > span { font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.input, textarea.input, select.input {
  width: 100%; min-height: 2.5rem; padding: .45rem .65rem; border-radius: var(--r-s);
  border: 1.5px solid var(--rule); background: var(--sheet);
}
.input:focus { border-color: var(--ink); outline: none; }
textarea.input { min-height: 5rem; resize: vertical; line-height: 1.5; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--red); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: .65rem 1rem; border-radius: var(--r-m);
  font-weight: 600; z-index: 100; max-width: calc(100% - 2rem);
}
.toast.error { background: var(--red); color: #fff; }

/* ---------- the four-step round tracker (shared by every screen) ---------- */
.steps { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: .5rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.steps li + li::before { content: ''; width: clamp(.75rem, 2vw, 2.5rem); height: 2px; background: var(--rule); margin: 0 .6rem; }
.steps .n {
  width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--rule); font-stretch: 72%; font-weight: 800; font-size: .9375rem;
}
.steps li.done { color: var(--ink-2); }
.steps li.done .n { background: var(--ink-2); border-color: var(--ink-2); color: var(--paper); }
.steps li.done + li::before, .steps li.now::before { background: var(--ink-2); }
.steps li.now { color: var(--ink); }
.steps li.now .n { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.steps li.now.live .n { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 25%, transparent); }

/* ---------- budget tape ---------- */
.tape { display: grid; gap: .45rem; }
.tape-readout { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.tape-left { font-stretch: 62%; font-weight: 850; font-size: 3.5rem; line-height: .88; letter-spacing: -.01em; }
.tape-left small { font-size: .36em; font-weight: 600; font-stretch: 85%; color: var(--ink-2); letter-spacing: 0; margin-left: .3em; }
.tape-spent { text-align: right; font-size: .875rem; color: var(--ink-2); }
.tape-spent b { color: var(--ink); }
.tape-bar {
  display: flex; height: 2.25rem; border: 1.5px solid var(--ink); border-radius: var(--r-s); overflow: hidden;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--rule-2) calc(10% - 1px) 10%);
}
.tape-seg {
  display: flex; align-items: center; justify-content: center; min-width: 0;
  background: var(--seg-a); color: var(--paper); font-stretch: 62%; font-weight: 700; font-size: .75rem;
  border-right: 1.5px solid var(--sheet); overflow: hidden; white-space: nowrap; padding: 0 2px;
}
.tape-seg:nth-child(even) { background: var(--seg-b); }
.tape-seg.flash { animation: segIn .35s ease-out; }
@keyframes segIn { from { filter: brightness(1.8); } to { filter: none; } }

/* ---------- product icon: official Fortinet artwork, light and dark variants ---------- */
.ico { display: inline-grid; flex: none; width: 2rem; height: 2rem; }
.ico img { width: 100%; height: 100%; grid-area: 1 / 1; }
.ico .on-dark { display: none; }

/* ---------- tables ---------- */
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
table.grid th { font-size: .8125rem; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--rule); }
table.grid td.r, table.grid th.r { text-align: right; }

.code {
  display: inline-flex; align-items: center; justify-content: center; min-width: 3.4rem; height: 1.5rem; padding: 0 .35rem;
  border-radius: var(--r-s); background: var(--ink); color: var(--paper);
  font-stretch: 62%; font-weight: 750; font-size: .8125rem; letter-spacing: .02em;
}
.pts { font-weight: 700; color: var(--green); }
.pts.zero { color: var(--ink-3); font-weight: 500; }
.pts.neg { color: var(--red); }

.flag { display: inline-block; padding: .05rem .5rem; border-radius: 99px; font-size: .8125rem; font-weight: 600; }
.flag-ok { background: var(--green-soft); color: var(--green); }
.flag-wait { background: var(--rule-2); color: var(--ink-2); }
.flag-hivis { background: var(--hivis); color: var(--hivis-ink); }
.flag-red { background: var(--red-soft); color: var(--red); }

.clock { font-stretch: 62%; font-weight: 850; line-height: .9; letter-spacing: .01em; }
.clock.warn { color: var(--red); }
.clock.paused { opacity: .5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* room colour swatch (Red, Yellow, ...) */
.sw { display: inline-block; width: .8em; height: .8em; border-radius: 50%; vertical-align: baseline; margin-right: .4em; flex: none; }
