/* =============================================================================
   base.css: App-specific custom properties, base elements, links, utilities
   ============================================================================= */

/* Properties */
/*------------*/
:root {
  --tf-sidebar-width: 300px;
  --tf-panel-width: 340px;
  /* Accent and color tokens derived from common-web brand tokens */
  --tf-accent: var(--rb-accent);
  --tf-accent-hover: var(--rb-accent-hover);
  --tf-accent-fg: var(--rb-accent-fg);
  --tf-border-radius-pill: 999px;
  --tf-gap: 1.5rem;
  --tf-sidebar-z: 200;
  --tf-overlay-z: 199;
  --tf-modal-z: 300;
  --tf-tooltip-z: 1000;
  /* Base tokens (light mode defaults via common-web) */
  --tf-radius: 0.25rem;
  --tf-border: var(--rb-border);
  --tf-muted: var(--rb-text-muted);
  --tf-color: var(--rb-text);
  --tf-bg: var(--rb-bg);
  --tf-surface: var(--rb-surface);
  --tf-input-bg: #fff;
  --tf-danger: #dc2626;
}

[data-theme="dark"] {
  /* App-specific dark overrides not covered by common-web tokens */
  --tf-input-bg: #1a2030;
  --tf-danger: #f87171;
}

/* Base Elements */
/*---------------*/
body {
  font-family:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  color: var(--tf-color);
  background: var(--tf-bg);
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.75rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.5rem;
}

hr {
  border: none;
  border-top: 1px solid var(--tf-border);
  margin: 1rem 0;
}

label {
  cursor: pointer;
}

/* Links */
/*-------*/
a {
  color: var(--tf-accent);
  text-decoration-color: currentColor;
}

a:hover {
  color: var(--tf-accent-hover);
}

/* No-script notice */
/*------------------*/
.noscript-notice {
  max-width: 600px;
  margin: 4rem auto;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  color: var(--tf-color);
}

.noscript-notice p {
  margin-top: 0.75rem;
  color: var(--tf-muted);
}

/* Screen-reader only */
/*--------------------*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
