/*
 * Paperbase Status. The dashboard's own colours (dash-paperbase/src/app/globals.css) on white --
 * light only, whatever the device prefers (owner, 2026-10-01) -- Poppins with Noto Sans Bengali for Bangla -- the same files the
 * shop serves -- and the name "Paperbase" alone, no mark, in Instrument Serif as on the
 * dashboard's sign-in pages (PaperbaseWordmark). No script: hover or tap a day's bar for its detail.
 */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/instrument-serif-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/noto-sans-bengali.woff2") format("woff2");
  unicode-range: U+951-952, U+964-965, U+980-9FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}

:root {
  --bg: hsl(0 0% 100%);
  --card: hsl(0 0% 100%);
  --fg: hsl(222 47% 11%);
  --fg-soft: hsl(215 25% 27%);
  --muted: hsl(215 16% 47%);
  --faint: hsl(215 16% 65%);
  --border: hsl(214 32% 91%);
  --border-strong: hsl(214 25% 82%);
  --track: hsl(214 32% 93%);
  --tip-bg: hsl(222 47% 11%);
  --tip-fg: hsl(210 40% 98%);
  --shadow: 0 1px 2px hsl(222 47% 11% / 0.04), 0 6px 20px -10px hsl(222 47% 11% / 0.12);

  /* Each level: its colour, and the darker ink its words are written in on white. */
  --operational: hsl(142 71% 40%);
  --operational-ink: hsl(142 72% 26%);
  --degraded: hsl(43 96% 50%);
  --degraded-ink: hsl(28 80% 30%);
  --partial_outage: hsl(25 95% 53%);
  --partial_outage-ink: hsl(17 88% 34%);
  --major_outage: hsl(0 84% 58%);
  --major_outage-ink: hsl(0 74% 40%);
  --maintenance: hsl(217 91% 58%);
  --maintenance-ink: hsl(224 76% 45%);
  --none: hsl(214 25% 88%);

  --radius: 3px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.55 "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif, "Noto Sans Bengali";
  -webkit-font-smoothing: antialiased;
}
:lang(bn) body, body:lang(bn) { line-height: 1.7; }
a { color: inherit; }
h1, h2, h3, h4, p, ol { margin: 0; }

.wrap { max-width: 880px; margin: 0 auto; padding: 36px 20px 56px; }

/* Levels: one colour each, used by bars, dots and stripes. */
.lv-operational { --c: var(--operational); --ink: var(--operational-ink); }
.lv-degraded { --c: var(--degraded); --ink: var(--degraded-ink); }
.lv-partial_outage { --c: var(--partial_outage); --ink: var(--partial_outage-ink); }
.lv-major_outage { --c: var(--major_outage); --ink: var(--major_outage-ink); }
.lv-maintenance, .window { --c: var(--maintenance); --ink: var(--maintenance-ink); }
.lv-unknown, .lv-none { --c: var(--none); --ink: var(--muted); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-name {
  font-family: "Instrument Serif", serif; font-weight: 400; font-size: 26px; line-height: 1;
  letter-spacing: -0.01em;
}
.brand-sub { font-weight: 500; font-size: 19px; color: var(--muted); }
.lang {
  font-size: 13px; font-weight: 500; text-decoration: none; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  transition: border-color 0.15s;
}
.lang:hover, .lang:focus-visible { border-color: var(--muted); outline: none; }

/* The banner over everything */
.banner {
  margin-top: 40px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--radius); background: var(--c); color: #fff;
  box-shadow: 0 1px 2px hsl(222 47% 11% / 0.06), 0 8px 24px -12px var(--c);
}
.banner.lv-degraded { color: hsl(222 47% 11%); }
.banner-icon { display: inline-flex; width: 28px; height: 28px; flex: none; }
.banner-icon svg { width: 100%; height: 100%; }
.banner-text { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; flex: 1; }
.banner-time { font-size: 13px; opacity: 0.85; }

/* Sections */
.block { margin-top: 44px; }
.block > h2 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* Incidents and maintenance: cards with a tinted top in their level's colour. */
.block > h2 { display: flex; align-items: center; gap: 8px; }
.count {
  font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px;
  background: var(--track); color: var(--fg-soft);
}
.cards { display: grid; gap: 16px; }
.incident, .window {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.incident, .window.live { border-color: color-mix(in srgb, var(--c) 30%, var(--border)); }
.incident-top {
  padding: 20px 22px 18px; border-bottom: 1px solid color-mix(in srgb, var(--c) 22%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, white), color-mix(in srgb, var(--c) 5%, white));
}
.incident-head { display: flex; align-items: flex-start; gap: 14px; }
.incident-icon {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 22%, white); color: var(--ink);
}
.incident-icon svg { width: 19px; height: 19px; }
.incident-title { flex: 1; min-width: 0; }
.incident-title h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.incident-title p { margin-top: 3px; font-size: 13px; color: var(--fg-soft); }
.incident-title p span { white-space: nowrap; }
.impact {
  flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: var(--card); border: 1px solid color-mix(in srgb, var(--c) 45%, white);
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.impact::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Investigating -> Identified -> Monitoring -> Resolved, and where it is now. */
.steps {
  list-style: none; padding: 0; margin: 18px 0 0 52px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.steps li { position: relative; padding-top: 12px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.steps li::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 18%, var(--track));
}
.steps .done { color: var(--fg-soft); }
.steps .done::before, .steps .now::before { background: var(--c); }
.steps .now { color: var(--ink); font-weight: 600; }
.steps .now::after {
  content: ""; position: absolute; top: -3px; right: 0; width: 10px; height: 10px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 3px var(--card);
  animation: beat 1.8s ease-out infinite;
}
@keyframes beat {
  0% { box-shadow: 0 0 0 3px var(--card), 0 0 0 3px color-mix(in srgb, var(--c) 55%, transparent); }
  100% { box-shadow: 0 0 0 3px var(--card), 0 0 0 11px color-mix(in srgb, var(--c) 0%, transparent); }
}

/* What was said, newest first, on a line. */
.updates { list-style: none; margin: 0; padding: 20px 22px 4px; }
.updates li { position: relative; padding: 0 0 18px 26px; }
.updates li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--border-strong);
}
.updates li:first-child::before {
  background: var(--c); border-color: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent);
}
.updates li::after {
  content: ""; position: absolute; left: 5px; top: 22px; bottom: 2px; width: 1px; background: var(--border);
}
.updates li:last-child::after { display: none; }
.update-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.update-head strong { font-size: 14px; font-weight: 600; }
.updates li:first-child .update-head strong { color: var(--ink); }
.update-head time { flex: none; font-size: 12.5px; color: var(--muted); }
.updates p { margin-top: 3px; font-size: 14px; color: var(--fg-soft); }

/* The parts it touches. */
.touches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.touches > span:first-child { color: var(--muted); margin-right: 2px; }
.incident .touches { padding: 14px 22px; border-top: 1px solid var(--border); background: hsl(210 40% 98.5%); }
.tag {
  font-weight: 500; color: var(--fg-soft); background: var(--card); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 999px;
}

/* Maintenance: a calendar leaf, the hours, how long until it starts or ends. */
.window { display: flex; gap: 18px; padding: 20px 22px; }
.leaf {
  flex: none; width: 58px; align-self: flex-start; text-align: center; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--border)); overflow: hidden; background: var(--card);
}
.leaf-month {
  display: block; padding: 3px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff; background: var(--c);
}
.leaf-day { display: block; padding: 4px 0 6px; font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--fg); }
.window-body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.window-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.window-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.state {
  flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: color-mix(in srgb, var(--c) 10%, white);
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.live .state::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c);
  animation: beat 1.8s ease-out infinite;
}
.window-when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 500; }
.window-when svg { width: 15px; height: 15px; color: var(--muted); }
.window-when .dim { color: var(--muted); font-weight: 400; }
.countdown { font-size: 13px; font-weight: 600; color: var(--ink); }
.window-details { font-size: 14px; color: var(--fg-soft); }
.window .touches { margin-top: 4px; }
progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px;
  border: 0; border-radius: 999px; background: var(--track); overflow: hidden; color: var(--c);
}
progress::-webkit-progress-bar { background: var(--track); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--c); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--c); border-radius: 999px; }

/* Parts and their 90 days */
.parts { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.part { padding: 20px 24px 18px; }
.part + .part { border-top: 1px solid var(--border); }
.part-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.part-name { font-size: 16px; font-weight: 500; }
.part-level { font-size: 14px; font-weight: 500; color: var(--c); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.part-level.lv-unknown { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }

/*
 * A day's detail sits over the row, not over its bar: centred, never wider than the row, wrapping
 * when long -- so even unseen it can never push the page wider than the screen. The bar it is for
 * is the one left bright. Nothing on a bar may be transformed: that would make the bar, not the
 * row, what the detail is placed against.
 */
.bars { display: flex; gap: 2px; height: 34px; margin-top: 14px; position: relative; }
.bar {
  flex: 1 1 0; min-width: 0; border-radius: 1.5px; background: var(--c);
  transition: opacity 0.12s; outline: none;
}
.bars:hover .bar { opacity: 0.45; }
.bars .bar:hover, .bars .bar:focus-visible { opacity: 1; }
.bar::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%); width: max-content; max-width: 100%;
  text-align: center;
  background: var(--tip-bg); color: var(--tip-fg);
  font-size: 12px; font-weight: 500; line-height: 1.4; padding: 7px 10px; border-radius: var(--radius);
  opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 5;
  box-shadow: 0 6px 20px -6px hsl(222 47% 11% / 0.35);
}
.bar:hover::after, .bar:focus::after { opacity: 1; }

.legend { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.legend .line { flex: 1; height: 1px; background: var(--border); }
.legend-uptime { color: var(--fg); font-weight: 500; }
/* What the phone shows instead: 30 days, not 90. */
.n30 { display: none; }

/* Past incidents: the week at a glance, then only what happened. */
.block > h2 .note { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.tile {
  position: relative; display: block; text-align: center; padding: 12px 0 14px; border-radius: var(--radius);
  background: var(--track); color: var(--fg); text-decoration: none; transition: box-shadow 0.15s;
}
.tile:hover, .tile:focus-visible { box-shadow: inset 0 0 0 1px var(--border-strong); outline: none; }
.tile-week { display: block; font-size: 12px; color: var(--muted); }
.tile-day { display: block; margin: 2px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.tile-dot { display: block; width: 8px; height: 8px; margin: 0 auto; border-radius: 50%; background: var(--c); }
.tile.bad {
  background: color-mix(in srgb, var(--c) 9%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 32%, white);
}
.tile.bad:hover, .tile.bad:focus-visible { box-shadow: inset 0 0 0 1px var(--c); }
/* Today says so in its own words; the day picked is the one outlined. */
.tile.today .tile-week { color: var(--fg); font-weight: 600; }
.tile.picked, .tile.picked:hover { box-shadow: inset 0 0 0 2px var(--fg); }
.tile.picked:not(.bad) { background: var(--card); }
.week-none { margin-top: 18px; font-size: 14px; color: var(--muted); }

.past-list { margin-top: 28px; }
.past-day { padding-top: 22px; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
.past-day + .past-day { margin-top: 24px; }
.past-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.past-date { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.show-all { flex: none; font-size: 13px; font-weight: 500; text-decoration: none; }
.show-all:hover, .show-all:focus-visible { text-decoration: underline; }
.past-none { margin-top: 6px; font-size: 15px; color: var(--fg-soft); }
.past { margin-top: 6px; }
.past + .past { margin-top: 20px; }
.past-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.past-top h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.soft-pill {
  flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap;
  background: color-mix(in srgb, var(--c) 10%, white); padding: 3px 10px; border-radius: 999px;
}
.past-meta { margin-top: 1px; font-size: 13px; color: var(--muted); }
.past-updates { margin-top: 12px; display: grid; gap: 8px; font-size: 14px; color: var(--fg-soft); }
.past-updates strong { font-weight: 600; color: var(--fg); }
.past-updates time { margin-left: 6px; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
/* The day picked: what its automatic checks saw. */
.day-checks { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); }
.day-checks-title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.day-checks-clear { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-soft); }
.day-checks-clear::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--operational); }
.day-checks-clear.unchecked::before { background: var(--none); }
.day-checks ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.day-checks li { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.day-checks li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.day-checks li strong { font-weight: 600; }
.day-checks li span { color: var(--fg-soft); }
/* Bangla has no capitals to space out. */
:lang(bn) .past-date, :lang(bn) .leaf-month, :lang(bn) .day-checks-title { letter-spacing: 0; }

/* Footer */
.foot { margin-top: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot a { text-decoration: none; font-weight: 500; color: var(--fg); }
.foot a:hover { text-decoration: underline; }

/* Phones: the last 30 days fit, the 60 before them do not. */
@media (max-width: 640px) {
  .wrap { padding: 24px 16px 44px; }
  .banner { margin-top: 28px; padding: 16px 18px; }
  .banner-text { font-size: 17px; }
  .banner-time { flex-basis: 100%; padding-left: 42px; }
  .part { padding: 16px 16px 14px; }
  .bar:nth-child(-n + 60) { display: none; }
  .bars { gap: 3px; height: 30px; }
  .n90 { display: none; }
  .n30 { display: inline; }
  .part-head { flex-wrap: wrap; }
  .incident-top { padding: 16px 16px 16px; }
  .incident-head { flex-wrap: wrap; gap: 12px; }
  .incident-title { flex-basis: calc(100% - 50px); }
  .impact { margin-left: 50px; }
  .steps { margin-left: 0; }
  /* Four names do not fit across a phone: the one it is at is said, the rest only to screen readers. */
  .steps .now span { white-space: nowrap; }
  .steps li:not(.now) span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .updates { padding: 18px 16px 2px; }
  .update-head { flex-direction: column; gap: 0; }
  .incident .touches { padding: 12px 16px; }
  .window { padding: 16px; gap: 14px; }
  .leaf { width: 50px; }
  .leaf-day { font-size: 20px; }
  .window-head { flex-direction: column; gap: 6px; }
  /* Seven across is too tight on a phone: four, then three centred under them, full size. */
  .week { display: flex; flex-wrap: wrap; justify-content: center; }
  .week li { flex: 0 0 calc((100% - 3 * 8px) / 4); }
  .past-top { flex-direction: column; gap: 4px; }
}

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