:root {
  --desktop: #cbd9e2;
  --window: #f7f9fa;
  --toolbar: #eef2f4;
  --sidebar: #e7eef1;
  --surface: #ffffff;
  --line: #d7e0e4;
  --line-strong: #bccbd2;
  --ink: #17313d;
  --muted: #66777f;
  --teal: #1d7785;
  --red: #c4584d;
  --gold: #b98a36;
  --shadow: 0 28px 70px rgba(49, 68, 78, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--desktop);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.system-menu {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(248, 250, 251, 0.84);
  color: #24353d;
  font-size: 12px;
  backdrop-filter: blur(18px);
}

.menu-links,
.menu-status {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu-links a {
  color: #33464f;
}

.menu-links a:hover,
.menu-links a.active {
  color: #0e5e78;
}

.menu-brand {
  font-weight: 750;
}

.menu-status {
  font-variant-numeric: tabular-nums;
}

.site-desktop {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 32px 54px 24px;
  background: var(--desktop);
}

.portal-window,
.construction-window {
  width: min(1240px, calc(100vw - 108px));
  min-height: 650px;
  height: min(760px, calc(100vh - 108px));
  display: grid;
  grid-template-rows: 48px 1fr;
  overflow: hidden;
  border: 1px solid rgba(43, 59, 68, 0.2);
  border-radius: 8px;
  background: var(--window);
  box-shadow: var(--shadow);
}

.window-toolbar {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid #d9e1e5;
  background: var(--toolbar);
}

.window-toolbar > strong {
  color: #29404b;
  font-size: 13px;
  text-align: center;
}

.window-context {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.window-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.window-actions span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #cad5da;
  border-radius: 6px;
  background: #fff;
  color: #57676f;
}

.portal-content {
  min-height: 0;
  display: grid;
  grid-template-columns: 390px 1fr;
}

.clock-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 46px;
  border-right: 1px solid #d8e1e5;
  background: var(--sidebar);
}

.clock-value {
  color: #173b4b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 58px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clock-date {
  margin: 24px 0 0;
  color: #203b47;
  font-size: 20px;
  font-weight: 650;
}

.clock-week {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.identity-block {
  margin-top: 58px;
  padding-top: 30px;
  border-top: 1px solid #bdcbd1;
}

.identity-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid #6e8792;
  border-radius: 7px;
  font-size: 20px;
  font-weight: 750;
}

.identity-block h1 {
  margin: 0;
  color: #17313d;
  font-size: 34px;
  line-height: 1.2;
}

.identity-block p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.module-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1.1fr 0.9fr;
  gap: 16px;
  padding: 24px;
  background: var(--window);
}

.module-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(40, 59, 67, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.module-card:hover,
.module-card:focus-visible {
  transform: translateY(-3px);
  border-color: #8ea6b0;
  box-shadow: 0 15px 32px rgba(40, 59, 67, 0.12);
  outline: none;
}

.module-regulatory {
  grid-column: 1 / -1;
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.module-academic { border-top: 4px solid var(--red); }
.module-procurement { border-top: 4px solid var(--gold); }

.module-regulatory p,
.module-regulatory .module-state { color: #cbe3e7; }

.module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 0;
}

.module-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.module-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
}

.module-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.module-state {
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 8px 24px 14px;
  background: var(--desktop);
  color: #4c626c;
  font-size: 11px;
}

.site-footer a:hover {
  color: #0e5e78;
  text-decoration: underline;
}

.construction-window {
  width: min(1040px, calc(100vw - 108px));
}

.construction-content {
  min-height: 0;
  display: grid;
  grid-template-columns: 350px 1fr;
}

.construction-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 42px;
  border-right: 1px solid #d8e1e5;
  background: var(--sidebar);
}

.construction-sidebar .clock-value { font-size: 48px; }
.construction-sidebar .identity-block { margin-top: 46px; }

.construction-main {
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--window);
}

.construction-card {
  width: min(500px, 100%);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(40, 59, 67, 0.08);
}

.construction-card.procurement { border-top-color: var(--gold); }
.construction-card span { color: var(--muted); font-size: 12px; }
.construction-card h1 { margin: 18px 0 0; font-size: 34px; }
.construction-card p { margin: 14px 0 32px; color: var(--muted); line-height: 1.7; }

.back-link {
  width: max-content;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--toolbar);
  color: #29404b;
  font-size: 13px;
}

.back-link:hover { border-color: #71909d; }

@media (max-width: 900px) {
  .system-menu { padding-inline: 14px; }
  .menu-links { gap: 12px; }
  .menu-links a:not(.menu-brand):not(.active) { display: none; }
  .menu-status span:first-child { display: none; }

  .site-desktop {
    display: block;
    min-height: 0;
    padding: 14px 12px 22px;
  }

  .portal-window,
  .construction-window {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .window-toolbar {
    grid-template-columns: 90px 1fr 90px;
  }

  .portal-content,
  .construction-content {
    grid-template-columns: 1fr;
  }

  .clock-sidebar,
  .construction-sidebar {
    min-height: 410px;
    padding: 38px 32px;
    border-right: 0;
    border-bottom: 1px solid #d8e1e5;
  }

  .clock-value { font-size: clamp(42px, 13vw, 58px); }
  .identity-block { margin-top: 40px; }

  .module-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 12px;
    padding: 14px;
  }

  .module-regulatory { grid-column: auto; }
  .module-card { min-height: 220px; padding: 24px; }
  .module-heading h2 { font-size: 26px; }

  .construction-main { padding: 18px; }
  .construction-card { min-height: 320px; padding: 32px 26px; }
  .construction-card h1 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  .module-card { transition: none; }
}
