:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34rem),
    linear-gradient(180deg, #f7f9ff 0%, var(--bg) 48%, #eef2ff 100%);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1340px, calc(100% - 48px));
  margin: 0 auto;
}

.portal-home {
  background: #f3f4f6;
  color: #424852;
}

.notice-bar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #8a8f99;
  font-size: 15px;
  border-bottom: 1px solid #eeeeee;
}

.notice-bar strong {
  color: #66ad46;
  font-weight: 700;
}

.notice-bar button,
.hero-dismiss {
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #f9f9f9;
  color: #8a8f99;
  padding: 3px 9px;
  font-size: 13px;
}

.masthead {
  height: 118px;
  display: grid;
  grid-template-columns: 280px minmax(260px, 620px) 260px;
  gap: 28px;
  align-items: center;
  background: #fff;
}

.portal-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-doc {
  color: #2c5d84;
  font-size: 52px;
  line-height: 1;
}

.logo-in {
  display: inline-grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  background: #76b947;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  position: relative;
}

.logo-in::after {
  content: "";
  position: absolute;
  right: 3px;
  top: -7px;
  width: 24px;
  height: 32px;
  border-radius: 0 100% 0 100%;
  background: #76b947;
  transform: rotate(22deg);
}

.logo-name {
  color: #222;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 58px;
  height: 50px;
  border: 2px solid #5fba62;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.search-box input {
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  color: #666;
  font-size: 20px;
  box-shadow: none;
}

.search-box input:focus {
  border: 0;
  box-shadow: none;
}

.search-box button {
  border: 0;
  border-left: 1px solid #d7ead4;
  background: #fff;
  color: #777;
  font-size: 36px;
  line-height: 1;
}

.header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  color: #363b44;
  font-size: 18px;
  font-weight: 700;
}

.header-links a:first-child {
  color: #8b929c;
  font-size: 14px;
  font-weight: 500;
  margin-right: 24px;
}

.category-nav {
  min-height: 82px;
  background: #3f61a4;
  color: #edf4ff;
}

.nav-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.nav-inner a {
  padding: 11px 14px;
  color: #edf4ff;
  font-size: 18px;
  line-height: 1;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: #fff;
  font-weight: 800;
}

.nav-spacer {
  flex: 1 1 auto;
}

.nav-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 82px;
  color: #f4ce45 !important;
  font-size: 27px !important;
}

.nav-icon small {
  font-size: 14px;
  font-weight: 700;
}

.portal-hero {
  position: relative;
  min-height: 182px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(65, 132, 210, 0.96), rgba(78, 142, 217, 0.9)),
    radial-gradient(circle at 70% 0%, rgba(255, 255, 255, 0.22), transparent 30rem),
    #4c8bd5;
  color: #fff;
}

.portal-hero::before,
.portal-hero::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 440px;
  height: 260px;
  border-radius: 44px;
  background: rgba(30, 83, 156, 0.16);
  transform: skewX(-22deg) rotate(-2deg);
}

.portal-hero::before {
  left: 47%;
  top: -48px;
}

.portal-hero::after {
  right: -80px;
  bottom: -150px;
}

.hero-dismiss {
  position: absolute;
  top: 20px;
  right: max(24px, calc((100% - 1340px) / 2));
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(28, 85, 160, 0.35);
  color: #eaf2ff;
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 34px 0;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-copy p {
  margin: 0;
  font-size: 22px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.94);
}

.hero-copy .hero-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.portal-main {
  padding: 28px 0 70px;
}

.category-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  align-items: stretch;
}

.board-card,
.visitor-card,
.feed-card {
  border: 1px solid #dedede;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid #e2e2e2;
  background: linear-gradient(#fbfbfb, #f0f0f0);
}

.board-heading h2 {
  margin: 0;
  color: #3b3f45;
  font-size: 24px;
}

.more-button {
  border: 0;
  background: transparent;
  color: #2877ac;
  font-size: 15px;
  font-weight: 800;
}

.portal-category-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 10px 14px 12px;
}

.portal-category-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 9px 10px;
  background: transparent;
  color: #4a4f58;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.portal-category-button:hover,
.portal-category-button.active {
  background: #eef5ff;
  color: #2765aa;
  transform: none;
}

.category-plus {
  color: #999;
  font-weight: 400;
}

.category-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-copy small {
  display: block;
  max-width: 190px;
  color: #8d929a;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count {
  align-self: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #667085;
  padding: 2px 7px;
  font-size: 12px;
  font-style: normal;
}

.visitor-card {
  overflow: hidden;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 56px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f8f8;
}

.tabs span {
  display: grid;
  place-items: center;
  color: #444;
  font-size: 18px;
  font-weight: 800;
}

.tabs .active {
  background: #fff;
}

.fake-input {
  height: 44px;
  margin: 20px 18px 0;
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  color: #b5b5b5;
  padding: 0 12px;
  font-size: 15px;
}

.login-tools {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 14px 20px 16px;
  color: #2d6ca2;
  font-size: 14px;
}

.blue-login-button,
.green-login-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: calc(50% - 28px);
  height: 40px;
  margin-left: 18px;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
}

.blue-login-button {
  background: #4b85e8;
}

.green-login-button {
  background: #55b63f;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 20px 18px 0;
  color: #4e76aa;
  font-size: 14px;
}

.feed-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 28px 0 18px;
}

.feed-title-row h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #3e4652;
  font-size: 23px;
}

.feed-title-row h2 small {
  color: #555;
  font-size: 16px;
  font-weight: 500;
}

.feed-title-row p {
  margin: 0;
  color: #2f6ea8;
  font-weight: 700;
}

.color-dot {
  width: 17px;
  height: 17px;
  display: inline-block;
  background:
    linear-gradient(90deg, #e05a47 0 45%, transparent 45% 55%, #7fc15a 55%),
    linear-gradient(#4aa0e6 0 45%, transparent 45% 55%, #f0c34c 55%);
  background-blend-mode: multiply;
}

.feed-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 22px;
}

.feed-tab {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: #4a4f58;
  font-size: 21px;
  font-weight: 800;
}

.portal-document-list {
  display: grid;
  gap: 0;
}

.portal-doc-card {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 22px;
  border: 0;
  border-top: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 22px 0;
  background: #fff;
  box-shadow: none;
}

.portal-doc-card.featured {
  padding-top: 18px;
}

.doc-cover {
  height: 155px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(74, 132, 219, 0.86), rgba(102, 173, 70, 0.78)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 0 8px, transparent 8px 18px);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.doc-cover::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
}

.doc-cover span {
  position: relative;
  z-index: 1;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.doc-main .eyebrow {
  margin: 0 0 6px;
  color: #2f75b5;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.portal-doc-card h3 {
  margin: 0 0 12px;
  color: #3c4149;
  font-size: 23px;
  line-height: 1.35;
}

.portal-doc-card p {
  margin: 0;
  color: #606773;
  font-size: 15px;
  line-height: 1.8;
}

.portal-doc-card .doc-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #626a75;
  font-size: 15px;
  line-height: 1.8;
}

.portal-doc-card .doc-meta {
  margin: 12px 0 0;
}

.portal-doc-card .pill {
  background: #f3f6fb;
  color: #6b7280;
}

.portal-doc-card .doc-link {
  color: #2d72b6;
}

.related-panel {
  padding-top: 38px;
}

.related-panel h3 {
  margin: 0 0 12px;
  color: #3c4149;
  font-size: 18px;
}

.related-list {
  border-top: 1px solid #e5e5e5;
}

.related-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  color: #626a75;
  padding: 12px 0 12px 18px;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.related-item::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #555;
  font-weight: 900;
}

.site-hero {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.86)),
    linear-gradient(45deg, #1e3a8a, #2563eb);
  border-bottom-left-radius: 42px;
  border-bottom-right-radius: 42px;
  box-shadow: var(--shadow);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.brand {
  font-size: 18px;
  font-weight: 800;
}

.admin-link {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 9px 16px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 66px;
}

.hero-content h1 {
  margin: 10px 0;
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: -0.05em;
}

.hero-content p:last-child {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-hero .eyebrow {
  color: #bfdbfe;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  max-width: 1180px;
  margin: -36px auto 56px;
  padding: 0 24px;
}

.panel,
.content-panel,
.admin-card,
.login-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 18px;
}

.panel-title,
.content-header,
.card-heading,
.admin-header,
.admin-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-title {
  margin-bottom: 12px;
  font-weight: 800;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  text-align: left;
  transition: 0.2s ease;
}

.category-button:hover,
.category-button.active {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
  transform: translateY(-1px);
}

.category-button strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.category-button span,
.muted {
  color: var(--muted);
}

.category-button small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.content-panel {
  min-height: 520px;
  padding: 24px;
}

.content-header {
  margin-bottom: 18px;
}

.content-header h2,
.admin-header h1,
.login-card h1,
.card-heading h2 {
  margin: 6px 0 0;
}

.card-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sync-status {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.document-list {
  display: grid;
  gap: 16px;
}

.document-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 20px;
}

.document-card h3 {
  margin: 8px 0;
  font-size: 22px;
}

.document-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.doc-content {
  margin-top: 14px;
  white-space: pre-wrap;
}

.doc-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 800;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.primary-button,
.ghost-button,
.danger-button,
.small-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
}

.small-button {
  padding: 8px 10px;
  background: #eff6ff;
  color: #1d4ed8;
}

.small-button.danger {
  background: #fee2e2;
  color: #991b1b;
}

.small-button.neutral {
  background: #f3f4f6;
  color: #374151;
}

.admin-page {
  padding: 28px;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  padding: 32px;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.admin-card {
  margin-bottom: 20px;
  padding: 22px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.document-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.full-row {
  grid-column: 1 / -1;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

.mini-table,
.admin-table {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mini-row,
.table-row {
  display: grid;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.mini-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.table-row {
  grid-template-columns: minmax(180px, 1fr) 140px 110px 180px 220px;
}

.table-row.header {
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.row-title {
  min-width: 0;
}

.row-title strong,
.row-title span {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.status-draft {
  background: #f3f4f6;
  color: #4b5563;
}

.portal-home .portal-category-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 10px 14px 12px;
}

.portal-home .portal-category-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-height: 52px;
  border: 0;
  border-radius: 4px;
  padding: 9px 10px;
  background: transparent;
  color: #4a4f58;
  transform: none;
}

.portal-home .portal-category-button:hover,
.portal-home .portal-category-button.active {
  border: 0;
  background: #eef5ff;
  color: #2765aa;
  transform: none;
}

.portal-home .portal-category-button strong {
  display: block;
  justify-content: initial;
  color: inherit;
  font-size: 16px;
  line-height: 1.2;
}

.portal-home .portal-category-button span {
  color: inherit;
}

.portal-home .category-plus {
  color: #999;
}

.portal-home .portal-category-button small {
  margin-top: 4px;
  color: #8d929a;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-home .portal-document-list {
  gap: 0;
}

.portal-home .portal-doc-card {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 22px;
  border: 0;
  border-top: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 22px 0;
  background: #fff;
}

.portal-home .portal-doc-card h3 {
  margin: 0 0 12px;
  color: #3c4149;
  font-size: 23px;
  line-height: 1.35;
}

.portal-home .portal-doc-card p {
  margin: 0;
  color: #606773;
  font-size: 15px;
  line-height: 1.8;
}

.portal-home .portal-doc-card .doc-content {
  margin-top: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 28px, 720px);
  }

  .notice-bar {
    display: none;
  }

  .masthead {
    height: auto;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0;
  }

  .portal-logo {
    justify-content: center;
  }

  .logo-doc {
    font-size: 38px;
  }

  .logo-in {
    width: 54px;
    height: 54px;
    font-size: 30px;
  }

  .header-links {
    justify-content: center;
  }

  .nav-inner {
    padding: 10px 0;
  }

  .nav-inner a {
    font-size: 15px;
    padding: 9px 10px;
  }

  .nav-spacer,
  .nav-icon {
    display: none;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .category-board,
  .feed-card {
    grid-template-columns: 1fr;
  }

  .portal-home .portal-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-home .portal-doc-card {
    grid-template-columns: 1fr;
  }

  .doc-cover {
    height: 120px;
  }

  .related-panel {
    padding-top: 0;
  }

  .layout,
  .admin-grid,
  .document-form {
    grid-template-columns: 1fr;
  }

  .layout {
    margin-top: -22px;
  }

  .table-row,
  .table-row.header {
    grid-template-columns: 1fr;
  }

  .table-row.header {
    display: none;
  }

  .admin-header,
  .content-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 用户端 v3：临时去掉 Logo，收紧顶部避免断层 */
.portal-home .portal-header {
  background: #fff;
}

.portal-home .masthead {
  height: 92px;
  grid-template-columns: minmax(420px, 760px) 150px;
  justify-content: center;
  gap: 48px;
  padding: 0;
}

.portal-home .search-box {
  width: 100%;
  max-width: 760px;
}

.portal-home .header-note {
  align-self: center;
}

@media (max-width: 900px) {
  .portal-home .masthead {
    height: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }

  .portal-home .header-note {
    display: none;
  }
}

.request-loader {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  box-shadow: 0 18px 50px rgba(30, 64, 175, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(14px);
}

.request-loader.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.request-loader strong {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.request-loader-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: request-loader-spin 0.78s linear infinite;
}

.loading-cursor,
.loading-cursor * {
  cursor: progress;
}

.loading-card,
.loading-row {
  pointer-events: none;
}

.loading-block,
.loading-line,
.loading-button {
  display: block;
  overflow: hidden;
  position: relative;
  border-radius: 999px;
  background: #edf2f7;
}

.loading-block::after,
.loading-line::after,
.loading-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: loading-shimmer 1.25s ease-in-out infinite;
}

.loading-block {
  min-height: 220px;
  border-radius: 16px;
}

.loading-line {
  width: 100%;
  height: 14px;
  margin: 10px 0;
}

.loading-line.title {
  width: 72%;
  height: 22px;
}

.loading-line.short {
  width: 42%;
}

.loading-button {
  width: 82px;
  height: 38px;
  border-radius: 14px;
}

.mini-row.loading-row,
.table-row.loading-row {
  background: #fff;
}

@keyframes request-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .request-loader,
  .request-loader-spinner,
  .loading-block::after,
  .loading-line::after,
  .loading-button::after {
    animation: none;
    transition: none;
  }
}

/* 管理端模块化：分类 / 编辑 / 列表 分开显示 */
.admin-module-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
}

.admin-module-tab {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  color: #475569;
  padding: 18px 20px;
  text-align: left;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-module-tab strong,
.admin-module-tab span {
  display: block;
}

.admin-module-tab strong {
  margin-bottom: 6px;
  color: #1f2937;
  font-size: 18px;
}

.admin-module-tab span {
  color: #64748b;
  font-size: 13px;
}

.admin-module-tab:hover,
.admin-module-tab.active {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.admin-module-tab.active {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.admin-module {
  animation: moduleFadeIn 0.18s ease;
}

.admin-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
}

.admin-dialog.hidden {
  display: none;
}

.admin-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
}

.admin-dialog-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.32);
  padding: 24px;
}

.admin-dialog-card .card-heading {
  margin-bottom: 2px;
}

.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.icon-button:hover {
  background: #e2e8f0;
}

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

@media (max-width: 900px) {
  .admin-module-nav {
    grid-template-columns: 1fr;
  }
}

/* 富文本编辑与附件 */
.rich-field,
.attachment-field {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 700;
}

.rich-editor-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.rich-toolbar button {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  padding: 7px 10px;
  font-weight: 800;
}

.rich-toolbar button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  color: #1d4ed8;
}

.rich-editor {
  min-height: 300px;
  padding: 18px;
  outline: none;
  color: #1f2937;
  font-weight: 400;
  line-height: 1.8;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
}

.rich-editor img,
.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 10px 0;
}

.rich-editor a,
.rich-content a {
  color: #2563eb;
  text-decoration: underline;
}

.rich-editor blockquote,
.rich-content blockquote {
  margin: 12px 0;
  border-left: 4px solid #93c5fd;
  padding: 8px 12px;
  background: #eff6ff;
  color: #334155;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-empty,
.attachment-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attachment-item a {
  color: #1d4ed8;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.public-attachments strong,
.public-attachments a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
}

.public-attachments strong {
  background: #f3f4f6;
  color: #4b5563;
}

.public-attachments a {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.modal-open {
  overflow: hidden;
}

.clickable-doc {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.clickable-doc:hover,
.clickable-doc:focus {
  border-color: rgba(37, 99, 235, 0.28);
  background: #fbfdff;
  transform: translateY(-1px);
  outline: none;
}

.doc-detail-button {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  padding: 9px 16px;
  font-weight: 900;
}

.doc-detail-button:hover {
  background: #1d4ed8;
}

.doc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.doc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

.doc-modal-card {
  position: relative;
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 52px);
  overflow: auto;
  margin: 26px auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
  padding: 34px;
}

.doc-modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  z-index: 1;
}

.doc-modal-head {
  padding-right: 52px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
  padding-bottom: 22px;
}

.doc-modal-head h2 {
  margin: 8px 0 12px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
}

.doc-modal-summary {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.8;
}

.doc-modal-content {
  color: #1f2937;
  font-size: 16px;
  line-height: 1.95;
}

.doc-modal-content h2,
.doc-modal-content h3,
.doc-modal-content h4 {
  margin: 1.2em 0 0.6em;
  color: #111827;
}

.doc-modal-content p {
  margin: 0 0 1em;
}

.doc-modal-content img {
  display: block;
  max-height: 70vh;
  margin: 16px auto;
}

.doc-modal-attachments {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.portal-home .portal-doc-card .rich-content {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
  white-space: normal;
}

/* 独立文档详情页 */
.detail-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.12), transparent 28rem),
    #f3f5f8;
}

.detail-top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.detail-top-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-weight: 800;
}

.back-link {
  color: #2563eb;
}

.detail-layout {
  padding: 34px 0 72px;
}

.detail-card {
  width: min(980px, 100%);
  margin: 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  padding: clamp(24px, 5vw, 56px);
}

.detail-head {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 28px;
  padding-bottom: 24px;
}

.detail-head h1 {
  margin: 10px 0 14px;
  color: #111827;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.2;
}

.detail-summary {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.8;
}

.detail-content {
  color: #1f2937;
  font-size: 17px;
  line-height: 2;
}

.detail-content h2,
.detail-content h3,
.detail-content h4 {
  margin: 1.3em 0 0.7em;
  color: #111827;
  line-height: 1.35;
}

.detail-content p {
  margin: 0 0 1em;
}

.detail-content img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  margin: 18px auto;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.detail-attachments {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 700px) {
  .detail-top-inner {
    height: 56px;
  }

  .detail-layout {
    padding: 18px 0 42px;
  }

  .detail-card {
    border-radius: 20px;
  }
}

/* 用户端 v2：只读文档门户，和管理端严格分离 */
.portal-home {
  background: #f3f5f8;
}

.portal-home .container {
  width: min(1280px, calc(100% - 48px));
}

.portal-home .notice-bar {
  height: 36px;
  gap: 18px;
  border-top: 1px solid #f0dcdc;
  border-bottom: 1px solid #e9edf3;
  color: #8b9098;
}

.portal-home .notice-bar strong {
  color: #5aad40;
}

.portal-home .masthead {
  height: 136px;
  grid-template-columns: 270px minmax(360px, 760px) 150px;
  justify-content: center;
  gap: 30px;
  padding: 0 18px;
  background: #fff;
}

.portal-home .portal-logo {
  min-width: 245px;
}

.portal-home .logo-doc {
  font-size: 54px;
}

.portal-home .logo-in {
  width: 78px;
  height: 78px;
  font-size: 36px;
}

.portal-home .logo-name {
  font-size: 30px;
}

.portal-home .search-box {
  height: 56px;
  grid-template-columns: 1fr 66px;
  border-color: #63b55b;
  border-radius: 6px;
}

.portal-home .search-box input {
  font-size: 20px;
}

.portal-home .search-box button {
  font-size: 34px;
}

.portal-home .header-note {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: #7d8490;
  font-size: 14px;
}

.portal-home .header-note strong {
  color: #2f3742;
  font-size: 18px;
}

.portal-home .category-nav {
  min-height: 76px;
  background: #4363a2;
}

.portal-home .nav-inner {
  min-height: 76px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: center;
  gap: 0;
  scrollbar-width: none;
}

.portal-home .nav-inner::-webkit-scrollbar {
  display: none;
}

.portal-home .nav-inner a {
  flex: 0 0 auto;
  padding: 0 15px;
  color: #eef4ff;
  font-size: 17px;
  font-weight: 700;
  line-height: 76px;
  white-space: nowrap;
}

.portal-home .nav-inner a:hover,
.portal-home .nav-inner a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-home .portal-hero {
  min-height: 220px;
  background:
    linear-gradient(90deg, rgba(75, 136, 212, 0.98), rgba(82, 139, 212, 0.94)),
    radial-gradient(circle at 72% 14%, rgba(255, 255, 255, 0.2), transparent 330px),
    #528bd6;
}

.portal-home .hero-copy h1 {
  margin-bottom: 22px;
  font-size: 52px;
  font-weight: 400;
}

.portal-home .hero-copy p {
  font-size: 24px;
  font-weight: 600;
}

.portal-home .hero-copy .hero-sub {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
}

.portal-home .portal-main {
  padding-top: 32px;
}

.portal-home .category-board {
  display: block;
}

.portal-home .board-card {
  overflow: hidden;
  border-color: #dfe3e8;
  border-radius: 4px;
}

.portal-home .board-heading {
  height: 60px;
  padding: 0 22px;
}

.portal-home .board-heading h2 {
  font-size: 24px;
}

.portal-home .portal-category-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px 16px 14px;
}

.portal-home .portal-category-button {
  min-height: 82px;
  grid-template-columns: 22px minmax(0, 1fr) 46px;
  align-items: start;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.portal-home .portal-category-button:hover,
.portal-home .portal-category-button.active {
  border: 1px solid #b9cdfa;
  background: #eef5ff;
}

.portal-home .portal-category-button strong {
  margin-bottom: 8px;
  font-size: 17px;
}

.portal-home .portal-category-button small {
  max-width: none;
  white-space: normal;
  font-size: 13px;
}

.portal-home .category-count {
  justify-self: end;
  min-width: 42px;
  justify-content: center;
}

.portal-home .feed-title-row {
  margin-top: 30px;
}

.portal-home .feed-card {
  grid-template-columns: minmax(0, 1fr);
  border-radius: 6px;
  padding: 24px;
}

.portal-home .portal-doc-card {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  min-height: 205px;
}

.portal-home .doc-cover {
  height: 160px;
  border-radius: 6px;
}

.portal-home .portal-doc-card h3 {
  font-size: 22px;
}

@media (max-width: 1180px) {
  .portal-home .masthead {
    grid-template-columns: 240px minmax(300px, 1fr) 130px;
  }

  .portal-home .portal-category-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .portal-home .container {
    width: min(100% - 28px, 720px);
  }

  .portal-home .masthead {
    height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 0;
  }

  .portal-home .portal-logo,
  .portal-home .header-note {
    justify-content: center;
    justify-items: center;
  }

  .portal-home .category-nav {
    min-height: 56px;
  }

  .portal-home .nav-inner {
    justify-content: flex-start;
    min-height: 56px;
  }

  .portal-home .nav-inner a {
    line-height: 56px;
    font-size: 15px;
  }

  .portal-home .portal-hero {
    min-height: 190px;
  }

  .portal-home .hero-copy h1 {
    font-size: 34px;
  }

  .portal-home .hero-copy p {
    font-size: 18px;
  }

  .portal-home .portal-category-list,
  .portal-home .feed-card,
  .portal-home .portal-doc-card {
    grid-template-columns: 1fr;
  }

  .portal-home .related-panel {
    padding-top: 0;
  }
}

/* 用户端 v3 最终覆盖：去掉 Logo 后，顶部只保留搜索与只读提示 */
.portal-home .portal-header {
  background: #fff;
}

.portal-home .masthead {
  height: 92px;
  grid-template-columns: minmax(420px, 760px) 150px;
  justify-content: center;
  gap: 48px;
  padding: 0;
}

.portal-home .search-box {
  width: 100%;
  max-width: 760px;
}

.portal-home .header-note {
  align-self: center;
}

@media (max-width: 1180px) {
  .portal-home .masthead {
    grid-template-columns: minmax(420px, 680px) 140px;
  }
}

/* 用户端 v5：去掉顶部提示/搜索白栏，页面从蓝色导航开始 */
.portal-home .notice-bar,
.portal-home .masthead {
  display: none;
}

.portal-home .category-nav {
  border-top: 0;
}

/* 用户端 v6：去掉上方导航，避免和文档分类重复 */
.portal-home .category-nav {
  display: none;
}

.portal-home .portal-hero {
  min-height: 250px;
}

/* 用户端 v7：简化文档列表入口，只保留一个分类按钮 */
.portal-home .simple-feed-title {
  display: block;
  margin: 24px 0 12px;
}

.portal-home .all-docs-button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2f6ea8;
  padding: 0;
  font-size: 18px;
  font-weight: 800;
}

.portal-home .all-docs-button:hover {
  color: #1d4f83;
  text-decoration: underline;
}

.portal-home .hidden-sync {
  display: none;
}

.portal-home .feed-card {
  padding-top: 20px;
}

/* 纯文字文档预览图 */
.portal-home .doc-cover {
  height: 190px;
  padding: 10px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #f9fafc, #eef2f7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.portal-home .doc-cover::after {
  display: none;
}

.portal-home .doc-preview-image {
  width: auto;
  max-width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.portal-home .portal-doc-card:hover .doc-preview-image {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.portal-home .doc-preview-image {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (max-width: 900px) {
  .portal-home .doc-cover {
    height: 220px;
  }
}

/* 用户端 v8：重新设计首屏 Banner */
.portal-home .portal-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.2), transparent 260px),
    radial-gradient(circle at 82% 24%, rgba(29, 78, 216, 0.34), transparent 360px),
    linear-gradient(135deg, #2f75c8 0%, #5d94dc 54%, #3274c4 100%);
}

.portal-home .portal-hero::before {
  left: 4%;
  top: -120px;
  width: 520px;
  height: 430px;
  border-radius: 80px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(18deg);
}

.portal-home .portal-hero::after {
  right: -60px;
  bottom: -120px;
  width: 520px;
  height: 340px;
  border-radius: 100px;
  background: rgba(20, 64, 140, 0.2);
  transform: skewX(-24deg);
}

.portal-home .hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 54px 0;
}

.portal-home .hero-copy {
  width: 100%;
  padding: 0;
  text-align: left;
}

.portal-home .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.portal-home .hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #b9f6ca;
  box-shadow: 0 0 16px rgba(185, 246, 202, 0.8);
}

.portal-home .hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(46px, 6.2vw, 76px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  text-shadow: 0 14px 34px rgba(8, 47, 100, 0.22);
}

.portal-home .hero-copy p {
  max-width: 680px;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.portal-home .hero-search {
  display: grid;
  grid-template-columns: 1fr 112px;
  width: min(680px, 100%);
  height: 58px;
  margin-top: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 38px rgba(15, 50, 110, 0.22);
}

.portal-home .hero-search input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 20px;
  color: #1f2937;
  font-size: 17px;
  box-shadow: none;
}

.portal-home .hero-search input:focus {
  border: 0;
  box-shadow: none;
}

.portal-home .hero-search button {
  border: 0;
  background: #58a73d;
  color: #fff;
  font-weight: 900;
}

.portal-home .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portal-home .hero-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.portal-home .hero-preview {
  position: relative;
  height: 250px;
}

.portal-home .preview-paper {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 55px rgba(13, 43, 95, 0.25);
}

.portal-home .main-paper {
  inset: 18px 42px 0 0;
  padding: 28px;
}

.portal-home .side-paper {
  width: 160px;
  height: 118px;
  right: 0;
  top: 0;
  padding: 18px;
  opacity: 0.86;
  transform: rotate(7deg);
}

.portal-home .preview-paper i {
  display: block;
  width: 42px;
  height: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #5b8fd8;
}

.portal-home .preview-paper strong {
  display: block;
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 22px;
}

.portal-home .preview-paper span {
  display: block;
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  background: #e5eaf2;
}

.portal-home .preview-paper .short {
  width: 62%;
}

@media (max-width: 900px) {
  .portal-home .portal-hero {
    min-height: auto;
  }

  .portal-home .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 42px 0;
  }

  .portal-home .hero-copy {
    text-align: center;
  }

  .portal-home .hero-copy p,
  .portal-home .hero-search {
    margin-left: auto;
    margin-right: auto;
  }

  .portal-home .hero-search {
    grid-template-columns: 1fr 88px;
  }

  .portal-home .hero-tags {
    justify-content: center;
  }

  .portal-home .hero-preview {
    display: none;
  }
}

@media (max-width: 900px) {
  .portal-home .masthead {
    height: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }

  .portal-home .header-note {
    display: none;
  }
}
