/* ============================================
   Folde OS — Base Theme
   E-ink optimized: high contrast, no animations,
   crisp type, grayscale palette
   ============================================ */

:root {
  --black:    #000000;
  --white:    #ffffff;
  --gray-1:   #111111;
  --gray-2:   #222222;
  --gray-3:   #444444;
  --gray-4:   #666666;
  --gray-5:   #888888;
  --gray-6:   #aaaaaa;
  --gray-7:   #cccccc;
  --gray-8:   #e8e8e8;
  --gray-9:   #f4f4f4;
  --accent:   #1a1a1a;

  /* System fonts only — zero network requests, zero battery cost */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Courier New', monospace;
  --font-serif: ui-serif, Georgia, 'Times New Roman', serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow: 2px 2px 0px var(--gray-7);
  --shadow-strong: 3px 3px 0px var(--gray-5);

  --bar-height: 48px;
  --dock-height: 72px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* E-ink: no transitions except deliberate page flips */
* {
  transition: none !important;
  animation: none !important;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

input, textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--gray-3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--black);
}

scrollbar-width: thin;

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-9);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-5);
  border-radius: 3px;
}

/* Utility */
.hidden    { display: none !important; }
.flex      { display: flex; }
.col       { flex-direction: column; }
.center    { align-items: center; justify-content: center; }
.gap-4     { gap: 4px; }
.gap-8     { gap: 8px; }
.gap-12    { gap: 12px; }
.gap-16    { gap: 16px; }
.gap-24    { gap: 24px; }
.flex-1    { flex: 1; }
.w-full    { width: 100%; }
.h-full    { height: 100%; }
.text-sm   { font-size: 13px; }
.text-xs   { font-size: 11px; }
.text-lg   { font-size: 18px; }
.text-xl   { font-size: 22px; }
.bold      { font-weight: 700; }
.mono      { font-family: var(--font-mono); }
.muted     { color: var(--gray-4); }
.border-b  { border-bottom: 1px solid var(--gray-7); }
.border-t  { border-top: 1px solid var(--gray-7); }
.p-12      { padding: 12px; }
.p-16      { padding: 16px; }
.p-24      { padding: 24px; }

/* Btn styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-3);
  border-color: var(--gray-6);
}

.btn:active {
  transform: translateY(1px);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--gray-7);
  font-size: 18px;
  cursor: pointer;
  background: var(--white);
  color: var(--gray-2);
}

.btn-icon:hover {
  background: var(--gray-9);
  border-color: var(--gray-5);
}
