:root {
  --text: #1D2329; --muted: #5A6068; --bg: #F6F5F1; --card: #FFFFFF; --link: #1F4E79; --line: #DDDAD2;
  --ok: #DDDAD2; --delay: #C27400; --suspended: #A3271B; --good: #1E6B3A;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.7;
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif; }
a { color: var(--link); }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.site-header { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.site-name { font-weight: bold; color: var(--text); text-decoration: none; margin-right: 16px; }
.crumbs { display: inline; color: var(--muted); font-size: 0.875rem; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0 12px; }
h2 { font-size: 1.125rem; margin: 20px 0 8px; }
.sub { color: var(--muted); margin-top: 0; }
.small { color: var(--muted); font-size: 0.8125rem; }
.banner { background: #FFF4D6; border: 1px solid var(--delay); padding: 8px 12px; margin-bottom: 12px; }
.warn { color: var(--suspended); font-weight: bold; margin: 4px 0 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); padding: 8px 14px 12px; }
.card h2 { font-size: 0.875rem; color: var(--muted); margin: 4px 0; }
.big { font-size: 1.25rem; font-weight: bold; margin: 0; }
.state-ok { color: var(--good); }
.state-degraded, .state-unknown { color: #8A5A10; }              /* 5.9:1 on white (the delay fill itself is only 3.6:1) */
.state-down { color: var(--suspended); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; font-size: 0.875rem; }
th { background: #EFEDE6; }
.badge { display: inline-block; padding: 0 8px; border: 1px solid var(--muted); font-size: 0.8125rem; }
.pager a { display: inline-block; min-height: 44px; min-width: 44px; padding: 10px 12px; }
.site-footer { max-width: 960px; margin: 24px auto 0; padding: 16px; border-top: 1px solid var(--line);
  font-size: 0.8125rem; color: var(--muted); }
.site-footer p { margin: 4px 0; }
.site-footer nav a, .site-footer nav span { display: inline-block; margin: 4px 14px 4px 0; }

/* ---- calendar parts (web.md 3.3) ---- */
.o { background: #DDDAD2; box-shadow: inset 0 0 0 1px #8E8A81; } .d { background: #C27400; }
/* Suspended: a dark frame as well as the red fill, so that delay / suspended / normal differ without colour:
   delay = fill only, suspended = fill + thick dark frame, normal = pale fill + thin grey frame, no data = stripes. */
.s { background: #A3271B; box-shadow: inset 0 0 0 2px #1D2329; }
.n { background: repeating-linear-gradient(45deg, #B9B6AE 0 2px, #F6F5F1 2px 4px); }
.f { background: transparent; border: 1px solid #DDDAD2; }
.b { background: repeating-linear-gradient(45deg, #EDEBE5 0 3px, transparent 3px 7px); }
.w { background: transparent; }
.t { outline: 1px dashed var(--muted); outline-offset: -1px; }
.p { position: relative; }
.p::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 6px 6px 0;
  border-color: transparent var(--text) transparent transparent; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 8px 0; font-size: 0.8125rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; position: relative; }
.tabs { margin: 8px 0; } .tab { display: inline-block; padding: 4px 14px; border-bottom: 3px solid transparent; }
.tab.cur { border-color: var(--text); font-weight: bold; } a.tab { color: var(--link); text-decoration: none; min-height: 44px; }
a.tab:hover { border-color: var(--link); } .tab.off, .off { color: #646A71; }                              /* 5.0:1 on the page background */
.range-nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; }
.range-nav a, .range-nav span { min-height: 44px; display: inline-flex; align-items: center; }
.legend-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0 2px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--muted);
  border-radius: 999px; background: var(--card); color: var(--text); font-size: 0.8125rem; font-family: inherit; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.group h2 { margin-top: 24px; position: sticky; top: 52px; background: var(--bg); padding: 4px 0; z-index: 4; }
.group.hidden, .lrow.hidden { display: none; }
.lrow, .axis-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 176px; gap: 12px; align-items: center; }
.lrow { padding: 6px 0; border-bottom: 1px solid var(--line); }
.lcount { justify-self: end; } .lcount span { white-space: nowrap; }
.lname { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.lbar { display: inline-block; width: 8px; height: 36px; flex: none; }
.lcount { display: flex; gap: 12px; font-size: 0.875rem; }
.band { height: 10px; }
.title-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.title-row h1 { margin: 0; }
.ring { display: inline-block; width: 52px; height: 52px; border: 10px solid; border-radius: 50%; background: #fff; flex: none; }
.ring.sm { width: 44px; height: 44px; border-width: 8px; }
.counts { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.counts div { background: var(--card); border: 1px solid var(--line); padding: 8px 16px; min-width: 150px; }
.counts dt { color: var(--muted); font-size: 0.8125rem; } .counts dd { margin: 0; font-size: 1.375rem; font-weight: bold; }
.counts .pct { font-size: 0.8125rem; font-weight: normal; color: var(--muted); }
.line-layout { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.cal { overflow-x: auto; overflow-y: hidden; }
.mlabels { display: grid; grid-template-columns: repeat(13, 28px); gap: 3px; margin-left: 30px; font-size: 0.6875rem; color: var(--muted);
  white-space: nowrap; height: 16px; }
.cal-body { display: flex; gap: 6px; }
.wlabels { display: grid; grid-template-rows: repeat(7, 28px); gap: 3px; font-size: 0.6875rem; color: var(--muted); width: 24px; line-height: 28px; }
.grid { display: grid; grid-template-columns: repeat(13, 28px); grid-template-rows: repeat(7, 28px); grid-auto-flow: column; gap: 3px; }
.grid a, .grid i { display: block; width: 28px; height: 28px; position: relative; }
.grid a.sel { outline: 2px solid var(--text); outline-offset: 1px; }
.grid a:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.grid a:hover, .mgrid a:hover { outline: 2px solid var(--link); outline-offset: 1px; cursor: pointer; }
.detail { background: var(--card); border: 1px solid var(--line); padding: 8px 16px 12px; min-width: 240px; }
.detail h2 { margin: 4px 0; } .detail dt { color: var(--muted); font-size: 0.8125rem; margin-top: 8px; } .detail dd { margin: 0; }
.badge.k-delay { background: #FCEBCF; border-color: #C27400; } .badge.k-suspended { background: #A3271B; color: #fff; border-color: #A3271B; }
.badge.k-no_data { background: #E9E7E1; } .badge.k-normal, .badge.k-ok { background: #fff; }
.btn { display: inline-block; min-height: 44px; padding: 10px 14px; background: var(--text); color: #fff; text-decoration: none; }
.sp { display: none; }
.mnav { display: flex; justify-content: space-between; align-items: center; max-width: 340px; }
.mnav a, .mnav span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.375rem; }
.mgrid { display: grid; grid-template-columns: repeat(7, 44px); gap: 3px; }
.mgrid .dow { text-align: center; font-size: 0.75rem; color: var(--muted); }
.mgrid a, .mgrid i { display: flex; align-items: center; justify-content: center; height: 44px; font-size: 0.8125rem; font-style: normal;
  color: var(--text); text-decoration: none; position: relative; }
.mgrid { gap: 5px; }
.mgrid a, .mgrid i { border-radius: 0; }
.mgrid a.sel { outline: 2px solid var(--text); outline-offset: 1px; font-weight: bold; }
.mgrid .o { background: #DDDAD2; } .mgrid .s { color: #fff; } .mgrid .d { color: #000; }   /* black on the delay fill: 5.8:1 */
/* The link cells replace box-shadow with the raised look, so the frames of normal / suspended days are kept in it. */
.mgrid a.o { box-shadow: inset 0 0 0 1px #8E8A81; }
.mgrid a.s { box-shadow: inset 0 0 0 2px #1D2329; }
.mgrid .pad { background: transparent; }
.detail-head { display: block; }
.tl-row { display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: center; margin: 4px 0; }
.tl { display: grid; grid-template-columns: repeat(96, 1fr); gap: 1px; }
.tl i { display: block; height: 14px; }
.tl.big i { height: 28px; }
.tl-hours { display: flex; justify-content: space-between; margin-left: 190px; font-size: 0.6875rem; color: var(--muted); }
.ev td { vertical-align: top; } .ev summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); }
.k-delay.big { color: #8A5A10; } .k-suspended.big { color: var(--suspended); } .k-no_data.big { color: var(--muted); }
@media (max-width: 720px) {
  .pc { display: none; } .sp { display: block; }
  .legend-bar, .group h2 { position: static; }
  .mgrid { grid-template-columns: repeat(7, 1fr); max-width: 340px; }
  .mgrid a, .mgrid i { height: 44px; }
  /* The month calendar shows a tooltip and a popover (pop.js); the side panel is for the PC grid only. */
  .detail { display: none; }
  .lrow, .axis-row { grid-template-columns: 1fr; gap: 4px; }
  .axis-pad { display: none; }
  .line-layout { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 1fr; }
  .tl-hours { display: none; }
  .tl.big { grid-template-columns: repeat(4, 1fr); } .tl.big i { height: 22px; }
  .site-footer { font-size: 0.75rem; }
}

/* ---- top page: a strip per line (one bar per day, the right end is today), month axis, tooltip, popover ---- */
.strip { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 1px; height: 26px; }
.strip > * { display: block; height: 100%; min-width: 0; border-radius: 1px; }
.strip .b, .strip .f { background: transparent; border: 0; }
.strip .p::after { content: none; }                 /* the corner mark (partly collected) is for the line page only */
.strip .o { background: #DDDAD2; box-shadow: inset 0 0 0 1px #8E8A81; height: 60%; align-self: end; }
.strip .n { background: repeating-linear-gradient(45deg, #B9B6AE 0 2px, #F6F5F1 2px 4px); height: 60%; align-self: end; }
.strip .w { background: transparent; outline: 1px dashed var(--muted); outline-offset: -1px; height: 60%; align-self: end; }
.strip a.d, .strip a.s { cursor: pointer; }
.strip a.d:hover, .strip a.s:hover, .strip a.open { outline: 2px solid var(--text); outline-offset: 1px; position: relative; z-index: 1; }
.strip a:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; position: relative; z-index: 1; }
.axis { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 1px; font-size: 0.75rem; color: var(--muted); line-height: 1.2; }
.axis span { white-space: nowrap; border-left: 1px solid var(--line); padding-left: 3px; }
.axis-row { margin-bottom: 2px; }
.tip { position: absolute; z-index: 40; max-width: 240px; padding: 4px 9px; border-radius: 6px; background: var(--text); color: #fff;
  font-size: 0.75rem; line-height: 1.5; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.pop { position: absolute; z-index: 50; width: 280px; max-width: calc(100vw - 16px); padding: 10px 14px 12px; border-radius: 12px; background: var(--card);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2), 0 1px 3px rgba(0, 0, 0, .12), inset 1px 1px 0 rgba(255, 255, 255, .95), inset -1px -1px 0 rgba(0, 0, 0, .04); }
.pop::before { content: ""; position: absolute; left: var(--ax, 24px); width: 12px; height: 12px; background: var(--card); transform: rotate(45deg);
  top: -6px; box-shadow: -2px -2px 3px rgba(0, 0, 0, .06); }
.pop.up::before { top: auto; bottom: -6px; box-shadow: 2px 2px 3px rgba(0, 0, 0, .08); }
.pop-head { display: flex; align-items: flex-start; gap: 8px; }
.pop-title { flex: 1; margin: 0; font-size: 0.875rem; line-height: 1.4; }
.pop-title small { display: block; color: var(--muted); font-weight: normal; font-size: 0.75rem; }
.pop-close { flex: none; min-width: 32px; min-height: 32px; border: 0; background: transparent; font-size: 1.25rem; line-height: 1; color: var(--muted); cursor: pointer; }
.pop dl { margin: 8px 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 0.875rem; }
.pop dt { color: var(--muted); } .pop dd { margin: 0; font-weight: bold; }
.pop .btn { display: block; text-align: center; margin: 8px 0 4px; min-height: 40px; padding: 8px 12px; font-size: 0.875rem; }
.pop .sub-link { display: block; text-align: center; font-size: 0.8125rem; padding: 6px 0; }
.pop-note { margin: 4px 0 0; font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }

/* ---- skip link, term links, list of days ---- */
.skip { position: absolute; left: -9999px; top: 0; background: var(--card); color: var(--link); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; top: 8px; outline: 3px solid var(--link); }
dt small { margin-left: 6px; font-weight: normal; }
.terms dt { font-weight: bold; margin-top: 10px; } .terms dd { margin: 2px 0 0; }
.daylist { padding-left: 20px; } .daylist li { margin: 2px 0; }

.lcount .den { color: var(--muted); }
.range-note { margin-top: 0; }

/* ---- day page: one-line summary under the h1; hour ticks beside the vertical (one row per hour) timeline on phones ---- */
.day-summary { margin: 4px 0 12px; font-weight: bold; } ul.day-summary { padding-left: 20px; }
.tl-ticks { display: none; }
@media (max-width: 720px) {
  .tlwrap { display: grid; grid-template-columns: 3em 1fr; gap: 6px; }
  .tl-ticks { display: grid; grid-auto-rows: 22px; gap: 1px; font-size: 0.6875rem; color: var(--muted); line-height: 1; }
}

/* ---- 7-1 .. 7-10 : accessibility parts ---- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.table-wrap:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.crumbs ol { display: inline; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline; }
.crumbs li + li::before { content: " › "; }
/* links inside the text are underlined (the default is kept; this guards against later resets) */
main p a, main li a, main dd a, .site-footer p a { text-decoration: underline; }
/* the tooltip can be reached with the pointer and stays while the pointer is on it (WCAG 1.4.13) */
.tip { pointer-events: auto; }
.tip::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.tip.up::before { top: auto; bottom: -8px; }

/* ---- 8: design parts ---- */
/* 8-1 day page: the figures are larger than the h1 (1.5rem); the state of the day is the largest */
.day-cards .big { font-size: 1.75rem; line-height: 1.3; }
.day-cards .card-state { border: 2px solid var(--text); }
.day-cards .card-state .big { font-size: 2.25rem; }
/* 8-2 the small timelines of the other lines of the operator */
.small-row { font-size: 0.875rem; margin: 2px 0; } .small-row .tl i { height: 10px; }
/* 8-3 terms and privacy: about 40 characters a line, with a table of contents */
.legal { max-width: 40em; }
.legal .toc { margin: 8px 0 16px; padding: 8px 14px; background: var(--card); border: 1px solid var(--line); }
.legal .toc ol { margin: 0; padding-left: 1.4em; }
.legal h2 { scroll-margin-top: 8px; }
/* 8-4 reasons of the status page: the border style differs as well as the colour */
.badge.reason-self { background: #FCEBCF; border: 2px solid #8A5A10; }
.badge.reason-provider { background: #E3ECF5; border: 2px dashed #1F4E79; }
.badge.reason-partial { background: #EFEDE6; border: 2px dotted #5A6068; }
.badge.reason-unknown { background: #fff; border: 1px solid #5A6068; }
/* 8-7 the day number in the cells of the PC calendar */
.grid a, .grid i { font-size: 0.6875rem; line-height: 28px; text-align: center; font-style: normal; color: #000; text-decoration: none; }
.grid .s { color: #fff; } .grid .b, .grid .f, .grid .w { color: var(--muted); }
