/* Design: FigCraft "05 Rencana UI/UX", frames "Status / ..." and "Catatan status page (4 Nov 2026)".
   Tokens and fonts are the website's (website/src/styles/global.css); sizes follow the docs/website columns of DESIGN.md. */
@font-face { font-family: 'PT Sans'; src: url('/fonts/pt-sans-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PT Sans'; src: url('/fonts/pt-sans-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url('/fonts/pt-serif-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f3f1ea;
  --paper-2: #e8e4d8;
  --ink: #0f1412;
  --engrave: #1e5b3c;
  --muted: #5c6460;
  --rule: #0f14121f;
  /* Day states. Degraded is a second printing ink (ochre); outage is its own red, not the serial token, which turns green in dark. */
  --ok: #1e5b3c;
  --partial: #9a6a12;
  --down: #a3262b;
  --none: #e8e4d8;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #0c1a13;
  --paper-2: #15271d;
  --ink: #eceae1;
  --engrave: #8fcb9f;
  --muted: #a9b3ad;
  --rule: #2b3f34;
  --ok: #8fcb9f;
  --partial: #e0a84a;
  --down: #e57361;
  --none: #15271d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #0c1a13;
    --paper-2: #15271d;
    --ink: #eceae1;
    --engrave: #8fcb9f;
    --muted: #a9b3ad;
    --rule: #2b3f34;
    --ok: #8fcb9f;
    --partial: #e0a84a;
    --down: #e57361;
    --none: #15271d;
  }
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: 'PT Sans', system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { margin: 0 auto; max-width: 824px; padding: 0 32px; font-size: 16px; line-height: 24px; background: var(--paper); }
a { color: var(--engrave); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--engrave); outline-offset: 2px; }
code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.875em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: 'PT Serif', Georgia, serif; }
h2 { font-size: 22px; line-height: 30px; margin: 48px 0 0; }
h2.ruled { padding-bottom: 8px; border-bottom: 1px solid var(--ink); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: 'PT Serif', Georgia, serif; font-size: 18px; }
.top nav { display: flex; gap: 20px; font-size: 14px; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.logo-dark { display: none; }
:root[data-theme='dark'] .logo-light { display: none; }
:root[data-theme='dark'] .logo-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo-light { display: none; }
  :root:not([data-theme='light']) .logo-dark { display: inline; }
}

/* The one focal point: what is true right now. A dot of ink in the day colours, not a coloured banner. */
/* One line of context for first-time visitors, quieter than the status sentence below it. */
.intro { margin: 24px 0 0; color: var(--muted); font-size: 15px; line-height: 24px; max-width: 680px; }
.summary { margin: 16px 0 0; --state: var(--ok); }
.summary.s-partial { --state: var(--partial); }
.summary.s-down { --state: var(--down); }
.summary.s-none { --state: var(--muted); }
.summary h1 { font-size: 28px; line-height: 36px; }
.summary h1::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 12px; border-radius: 50%; background: var(--state); vertical-align: 3px; }
.summary p { margin: 4px 0 0; }
.summary .checked { color: var(--muted); font-size: 14px; }
.open { font-weight: 700; }

.components, .incidents { list-style: none; margin: 0; padding: 0; }
.component { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.name { font-weight: 700; }
code.name { font-weight: 400; font-size: 15px; }
.now { font-size: 14px; white-space: nowrap; }
.now::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--ok); }
.now.is-failing { font-weight: 700; }
.now.is-failing::before { background: var(--down); }

.bar { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 28px; }
.bar i { position: relative; background: var(--ok); }
.bar i.d-partial { background: var(--partial); }
.bar i.d-down { background: var(--down); }
.bar i.d-none { background: var(--none); }
.bar i:focus-visible { outline-offset: 1px; }
/* Tooltip on hover, keyboard focus, or a tap (a tap focuses the day). Anchored to the side with room. */
.bar i:hover::after, .bar i:focus::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 1;
  padding: 8px 12px; white-space: pre; background: var(--ink); color: var(--paper);
  font: 13px/20px 'JetBrains Mono', ui-monospace, monospace;
}
.bar i:nth-child(n + 46):hover::after, .bar i:nth-child(n + 46):focus::after { left: auto; right: 0; }
.axis { display: flex; justify-content: space-between; gap: 4px 8px; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.axis span { white-space: nowrap; }
.from-30 { display: none; }

.empty { color: var(--muted); margin: 16px 0 0; }
.incidents > li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.incidents .head { margin-bottom: 8px; }
.incidents h3 { font-size: 16px; line-height: 24px; font-weight: 700; }
.tag { padding: 0 8px; border: 1px solid var(--ink); font-size: 13px; line-height: 22px; white-space: nowrap; }
.incidents p { margin: 0 0 8px; font-size: 15px; }
.incidents .meta { margin: 0; color: var(--muted); font: 13px/20px 'JetBrains Mono', ui-monospace, monospace; }

.method p { margin: 12px 0 0; font-size: 15px; line-height: 24px; }

footer { margin-top: 48px; padding: 16px 0 32px; border-top: 1px solid var(--rule); }
.pita { height: 16px; background: url('/pita.webp') left center / auto 16px repeat-x; }
footer p { margin: 16px 0 0; font-family: 'PT Serif', Georgia, serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
footer a { color: var(--muted); }

/* Phone: the last 30 days, so each day stays wide enough to tap; the share gets its own line; links get 44 px targets. */
@media (max-width: 480px) {
  body { padding: 0 16px; }
  .top nav { gap: 12px; }
  .top nav a, footer a { display: inline-flex; align-items: center; min-height: 44px; }
  .intro { margin-top: 16px; }
  .summary { margin-top: 12px; }
  .summary h1 { font-size: 24px; line-height: 32px; }
  h2 { margin-top: 32px; }
  .bar { grid-template-columns: repeat(30, 1fr); }
  .bar i:nth-child(-n + 60) { display: none; }
  .bar i:nth-child(n + 46):hover::after, .bar i:nth-child(n + 46):focus::after { left: 0; right: auto; }
  .bar i:nth-child(n + 76):hover::after, .bar i:nth-child(n + 76):focus::after { left: auto; right: 0; }
  .from-90 { display: none; }
  .from-30 { display: inline; }
  .axis { flex-wrap: wrap; }
  .axis .share { order: 3; flex-basis: 100%; }
  code.name { font-size: 14px; }
}
