/* =============================================
   K E N S E I  —  見 性
   Retrofuturistic clinical. Warm institutional.
   Light mode. Sharp corners. Grid paper.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&family=Noto+Serif+JP:wght@400;700&display=swap');

*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

body {
  background: #eae6df !important;
  margin: 0;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(180, 175, 165, 0.1) 39px,
      rgba(180, 175, 165, 0.1) 40px
    );
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99990;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(210, 205, 195, 0.35) 100%);
}

::selection {
  background: rgba(74, 144, 128, 0.2);
  color: #1a1a1a;
}

#root { position: relative; z-index: 1; }

#root > div {
  background: transparent !important;
  color: #2c2c2c !important;
  font-family: 'Newsreader', Georgia, serif !important;
  animation: k-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes k-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- TYPOGRAPHY ---- */
#root h1 {
  font-family: 'DM Mono', monospace !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  color: #1a1a1a !important;
  font-size: 26px !important;
  line-height: 1.35 !important;
}

#root h2 {
  font-family: 'DM Mono', monospace !important;
  font-weight: 400 !important;
  color: #1a1a1a !important;
}

#root p {
  color: #3d3d3d !important;
  font-family: 'Newsreader', Georgia, serif !important;
  text-rendering: optimizeLegibility;
}

#root div[style*="letterSpacing"][style*="0.1em"][style*="uppercase"] {
  font-family: 'DM Mono', monospace !important;
  color: #4a9080 !important;
  font-size: 10px !important;
  letter-spacing: 0.2em !important;
  border-bottom: 1px solid rgba(74, 144, 128, 0.2);
  padding-bottom: 8px;
  display: inline-block;
}

/* ---- BACKGROUNDS ---- */
div[style*="background"][style*="#0c0f14"],
div[style*="background"][style*="rgb(12"] {
  background: transparent !important;
}

/* ---- OPTION BUTTONS ---- */
#root button[style*="#12161f"] {
  background: #f5f2ec !important;
  border: 1px solid #ccc8bf !important;
  color: #2c2c2c !important;
  border-radius: 2px !important;
  font-family: 'Newsreader', Georgia, serif !important;
  padding: 16px 20px !important;
  transition: all 0.15s ease !important;
}

#root button[style*="#12161f"]:hover {
  background: #efece5 !important;
  border-color: #4a9080 !important;
}

#root button[style*="#1e3a5f"],
#root button[style*="rgb(30, 58, 95"] {
  background: #e8f0ed !important;
  border: 1px solid #4a9080 !important;
  color: #1a1a1a !important;
  border-radius: 2px !important;
}

/* ---- CTA BUTTONS ---- */
#root button[style*="#1e293b"][style*="fontWeight"] {
  background: #1a1a1a !important;
  border: 1px solid #1a1a1a !important;
  color: #eae6df !important;
  border-radius: 2px !important;
  font-family: 'DM Mono', monospace !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  font-size: 13px !important;
  padding: 18px 24px !important;
  transition: all 0.2s ease !important;
}

#root button[style*="#1e293b"][style*="fontWeight"]:hover {
  background: #2a2a2a !important;
}

#root button[style*="#1e293b"][style*="fontWeight"]:active {
  transform: scale(0.985);
}

/* ---- LIKERT ---- */
#root button[style*="borderRadius"][style*="50%"][style*="44px"] {
  border-color: #c0bdb5 !important;
  background: #f5f2ec !important;
  color: #666 !important;
  font-family: 'DM Mono', monospace !important;
  border-radius: 2px !important;
}

#root button[style*="borderRadius"][style*="50%"][style*="#3b82f6"],
#root button[style*="borderRadius"][style*="50%"][style*="#1e3a5f"] {
  border-color: #4a9080 !important;
  background: #e8f0ed !important;
  color: #1a1a1a !important;
  border-radius: 2px !important;
}

/* ---- RANGE SLIDER ---- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 2px !important;
  background: #c0bdb5 !important;
  border-radius: 0 !important;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: #4a9080;
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #eae6df;
  box-shadow: 0 0 0 1px #4a9080;
}

input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: #4a9080;
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #eae6df;
}

/* ---- PROGRESS DOTS → DASHES ---- */
#root div[style*="borderRadius"][style*="50%"][style*="width: 6px"],
#root div[style*="borderRadius"][style*="50%"][style*="width:6px"] {
  border-radius: 0 !important;
  width: 8px !important;
  height: 2px !important;
}

/* ---- RESULT CARDS ---- */
#root div[style*="#111318"] {
  background: #f5f2ec !important;
  border: 1px solid #d8d4cc !important;
  border-radius: 2px !important;
}

div[style*="background"][style*="#12161f"]:not(button) {
  background: #f0ede6 !important;
}

/* Tab bar */
div[style*="#111318"] button {
  font-family: 'DM Mono', monospace !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  border-radius: 1px !important;
  color: #888 !important;
}

div[style*="#111318"] button[style*="#1e293b"] {
  background: #1a1a1a !important;
  color: #eae6df !important;
}

/* Section headers */
#root div[style*="letterSpacing"][style*="0.05em"][style*="uppercase"][style*="#6b7280"] {
  font-family: 'DM Mono', monospace !important;
  color: #4a9080 !important;
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
}

/* Profile badge */
#root div[style*="borderRadius: 24px"][style*="inline"],
#root div[style*="borderRadius:24px"][style*="inline"] {
  border-radius: 2px !important;
  font-family: 'DM Mono', monospace !important;
}

/* ---- SCORE BARS ---- */
div[style*="height: 6px"][style*="#1f2937"],
div[style*="height:6px"][style*="#1f2937"] {
  background: #d8d4cc !important;
  border-radius: 0 !important;
  height: 3px !important;
}

div[style*="height: 6px"] div[style*="borderRadius: 3px"],
div[style*="height:6px"] div[style*="borderRadius:3px"] {
  border-radius: 0 !important;
}

/* ---- ALL BORDERS ---- */
div[style*="borderBottom"][style*="rgba(255"] { border-color: #d8d4cc !important; }
div[style*="borderTop"][style*="rgba(255"] { border-color: #d8d4cc !important; }
#root div[style*="border"][style*="#1f2937"] { border-color: #d8d4cc !important; }

/* ---- TEXT COLORS ---- */
#root *[style*="color"][style*="#f4f4f5"] { color: #1a1a1a !important; }
#root *[style*="color"][style*="#d4d4d8"] { color: #2c2c2c !important; }
#root span[style*="color"][style*="#a1a1aa"] { color: #666 !important; }
#root span[style*="color"][style*="#6b7280"] { color: #888 !important; }
#root span[style*="color"][style*="#71717a"] { color: #888 !important; }
#root span[style*="color"][style*="#52525b"] { color: #999 !important; }
#root span[style*="color"][style*="#4b5563"] { color: #aaa !important; }
#root p[style*="#a1a1aa"] { color: #555 !important; }
#root p[style*="#71717a"] { color: #777 !important; }
#root p[style*="#52525b"] { color: #999 !important; }
div[style*="color"][style*="#3f3f46"] { color: #bbb !important; }
div[style*="color"][style*="#3a3935"] { color: #bbb !important; }

/* ---- ACCENT → INSTITUTIONAL TEAL ---- */
#root *[style*="color"][style*="#3b82f6"] { color: #4a9080 !important; }
#root *[style*="background"][style*="#3b82f610"] { background: rgba(74, 144, 128, 0.06) !important; }
#root *[style*="accentColor"] { accent-color: #4a9080 !important; }

/* Radar chart */
polygon[stroke="#3b82f6"] { stroke: #4a9080 !important; }
polygon[fill="#3b82f610"] { fill: rgba(74, 144, 128, 0.06) !important; }
circle[fill="#3b82f6"] { fill: #4a9080 !important; }
polygon[stroke="#1f2937"] { stroke: #d8d4cc !important; }
line[stroke="#1f2937"] { stroke: #d8d4cc !important; }
text[style*="#6b7280"] { fill: #999 !important; }

/* ---- KILL ALL BORDER-RADIUS ---- */
#root button[style*="borderRadius: 10px"],
#root button[style*="borderRadius:10px"] { border-radius: 2px !important; }
#root div[style*="borderRadius: 12px"],
#root div[style*="borderRadius:12px"] { border-radius: 2px !important; }
#root div[style*="borderRadius: 8px"],
#root div[style*="borderRadius:8px"] { border-radius: 2px !important; }
#root div[style*="borderRadius: 10px"],
#root div[style*="borderRadius:10px"] { border-radius: 2px !important; }

/* ---- MONOSPACE NUMBERS ---- */
#root *[style*="fontFamily"][style*="monospace"] {
  font-family: 'DM Mono', monospace !important;
}

/* ---- QUESTION TEXT ---- */
#root p[style*="fontSize: 20px"],
#root p[style*="fontSize:20px"] {
  font-size: 19px !important;
  font-weight: 400 !important;
  color: #1a1a1a !important;
}

#root p[style*="fontSize: 18px"],
#root p[style*="fontSize:18px"] {
  font-size: 17px !important;
  color: #2c2c2c !important;
}

/* ---- CPT/TIME TASKS ---- */
#root div[style*="fontSize: 80px"],
#root div[style*="fontSize:80px"],
#root div[style*="fontSize: 64px"],
#root div[style*="fontSize:64px"],
#root div[style*="fontSize: 56px"],
#root div[style*="fontSize:56px"] {
  font-family: 'DM Mono', monospace !important;
  color: #1a1a1a !important;
}

#root div[style*="color"][style*="#ef4444"][style*="fontSize"] {
  color: #c4453a !important;
}

/* CPT stat cards */
div[style*="#12161f"][style*="padding: 14px"],
div[style*="#12161f"][style*="padding:14px"] {
  background: #f0ede6 !important;
  border: 1px solid #d8d4cc !important;
  border-radius: 2px !important;
}

div[style*="#12161f"] div[style*="fontSize: 22px"],
div[style*="#12161f"] div[style*="fontSize:22px"] {
  font-family: 'DM Mono', monospace !important;
  color: #1a1a1a !important;
}

/* ---- WHAT NOW TAB ---- */
div[style*="borderLeft"][style*="3px solid"] {
  border-radius: 0 !important;
  background: #f5f2ec !important;
}

/* ---- BACK BUTTON ---- */
#root button[style*="background: none"][style*="#4b5563"] {
  color: #999 !important;
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
}

/* ---- CLEAR/RESET BUTTON ---- */
#root button[style*="#1f2937"][style*="fontSize: 13px"],
#root button[style*="#1f2937"][style*="fontSize:13px"] {
  border-color: #d8d4cc !important;
  color: #999 !important;
  border-radius: 2px !important;
  font-family: 'DM Mono', monospace !important;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0bdb5; border-radius: 0; }

/* ---- FOCUS ---- */
button:focus-visible, input:focus-visible {
  outline: 1px solid #4a9080 !important;
  outline-offset: 2px !important;
}

/* ---- SLIDER VALUE ---- */
#root div[style*="fontSize: 32px"][style*="monospace"],
#root div[style*="fontSize:32px"][style*="monospace"] {
  font-family: 'DM Mono', monospace !important;
  color: #1a1a1a !important;
  font-weight: 300 !important;
}

/* ---- STRENGTHS / RESULTS TEXT ---- */
#root div[style*="fontSize: 15px"][style*="fontWeight: 600"],
#root div[style*="fontSize:15px"][style*="fontWeight:600"] {
  font-family: 'DM Mono', monospace !important;
  font-weight: 400 !important;
  color: #1a1a1a !important;
}
