:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ink: #182333;
  --muted: #526074;
  --line: #dbe1e6;
  --page: #f5f6f4;
  --surface: #fff;
  --navy: #152b45;
  --lime: #d6f979;
  --pad: clamp(16px, 5vw, 36px);
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 260px; font-size: 1rem; line-height: 1.5; }
button, input, select, textarea { color: inherit; font: inherit; }
button, .upload, .doc { -webkit-tap-highlight-color: transparent; }
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}
button:disabled, [aria-disabled="true"] { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #2976be; outline-offset: 3px; }
a { color: #215b95; text-underline-offset: .18em; overflow-wrap: anywhere; }
button, p, h1, h2, h3, .doc, .cardtext { overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(1.82rem, 5.9vw, 2.85rem); letter-spacing: -.052em; font-weight: 720; }
h2 { font-size: clamp(1.32rem, 4.2vw, 1.68rem); letter-spacing: -.039em; }
h3 { font-size: 1.08rem; letter-spacing: -.024em; }
small, .muted { color: var(--muted); }
.shell {
  width: min(100%, 800px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--safe-top) var(--pad) calc(100px + var(--safe-bottom));
}
header.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.47rem;
  font-weight: 790;
  line-height: 1;
  letter-spacing: -.058em;
}
.brandmark {
  display: inline-grid;
  width: 33px;
  height: 33px;
  place-items: center;
  position: relative;
  color: white;
  background: var(--navy);
  border-radius: 10px;
}
.brandmark:empty::before, .brandmark:empty::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 16px;
  border-radius: 2px;
  background: var(--lime);
  transform: skew(-23deg);
}
.brandmark:empty::before { left: 10px; top: 11px; }
.brandmark:empty::after { left: 18px; top: 6px; }
.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #2d4431;
  background: #e0e9d9;
  font-size: .875rem;
  font-weight: 700;
  overflow: hidden;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
main { padding-top: clamp(22px, 5vw, 38px); }
.eyebrow, .kicker { font-size: .81rem; font-weight: 650; line-height: 1.35; letter-spacing: .02em; }
.eyebrow { color: var(--muted); margin-bottom: 6px; }
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  margin: 21px 0 26px;
  padding: clamp(20px, 4.7vw, 36px);
  border-radius: 23px;
  color: #fff;
  background: radial-gradient(ellipse at 101% 110%, #30516a 0, transparent 54%), var(--navy);
}
.hero-content { position: relative; z-index: 1; max-width: 74%; }
.hero .kicker { color: #dbe7ef; }
.hero h2 { margin: 8px 0; max-width: 18ch; font-size: clamp(1.55rem, 5.2vw, 2.35rem); }
.hero p { color: #e0e8f0; max-width: 44ch; line-height: 1.45; }
.hero .primary { margin-top: 18px; }
.art {
  --paper-w: clamp(64px, 16vw, 118px);
  position: absolute;
  z-index: -1;
  right: 6%;
  top: 50%;
  width: var(--paper-w);
  height: calc(var(--paper-w) * 1.19);
  transform: translateY(-49%) rotate(10deg);
  pointer-events: none;
}
.art i, .art b, .art em {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 13%;
}
.art i { background: #658198; transform: translate(-12%, 8%) rotate(-18deg); }
.art b { background: #b7c9d4; transform: translate(-5%, 5%) rotate(-9deg); }
.art em {
  background:
    linear-gradient(#758b7d, #758b7d) 20% 24% / 40% 3% no-repeat,
    linear-gradient(#a6baac, #a6baac) 22% 34% / 54% 3% no-repeat,
    linear-gradient(#a6baac, #a6baac) 19% 44% / 33% 3% no-repeat,
    #eff3e5;
  box-shadow: 4px 7px 12px #0a19272a;
}
.art em::before {
  content: "";
  position: absolute;
  width: 47%;
  aspect-ratio: 1;
  right: -8%;
  bottom: -6%;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: inset 0 0 0 1px #61782d26;
}
.art em::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 9%;
  width: 21%;
  height: 9%;
  border: solid #253e2b;
  border-width: 0 0 3px 3px;
  transform: rotate(-54deg);
}
.section-head, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head { margin: 22px 0 12px; }
.section-head > *, .row > * { min-width: 0; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tile, .panel, .card, .empty, .signin {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.tile {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: clamp(13px, 3.5vw, 21px);
  min-height: 126px;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
}
.icon {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin-bottom: 13px;
  border-radius: 10px;
  background: #e9eef5;
  color: #345172;
  font-size: 1.08rem;
  line-height: 1;
}
.tile:nth-child(4n+2) .icon { color: #485c28; background: #e8efdc; }
.tile:nth-child(4n+3) .icon { color: #604575; background: #f0eaf5; }
.tile:nth-child(4n) .icon { color: #755036; background: #f5ece3; }
.tile-title { font-size: 1.045rem; line-height: 1.2; font-weight: 670; letter-spacing: -.027em; }
.tile small { margin-top: 4px; font-size: .875rem; line-height: 1.3; }
.panel, .card, .empty, .signin { padding: clamp(16px, 4vw, 26px); margin-block: 12px; }
.cardtext { color: #243244; line-height: 1.57; white-space: pre-wrap; }
.cardtext b, .cardtext strong { color: var(--ink); }
.cardtext code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #eef1f4;
  font-size: .92em;
  white-space: pre-wrap;
}
.actions { display: grid; gap: 8px; margin-top: 15px; }
.actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.actions > div > * { flex: 1 1 120px; }
.actions button, .secondary, .primary, .quiet, .back, .doc, .upload {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 12px;
  background: #edf1f5;
  color: #23384b;
  text-decoration: none;
  line-height: 1.3;
  font-size: .95rem;
  font-weight: 620;
  text-align: center;
}
.primary, .actions .primary, button.primary { color: #192d1c; background: var(--lime); }
.quiet, .back { padding-inline: 4px; background: transparent; color: #375374; }
.actions .quiet, .actions .back { background: transparent; }
.status, .badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 4px 9px;
  border-radius: 7px;
  background: #e5efda;
  color: #38542b;
  font-size: .81rem;
  font-weight: 650;
  line-height: 1.3;
}
.hero .status, .hero .badge { color: #f0f7df; background: #ffffff19; }
.form { display: grid; gap: 10px; margin-top: 14px; }
.form label { font-size: .91rem; font-weight: 620; }
textarea, .form input:not([type="file"]), .form select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #aebbc7;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
.upload { border: 1px dashed #a4b2bf; background: #f6f8fa; cursor: pointer; }
input[type="file"] { max-width: 100%; }
.media-img { display: block; max-width: 100%; max-height: 65vh; margin-block: 12px; border-radius: 10px; object-fit: contain; }
.doc { margin-block: 6px; color: #234f73; background: #eaf2f8; }
.notice { margin: 10px 0; padding: 11px 14px; border-radius: 12px; background: #ebf0f4; color: #34495e; }
.empty, .signin { color: var(--muted); }
.signin h1, .empty h2 { color: var(--ink); }
.signin p, .empty p { margin-block: 10px; }
.tabbar {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 800px);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
  padding: 6px max(8px, var(--pad)) calc(6px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}
.tabbar button {
  display: flex;
  flex: 1 1 0;
  min-height: 48px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  color: #596779;
  font-size: .81rem;
  font-weight: 590;
  line-height: 1.2;
}
.tabbar button.active, .tabbar button[aria-current="page"] {
  background: #e9eedf;
  color: #273e2b;
}
.navicon { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; font-size: 1.18rem; }
.tabbar .navicon { position: relative; }
.nav-count { position:absolute; top:-2px; left:90%; min-width:15px; padding:1px 3px; border-radius:8px; background:#324c64; color:white; font-size:.65rem; font-weight:700; text-align:center; }
#toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(82px + var(--safe-bottom));
  transform: translateX(-50%);
  max-width: min(90vw, 560px);
  width: max-content;
  padding: 12px 17px;
  border-radius: 13px;
  color: #fff;
  background: #1e3040;
  box-shadow: 0 4px 20px #0a17221f;
  font-size: .92rem;
  overflow-wrap: anywhere;
}
#toast:empty { display: none; }
.loading { padding-block: 16px; color: var(--muted); }
@media (hover: hover) {
  .tile:hover { border-color: #91a1ae; }
  .actions button:hover, .secondary:hover, .primary:hover, .doc:hover, .upload:hover { filter: brightness(.96); }
  .quiet:hover, .back:hover { text-decoration: underline; }
}
@media (min-width: 640px) {
  .grid { gap: 14px; }
  .hero { min-height: 206px; }
  .art { right: 9%; }
}
@media (max-width: 350px) {
  :root { --pad: 12px; }
  .hero { padding: 16px; }
  .hero-content { max-width: 80%; }
  .art { right: -4%; opacity: .55; }
  .tabbar { gap: 0; padding-inline: 4px; }
  .tabbar button { font-size: .76rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .tile, .primary, .actions button { transition: border-color .16s, filter .16s; }
}
