/* Rithub (Railyard) — Apple-style theme overlay.
   Owner 2026-11-17: "UIs are AI slop, too colorful, use Apple design" /
   "no emojis no writings on components apple design clean simple".
   Follows plans/gtm/APPLE-DESIGN-RULES-2026-11-17.md: neutral surfaces +
   ONE accent (#0071E3), system font, no gradients, no second accent.
   Pure CSS-custom-property overlay loaded via templates/custom/header.tmpl
   (Gitea's documented customization hook) — no upstream stylesheet is
   edited or replaced. Functional colors (issue/PR labels, diff add/remove,
   success/error/warning banners) are intentionally untouched: those are
   semantic states, not decoration, per the design rules' "Honesty" and
   color sections.
*/
:root {
  /* --- system font stack, replaces any Google/display font fallback --- */
  --fonts-override: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  /* --- one accent color: Apple blue, replacing Gitea's default blue/green --- */
  --color-primary: #0071e3;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: color-mix(in srgb, #0071e3 88%, black);
  --color-primary-dark-2: color-mix(in srgb, #0071e3 76%, black);
  --color-primary-dark-3: color-mix(in srgb, #0071e3 64%, black);
  --color-primary-dark-4: color-mix(in srgb, #0071e3 52%, black);
  --color-primary-dark-5: color-mix(in srgb, #0071e3 40%, black);
  --color-primary-dark-6: color-mix(in srgb, #0071e3 28%, black);
  --color-primary-dark-7: color-mix(in srgb, #0071e3 16%, black);
  --color-primary-light-1: color-mix(in srgb, #0071e3 88%, white);
  --color-primary-light-2: color-mix(in srgb, #0071e3 76%, white);
  --color-primary-light-3: color-mix(in srgb, #0071e3 64%, white);
  --color-primary-light-4: color-mix(in srgb, #0071e3 52%, white);
  --color-primary-light-5: color-mix(in srgb, #0071e3 40%, white);
  --color-primary-light-6: color-mix(in srgb, #0071e3 28%, white);
  --color-primary-light-7: color-mix(in srgb, #0071e3 10%, white);
  --color-primary-alpha-10: color-mix(in srgb, #0071e3 10%, transparent);
  --color-primary-alpha-20: color-mix(in srgb, #0071e3 20%, transparent);
  --color-primary-alpha-30: color-mix(in srgb, #0071e3 30%, transparent);
  --color-primary-alpha-40: color-mix(in srgb, #0071e3 40%, transparent);
  --color-primary-alpha-50: color-mix(in srgb, #0071e3 50%, transparent);
  --color-primary-alpha-60: color-mix(in srgb, #0071e3 60%, transparent);
  --color-primary-alpha-70: color-mix(in srgb, #0071e3 70%, transparent);
  --color-primary-alpha-80: color-mix(in srgb, #0071e3 80%, transparent);
  --color-primary-alpha-90: color-mix(in srgb, #0071e3 90%, transparent);

  /* --- neutral surfaces + text, apple.com / system-app palette --- */
  --color-body: #ffffff;
  --color-text: #1d1d1f;
  --color-text-dark: #1d1d1f;
  --color-text-light: #3a3a3c;
  --color-text-light-1: #48484a;
  --color-text-light-2: #6e6e73;
  --color-text-light-3: #86868b;
  --color-nav-bg: #f5f5f7;
  --color-secondary-nav-bg: #f5f5f7;
  --color-secondary-bg: #f5f5f7;
  --color-box-header: #f5f5f7;
  --color-menu: #f5f5f7;
  --color-card: #f5f5f7;
  --color-secondary: #d2d2d7;
}

/* no second accent / gradients anywhere */
body, .ui.card, .ui.segment, .ui.button, .page-content {
  background-image: none !important;
}

/* system font everywhere, including form controls */
body, button, input, select, textarea, .ui.button, .markup {
  font-family: var(--fonts-override), var(--fonts-regular, sans-serif);
}

/* flatter, quieter chrome: thin hairlines over heavy shadows */
.ui.card, .repository.list .item, .ui.attached.segment {
  box-shadow: none;
  border: 1px solid var(--color-secondary);
}

/* ---- homepage hero (apple.com-style: one headline, one subline, two
   icon buttons, one real screenshot) ---- */
.rithub-home {
  max-width: 980px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}
.rithub-hero-title {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.07;
  color: var(--color-text-dark);
  margin: 0 0 16px;
}
.rithub-hero-sub {
  font-size: 21px;
  line-height: 1.38;
  color: var(--color-text-light-2);
  margin: 0 0 40px;
}
.rithub-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}
.rithub-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--color-nav-bg);
  color: var(--color-text-dark);
  border: 1px solid var(--color-secondary);
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}
.rithub-icon-btn:hover {
  background: var(--color-secondary-light-1, var(--color-nav-bg));
  transform: translateY(-1px);
}
.rithub-icon-btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border-color: var(--color-primary);
}
.rithub-icon-btn-primary:hover {
  background: var(--color-primary-dark-1);
}
.rithub-shot-frame {
  border-radius: 20px;
  border: 1px solid var(--color-secondary);
  overflow: hidden;
  box-shadow: 0 1px 3px var(--color-shadow, rgba(0, 0, 0, 0.08));
}
.rithub-shot {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 600px) {
  .rithub-home { padding: 56px 16px 40px; }
  .rithub-hero-title { font-size: 34px; }
  .rithub-hero-sub { font-size: 17px; }
}

.rithub-footer-links {
  text-align: center;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--color-text-light-2);
}
.rithub-footer-links a {
  color: var(--color-text-light-2);
}

/* ---- icon-only chrome: visually hide label text Gitea still renders for
   screen readers via each link's own aria-label/title (added in the
   template overrides below), keeping one accessible name per control. ---- */
#navbar .item .nav-label,
.secondary-nav .item .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
