:root {
  --ads-bg: #f4f7fb;
  --ads-surface: #ffffff;
  --ads-surface-soft: #eef4fb;
  --ads-border: #d8e1eb;
  --ads-text: #182433;
  --ads-muted: #5a6b7f;
  --ads-accent: #0f5ea8;
  --ads-accent-soft: #dcecff;
  --ads-shadow: 0 24px 55px rgba(13, 38, 76, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(15, 94, 168, 0.09), transparent 30%),
    linear-gradient(180deg, #f9fbfe 0%, var(--ads-bg) 100%);
}

body.ads-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 94, 168, 0.09), transparent 30%),
    linear-gradient(180deg, #f9fbfe 0%, var(--ads-bg) 100%);
  color: var(--ads-text);
  font: 16px/1.6 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--ads-accent);
}

.ads-hero {
  padding: 36px 20px 10px;
}

.ads-hero-inner,
.ads-main {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.ads-hero-inner {
  background: linear-gradient(135deg, #0d355e, #0f5ea8 65%, #3d89cf);
  color: #fff;
  border-radius: 28px;
  padding: 28px 32px;
  box-shadow: var(--ads-shadow);
}

.ads-brand-link {
  display: inline-flex;
  text-decoration: none;
  margin-bottom: 14px;
}

.ads-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ads-brand-logo {
  display: block;
  width: min(420px, 100%);
  height: auto;
  filter: brightness(0) invert(1);
}

.ads-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ads-breadcrumbs a {
  color: #eff7ff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
}

.ads-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.ads-hero p {
  margin: 0;
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.92);
}

.ads-main {
  padding: 18px 0 56px;
}

.ads-card {
  background: var(--ads-surface);
  border: 1px solid var(--ads-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--ads-shadow);
}

.ads-section-head {
  margin: 16px 0 12px;
}

.ads-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.ads-section-head-files {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ads-section-disclosure {
  margin-bottom: 24px;
}

.ads-section-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  margin: 16px 0 12px;
  padding: 0;
}

.ads-section-summary::-webkit-details-marker {
  display: none;
}

.ads-section-summary::after {
  content: "\25be";
  color: var(--ads-muted);
  font-size: 1rem;
  line-height: 1;
  margin-left: auto;
}

.ads-section-disclosure:not([open]) .ads-section-summary::after {
  content: "\25b8";
}

.ads-section-summary-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ads-text);
}

.ads-section-summary-meta {
  color: var(--ads-muted);
  font-size: 0.92rem;
}

.ads-sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ads-sort-label {
  color: var(--ads-muted);
  font-size: 0.92rem;
}

.ads-sort-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ads-sort-link {
  display: inline-block;
  appearance: none;
  text-decoration: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: #eef4fb;
  border: 1px solid var(--ads-border);
  color: var(--ads-text);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.ads-sort-link-active {
  background: var(--ads-accent);
  border-color: var(--ads-accent);
  color: #fff;
}

.ads-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ads-folder-card {
  display: block;
  text-decoration: none;
  padding: 18px;
  background: var(--ads-surface-soft);
  border: 1px solid #d4e7ff;
  border-radius: 18px;
  color: inherit;
  min-width: 0;
}

.ads-folder-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ads-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ads-folder-meta {
  display: block;
  color: var(--ads-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.ads-file-list {
  display: grid;
  gap: 12px;
}

.ads-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border: 1px solid var(--ads-border);
  border-radius: 18px;
  padding: 18px;
  background: #fbfdff;
}

.ads-file-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ads-file-link {
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ads-file-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e7f1ff;
  border: 1px solid #bfd7f5;
  color: var(--ads-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ads-file-filename {
  color: var(--ads-muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.ads-file-description {
  margin: 8px 0 0;
  color: var(--ads-text);
}

.ads-file-meta {
  display: grid;
  gap: 8px;
  text-align: right;
  color: var(--ads-muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.ads-empty-state {
  text-align: center;
}

.ads-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.ads-button {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--ads-accent);
  color: #fff;
  font-weight: 700;
}

.ads-button-secondary {
  background: var(--ads-accent-soft);
  color: var(--ads-accent);
}

.ads-choice-list {
  text-align: left;
  display: inline-block;
  margin: 18px auto 0;
}

.ads-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.ads-home-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  border: 1px solid var(--ads-border);
  border-radius: 20px;
  padding: 22px;
}

.ads-home-card h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.ads-home-card p {
  margin: 0;
  color: var(--ads-muted);
}

.ads-home-note {
  margin-top: 22px;
  color: var(--ads-muted);
}

code {
  background: #eef4fb;
  border-radius: 8px;
  padding: 2px 6px;
}

@media (max-width: 700px) {
  .ads-hero-inner,
  .ads-main {
    width: min(100% - 20px, 1100px);
  }

  .ads-brand-logo {
    width: min(300px, 100%);
  }

  .ads-section-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .ads-file-row {
    grid-template-columns: 1fr;
  }

  .ads-file-meta {
    text-align: left;
  }
}
