body.time-relative .time-absolute { display: none; }
body.time-absolute .time-relative { display: none; }
:root {
  color-scheme: light;
  /* App-local token: prayticland-ui-libs defines no link color; the blue
     accent is USCIS-local (same value as the tailwind.config.js accent). */
  --app-link: #2563eb;
  /* App-local token: prayticland-ui-libs defines no nav shadow; this is
     baseui 16.1.1's lighting shadow600 verbatim — the shadow the fleet's
     BottomNav buttons carry (see .uscis-bottom-nav below). */
  --app-nav-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.16);
}
body {
  background: var(--tg-theme-bg-color, #f9fafb);
  color: var(--tg-theme-text-color, #111827);
  padding: max(var(--safe-top, 0px), var(--pl-top-clearance)) var(--safe-right, 0px) var(--safe-bottom, 0px) var(--safe-left, 0px);
  min-height: var(--viewport-height, 100vh);
}
body[data-theme="dark"] { color-scheme: dark; }
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-gray-50,
body[data-theme="dark"] .bg-gray-100 { background: var(--tg-theme-secondary-bg-color, #242424); }
body[data-theme="dark"] .text-gray-900,
body[data-theme="dark"] .text-gray-800,
body[data-theme="dark"] .text-gray-700 { color: var(--tg-theme-text-color, #eee); }
body[data-theme="dark"] .text-gray-600,
body[data-theme="dark"] .text-gray-500,
body[data-theme="dark"] .text-gray-400 { color: var(--tg-theme-hint-color, #aaa); }
body[data-theme="dark"] .border-gray-200,
body[data-theme="dark"] .border-gray-300 { border-color: #484848; }

/* GC progress chart (redesign): X axis is the stage, Y axis is one row
   per month with its year. Only EB-3 ROW cases appear. The chart draws
   the family lines, the recently updated lines, and a transparent range band over all
   ROW close cases; the same-block lines stay hidden until their
   legend chip is tapped. The case cards live in an always-visible panel on
   the right (desktop) sorted Vladislav, Kate, same block, everyone
   else; on narrow screens the panel hides and a click on the chart
   opens the tooltip stack over the chart instead. */
.pg-line[data-group="you"], .pg-swatch[data-group="you"], .pg-card[data-group="you"] { --pg-color: #2563eb; }
.pg-line[data-group="kate"], .pg-swatch[data-group="kate"], .pg-card[data-group="kate"] { --pg-color: #9333ea; }
.pg-line[data-group="close"], .pg-swatch[data-group="close"], .pg-card[data-group="close"] { --pg-color: #2e7d32; }
.pg-line[data-group="reddit"], .pg-line[data-group="telegram"],
.pg-swatch[data-group="reddit"], .pg-swatch[data-group="telegram"],
.pg-card[data-group="reddit"], .pg-card[data-group="telegram"] { --pg-color: #64748b; }
.pg-swatch[data-group="range"] { --pg-color: #737373; opacity: .4; }
.pg-swatch[data-group="recent"] { --pg-color: var(--app-activity); }
.pg-band { fill: #737373; fill-opacity: .07; stroke: none; }
.pg-updated { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--app-gray-100, #f3f4f6); color: var(--app-text-muted, #4b5563); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.pg-help { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.pg-help-head { font-size: 14px; font-weight: 600; color: var(--app-text-strong, #374151); }
.pg-info-wrap { display: inline-flex; }
.pg-info { display: inline-flex; align-items: center; justify-content: center; padding: 2px; border: 0; background: none; color: var(--app-text-muted, #6b7280); cursor: pointer; }
.pg-tip { display: none; position: absolute; left: 0; top: calc(100% + 2px); z-index: 40; width: max-content; max-width: min(320px, 84vw); background: #ffffff; border: 1px solid var(--app-gray-200, #e5e7eb); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 8px 10px; font-size: 13px; line-height: 1.45; color: var(--app-text-muted, #4b5563); }
.pg-tip-line { display: block; }
@media (hover: hover) { .pg-info-wrap:hover .pg-tip { display: block; } }
.pg-info-wrap.open .pg-tip { display: block; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; font-size: 13px; }
.pg-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--app-text-strong); cursor: pointer; }
.pg-chip.is-off { opacity: .45; }
.pg-chip.is-off .pg-swatch { background: transparent; box-shadow: inset 0 0 0 1px var(--app-gray-400); }
.pg-swatch { width: 22px; height: 5px; border-radius: 3px; background: var(--pg-color, var(--app-gray-500)); }
.pg-flex { position: relative; }
.pg-chart { min-width: 0; }
.pg-view { overflow: auto; scrollbar-width: none; -ms-overflow-style: none; touch-action: pan-x pan-y; cursor: grab; }
.pg-view::-webkit-scrollbar { display: none; }
.pg-svg { display: block; }
.pg-grid-h { stroke: var(--app-border-subtle); stroke-width: 1; }
.pg-grid-v { stroke: var(--app-border-subtle); stroke-width: 1; stroke-dasharray: 2 4; }
.pg-grid-v-minor { stroke: var(--app-border-subtle); stroke-opacity: .45; stroke-width: 1; }
.pg-today-line { stroke: var(--app-error); stroke-width: 1.5; }
.pg-today-label { font-size: 11px; font-weight: 700; fill: var(--app-error); }
.pg-projection { fill: none; stroke: var(--pg-color); stroke-width: 1.25; stroke-dasharray: 5 4; stroke-linecap: round; }
/* Prediction points on the family lines: hollow dashed markers
   at the predicted date of each unreached stage; tapping one
   shows the prediction in a dark label. */
.pg-predict-point { fill: #fff; stroke: var(--pg-color); stroke-width: 2; stroke-dasharray: 3 2; cursor: pointer; }
.pg-predict-tip-bg { fill: #111827; opacity: .93; }
.pg-predict-tip-text { fill: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.pg-projection-overlay { fill: none; stroke-linecap: round; }
.pg-line.pg-family .pg-projection { stroke-width: 2; }
.pg-line[data-group="close"] .pg-projection { stroke-width: 1.5; }
.pg-axis-label { font-size: 11px; fill: var(--app-muted); }
.pg-stage-label { font-size: 11.5px; font-weight: 600; fill: var(--app-text-strong); }
.pg-line { opacity: .38; }
.pg-line.pg-family { opacity: 1; }
.pg-svg.pg-has-sel .pg-line.pg-family { opacity: .18; }
.pg-svg.pg-has-sel .pg-line.pg-family.pg-hover { opacity: 1; }
.pg-svg.pg-has-sel .pg-line.pg-family.pg-active { opacity: 1; }
.pg-line.pg-hover, .pg-line.pg-active { opacity: 1; }
/* The merged SBD-or-bucket lines rest faint and thin (20% of
   their color); selected or hovered they come to 80% of the color at
   the family line weight. */
.pg-line[data-group="close"] { opacity: .2; }
.pg-line[data-group="close"] .pg-line-main { stroke-width: 1.5; }
.pg-line.pg-hover[data-group="close"],
.pg-line.pg-active[data-group="close"] { opacity: .8; }
.pg-line.pg-hover[data-group="close"] .pg-line-main,
.pg-line.pg-active[data-group="close"] .pg-line-main { stroke-width: 2.5; }
/* Recently updated lines are drawn by default next to the family
   lines, whatever their category: a grey line at close-line weight,
   resting almost fully visible, whose updated sections are bright
   green (the .pg-line-new rule below). */
.pg-line.pg-recent { opacity: .9; }
.pg-line.pg-recent.pg-hover, .pg-line.pg-recent.pg-active { opacity: 1; }
.pg-line.pg-recent .pg-line-main { stroke: #737373; stroke-width: 1.5; }
.pg-line.pg-recent .pg-projection { stroke: #737373; }
.pg-line.pg-recent .pg-point { fill: #737373; }
.pg-line.pg-recent .pg-point-new { fill: var(--app-activity); }
.pg-line-main { fill: none; stroke: var(--pg-color); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
/* The newest update of a same-bucket or same-FO line: only that one
   segment and its data point are green, the rest of the line stays
   grey. The segment tracks the line's rest and emphasis widths. */
.pg-line-new { fill: none; stroke: var(--app-activity); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pg-line.pg-hover .pg-line-new, .pg-line.pg-active .pg-line-new { stroke-width: 2.5; }
.pg-point-new { fill: var(--app-activity); }
.pg-line.pg-family .pg-line-main { stroke-width: 2; }
.pg-line-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.pg-point { fill: var(--pg-color); stroke: #fff; stroke-width: 1.5; cursor: pointer; }
/* A selected line outside the family (Vladislav, Kate) is plain
   black: its line, its projection, its fresh-update segment and
   its points all render black while it is selected. */
.pg-line.pg-active:not(.pg-family) .pg-line-main { stroke: var(--app-activity); }
.pg-line.pg-active:not(.pg-family) .pg-projection { stroke: var(--app-activity); }
.pg-line.pg-active:not(.pg-family) .pg-line-new { stroke: var(--app-activity); }
.pg-line.pg-active:not(.pg-family) .pg-point { fill: var(--app-activity); }
.pg-line.pg-active:not(.pg-family) .pg-point-new { fill: var(--app-activity); }
.pg-card { position: relative; flex: 0 0 auto; border: 1px solid var(--app-border-subtle); border-left: 4px solid var(--pg-color, var(--app-border-strong)); border-radius: 10px; background: var(--app-background); padding: 14px 16px; font-size: 13.5px; line-height: 1.5; color: var(--app-text-strong); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.pg-detail-tldr { margin: 0 0 8px; }
.pg-detail-link { color: var(--app-link, #2563eb); font-weight: 600; text-decoration: underline; }
/* Panel of case cards: its own container in the flow — on the right
   under the navbar on desktop, under the chart on narrow screens; it
   never overlays the chart. */
.pg-panel { display: block; border: 1px solid var(--app-border-subtle); border-radius: 12px; padding: 12px; background: var(--app-background); margin-top: 16px; }
.pg-panel-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: var(--app-text-strong); }
.pg-panel-hint { font-size: 12px; color: var(--app-muted); margin: 0 0 10px; line-height: 1.45; }
.pg-card-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; overflow-wrap: anywhere; }
.pg-panel-card { background: var(--app-background); backdrop-filter: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); margin-bottom: 8px; cursor: pointer; padding: 10px 12px; }
.pg-panel-card:hover, .pg-panel-card.is-hovered { border-color: var(--pg-color, var(--app-border-strong)); }
.pg-panel-card.is-selected { border-color: var(--app-activity); background: #e8f7ee; }
@media (min-width: 900px) {
  .pg-flex { display: flex; gap: 16px; align-items: flex-start; }
  .pg-chart { flex: 1 1 auto; }
  .pg-view { overflow-x: hidden; }
  .pg-panel { flex: 0 0 320px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; margin-top: 0; }
}

/* Bottom navigation — prayticland-ui-libs BottomNav + NavCircleButton
   reproduced in vanilla CSS (the library components are React/Base Web;
   USCIS consumes the library at the typeface + tokens level, §2.1).
   Values extracted from baseui 16.1.1's LightTheme — the theme the
   library's factory derives from, with only typography/breakpoints
   overridden: sizing scale1400 = 56px (button), scale600 = 16px
   (bottom offset), scale400 = 10px (gap); lighting shadow600 is the
   --app-nav-shadow token above. Colors map to the vendored tokens:
   contentPrimary #000000 is --app-text, backgroundPrimary #FFFFFF is
   --app-background, contentSecondary #4B4B4B is --app-gray-700. No bar,
   no background, no text — labels are aria-label only. */
.uscis-bottom-nav {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.uscis-bottom-nav[hidden] { display: none; }
.uscis-nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--app-background);
  color: var(--app-gray-700);
  box-shadow: var(--app-nav-shadow);
  cursor: pointer;
}
.uscis-nav-btn.is-active {
  background: var(--app-text);
  color: var(--app-background);
}
/* Keep the end of the scrolling content clear of the floating nav on
   every view: 56px button + 16px bottom offset + 32px margin, plus
   the safe area. */
#app { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }

/* App launcher: the fleet's prayticland-ui-libs AppLauncher
   (v0.14.0: one stack of two round buttons—the waffle and the
   account button under it—opening separate panels: the waffle's
   panel carries the three-column site grid under a Prayticland
   home row and the account block under a divider, the account
   button's panel holds only the account block), reproduced in
   vanilla CSS against the vendored tokens, the same pattern as
   .uscis-bottom-nav above. */
.pl-launcher {
  position: fixed;
  top: calc(var(--pl-top-clearance, 0px) + 12px);
  inset-inline-end: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pl-launcher-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-background, #ffffff);
  color: var(--app-gray-700, #374151);
  box-shadow: var(--app-nav-shadow);
  cursor: pointer;
}
.pl-launcher-btn:hover { background: var(--app-gray-100, #f3f4f6); }
.pl-launcher-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  width: 328px;
  max-width: calc(100vw - 32px);
  background: var(--app-background, #ffffff);
  border-radius: 16px;
  box-shadow: var(--app-nav-shadow);
  padding: 20px;
}
.pl-launcher-panel[hidden] { display: none; }
.pl-launcher-home {
  display: block;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--app-gray-200, #e5e7eb);
}
.pl-launcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pl-launcher-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
}
.pl-launcher-grid a:hover { background: var(--app-gray-100, #f3f4f6); }
.pl-launcher-grid a.is-current { background: var(--app-gray-100, #f3f4f6); }

.pl-launcher-grid a img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

#app { padding-top: max(1.5rem, var(--pl-top-clearance, 0px)); }
#app > #time-toggle { margin-bottom: 2rem; }

/* Account button and blocks (the fleet's AccountButton pattern):
   the button is the launcher stack's second round button, carrying
   the user's Telegram profile photo from /gateway/whoami; the
   account block lives in both panels—in the waffle's panel under
   the site grid, divided from it, and alone in the account
   button's own panel, where the divider drops—with the user's
   name, the bot link and the logout address. account.js fills
   both blocks from the whoami answer and keeps them hidden until
   a session answers. The panels hang below the whole stack, so
   the buttons stay in place while one is open. */
.pl-account-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-background, #ffffff);
  box-shadow: var(--app-nav-shadow);
  cursor: pointer;
}
.pl-account-btn img { width: 48px; height: 48px; object-fit: cover; display: block; }
.pl-account-initial {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-gray-100, #f3f4f6);
  font-size: 20px;
  font-weight: 600;
}
.pl-account-initial-sm { width: 40px; height: 40px; font-size: 17px; border-radius: 50%; }
.pl-account-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--app-gray-200, #e5e7eb);
}
.pl-account-block[hidden] { display: none; }
.pl-account-panel .pl-account-block {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.pl-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pl-account-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.pl-account-name { font-size: 18px; font-weight: 600; }
.pl-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  background: var(--app-gray-100, #f3f4f6);
}
a.pl-account-row:last-child { background: transparent; }
.pl-account-row:hover { background: var(--app-gray-100, #f3f4f6); }
.pl-account-row img { border-radius: 50%; object-fit: cover; display: block; }
