:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #73777c;
  --quiet: #969ba1;
  --line: #e3e5e7;
  --line-strong: #cfd3d7;
  --canvas: #f5f6f7;
  --paper: #ffffff;
  --paper-soft: #fafafa;
  --brand-red: #e30012;
  --brand-red-dark: #b6000e;
  --green: #198754;
  --amber: #dc8e21;
  --blue: #4b657d;
  --violet: #785b8f;
  --shadow-sm: 0 10px 30px rgba(17, 18, 20, 0.07);
  --shadow-lg: 0 24px 70px rgba(17, 18, 20, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --max: 1480px;
  --sidebar-width: clamp(270px, 19.5vw, 390px);
  --header-height: 76px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 90% 4%, rgba(227, 0, 18, 0.055), transparent 28rem), var(--canvas);
  color: var(--ink);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.mobile-menu-open { overflow-y: hidden; }

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.portal-shell,
.portal-main,
.view-stack,
.dashboard-grid,
.panel,
.featured-grid,
.featured-card,
.articles-page,
.article-card,
.system-view,
.system-frame-wrap {
  min-width: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 30px rgba(17, 18, 20, 0.045);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-height: var(--header-height);
  align-items: center;
  width: 100%;
  padding: 0 1.7rem 0 3.6rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.sidebar-topbar {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.mobile-menu-toggle,
.mobile-primary-tabs {
  display: none;
}

.mobile-menu-toggle {
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.system-sidebar.is-mobile-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.system-sidebar.is-mobile-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
.system-sidebar.is-mobile-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.brand:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--brand-red);
  outline-offset: 6px;
}

.brand-logo { width: 158px; height: auto; }

.brand-copy {
  padding-left: 0.9rem;
  border-left: 1px solid var(--line-strong);
}

.brand-copy strong,
.brand-copy small { display: block; }
.brand-copy strong { font-size: 1rem; letter-spacing: 0.08em; }
.brand-copy small { margin-top: 0.08rem; color: var(--muted); font-size: 0.72rem; }

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(25, 135, 84, 0.1);
}

.primary-tabs {
  display: grid;
  width: min(760px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 auto;
}

.primary-tabs button {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-tabs button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--brand-red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-tabs button:hover,
.primary-tabs button:focus-visible,
.primary-tabs button.is-active {
  border-color: rgba(227, 0, 18, 0.32);
  background: rgba(227, 0, 18, 0.035);
  box-shadow: 0 8px 24px rgba(227, 0, 18, 0.07);
  transform: translateY(-1px);
}

.primary-tabs button.is-active::after { transform: scaleX(1); }

.primary-tabs strong { display: block; min-width: 0; max-width: 100%; font-size: 0.88rem; letter-spacing: 0.03em; }

.portal-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: calc(var(--header-height) + 1.25rem) 22px 2.5rem;
}

.system-sidebar {
  position: fixed;
  z-index: 70;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 10px 0 36px rgba(17, 18, 20, 0.045);
}

.system-sidebar::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 30px;
  height: var(--header-height);
  background: var(--brand-red);
  clip-path: polygon(0 0, 0 100%, 100% 100%, 0 0);
  content: "";
  pointer-events: none;
}

.sidebar-body {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  flex: 1;
  flex-direction: column;
  padding: 1.8rem 1.35rem 1.25rem;
}

.sidebar-heading span,
.view-kicker {
  color: var(--brand-red);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.sidebar-heading h2 { margin: 0.2rem 0 0; font-size: 1.15rem; }

.system-links {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.35rem;
}

.system-link {
  display: grid;
  min-height: 58px;
  grid-template-columns: 38px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.72rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.system-link:hover,
.system-link:focus-visible,
.system-link.is-active {
  border-color: rgba(227, 0, 18, 0.17);
  background: rgba(227, 0, 18, 0.05);
  color: var(--brand-red);
}

.system-link-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.63rem;
  font-weight: 900;
}

.system-link-label {
  min-width: 0;
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-link-arrow { color: var(--quiet); font-size: 1rem; }

.sidebar-note {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.note-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--canvas);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.sidebar-note p { margin: 0; color: var(--muted); font-size: 0.68rem; line-height: 1.6; }
.portal-main { width: min(100%, var(--max)); min-width: 0; min-height: 680px; margin: 0 auto; outline: none; }

.view-stack {
  display: grid;
  gap: 1.25rem;
  animation: view-in 220ms ease both;
}

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.9rem 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 88% 10%, rgba(227, 0, 18, 0.12), transparent 18rem), var(--paper);
  box-shadow: var(--shadow-sm);
}

.view-header h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.view-header > p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.8;
}

.home-intro { min-height: 220px; align-items: center; }
.home-intro h1 span { color: var(--brand-red); }

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.action-button,
.material-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}

.action-button {
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  font-size: 0.76rem;
}

.action-button.primary { border-color: var(--brand-red); background: var(--brand-red); color: #fff; }
.action-button:hover, .action-button:focus-visible { border-color: var(--brand-red); color: var(--brand-red); }
.action-button.primary:hover, .action-button.primary:focus-visible { background: var(--brand-red-dark); color: #fff; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1.25rem;
}

.panel {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading h2 { margin: 0; font-size: 1.05rem; }
.panel-heading span, .panel-heading button { color: var(--brand-red); font-size: 0.7rem; font-weight: 800; }
.panel-heading button { padding: 0; border: 0; background: transparent; cursor: pointer; }

.announcement-list,
.article-list,
.material-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.announcement-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.announcement-item:first-child, .article-item:first-child { border-top: 0; }
.announcement-date { color: var(--brand-red); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.04em; }
.announcement-item strong, .article-item strong { display: block; font-size: 0.88rem; }
.announcement-item p, .article-item p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.65; }

.article-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.article-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--canvas);
  color: var(--brand-red);
  font-size: 0.65rem;
  font-weight: 900;
}

.article-status,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.featured-card {
  --accent: var(--brand-red);
  position: relative;
  display: flex;
  min-height: 380px;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 42%), var(--paper);
  box-shadow: var(--shadow-sm);
}

.featured-card::before {
  position: absolute;
  top: 0;
  left: 1.5rem;
  width: 48px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.featured-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.featured-card .group-code { color: var(--accent); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.1em; }
.featured-card h2 { margin: 1rem 0 0.65rem; font-size: 1.35rem; line-height: 1.35; letter-spacing: -0.03em; }
.featured-card > p { margin: 0; color: var(--muted); font-size: 0.8rem; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li { padding: 0.2rem 0.5rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.62rem; font-weight: 700; }
.featured-materials { margin-top: auto; padding-top: 1.15rem; }
.featured-materials h3 { margin: 0 0 0.55rem; font-size: 0.72rem; letter-spacing: 0.06em; }
.material-list { gap: 0.4rem; }

.material-link {
  display: grid;
  min-height: 48px;
  grid-template-columns: 30px 1fr auto;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}

.material-link:hover, .material-link:focus-visible { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--paper); }

.file-type {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
  color: var(--accent);
  font-size: 0.52rem;
  font-weight: 900;
}

.material-link strong { display: block; min-width: 0; align-self: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-link .open-mark { align-self: center; color: var(--quiet); font-size: 0.9rem; }

.empty-workspace {
  display: grid;
  min-height: 500px;
  place-items: center;
  padding: 3rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.empty-workspace-inner { max-width: 560px; }

.empty-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 1.2rem;
  border: 1px solid rgba(227, 0, 18, 0.2);
  border-radius: 22px;
  background: rgba(227, 0, 18, 0.05);
  color: var(--brand-red);
  font-size: 1.45rem;
  font-weight: 900;
}

.empty-workspace h2 { margin: 0; font-size: 1.55rem; }
.empty-workspace p { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.85rem; }

.placeholder-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.placeholder-types li { padding: 0.42rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 0.68rem; font-weight: 800; }
.articles-page { display: grid; gap: 0.75rem; }

.article-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.article-card .article-number { width: 48px; height: 48px; font-size: 0.75rem; }
.article-card h2 { margin: 0; font-size: 1rem; }
.article-card p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.76rem; }

.system-view {
  display: grid;
  min-height: 680px;
  grid-template-rows: auto minmax(520px, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  animation: view-in 220ms ease both;
}

.system-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.system-title { display: flex; align-items: center; gap: 0.75rem; }
.system-title .system-link-icon { width: 40px; height: 40px; border-color: rgba(227, 0, 18, 0.18); background: rgba(227, 0, 18, 0.05); color: var(--brand-red); }
.system-title h1 { margin: 0; font-size: 1.05rem; }
.system-title p { margin: 0.05rem 0 0; color: var(--muted); font-size: 0.7rem; }
.system-frame-wrap { position: relative; min-height: 520px; background: var(--paper-soft); }
.system-frame { width: 100%; height: 100%; min-height: 600px; border: 0; background: #fff; }

.system-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
}

.system-placeholder > div { max-width: 480px; }
.system-placeholder .system-link-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; color: var(--brand-red); font-size: 0.85rem; }
.system-placeholder h2 { margin: 0; font-size: 1.35rem; }
.system-placeholder p { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.8rem; }

.config-hint {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: auto;
  margin-left: var(--sidebar-width);
  padding: 1.4rem 22px 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.8rem; color: var(--ink); font-weight: 800; }
.footer-brand img { width: 108px; padding-right: 0.8rem; border-right: 1px solid var(--line-strong); }
.site-footer p { margin: 0; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1000px) {
  .system-sidebar {
    position: sticky;
    top: 0;
    width: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 26px rgba(17, 18, 20, 0.07);
  }
  .system-sidebar::before { height: 64px; }
  .sidebar-topbar {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .brand {
    min-height: 64px;
    flex: 1;
    padding: 0 20px 0 52px;
    border-bottom: 0;
  }
  .mobile-menu-toggle { display: grid; flex: 0 0 auto; }
  .sidebar-body {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    min-height: auto;
    max-height: calc(100dvh - 64px);
    padding: 1rem 12px 1.2rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 20px 44px rgba(17, 18, 20, 0.15);
  }
  .system-sidebar.is-mobile-open .sidebar-body {
    display: block;
    animation: mobile-menu-in 180ms ease both;
  }
  .mobile-primary-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .mobile-primary-tabs button {
    min-width: 0;
    min-height: 46px;
    padding: 0.55rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper-soft);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
  }
  .mobile-primary-tabs button:hover,
  .mobile-primary-tabs button:focus-visible,
  .mobile-primary-tabs button.is-active {
    border-color: rgba(227, 0, 18, 0.28);
    background: rgba(227, 0, 18, 0.06);
    color: var(--brand-red);
  }
  .sidebar-heading { display: block; margin-top: 0.9rem; }
  .sidebar-heading h2 { font-size: 0.95rem; }
  .sidebar-note { display: none; }
  .system-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding-bottom: 0;
    overflow: visible;
  }
  .system-link { min-width: 0; scroll-snap-align: none; }
  .site-header { display: none; }
  .portal-shell {
    min-height: auto;
    margin-left: 0;
    padding: 0.85rem 12px 2.5rem;
  }
  .site-footer { margin-left: 0; padding-right: 12px; padding-left: 12px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .brand-logo { width: 122px; }
  .sidebar-body { padding: 0.9rem 10px 1.1rem; }
  .mobile-primary-tabs { grid-template-columns: 1fr; }
  .mobile-primary-tabs button { text-align: left; padding-right: 0.8rem; padding-left: 0.8rem; }
  .system-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-link { min-height: 52px; padding: 0.42rem 0.55rem; }
  .system-link-icon { width: 34px; height: 34px; }
  .view-header { align-items: flex-start; flex-direction: column; padding: 1.4rem; }
  .view-header > p { max-width: none; }
  .home-intro { min-height: auto; }
  .featured-grid { grid-template-columns: 1fr; }
  .announcement-item { grid-template-columns: 1fr; gap: 0.2rem; }
  .article-item, .article-card { grid-template-columns: 38px 1fr; }
  .article-item .article-status, .article-card .article-status { grid-column: 2; width: fit-content; }
  .article-card { align-items: start; padding: 1rem; }
  .system-view { min-height: 0; grid-template-rows: auto minmax(440px, 1fr); }
  .system-frame-wrap { min-height: 440px; }
  .system-frame { min-height: 520px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
}

@media (max-width: 460px) {
  .site-header { padding-right: 8px; padding-left: 8px; }
  .primary-tabs { gap: 0.3rem; }
  .primary-tabs button { padding-right: 0.2rem; padding-left: 0.2rem; }
  .primary-tabs strong { font-size: 0.72rem; }
  .portal-shell { padding-right: 10px; padding-left: 10px; }
  .view-stack { gap: 0.85rem; }
  .view-header { padding: 1.1rem; border-radius: 18px; }
  .view-header h1 { font-size: clamp(1.7rem, 9vw, 2rem); overflow-wrap: anywhere; }
  .view-header > p { font-size: 0.8rem; }
  .home-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .action-button { width: 100%; }
  .panel, .featured-card { padding: 1.1rem; }
  .panel-heading { align-items: flex-start; }
  .featured-card { min-height: 350px; }
  .material-link { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .empty-workspace { min-height: 430px; padding: 1.5rem; }
  .system-view-header { align-items: flex-start; flex-direction: column; }
  .system-title { align-items: flex-start; }
  .site-footer { padding-right: 10px; padding-left: 10px; }
}
