/*
 * Rhombus Downloads — design tokens lifted verbatim from www.rhombus.com
 * (:root variables, theme_ButtonBase / rui_ButtonBase button system).
 * Headings + buttons: Sora · Body: DM Sans · Buttons are 4px radius, not pills.
 */

:root {
  --headerFontFamily: 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --bodyFontFamily: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* rhombus.com palette */
  --primary: #4bebff;
  --secondary: #caf6ff;
  --primary-bg: #17323b;
  --secondary-bg: #e9f4f8;
  --tertiary-bg: #f4f7fa;
  --body-subtle: #888f9b;
  --blue-500: #006f94;
  --blue-700: #0e4180;
  --blue-900: #031933;
  --teal-500: #00c1de;
  --neutral-100: #f4f7fa;
  --neutral-200: #dfe2e5;
  --neutral-400: #898e94;
  --neutral-600: #55585c;
  --background-hover: #d6e7ee;
  --white: #fcfeff;
  --error-red: #ff5353;
  --box-shadow-color: #03193320;
  --gradient-light-fade: linear-gradient(180deg, transparent 65.4%, #fcfeff 99.84%),
    linear-gradient(90deg, #e9f4f8 0%, #e9f4f8 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--bodyFontFamily);
  color: var(--primary-bg);
  background: var(--white);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: subpixel-antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--headerFontFamily); }

button { cursor: pointer; border: 0; outline: 0; font-family: var(--headerFontFamily); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ---- Nav (rhombus.com header: 80px, white) ---- */

.nav {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 500;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-bg);
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--primary-bg);
}

.brand-name {
  font-family: var(--headerFontFamily);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--neutral-200);
  margin: 0 2px;
}

.brand-section {
  font-family: var(--headerFontFamily);
  font-weight: 500;
  font-size: 15px;
  color: var(--blue-500);
}

/* ---- Hero ---- */

.hero {
  background: var(--gradient-light-fade);
  padding: 56px 0 40px;
}

.hero h1 {
  font-size: 32px;
  line-height: 44.77px;
  font-weight: 600;
  font-style: normal;
  margin-bottom: 8px;
}

.hero p {
  font-size: 17px;
  color: var(--neutral-600);
}

/* ---- Toolbar ---- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 24px;
  flex-wrap: wrap;
}

.search {
  flex: 1;
  min-width: 220px;
  font-family: var(--bodyFontFamily);
  font-size: 15px;
  padding: 10px 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 4px;
  background: var(--white);
  color: var(--primary-bg);
  outline: none;
  transition: all 0.25s;
}

.search:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px #006f9420;
}

.select {
  font-family: var(--bodyFontFamily);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 4px;
  background: var(--white);
  color: var(--primary-bg);
  outline: none;
}

.count {
  font-size: 14px;
  color: var(--body-subtle);
  white-space: nowrap;
}

/* ---- File groups ---- */

.group {
  margin-bottom: 32px;
}

.group h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group .os-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 20px 0 10px;
}

.group h2 .badge {
  font-family: var(--bodyFontFamily);
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-500);
  background: var(--secondary-bg);
  border-radius: 4px;
  padding: 2px 10px;
}

.file-table {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: 1rem;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  box-shadow: 0.1rem 0.1rem 1rem var(--box-shadow-color);
}

.file-table th {
  font-family: var(--bodyFontFamily);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neutral-400);
  text-align: left;
  padding: 12px 16px;
  background: var(--neutral-100);
  border-bottom: 1px solid var(--neutral-200);
}

.file-table td {
  padding: 14px 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

.file-table tr:last-child td { border-bottom: none; }

.file-table tbody tr { transition: background 0.25s; }

.file-table tbody tr:hover td { background: var(--background-hover); }

.file-name {
  font-weight: 500;
  word-break: break-all;
}

.file-meta {
  color: var(--neutral-600);
  white-space: nowrap;
  font-size: 14px;
}

.file-sha {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--neutral-400);
  cursor: pointer;
}

.file-sha:hover { color: var(--blue-500); }

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ---- Buttons (rhombus.com theme_ButtonBase system: 4px radius, Sora 600) ---- */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 20px;
  font-family: var(--headerFontFamily);
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-900);
  color: var(--white);
}

.btn-primary:hover { background: var(--blue-500); }

.btn-secondary {
  background: transparent;
  border-color: var(--primary-bg);
  color: var(--primary-bg);
}

.btn-secondary:hover {
  color: var(--white);
  background: var(--blue-500);
  border-color: var(--blue-500);
}

/* ---- States ---- */

.empty {
  text-align: center;
  color: var(--body-subtle);
  padding: 64px 0;
  font-size: 16px;
}

/* ---- Footer ---- */

.footer {
  margin-top: 64px;
  border-top: 1px solid var(--neutral-200);
  padding: 24px 0;
  font-size: 14px;
  color: var(--neutral-400);
}

/* ---- Toast ---- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-bg);
  color: var(--white);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.toast.show { opacity: 1; }

@media (max-width: 767px) {
  .container { padding: 0 1.25rem; }
  .hero h1 { font-size: 24px; line-height: 33.58px; }
  .nav-inner { height: 64px; }
  .file-table th:nth-child(3),
  .file-table td:nth-child(3) { display: none; }
}
