/* ClauseReport design system — indigo primary on warm-cool neutrals.
   Geist sans + Geist Mono. Professional density for legal/compliance buyers. */

:root {
  /* Surfaces */
  --bg:           #ffffff;
  --surface:      #fafafa;
  --surface-2:    #f4f4f5;
  --surface-3:    #e9e9ec;
  --tint:         #f3f4fb;

  /* Lines */
  --border:        #e7e5e4;
  --border-strong: #d4d4d8;
  --border-focus:  #4338ca;

  /* Text */
  --text:    #1c1917;
  --text-2:  #44403c;
  --text-3:  #78716c;
  --text-4:  #a8a29e;

  /* Brand — indigo */
  --primary-50:  #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;
  --primary:     #4338ca;

  /* Status — muted, light theme */
  --success:     #15803d;
  --success-bg:  #f0fdf4;
  --warning:     #a16207;
  --warning-bg:  #fefce8;
  --danger:      #b91c1c;
  --danger-bg:   #fef2f2;
  --info:        #4338ca;
  --info-bg:     #eef2ff;

  /* Type */
  --font-sans: "Geist", -apple-system, "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  /* Radii */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 20px; --r-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 10px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
}

/* ---------- Page base ---------- */
.pc-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
.pc-page * { box-sizing: border-box; }

/* ---------- Typography ---------- */
.pc-display { font-size: 44px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
.pc-h1     { font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.pc-h2     { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.pc-h3     { font-size: 16px; line-height: 1.3;  letter-spacing: -0.01em;  font-weight: 600; }
.pc-eyebrow{ font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.pc-mono   { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.pc-tnum   { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.pc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; font: inherit; font-weight: 500;
  border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  white-space: nowrap; text-decoration: none;
}
.pc-btn-primary { background: var(--primary-700); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 1px 2px rgba(49, 46, 129, 0.25); }
.pc-btn-primary:hover { background: var(--primary-800); }
.pc-btn-secondary { background: #fff; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.pc-btn-secondary:hover { background: var(--surface-2); }
.pc-btn-ghost { background: transparent; color: var(--text-2); }
.pc-btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.pc-btn-danger { background: #fff; color: var(--danger); border-color: var(--border-strong); }
.pc-btn-danger:hover { background: var(--danger-bg); border-color: #fca5a5; }
.pc-btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.pc-btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Cards ---------- */
.pc-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.pc-card-hd { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.pc-card-bd { padding: 20px; }

/* ---------- Inputs ---------- */
.pc-input, .pc-select, .pc-textarea {
  width: 100%; height: 36px; padding: 0 12px; font: inherit;
  background: #fff; color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.pc-textarea { height: auto; padding: 10px 12px; resize: vertical; }
.pc-input:focus, .pc-select:focus, .pc-textarea:focus {
  outline: none; border-color: var(--primary-700); box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.12);
}
.pc-input::placeholder, .pc-textarea::placeholder { color: var(--text-4); }
.pc-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.pc-help  { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ---------- Pills / Badges ---------- */
.pc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; font-size: 12px; font-weight: 500; border-radius: var(--r-full); border: 1px solid transparent; line-height: 1.5; }
.pc-pill-neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.pc-pill-success { background: var(--success-bg); color: var(--success); border-color: #bbf7d0; }
.pc-pill-warning { background: var(--warning-bg); color: var(--warning); border-color: #fde68a; }
.pc-pill-danger  { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.pc-pill-info    { background: var(--info-bg); color: var(--info); border-color: var(--primary-200); }
.pc-pill-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ---------- Tables ---------- */
.pc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pc-table thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.pc-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.pc-table tbody tr:hover td { background: var(--surface); }
.pc-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- misc ---------- */
.pc-hr { height: 1px; background: var(--border); border: 0; margin: 0; }
.pc-link { color: var(--primary-700); text-decoration: none; border-bottom: 1px solid transparent; }
.pc-link:hover { border-bottom-color: var(--primary-700); }
:focus-visible { outline: 2px solid var(--primary-700); outline-offset: 2px; }

/* ---------- Mobile nav ---------- */
.pc-nav-toggle  { display: none; }
.pc-mobile-menu { display: none; }
.pc-mobile-menu a, .pc-mobile-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  font: inherit; font-size: 15px; text-align: left; color: var(--text); text-decoration: none;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.pc-mobile-menu a:hover, .pc-mobile-menu button:hover { background: var(--surface-2); }
.pc-mobile-menu .pc-mm-sep { height: 1px; background: var(--border); margin: 6px 6px; }
.pc-mobile-menu .pc-mm-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); padding: 12px 14px 4px; }

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .pc-page [style*="grid-template-columns"]      { grid-template-columns: 1fr !important; }
  .pc-page [style*="grid-template-columns"] > *  { min-width: 0; }
  .pc-page [style*="font-size:64px"] { font-size: 38px !important; }
  .pc-page [style*="font-size:56px"] { font-size: 34px !important; }
  .pc-page [style*="font-size:44px"], .pc-page .pc-display { font-size: 32px !important; }
  .pc-page [style*="font-size:40px"] { font-size: 30px !important; }
  .pc-page [style*="font-size:36px"] { font-size: 27px !important; }
  .pc-page [style*="font-size:32px"], .pc-page .pc-h1 { font-size: 25px !important; }
  .pc-nav-desktop { display: none !important; }
  .pc-nav-toggle  { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; color: var(--text); }
  .pc-mobile-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; max-height: calc(100vh - 60px); overflow-y: auto; }
  .pc-mobile-menu.open { display: block; }
  .pc-page .pc-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .pc-auth-aside { display: none !important; }
  .pc-auth-form  { width: 100% !important; max-width: 380px; }
}
