: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;
  }
}

/* 2026-07 portal redesign: scoped to user-facing pages only. */
.portal-home {
  --portal-ink: #111827;
  --portal-muted: #667085;
  --portal-blue: #2563eb;
  --portal-cyan: #06b6d4;
  --portal-violet: #7c3aed;
  --portal-green: #10b981;
  --portal-line: rgba(15, 23, 42, 0.09);
  --portal-card: rgba(255, 255, 255, 0.88);
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.18), transparent 31rem),
    radial-gradient(circle at 88% 12%, rgba(124, 58, 237, 0.14), transparent 28rem),
    linear-gradient(180deg, #f7f9ff 0%, #eef4ff 42%, #f8fafc 100%);
  color: var(--portal-ink);
}

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

.portal-home .portal-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: #0f172a;
  color: rgba(255, 255, 255, 0.78);
}

.portal-home .portal-topbar-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
}

.portal-home .portal-topbar a {
  margin-left: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.portal-home .portal-topbar a:hover {
  color: #fff;
}

.portal-home .portal-hero {
  min-height: 460px;
  display: block;
  padding: 58px 0 96px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.9) 52%, rgba(8, 145, 178, 0.82)),
    radial-gradient(circle at 80% 25%, rgba(255, 255, 255, 0.28), transparent 18rem);
}

.portal-home .portal-hero::before {
  left: auto;
  right: 12%;
  top: 54px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
  transform: none;
}

.portal-home .portal-hero::after {
  right: -130px;
  bottom: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.18);
  transform: none;
}

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

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

.portal-home .hero-badge,
.portal-home .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portal-home .hero-badge::before,
.portal-home .section-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--portal-cyan), var(--portal-blue));
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.15);
}

.portal-home .hero-copy h1 {
  max-width: 820px;
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(52px, 6.8vw, 96px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.portal-home .hero-copy p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 21px;
  line-height: 1.8;
}

.portal-home .hero-search {
  width: min(720px, 100%);
  height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 8px;
  margin-top: 34px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.portal-home .hero-search input {
  height: 100%;
  border: 0;
  border-radius: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 16px;
  box-shadow: none;
}

.portal-home .hero-search button {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #38bdf8, #2563eb 58%, #7c3aed);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.portal-home .hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.portal-home .hero-metrics span {
  min-width: 128px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  backdrop-filter: blur(12px);
}

.portal-home .hero-metrics strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.portal-home .hero-metrics small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.portal-home .hero-dashboard {
  position: relative;
  min-height: 360px;
}

.portal-home .dashboard-card {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px);
}

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

.portal-home .dashboard-card.side-paper {
  right: 0;
  top: 0;
  width: 190px;
  min-height: 180px;
  padding: 22px;
  transform: rotate(6deg);
}

.portal-home .dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 24px;
}

.portal-home .dashboard-title i {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
}

.portal-home .dashboard-line,
.portal-home .dashboard-card em {
  display: block;
  height: 12px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.portal-home .dashboard-line.wide { width: 86%; }
.portal-home .dashboard-line.short { width: 54%; }
.portal-home .dashboard-card em:nth-child(3) { width: 72%; }
.portal-home .dashboard-card em:nth-child(4) { width: 52%; }

.portal-home .dashboard-progress {
  display: grid;
  grid-template-columns: 1fr 0.72fr 0.48fr;
  gap: 12px;
  margin-top: 34px;
}

.portal-home .dashboard-progress span {
  height: 92px;
  align-self: end;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.85), rgba(37, 99, 235, 0.5));
}

.portal-home .dashboard-progress span:nth-child(2) { height: 132px; }
.portal-home .dashboard-progress span:nth-child(3) { height: 68px; }

.portal-home .portal-main {
  margin-top: -54px;
  padding: 0 0 86px;
}

.portal-home .portal-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.portal-home .board-card,
.portal-home .feed-card,
.portal-home .side-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: var(--portal-card);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(18px);
}

.portal-home .category-board {
  display: block;
  position: sticky;
  top: 18px;
}

.portal-home .board-heading {
  height: auto;
  min-height: 92px;
  padding: 22px;
  border-bottom: 1px solid var(--portal-line);
  background: transparent;
}

.portal-home .board-heading h2 {
  margin: 7px 0 0;
  color: var(--portal-ink);
  font-size: 26px;
  letter-spacing: -0.04em;
}

.portal-home .more-button {
  min-width: 62px;
  height: 38px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.portal-home .portal-category-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px;
}

.portal-home .portal-category-button {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.74);
}

.portal-home .portal-category-button:hover,
.portal-home .portal-category-button.active {
  border-color: rgba(37, 99, 235, 0.24);
  background: linear-gradient(135deg, #eff6ff, #fff);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.1);
}

.portal-home .category-plus {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0284c7;
}

.portal-home .portal-category-button strong {
  color: #1f2937;
  font-size: 15px;
}

.portal-home .portal-category-button small {
  max-width: 100%;
  color: #7b8494;
}

.portal-home .category-count {
  background: #111827;
  color: #fff;
}

.portal-home .portal-feed-column {
  min-width: 0;
}

.portal-home .feed-title-row {
  align-items: center;
  margin: 0 0 16px;
  padding: 22px 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(18px);
}

.portal-home .all-docs-button {
  position: relative;
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--portal-ink);
  padding: 0;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.portal-home .all-docs-button::after {
  content: attr(data-count);
  display: inline-flex;
  margin-left: 12px;
  transform: translateY(-5px);
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0;
}

.portal-home .sync-status {
  background: #eef2ff;
  color: #3730a3;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.portal-home .feed-card {
  display: block;
  padding: 18px;
}

.portal-home .portal-document-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-home .portal-doc-card {
  position: relative;
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 18px;
  min-height: 260px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.portal-home .portal-doc-card::before {
  content: var(--card-index);
  position: absolute;
  right: 18px;
  top: 16px;
  color: rgba(15, 23, 42, 0.06);
  font-size: 54px;
  line-height: 1;
  font-weight: 950;
}

.portal-home .portal-doc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.12);
}

.portal-home .portal-doc-card.featured {
  grid-column: 1 / -1;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 300px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.16), transparent 20rem);
}

.portal-home .doc-cover {
  height: 100%;
  min-height: 216px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.62);
}

.portal-home .doc-cover::after {
  inset: auto 18px 18px 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--portal-blue), var(--portal-cyan));
}

.portal-home .doc-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transform: scale(1.01);
}

.portal-home .doc-main {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.portal-home .doc-main .eyebrow {
  width: fit-content;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  padding: 7px 10px;
  letter-spacing: 0.08em;
}

.portal-home .portal-doc-card h3 {
  margin: 14px 0 10px;
  color: #101828;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

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

.portal-home .portal-doc-card p,
.portal-home .portal-doc-card .doc-content {
  color: #667085;
  font-size: 14px;
  line-height: 1.85;
}

.portal-home .portal-doc-card .doc-content {
  margin-top: 12px;
  -webkit-line-clamp: 2;
}

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

.portal-home .portal-doc-card .pill {
  background: #f8fafc;
  color: #475467;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.portal-home .doc-detail-button {
  width: fit-content;
  margin-top: auto;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
}

.portal-home .public-attachments {
  margin: 12px 0 12px;
}

.portal-home .portal-side-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.portal-home .side-card {
  padding: 22px;
}

.portal-home .side-card-dark {
  background:
    linear-gradient(135deg, #111827, #1e3a8a 58%, #075985);
  color: #fff;
}

.portal-home .side-card-dark .section-kicker,
.portal-home .side-card-dark p {
  color: rgba(255, 255, 255, 0.72);
}

.portal-home .side-card h2 {
  margin: 10px 0 12px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.portal-home .side-card p {
  margin: 0;
  color: #667085;
  line-height: 1.8;
}

.portal-home .side-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.portal-home .side-card-heading strong {
  font-size: 20px;
}

.portal-home .latest-list {
  display: grid;
  gap: 10px;
}

.portal-home .latest-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.portal-home .latest-item span {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}

.portal-home .latest-item strong,
.portal-home .latest-item small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-home .latest-item strong {
  color: #111827;
  font-size: 14px;
}

.portal-home .latest-item small,
.portal-home .latest-empty {
  color: #667085;
  font-size: 12px;
}

.portal-home .side-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.portal-home .side-mini-grid span {
  display: grid;
  gap: 6px;
  min-width: 0;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px 8px;
  text-align: center;
}

.portal-home .side-mini-grid strong {
  font-size: 15px;
}

.portal-home .side-mini-grid small {
  color: #667085;
  font-size: 11px;
}

.portal-home .empty-state {
  grid-column: 1 / -1;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
}

.detail-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.14), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 46%, #f8fafc 100%);
}

.detail-page .detail-top,
.detail-page .detail-hero {
  min-height: 260px;
  padding: 24px 0 86px;
  background:
    linear-gradient(135deg, #0f172a, #1e3a8a 62%, #075985),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.24), transparent 18rem);
  color: #fff;
}

.detail-page .detail-top-inner {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  backdrop-filter: blur(16px);
}

.detail-page .back-link {
  color: #fff;
}

.detail-page #detailStatus,
.detail-page .detail-top-inner span {
  color: rgba(255, 255, 255, 0.72);
}

.detail-page .detail-hero-copy {
  margin-top: 44px;
}

.detail-page .detail-hero-copy p {
  max-width: 640px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
}

.detail-page .detail-layout {
  margin-top: -68px;
  padding-bottom: 86px;
}

.detail-page .detail-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
}

.detail-page .detail-head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding-bottom: 26px;
}

.detail-page .detail-head h1,
.detail-page .detail-card h1 {
  color: #101828;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-page .detail-summary {
  color: #667085;
  font-size: 18px;
}

.detail-page .rich-content {
  color: #263244;
  font-size: 17px;
  line-height: 2;
}

.detail-page .rich-content img {
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

@media (max-width: 1180px) {
  .portal-home .portal-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .portal-home .portal-side-panel {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: 1fr 1.2fr 0.8fr;
  }

  .portal-home .portal-document-list {
    grid-template-columns: 1fr;
  }
}

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

  .portal-home .portal-topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  .portal-home .hero-grid,
  .portal-home .portal-workspace,
  .portal-home .portal-side-panel {
    grid-template-columns: 1fr;
  }

  .portal-home .portal-hero {
    min-height: auto;
    padding: 42px 0 82px;
  }

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

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

  .portal-home .category-board,
  .portal-home .portal-side-panel {
    position: static;
  }

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

  .portal-home .doc-cover {
    height: 260px;
  }
}

@media (max-width: 560px) {
  .portal-home .hero-copy h1 {
    font-size: 46px;
  }

  .portal-home .hero-search {
    height: auto;
    grid-template-columns: 1fr;
  }

  .portal-home .hero-search button {
    height: 48px;
  }

  .portal-home .hero-metrics,
  .portal-home .side-mini-grid {
    grid-template-columns: 1fr;
  }

  .portal-home .hero-metrics span {
    width: 100%;
  }

  .portal-home .feed-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-home .all-docs-button {
    font-size: 28px;
  }
}

/* 2026-07 editorial redesign: warm paper / ink green / amber magazine style. */
.portal-home {
  --paper-bg: #f4efe4;
  --paper-bg-2: #ebe2d1;
  --paper-card: rgba(255, 252, 244, 0.92);
  --paper-solid: #fffaf0;
  --ink: #17231d;
  --ink-soft: #425247;
  --moss: #173f35;
  --moss-2: #27594a;
  --amber: #bf8742;
  --amber-2: #e4c38c;
  --line-warm: rgba(71, 58, 41, 0.14);
  --shadow-warm: 0 24px 70px rgba(60, 44, 25, 0.14);
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(191, 135, 66, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 8%, rgba(23, 63, 53, 0.13), transparent 26rem),
    linear-gradient(180deg, var(--paper-bg) 0%, #faf5e9 46%, var(--paper-bg-2) 100%);
  color: var(--ink);
}

.portal-home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(23, 35, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 29, 0.025) 1px, transparent 1px);
  background-size: 36px 36px, 36px 36px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 86%);
}

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

.portal-home .portal-topbar {
  border-bottom: 1px solid rgba(255, 250, 240, 0.14);
  background: var(--moss);
  color: rgba(255, 250, 240, 0.78);
}

.portal-home .portal-topbar-inner {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  font-size: 13px;
}

.portal-home .portal-brand {
  color: #fffaf0;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.portal-home .portal-brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background: linear-gradient(135deg, var(--amber), #f1d6a4);
  box-shadow: 8px 8px 0 rgba(255, 250, 240, 0.25);
}

.portal-home .portal-topbar a {
  margin-left: 18px;
  color: rgba(255, 250, 240, 0.78);
}

.portal-home .portal-topbar a:hover {
  color: #fffaf0;
}

.portal-home .portal-hero {
  min-height: 520px;
  display: block;
  padding: 72px 0 116px;
  background:
    radial-gradient(circle at 77% 18%, rgba(228, 195, 140, 0.4), transparent 18rem),
    linear-gradient(135deg, #fbf3e2 0%, #efe2c7 58%, #d9c49f 100%);
  color: var(--ink);
}

.portal-home .portal-hero::before {
  right: 10%;
  top: 92px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 50%;
  background: transparent;
  transform: none;
}

.portal-home .portal-hero::after {
  right: 22%;
  bottom: 80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(191, 135, 66, 0.14);
  transform: none;
}

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

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

.portal-home .hero-badge,
.portal-home .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.portal-home .hero-badge::before,
.portal-home .section-kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  border-radius: 0;
  background: var(--amber);
  box-shadow: none;
}

.portal-home .hero-copy h1 {
  max-width: 900px;
  margin: 24px 0 22px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  font-size: clamp(58px, 7.2vw, 112px);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.portal-home .hero-copy p {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.85;
}

.portal-home .hero-search {
  width: min(720px, 100%);
  height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 0;
  margin-top: 38px;
  padding: 0;
  border: 1px solid var(--moss);
  border-radius: 0;
  background: var(--paper-solid);
  box-shadow: 12px 12px 0 rgba(23, 63, 53, 0.12);
  backdrop-filter: none;
}

.portal-home .hero-search input {
  height: 100%;
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--line-warm);
  padding: 0 24px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  box-shadow: none;
}

.portal-home .hero-search button {
  border: 0;
  border-radius: 0;
  background: var(--moss);
  color: #fffaf0;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: none;
}

.portal-home .hero-search button:hover {
  background: #0f2f28;
}

.portal-home .hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 34px;
  border-top: 1px solid rgba(23, 63, 53, 0.16);
  border-bottom: 1px solid rgba(23, 63, 53, 0.16);
  width: fit-content;
}

.portal-home .hero-metrics span {
  min-width: 150px;
  border: 0;
  border-right: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 0;
  padding: 18px 22px;
  background: transparent;
  color: var(--ink);
  backdrop-filter: none;
}

.portal-home .hero-metrics span:last-child {
  border-right: 0;
}

.portal-home .hero-metrics strong {
  display: block;
  color: var(--moss);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.portal-home .hero-metrics small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.portal-home .hero-dashboard {
  position: relative;
  min-height: 420px;
}

.portal-home .dashboard-card {
  position: absolute;
  border: 1px solid rgba(23, 63, 53, 0.18);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow-warm);
  backdrop-filter: blur(8px);
}

.portal-home .dashboard-card.main-paper {
  inset: 20px 50px 0 0;
  padding: 34px;
}

.portal-home .dashboard-card.main-paper::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(191, 135, 66, 0.24);
  pointer-events: none;
}

.portal-home .dashboard-card.side-paper {
  right: 0;
  top: 0;
  width: 196px;
  min-height: 210px;
  padding: 24px;
  transform: rotate(4deg);
  background: #173f35;
  color: #fffaf0;
}

.portal-home .dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--moss);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.portal-home .dashboard-title i {
  width: 54px;
  height: 68px;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(23, 63, 53, 0.12), rgba(23, 63, 53, 0.02)),
    #fffaf0;
  border: 1px solid rgba(23, 63, 53, 0.2);
  box-shadow: 8px 8px 0 rgba(191, 135, 66, 0.22);
}

.portal-home .dashboard-line,
.portal-home .dashboard-card em {
  display: block;
  height: 11px;
  margin-top: 20px;
  border-radius: 0;
  background: rgba(23, 63, 53, 0.16);
}

.portal-home .dashboard-card.side-paper em {
  background: rgba(255, 250, 240, 0.28);
}

.portal-home .dashboard-line.wide { width: 86%; }
.portal-home .dashboard-line.short { width: 54%; }
.portal-home .dashboard-card em:nth-child(3) { width: 72%; }
.portal-home .dashboard-card em:nth-child(4) { width: 52%; }

.portal-home .dashboard-progress {
  display: grid;
  grid-template-columns: 1fr 0.72fr 0.48fr;
  gap: 12px;
  margin-top: 42px;
  align-items: end;
}

.portal-home .dashboard-progress span {
  height: 94px;
  border-radius: 0;
  background: linear-gradient(180deg, var(--amber-2), var(--amber));
}

.portal-home .dashboard-progress span:nth-child(2) { height: 146px; background: linear-gradient(180deg, #315f50, var(--moss)); }
.portal-home .dashboard-progress span:nth-child(3) { height: 66px; }

.portal-home .portal-main {
  margin-top: -62px;
  padding: 0 0 92px;
}

.portal-home .portal-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.portal-home .board-card,
.portal-home .feed-card,
.portal-home .side-card,
.portal-home .feed-title-row {
  border: 1px solid var(--line-warm);
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: var(--shadow-warm);
  backdrop-filter: blur(10px);
}

.portal-home .category-board,
.portal-home .portal-side-panel {
  position: sticky;
  top: 18px;
}

.portal-home .board-heading {
  height: auto;
  min-height: 102px;
  padding: 24px;
  border-bottom: 1px solid var(--line-warm);
  background: transparent;
}

.portal-home .board-heading h2,
.portal-home .side-card h2,
.portal-home .side-card-heading strong {
  margin: 9px 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.portal-home .more-button {
  min-width: 64px;
  height: 38px;
  border: 1px solid var(--moss);
  border-radius: 0;
  background: transparent;
  color: var(--moss);
  font-weight: 950;
}

.portal-home .more-button:hover {
  background: var(--moss);
  color: #fffaf0;
}

.portal-home .portal-category-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.portal-home .portal-category-button {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 76px;
  border: 0;
  border-bottom: 1px solid var(--line-warm);
  border-radius: 0;
  padding: 16px 20px;
  background: transparent;
}

.portal-home .portal-category-button:last-child {
  border-bottom: 0;
}

.portal-home .portal-category-button:hover,
.portal-home .portal-category-button.active {
  border-color: var(--line-warm);
  background: #f4ead6;
  box-shadow: inset 4px 0 0 var(--amber);
  transform: none;
}

.portal-home .category-plus {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(23, 63, 53, 0.22);
  border-radius: 50%;
  background: transparent;
  color: var(--moss);
}

.portal-home .portal-category-button strong {
  color: var(--ink);
  font-size: 15px;
}

.portal-home .portal-category-button small {
  max-width: 100%;
  color: var(--ink-soft);
}

.portal-home .category-count {
  background: var(--moss);
  color: #fffaf0;
  border-radius: 0;
}

.portal-home .portal-feed-column {
  min-width: 0;
}

.portal-home .feed-title-row {
  align-items: center;
  margin: 0 0 18px;
  padding: 24px 28px;
}

.portal-home .all-docs-button {
  position: relative;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.portal-home .all-docs-button::after {
  content: attr(data-count);
  display: inline-flex;
  margin-left: 14px;
  transform: translateY(-7px);
  border: 1px solid var(--amber);
  border-radius: 0;
  background: transparent;
  color: var(--amber);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0;
}

.portal-home .sync-status {
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-radius: 0;
  background: #f8f0df;
  color: var(--ink-soft);
}

.portal-home .feed-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.portal-home .portal-document-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.portal-home .portal-doc-card {
  position: relative;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 26px;
  min-height: 232px;
  border: 0;
  border-bottom: 1px solid var(--line-warm);
  border-radius: 0;
  padding: 28px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transition: background 0.18s ease, transform 0.18s ease;
}

.portal-home .portal-doc-card:last-child {
  border-bottom: 0;
}

.portal-home .portal-doc-card::before {
  content: var(--card-index);
  position: absolute;
  right: 24px;
  top: 18px;
  color: rgba(23, 63, 53, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 68px;
  line-height: 1;
  font-weight: 900;
}

.portal-home .portal-doc-card:hover {
  background: #f6edda;
  transform: none;
  box-shadow: none;
}

.portal-home .portal-doc-card.featured {
  grid-column: auto;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 306px;
  background:
    linear-gradient(90deg, rgba(23, 63, 53, 0.08), transparent 44%),
    #fff8e9;
}

.portal-home .doc-cover {
  height: 100%;
  min-height: 178px;
  border: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 0;
  background: #f8f0df;
  box-shadow: 8px 8px 0 rgba(23, 63, 53, 0.08);
}

.portal-home .portal-doc-card.featured .doc-cover {
  min-height: 246px;
}

.portal-home .doc-cover::after {
  inset: 16px;
  height: auto;
  border: 1px solid rgba(191, 135, 66, 0.28);
  border-radius: 0;
  background: transparent;
}

.portal-home .doc-preview-image {
  width: calc(100% - 22px);
  height: calc(100% - 22px);
  object-fit: cover;
  border-radius: 0;
  filter: sepia(0.12) saturate(0.92);
}

.portal-home .doc-main {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.portal-home .doc-main .eyebrow {
  width: fit-content;
  border: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 0;
  background: transparent;
  color: var(--moss);
  padding: 6px 10px;
  letter-spacing: 0.1em;
}

.portal-home .portal-doc-card h3 {
  margin: 16px 0 10px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.portal-home .portal-doc-card.featured h3 {
  font-size: 42px;
  max-width: 760px;
}

.portal-home .portal-doc-card p,
.portal-home .portal-doc-card .doc-content {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
}

.portal-home .portal-doc-card .doc-content {
  margin-top: 12px;
  -webkit-line-clamp: 2;
}

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

.portal-home .portal-doc-card .pill {
  border: 1px solid rgba(23, 63, 53, 0.13);
  border-radius: 0;
  background: #f8f0df;
  color: var(--ink-soft);
  box-shadow: none;
}

.portal-home .doc-detail-button {
  width: fit-content;
  margin-top: auto;
  border: 1px solid var(--moss);
  border-radius: 0;
  background: var(--moss);
  color: #fffaf0;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.portal-home .doc-detail-button:hover {
  background: transparent;
  color: var(--moss);
}

.portal-home .public-attachments {
  margin: 12px 0 12px;
}

.portal-home .portal-side-panel {
  display: grid;
  gap: 18px;
}

.portal-home .side-card {
  padding: 24px;
}

.portal-home .side-card-dark {
  background:
    linear-gradient(135deg, #173f35, #0f2f28);
  color: #fffaf0;
}

.portal-home .side-card-dark .section-kicker,
.portal-home .side-card-dark p {
  color: rgba(255, 250, 240, 0.72);
}

.portal-home .side-card h2 {
  margin: 12px 0 14px;
  font-size: 34px;
  line-height: 1.08;
}

.portal-home .side-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.85;
}

.portal-home .side-card-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.portal-home .side-card-heading strong {
  font-size: 28px;
}

.portal-home .latest-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-warm);
}

.portal-home .latest-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-warm);
  border-radius: 0;
  background: transparent;
  padding: 14px 0;
  text-align: left;
}

.portal-home .latest-item span {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(23, 63, 53, 0.18);
  border-radius: 50%;
  background: transparent;
  color: var(--moss);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 900;
}

.portal-home .latest-item strong,
.portal-home .latest-item small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-home .latest-item strong {
  color: var(--ink);
  font-size: 15px;
}

.portal-home .latest-item small,
.portal-home .latest-empty {
  color: var(--ink-soft);
  font-size: 12px;
}

.portal-home .side-mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.portal-home .side-mini-grid span {
  display: grid;
  gap: 6px;
  min-width: 0;
  border-bottom: 1px solid var(--line-warm);
  border-radius: 0;
  background: transparent;
  padding: 18px 22px;
  text-align: left;
}

.portal-home .side-mini-grid span:last-child {
  border-bottom: 0;
}

.portal-home .side-mini-grid strong {
  color: var(--moss);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.portal-home .side-mini-grid small {
  color: var(--ink-soft);
  font-size: 12px;
}

.portal-home .empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgba(23, 63, 53, 0.28);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.72);
}

.detail-page {
  --paper-bg: #f4efe4;
  --paper-card: rgba(255, 252, 244, 0.94);
  --ink: #17231d;
  --ink-soft: #425247;
  --moss: #173f35;
  --amber: #bf8742;
  --line-warm: rgba(71, 58, 41, 0.14);
  background:
    radial-gradient(circle at 10% 0%, rgba(191, 135, 66, 0.16), transparent 30rem),
    linear-gradient(180deg, #f7f0e3 0%, #fbf7ee 48%, #efe3cc 100%);
}

.detail-page .detail-top,
.detail-page .detail-hero {
  min-height: 300px;
  padding: 28px 0 104px;
  background:
    radial-gradient(circle at 82% 22%, rgba(228, 195, 140, 0.3), transparent 18rem),
    linear-gradient(135deg, #173f35, #0f2f28);
  color: #fffaf0;
}

.detail-page .detail-top-inner {
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.08);
  padding: 12px 16px;
  backdrop-filter: blur(10px);
}

.detail-page .back-link {
  color: #fffaf0;
}

.detail-page #detailStatus,
.detail-page .detail-top-inner span {
  color: rgba(255, 250, 240, 0.72);
}

.detail-page .detail-hero-copy {
  margin-top: 54px;
}

.detail-page .section-kicker {
  color: #e4c38c;
  letter-spacing: 0.22em;
}

.detail-page .detail-hero-copy p {
  max-width: 640px;
  margin: 16px 0 0;
  color: rgba(255, 250, 240, 0.76);
  font-size: 21px;
}

.detail-page .detail-layout {
  margin-top: -76px;
  padding-bottom: 96px;
}

.detail-page .detail-card {
  border: 1px solid var(--line-warm);
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: 0 28px 80px rgba(60, 44, 25, 0.14);
  backdrop-filter: blur(8px);
}

.detail-page .detail-head {
  border-bottom: 1px solid var(--line-warm);
  padding-bottom: 30px;
}

.detail-page .detail-head h1,
.detail-page .detail-card h1 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-page .detail-summary {
  color: var(--ink-soft);
  font-size: 18px;
}

.detail-page .pill {
  border-radius: 0;
  background: #f8f0df;
  color: var(--ink-soft);
}

.detail-page .rich-content {
  color: #22332b;
  font-size: 17px;
  line-height: 2.05;
}

.detail-page .rich-content img {
  border-radius: 0;
  box-shadow: 10px 10px 0 rgba(23, 63, 53, 0.08);
}

@media (max-width: 1180px) {
  .portal-home .portal-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .portal-home .portal-side-panel {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: 1fr 1fr 1fr;
  }
}

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

  .portal-home .portal-topbar-inner {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 0;
  }

  .portal-home .hero-grid,
  .portal-home .portal-workspace,
  .portal-home .portal-side-panel {
    grid-template-columns: 1fr;
  }

  .portal-home .portal-hero {
    min-height: auto;
    padding: 48px 0 88px;
  }

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

  .portal-home .category-board,
  .portal-home .portal-side-panel {
    position: static;
  }

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

  .portal-home .doc-cover {
    height: 260px;
  }
}

@media (max-width: 560px) {
  .portal-home .hero-copy h1 {
    font-size: 48px;
  }

  .portal-home .hero-search {
    height: auto;
    grid-template-columns: 1fr;
  }

  .portal-home .hero-search button {
    height: 52px;
  }

  .portal-home .hero-metrics {
    width: 100%;
  }

  .portal-home .hero-metrics span {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 63, 53, 0.16);
  }

  .portal-home .hero-metrics span:last-child {
    border-bottom: 0;
  }

  .portal-home .feed-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-home .all-docs-button {
    font-size: 31px;
  }
}

/* Remove right side panel and expand content area. */
.portal-home .portal-workspace {
  grid-template-columns: 300px minmax(0, 1fr) !important;
}

.portal-home .portal-feed-column {
  max-width: none;
}

@media (max-width: 1180px) {
  .portal-home .portal-workspace {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .portal-home .portal-workspace {
    grid-template-columns: 1fr !important;
  }
}

/* Tighten two-column layout after removing the right panel. */
.portal-home .container {
  width: min(1280px, calc(100% - 64px));
}

.portal-home .portal-workspace {
  grid-template-columns: 280px minmax(0, 1fr) !important;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.portal-home .feed-card,
.portal-home .feed-title-row {
  width: 100%;
}

.portal-home .portal-doc-card {
  grid-template-columns: 220px minmax(0, 1fr);
}

.portal-home .portal-doc-card.featured {
  grid-template-columns: 280px minmax(0, 1fr);
}

@media (max-width: 1180px) {
  .portal-home .container {
    width: min(1120px, calc(100% - 40px));
  }

  .portal-home .portal-workspace {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }

  .portal-home .portal-doc-card,
  .portal-home .portal-doc-card.featured {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

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

  .portal-home .portal-workspace,
  .portal-home .portal-doc-card,
  .portal-home .portal-doc-card.featured {
    grid-template-columns: 1fr !important;
  }
}

/* Replace hero preview with archive cabinet illustration. */
.portal-home .archive-visual {
  position: relative;
  min-height: 430px;
  perspective: 1100px;
}

.portal-home .archive-orbit {
  position: absolute;
  inset: 16px 18px 32px 42px;
  border: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.portal-home .archive-orbit::before,
.portal-home .archive-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(191, 135, 66, 0.16);
}

.portal-home .archive-orbit::before {
  width: 170px;
  height: 170px;
  right: 52px;
  top: -42px;
}

.portal-home .archive-orbit::after {
  width: 230px;
  height: 230px;
  left: 38px;
  bottom: -76px;
}

.portal-home .archive-cabinet {
  position: absolute;
  right: 36px;
  top: 48px;
  width: 360px;
  padding: 22px;
  border: 1px solid rgba(23, 63, 53, 0.2);
  background: #fffaf0;
  box-shadow: 18px 18px 0 rgba(23, 63, 53, 0.12), 0 30px 70px rgba(60, 44, 25, 0.18);
  transform: rotateY(-8deg) rotateZ(1deg);
}

.portal-home .archive-cabinet::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 78px;
  height: 1px;
  background: rgba(23, 63, 53, 0.12);
}

.portal-home .cabinet-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--moss);
  font-weight: 950;
  font-size: 22px;
}

.portal-home .cabinet-head span {
  width: 44px;
  height: 56px;
  border: 1px solid rgba(23, 63, 53, 0.18);
  background: linear-gradient(180deg, #f5f0e4, #e4dccb);
  box-shadow: 8px 8px 0 rgba(191, 135, 66, 0.18);
}

.portal-home .drawer-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-top: 1px solid rgba(23, 63, 53, 0.1);
  color: var(--ink-soft);
  font-weight: 800;
}

.portal-home .drawer-row i {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(23, 63, 53, 0.24);
  border-radius: 50%;
}

.portal-home .drawer-row em {
  height: 8px;
  background: rgba(23, 63, 53, 0.14);
}

.portal-home .drawer-row.active {
  color: var(--moss);
}

.portal-home .drawer-row.active i {
  background: var(--amber);
  border-color: var(--amber);
}

.portal-home .archive-folder {
  position: absolute;
  left: 22px;
  border: 1px solid rgba(23, 63, 53, 0.18);
  background: var(--moss);
  color: #fffaf0;
  box-shadow: 12px 12px 0 rgba(191, 135, 66, 0.2);
}

.portal-home .archive-folder::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -18px;
  width: 86px;
  height: 18px;
  background: inherit;
  border: 1px solid rgba(23, 63, 53, 0.18);
  border-bottom: 0;
}

.portal-home .archive-folder b {
  display: block;
  margin-bottom: 18px;
  font-size: 26px;
  letter-spacing: 0.08em;
}

.portal-home .archive-folder span {
  display: block;
  height: 10px;
  margin-top: 12px;
  background: rgba(255, 250, 240, 0.25);
}

.portal-home .folder-one {
  top: 128px;
  width: 190px;
  min-height: 152px;
  padding: 28px 24px;
  transform: rotate(-8deg);
}

.portal-home .folder-two {
  left: 96px;
  bottom: 34px;
  width: 174px;
  min-height: 116px;
  padding: 26px 22px;
  background: #bf8742;
  color: #173f35;
  transform: rotate(7deg);
}

.portal-home .folder-two span {
  background: rgba(23, 63, 53, 0.24);
}

.portal-home .archive-seal {
  position: absolute;
  right: 8px;
  bottom: 42px;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 1px solid rgba(23, 63, 53, 0.24);
  border-radius: 50%;
  color: var(--moss);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  background: rgba(255, 250, 240, 0.58);
  box-shadow: inset 0 0 0 8px rgba(191, 135, 66, 0.12);
}

@media (max-width: 900px) {
  .portal-home .archive-visual {
    display: none;
  }
}

/* Remove hero illustration and make the opening area cleaner. */
.portal-home .hero-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 980px;
  gap: 0;
}

.portal-home .portal-hero {
  min-height: auto;
  padding: 78px 0 108px;
}

.portal-home .hero-copy h1 {
  max-width: 980px;
}

.portal-home .hero-copy p {
  max-width: 760px;
}

.portal-home .hero-search {
  width: min(780px, 100%);
}

.portal-home .hero-metrics {
  width: min(780px, 100%);
}

.portal-home .hero-metrics span {
  flex: 1 1 0;
}

.portal-home .portal-hero::before {
  right: 8%;
  top: 48px;
  width: 260px;
  height: 260px;
  opacity: 0.55;
}

.portal-home .portal-hero::after {
  right: 18%;
  bottom: 42px;
  width: 170px;
  height: 170px;
  opacity: 0.75;
}

/* Refine hero into balanced two-column editorial intro. */
.portal-home .portal-hero {
  min-height: auto;
  padding: 64px 0 86px;
}

.portal-home .hero-grid {
  grid-template-columns: minmax(0, 0.95fr) 360px !important;
  max-width: 1280px;
  gap: 64px;
  align-items: center;
}

.portal-home .hero-copy h1 {
  font-size: clamp(54px, 6vw, 96px);
}

.portal-home .hero-summary-card {
  position: relative;
  min-height: 330px;
  border: 1px solid rgba(23, 63, 53, 0.18);
  background: rgba(255, 250, 240, 0.84);
  box-shadow: 16px 16px 0 rgba(23, 63, 53, 0.1), 0 28px 70px rgba(60, 44, 25, 0.16);
  padding: 28px;
}

.portal-home .hero-summary-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(191, 135, 66, 0.24);
  pointer-events: none;
}

.portal-home .summary-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--moss);
}

.portal-home .summary-card-head span {
  font-size: 26px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-weight: 900;
}

.portal-home .summary-card-head strong {
  color: rgba(23, 63, 53, 0.36);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.portal-home .summary-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 0.78fr 0.58fr;
  gap: 14px;
  align-items: end;
  height: 160px;
  margin-top: 46px;
  padding: 0 6px;
}

.portal-home .summary-card-body i {
  display: block;
  border: 1px solid rgba(23, 63, 53, 0.15);
  background: linear-gradient(180deg, #e4c38c, #bf8742);
}

.portal-home .summary-card-body i:nth-child(1) { height: 96px; }
.portal-home .summary-card-body i:nth-child(2) { height: 138px; background: linear-gradient(180deg, #315f50, var(--moss)); }
.portal-home .summary-card-body i:nth-child(3) { height: 72px; }

.portal-home .summary-card-foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 30px;
  border-top: 1px solid rgba(23, 63, 53, 0.14);
  padding-top: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.portal-home .portal-hero::before {
  right: 6%;
  top: 60px;
  width: 210px;
  height: 210px;
  opacity: 0.42;
}

.portal-home .portal-hero::after {
  right: 25%;
  bottom: 34px;
  width: 118px;
  height: 118px;
  opacity: 0.46;
}

@media (max-width: 1100px) {
  .portal-home .hero-grid {
    grid-template-columns: 1fr !important;
    max-width: 900px;
  }

  .portal-home .hero-summary-card {
    display: none;
  }
}

/* Final hero balance: remove the awkward empty right side, align intro with content. */
.portal-home .portal-hero {
  min-height: 430px;
  padding: 56px 0 84px;
}

.portal-home .hero-grid {
  display: block;
  max-width: 1280px;
}

.portal-home .hero-copy {
  width: min(860px, 100%);
}

.portal-home .hero-copy h1 {
  max-width: 860px;
  margin-top: 0;
  font-size: clamp(56px, 6.4vw, 96px);
  line-height: 0.98;
}

.portal-home .hero-copy p {
  max-width: 620px;
  font-size: 20px;
  line-height: 1.7;
}

.portal-home .hero-search,
.portal-home .hero-metrics {
  width: min(760px, 100%);
}

.portal-home .hero-search {
  margin-top: 30px;
}

.portal-home .hero-metrics {
  margin-top: 30px;
}

.portal-home .hero-summary-card {
  display: none !important;
}

.portal-home .portal-hero::before {
  right: 8%;
  top: 58px;
  width: 260px;
  height: 260px;
  opacity: 0.28;
}

.portal-home .portal-hero::after {
  right: 18%;
  bottom: 48px;
  width: 150px;
  height: 150px;
  opacity: 0.4;
}

.portal-home .portal-main {
  margin-top: -42px;
}

@media (max-width: 900px) {
  .portal-home .portal-hero {
    padding: 42px 0 70px;
  }

  .portal-home .hero-copy h1 {
    font-size: clamp(44px, 16vw, 68px);
  }
}

/* Compact cover: turn the empty hero into a framed search panel. */
.portal-home .portal-hero {
  min-height: auto;
  padding: 48px 0 74px;
}

.portal-home .hero-grid {
  display: block;
  max-width: 1280px;
}

.portal-home .hero-copy {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-areas:
    "title metrics"
    "intro metrics"
    "search metrics";
  column-gap: 52px;
  align-items: center;
  padding: 42px 48px 38px;
  border: 1px solid rgba(23, 63, 53, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.95) 0%, rgba(255, 250, 240, 0.78) 62%, rgba(244, 232, 211, 0.9) 100%);
  box-shadow: 18px 18px 0 rgba(23, 63, 53, 0.08), 0 30px 80px rgba(60, 44, 25, 0.12);
}

.portal-home .hero-copy h1 {
  grid-area: title;
  margin: 0 0 16px;
  font-size: clamp(48px, 5.2vw, 82px);
  letter-spacing: -0.07em;
}

.portal-home .hero-copy p {
  grid-area: intro;
  max-width: none;
  margin: 0;
  font-size: 19px;
}

.portal-home .hero-search {
  grid-area: search;
  width: 100%;
  height: 62px;
  margin-top: 28px;
}

.portal-home .hero-metrics {
  grid-area: metrics;
  width: 100%;
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid rgba(23, 63, 53, 0.16);
  background: rgba(255, 252, 244, 0.72);
}

.portal-home .hero-metrics::before {
  content: "资料概览";
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(23, 63, 53, 0.12);
  color: var(--moss);
  font-size: 18px;
  font-weight: 950;
}

.portal-home .hero-metrics span {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  padding: 16px 18px;
  border-right: 0;
  border-bottom: 1px solid rgba(23, 63, 53, 0.1);
}

.portal-home .hero-metrics span:last-child {
  border-bottom: 0;
}

.portal-home .hero-metrics strong {
  font-size: 34px;
  line-height: 1;
}

.portal-home .hero-metrics small {
  padding-bottom: 3px;
}

.portal-home .portal-hero::before {
  right: 7%;
  top: 36px;
  width: 210px;
  height: 210px;
  opacity: 0.18;
}

.portal-home .portal-hero::after {
  right: 18%;
  bottom: 22px;
  width: 120px;
  height: 120px;
  opacity: 0.22;
}

.portal-home .portal-main {
  margin-top: -34px;
}

@media (max-width: 1100px) {
  .portal-home .hero-copy {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "intro"
      "search"
      "metrics";
    row-gap: 0;
    padding: 34px 30px;
  }

  .portal-home .hero-metrics {
    margin-top: 28px;
    grid-template-columns: repeat(3, 1fr);
  }

  .portal-home .hero-metrics::before {
    grid-column: 1 / -1;
  }

  .portal-home .hero-metrics span {
    grid-template-columns: 1fr;
    border-bottom: 0;
    border-right: 1px solid rgba(23, 63, 53, 0.1);
  }
}

@media (max-width: 720px) {
  .portal-home .portal-hero {
    padding: 28px 0 56px;
  }

  .portal-home .hero-copy {
    padding: 28px 20px;
  }

  .portal-home .hero-search {
    height: auto;
    grid-template-columns: 1fr;
  }

  .portal-home .hero-search button {
    min-height: 52px;
  }

  .portal-home .hero-metrics {
    grid-template-columns: 1fr;
  }

  .portal-home .hero-metrics span {
    border-right: 0;
    border-bottom: 1px solid rgba(23, 63, 53, 0.1);
  }
}

/* Detail page cleanup: compact top bar, no sticky cover blocking the article. */
.detail-page .detail-top,
.detail-page .detail-hero {
  position: static;
  min-height: auto;
  padding: 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.12);
  background: var(--moss);
  color: #fffaf0;
}

.detail-page .detail-top-inner {
  min-height: 64px;
  height: auto;
  border: 0;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
}

.detail-page .detail-hero-copy {
  display: none;
}

.detail-page .detail-layout {
  margin-top: 0;
  padding-top: 38px;
}

.detail-page .detail-card {
  width: min(1040px, 100%);
}

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

  .detail-page .detail-layout {
    padding-top: 20px;
  }
}

/* Preview: swap hero overview and main search positions. */
.portal-home .hero-copy {
  grid-template-columns: 330px minmax(0, 1fr);
  grid-template-areas:
    "metrics title"
    "metrics intro"
    "metrics search";
}

.portal-home .hero-copy h1,
.portal-home .hero-copy p,
.portal-home .hero-search {
  justify-self: stretch;
}

.portal-home .hero-metrics {
  align-self: stretch;
}

@media (max-width: 1100px) {
  .portal-home .hero-copy {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "intro"
      "search"
      "metrics";
  }
}

/* Admin editorial redesign: follow the public warm-paper / moss-green style. */
.admin-page {
  --paper-bg: #f4efe4;
  --paper-card: rgba(255, 252, 244, 0.94);
  --paper-solid: #fffaf0;
  --ink: #17231d;
  --ink-soft: #425247;
  --moss: #173f35;
  --moss-2: #27594a;
  --amber: #bf8742;
  --amber-2: #e4c38c;
  --line-warm: rgba(71, 58, 41, 0.14);
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(191, 135, 66, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(23, 63, 53, 0.12), transparent 24rem),
    linear-gradient(180deg, #f7f0e3 0%, #fbf7ee 50%, #efe3cc 100%);
  color: var(--ink);
}

.admin-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(23, 35, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 29, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 86%);
}

.admin-page .eyebrow {
  color: var(--amber);
  letter-spacing: 0.14em;
  text-transform: none;
}

.admin-page .login-shell {
  min-height: 100vh;
  padding: 34px;
}

.admin-page .login-card {
  position: relative;
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
  border: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: 18px 18px 0 rgba(23, 63, 53, 0.08), 0 28px 80px rgba(60, 44, 25, 0.14);
  backdrop-filter: none;
}

.admin-page .login-card::before {
  content: "";
  display: block;
  min-height: 386px;
  border: 1px solid rgba(255, 250, 240, 0.18);
  background:
    linear-gradient(rgba(255, 250, 240, 0.2), rgba(255, 250, 240, 0.2)) 34px 48px / 74px 10px no-repeat,
    linear-gradient(rgba(255, 250, 240, 0.14), rgba(255, 250, 240, 0.14)) 34px 86px / 210px 12px no-repeat,
    linear-gradient(rgba(255, 250, 240, 0.14), rgba(255, 250, 240, 0.14)) 34px 116px / 180px 12px no-repeat,
    linear-gradient(145deg, var(--moss), #0f2f28);
  box-shadow: inset 0 0 0 18px rgba(255, 250, 240, 0.04);
}

.admin-page .login-card .eyebrow,
.admin-page .login-card h1,
.admin-page .login-card .stack-form {
  grid-column: 2;
}

.admin-page .login-card h1,
.admin-page .admin-header h1,
.admin-page .card-heading h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: -0.05em;
}

.admin-page .login-card h1 {
  margin: 6px 0 6px;
  font-size: clamp(42px, 5vw, 58px);
  line-height: 1.05;
}

.admin-page label {
  color: var(--ink);
}

.admin-page input,
.admin-page select,
.admin-page textarea {
  border-color: rgba(23, 63, 53, 0.18);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.88);
  color: var(--ink);
}

.admin-page input:focus,
.admin-page select:focus,
.admin-page textarea:focus {
  border-color: rgba(23, 63, 53, 0.58);
  box-shadow: 0 0 0 4px rgba(23, 63, 53, 0.08);
}

.admin-page .primary-button,
.admin-page .ghost-button,
.admin-page .danger-button,
.admin-page .small-button {
  border-radius: 0;
}

.admin-page .primary-button {
  background: var(--moss);
  color: #fffaf0;
}

.admin-page .primary-button:hover {
  background: #0f2f28;
}

.admin-page .ghost-button {
  border: 1px solid rgba(23, 63, 53, 0.22);
  background: rgba(255, 250, 240, 0.72);
  color: var(--moss);
}

.admin-page .danger-button,
.admin-page .small-button.danger {
  background: #f3d7cf;
  color: #8f2d1f;
}

.admin-page .small-button {
  background: #ecf0e9;
  color: var(--moss);
}

.admin-page .small-button.neutral {
  background: #f6eddc;
  color: var(--ink-soft);
}

.admin-page .admin-shell {
  width: min(1280px, calc(100% - 64px));
  max-width: none;
  margin: 0 auto;
  padding: 44px 0 80px;
}

.admin-page .admin-header {
  align-items: center;
  margin-bottom: 22px;
  padding: 28px 34px;
  border: 1px solid rgba(23, 63, 53, 0.16);
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.96), rgba(244, 232, 211, 0.88));
  box-shadow: 14px 14px 0 rgba(23, 63, 53, 0.08);
}

.admin-page .admin-header h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1;
}

.admin-page .admin-module-nav {
  gap: 18px;
  margin-bottom: 24px;
}

.admin-page .admin-module-tab {
  min-height: 124px;
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.78);
  color: var(--ink-soft);
  box-shadow: 10px 10px 0 rgba(23, 63, 53, 0.06);
}

.admin-page .admin-module-tab strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.admin-page .admin-module-tab:hover,
.admin-page .admin-module-tab.active {
  border-color: rgba(191, 135, 66, 0.52);
  background: #fffaf0;
  box-shadow: 10px 10px 0 rgba(191, 135, 66, 0.16);
}

.admin-page .admin-module-tab.active {
  border-left: 5px solid var(--amber);
}

.admin-page .admin-card {
  padding: 30px;
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: 18px 18px 0 rgba(23, 63, 53, 0.06), 0 26px 80px rgba(60, 44, 25, 0.11);
  backdrop-filter: none;
}

.admin-page .card-heading {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23, 63, 53, 0.12);
}

.admin-page .card-heading h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
}

.admin-page .muted {
  color: var(--ink-soft);
}

.admin-page .mini-row,
.admin-page .table-row {
  border-color: rgba(23, 63, 53, 0.12);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.72);
}

.admin-page .table-row.header {
  background: var(--moss);
  color: #fffaf0;
}

.admin-page .row-title strong {
  color: var(--ink);
}

.admin-page .status-published {
  background: #dfeee3;
  color: #1f5b39;
}

.admin-page .status-draft {
  background: #f6eddc;
  color: #76532c;
}

.admin-page .rich-editor-card {
  border-color: rgba(23, 63, 53, 0.16);
  border-radius: 0;
  background: rgba(255, 250, 240, 0.84);
}

.admin-page .rich-toolbar {
  background: #f6eddc;
  border-bottom-color: rgba(23, 63, 53, 0.12);
}

.admin-page .rich-toolbar button {
  border-color: rgba(23, 63, 53, 0.18);
  border-radius: 0;
  background: #fffaf0;
  color: var(--moss);
}

.admin-page .rich-editor {
  background: rgba(255, 250, 240, 0.76);
}

.admin-page .admin-dialog-backdrop {
  background: rgba(23, 35, 29, 0.48);
}

.admin-page .admin-dialog-card {
  border-color: rgba(23, 63, 53, 0.16);
  border-radius: 0;
  background: var(--paper-solid);
  box-shadow: 18px 18px 0 rgba(23, 63, 53, 0.16), 0 32px 90px rgba(23, 35, 29, 0.24);
}

.admin-page .icon-button {
  border-radius: 0;
  background: #f6eddc;
  color: var(--moss);
}

@media (max-width: 980px) {
  .admin-page .login-card {
    grid-template-columns: 1fr;
  }

  .admin-page .login-card::before {
    min-height: 150px;
  }

  .admin-page .login-card .eyebrow,
  .admin-page .login-card h1,
  .admin-page .login-card .stack-form {
    grid-column: 1;
  }

  .admin-page .admin-shell {
    width: min(100% - 32px, 760px);
  }
}

@media (max-width: 760px) {
  .admin-page .login-shell {
    padding: 18px;
  }

  .admin-page .login-card,
  .admin-page .admin-card,
  .admin-page .admin-header {
    padding: 24px 20px;
  }

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