:root {
  --bg: #f3f6f7;
  --page: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --header-bg: #edf3f5;
  --text: #1f2d38;
  --muted: #627684;
  --border: #cfd9df;
  --border-soft: #dde5ea;
  --link: #2f6f8a;
  --link-hover: #1f556b;
  --accent: #6aa2b8;
  --accent-soft: #e7f0f4;
  --row-alt: #fafcfd;
  --row-hover: #f1f6f8;
  --shadow: 0 8px 24px rgba(31, 45, 56, 0.06);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Arial, Helvetica, sans-serif;
}

body {
  padding: 20px 14px;
}

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

/* Header */
.topbar {
  margin-bottom: 14px;
  padding: 4px 2px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark img {
  height: 64px;
}

.brand-text h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height:1;
  transform: translateY(6px);
}

.muted {
  margin: 4px 0 0;
  color: var(--muted);
}

/* ===== README (separate card) ===== */

.folder-doc {
  background: linear-gradient(
    to bottom,
    var(--panel-soft),
    var(--panel)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

/* ===== Breadcrumbs (attached to listing) ===== */

.breadcrumbs {
  margin: 0;
  padding: 6px 10px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;

  display: inline-flex;
  align-items: center;
  gap: 4px;

  font-size: 13px;
  line-height: 1.35;
}

/* Brackets */
.breadcrumbs::before,
.breadcrumbs::after {
  color: var(--muted);
  transform: translateY(-1px);
}

.breadcrumbs::before {
  content: "[";
  margin-right: 2px;
}

.breadcrumbs::after {
  content: "]";
  margin-left: 2px;
}

.breadcrumbs ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "›";
  color: var(--muted);
  margin: 0 4px;
  opacity: 0.7;
}

.breadcrumbs a {
  color: var(--link);
  text-decoration: none;
  padding: 1px 2px;
  border-radius: 3px;
}

.breadcrumbs a:hover {
  background: #eef4f7;
}

.breadcrumbs .current {
  font-weight: 600;
  color: var(--text);
}

/* Home icon */
.home-icon {
  display: inline-flex;
  align-items: center;
}

.home-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--muted);
  display: block;
  transform: translateY(2px);
}

.breadcrumbs a:hover .home-icon svg {
  fill: var(--link-hover);
}

/* ===== Listing ===== */

.listing-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

/* Table */
.listing-card table {
  width: 100%;
  border-collapse: collapse;
}

.listing-card thead th {
  background: var(--header-bg);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 10px;
  border-bottom: 2px solid var(--border);
}

/* Ensure name column aligns perfectly */
.listing-card th:first-child,
.listing-card td:first-child {
  text-align: left;
  padding-left: 12px;
}

.listing-card td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.listing-card tbody tr:nth-child(even) td {
  background: var(--row-alt);
}

.listing-card tbody tr:hover td {
  background: var(--row-hover);
}

/* Right align size/date */
.listing-card td:nth-child(2),
.listing-card th:nth-child(2),
.listing-card td:nth-child(3),
.listing-card th:nth-child(3) {
  text-align: right;
}

/* ===== Links ===== */

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ===== Markdown ===== */

.folder-doc h1,
.folder-doc h2,
.folder-doc h3,
.folder-doc h4 {
  margin: 0 0 10px;
}

.folder-doc p {
  margin: 0 0 12px;
}

.folder-doc ul,
.folder-doc ol {
  margin: 0 0 12px;
  padding-left: 1.4rem;
}

.folder-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  border: 1px solid var(--border);
}

.folder-doc th,
.folder-doc td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
}

.folder-doc th:last-child,
.folder-doc td:last-child {
  border-right: none;
}

.folder-doc th {
  background: var(--header-bg);
}

.folder-doc tr:nth-child(even) td {
  background: var(--row-alt);
}

/* ===== Responsive ===== */

@media (max-width: 700px) {
  body {
    padding: 12px 8px;
  }

  .breadcrumbs {
    padding: 5px 8px;
    font-size: 12px;
  }

  .listing-card th,
  .listing-card td,
  .folder-doc th,
  .folder-doc td {
    padding: 8px;
  }
}

/* ===== 404 / Not found ===== */

.not-found h2 {
  margin: 0 0 8px;
}

.not-found p {
  margin: 0 0 10px;
}

.not-found-path-label {
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.not-found-path {
  margin: 0;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);

  font-size: 13px;
  line-height: 1.4;

  word-break: break-all;
}

.not-found-actions {
  margin-top: 14px;
}
