/* ===========================
   FlowStateADHD — Main Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/gh/antijingoist/opendyslexic@master/compiled/OpenDyslexic-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---- Custom Properties ---- */
:root {
  --teal: #0D9488;
  --teal-dark: #0b7a70;
  --teal-light: #ccfbf1;
  --indigo: #4F46E5;
  --indigo-dark: #3730a3;
  --indigo-light: #e0e7ff;
  --bg-white: #FFFFFF;
  --bg-grey: #F0F1F3;
  --bg-rose: #FFF0F3;
  --bg-mint: #F0FDF8;
  --bg-lavender: #F3F0FF;
  --bg-dark: #1A1A2E;

  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --text-link: #0D9488;

  --bionic-bold-color: #111827;
  --bionic-normal-color: #374151;

  --card-bg: #ffffff;
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  --card-shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.12);
  --border-color: #E5E7EB;
  --input-border: #D1D5DB;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-ui: 'DM Sans', system-ui, sans-serif;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-reading: 'DM Sans', system-ui, sans-serif;

  --nav-height: 68px;
  --sidebar-width: 320px;
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  --page-bg: var(--cream);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background-color: var(--page-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }
button { cursor: pointer; font-family: var(--font-ui); }
input, textarea, select { font-family: var(--font-ui); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.15rem; line-height: 1.75; color: var(--text-secondary); }

/* ---- Utility ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.badge {
  display: inline-block;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--indigo-light);
  color: var(--indigo);
}
.btn-secondary:hover {
  background: var(--indigo);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
}

.btn-full { width: 100%; justify-content: center; }

.btn-convert {
  width: 100%;
  justify-content: center;
  padding: 0.8rem;
  font-size: 1rem;
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-convert:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}
.btn-convert .btn-icon { font-size: 1.1rem; }

.btn-clear {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-color);
  background: #fff;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-clear:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: #FEF2F2;
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-logo:hover { color: var(--teal); }
.logo-o {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  vertical-align: -0.3em;
  margin: 0 0.02em;
}
.nav-logo .logo-adhd {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--teal);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--teal); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--teal);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--teal-dark); }
.nav-cta::after { display: none !important; }

.nav-coffee {
  background: #FFDD00 !important;
  color: #111 !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
}
.nav-coffee:hover { background: #f5d000 !important; color: #111 !important; }
.nav-coffee::after { display: none !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--page-bg);
  z-index: 99;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 0.5rem;
  overflow-y: auto;
  animation: slideDown 0.25s ease;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--teal); }

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

/* ---- Page Header ---- */
.page-header {
  background: linear-gradient(135deg, var(--cream) 0%, #e8f4f2 100%);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
}
.page-header h1 { margin-bottom: 0.75rem; }
.page-header p { font-size: 1.1rem; max-width: 600px; }

/* ==========================
   HOME PAGE — APP LAYOUT
   ========================== */
.app-layout {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
}

/* ---- Sidebar ---- */
.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.25rem 0;
}

.text-input-area {
  width: 100%;
  min-height: 140px;
  max-height: 240px;
  resize: vertical;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  padding: 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--cream);
  transition: border-color var(--transition);
  line-height: 1.6;
}
.text-input-area:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem;
  border: 1.5px dashed var(--input-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}
.upload-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

.upload-filename {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.25rem;
  display: none;
}
.upload-filename.visible { display: block; }

/* Slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.slider-row span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  min-width: 36px;
  text-align: right;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px var(--teal);
  transition: box-shadow var(--transition);
}
input[type="range"]:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

/* Select */
.control-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
  background-size: 10px;
  -webkit-appearance: none;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition);
}
.control-select:focus {
  outline: none;
  border-color: var(--teal);
}

/* Font size controls */
.font-size-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.font-size-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: #fff;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.font-size-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}
.font-size-display {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Spacing buttons */
.spacing-btns {
  display: flex;
  gap: 0.4rem;
}
.spacing-btn {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.spacing-btn:hover { border-color: var(--teal); color: var(--teal); }
.spacing-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* Background buttons */
.bg-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.bg-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.bg-btn:hover { transform: scale(1.1); }
.bg-btn.active { border-color: var(--teal); }
.bg-btn.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}
.bg-btn[data-bg="white"]    { background: #FFFFFF; border: 1.5px solid #E5E7EB; }
.bg-btn[data-bg="grey"]     { background: #F0F1F3; }
.bg-btn[data-bg="rose"]     { background: #FFF0F3; }
.bg-btn[data-bg="mint"]     { background: #F0FDF8; }
.bg-btn[data-bg="lavender"] { background: #F3F0FF; }
.bg-btn[data-bg="dark"]     { background: #1A1A2E; }
.bg-btn[data-bg="dark"].active::after { color: #fff; }

/* Background intensity slider hidden in dark mode via JS */

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.toggle-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-track { background: var(--teal); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }


/* ==========================
   OUTPUT / READING AREA
   ========================== */
.output-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.progress-bar-track {
  position: sticky;
  top: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  z-index: 10;
  flex-shrink: 0;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--indigo));
  transition: width 0.15s ease;
  border-radius: 0 2px 2px 0;
}

.output-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.output-toolbar-left { display: flex; align-items: center; gap: 0.5rem; }
.output-toolbar-right { display: flex; align-items: center; gap: 0.5rem; }

.reading-stats {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.output-area {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 3rem;
  position: relative;
  transition: background-color var(--transition-slow);
  scroll-behavior: smooth;
}

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  min-height: 400px;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}
.output-placeholder .placeholder-icon {
  font-size: 3.5rem;
  opacity: 0.35;
}
.output-placeholder h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-muted);
}
.output-placeholder p {
  font-size: 0.95rem;
  max-width: 320px;
  color: var(--text-muted);
}

.reading-content {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

/* Bionic text */
.bionic-paragraph {
  font-size: var(--reading-font-size, 18px);
  line-height: var(--reading-line-height, 1.9);
  margin-bottom: 1.4em;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 1;
}

.bionic-bold {
  font-weight: 800;
  color: var(--bionic-bold-color);
}

.bionic-normal {
  font-weight: 400;
  color: var(--bionic-normal-color);
}

/* Line focus mode */
.line-focus .bionic-paragraph {
  opacity: 0.2;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.line-focus .bionic-paragraph.focused {
  opacity: 1;
  background: rgba(13, 148, 136, 0.14);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.line-focus .bionic-paragraph.near-focus { opacity: 0.55; }

body[data-bg="dark"] .line-focus .bionic-paragraph.focused {
  background: rgba(13, 148, 136, 0.28);
}

/* Converting animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bionic-paragraph {
  animation: fadeInUp 0.3s ease both;
}
.bionic-paragraph:nth-child(1) { animation-delay: 0ms; }
.bionic-paragraph:nth-child(2) { animation-delay: 30ms; }
.bionic-paragraph:nth-child(3) { animation-delay: 60ms; }
.bionic-paragraph:nth-child(n+4) { animation-delay: 80ms; }

/* ==========================
   BACKGROUND MODES
   ========================== */
body[data-bg="white"]    .output-area { background: var(--bg-white); }
body[data-bg="grey"]     .output-area { background: var(--bg-grey); }
body[data-bg="rose"]     .output-area { background: var(--bg-rose); }
body[data-bg="mint"]     .output-area { background: var(--bg-mint); }
body[data-bg="lavender"] .output-area { background: var(--bg-lavender); }
body[data-bg="dark"] {
  --bionic-bold-color: #F0F0FA;
  --bionic-normal-color: #C0C8DC;
  --page-bg: var(--bg-dark);
  --card-bg: #252540;
  --text-primary: #E8E8F0;
  --text-secondary: #B0B0CC;
  --text-muted: #666680;
  --border-color: #2E2E4E;
  --input-border: #3A3A5A;
  color: var(--text-primary);
}
body[data-bg="dark"] .output-area { background: var(--bg-dark); }
body[data-bg="dark"] .sidebar { background: #1E1E38; }
body[data-bg="dark"] .nav { background: rgba(26, 26, 46, 0.95); }
body[data-bg="dark"] .output-toolbar { background: rgba(26, 26, 46, 0.9); }
body[data-bg="dark"] .text-input-area { background: #1E1E38; color: var(--text-primary); }
body[data-bg="dark"] .control-select { background-color: #1E1E38; color: var(--text-primary); border-color: var(--border-color); }
body[data-bg="dark"] .overlay-controls { background: #1E1E38; }
body[data-bg="dark"] .upload-btn { color: var(--text-muted); }
body[data-bg="dark"] .font-size-btn { background: #1E1E38; color: var(--text-primary); }

/* ==========================
   BLOG
   ========================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.blog-card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--teal-light), var(--indigo-light));
}

.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.blog-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.blog-card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.blog-card-link:hover { gap: 0.6rem; }

/* Article page */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.article-meta time { font-size: 0.88rem; color: var(--text-muted); }
.article-reading-time {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
  color: var(--text-primary);
}
.article-body h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
  color: var(--text-primary);
}
.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.article-body blockquote {
  border-left: 4px solid var(--teal);
  padding: 0.75rem 1.25rem;
  background: var(--teal-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--teal); }

/* ==========================
   ABOUT
   ========================== */
.about-hero {
  background: linear-gradient(135deg, #e8f7f5 0%, #ede9fe 100%);
  border-radius: var(--radius-xl);
  padding: 3.5rem;
  margin-bottom: 3rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}
.about-hero-icon {
  font-size: 4rem;
  flex-shrink: 0;
  line-height: 1;
}
.about-hero h1 { margin-bottom: 0.75rem; }
.about-hero .lead { max-width: 560px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.about-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}
.about-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.about-card h3 { margin-bottom: 0.75rem; }

/* ==========================
   FEEDBACK / FORMS
   ========================== */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.form-group label .req { color: var(--teal); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.form-textarea { resize: vertical; min-height: 130px; }
.form-select {
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 1rem center;
  background-size: 10px;
}

.gdpr-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 0.75rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--teal);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  animation: fadeInUp 0.4s ease;
}
.form-success.visible { display: block; }
.form-success .success-icon { font-size: 3rem; margin-bottom: 1rem; }
.form-success h3 { color: var(--teal); margin-bottom: 0.5rem; }

/* ==========================
   FOOTER
   ========================== */
.footer {
  background: #1F2937;
  color: #9CA3AF;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #F9FAFB;
  margin-bottom: 0.5rem;
  display: block;
  text-decoration: none;
}
.footer-logo .logo-adhd {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--teal);
  text-transform: uppercase;
}
.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #6B7280;
  max-width: 240px;
  margin-top: 0.5rem;
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #F9FAFB;
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  font-size: 0.9rem;
  color: #9CA3AF;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--teal); }

.footer-newsletter h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #F9FAFB;
  font-family: var(--font-ui);
  margin-bottom: 0.5rem;
}
.footer-newsletter p {
  font-size: 0.88rem;
  color: #6B7280;
  margin-bottom: 0.85rem;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.newsletter-input {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  border: 1.5px solid #374151;
  background: #111827;
  color: #F9FAFB;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  transition: border-color var(--transition);
}
.newsletter-input:focus { outline: none; border-color: var(--teal); }
.newsletter-input::placeholder { color: #4B5563; }
.newsletter-btn {
  padding: 0.55rem 1.1rem;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background var(--transition);
  font-family: var(--font-ui);
  cursor: pointer;
}
.newsletter-btn:hover { background: var(--teal-dark); }

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom p { font-size: 0.85rem; color: #6B7280; margin: 0; }
.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
}
.footer-bottom-links a {
  font-size: 0.85rem;
  color: #6B7280;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: var(--teal); }

/* ==========================
   COOKIE BANNER
   ========================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #1F2937;
  color: #E5E7EB;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  transform: translateY(0);
  transition: transform 0.3s ease;
}
.cookie-banner.hidden { transform: translateY(110%); }
.cookie-text {
  font-size: 0.9rem;
  flex: 1;
  min-width: 200px;
}
.cookie-text a { color: var(--teal); }
.cookie-btns { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-accept {
  padding: 0.5rem 1.2rem;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background var(--transition);
}
.cookie-accept:hover { background: var(--teal-dark); }
.cookie-decline {
  padding: 0.5rem 1rem;
  background: transparent;
  color: #9CA3AF;
  border: 1px solid #374151;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all var(--transition);
}
.cookie-decline:hover { color: #E5E7EB; border-color: #6B7280; }

/* ==========================
   MODAL
   ========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-primary);
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--border-color);
  color: var(--text-secondary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--text-muted); color: #fff; }
.modal p { font-size: 0.93rem; margin-bottom: 1rem; }
.modal .info-box {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  border-left: 3px solid var(--teal);
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ==========================
   404 PAGE
   ========================== */
.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
}
.error-inner { max-width: 480px; }
.error-code {
  font-family: var(--font-heading);
  font-size: 8rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.error-inner h2 { margin-bottom: 1rem; }
.error-inner p { margin-bottom: 2rem; }

/* ==========================
   PRIVACY PAGE
   ========================== */
.privacy-body h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.75rem;
}
.privacy-body p, .privacy-body li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.privacy-body ul { padding-left: 1.5rem; }
.privacy-last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ==========================
   HERO (home intro)
   ========================== */
.home-hero {
  background: linear-gradient(135deg, #e8f7f5 0%, #ede9fe 60%, #fef3c7 100%);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.home-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.5rem;
}
.home-hero p {
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: auto;
  }
  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
  }
  .output-area { padding: 1.5rem 1.25rem; }
  .output-area .reading-content { max-width: 100%; }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-hero { flex-direction: column; padding: 2rem; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .output-toolbar { padding: 0.6rem 1rem; }
  .output-area { padding: 1.25rem 1rem; }
  .form-card { padding: 1.5rem; }
}
