/* Critical CSS for Typography Template - Mobile First */
/* This should be inlined in the <head> for optimal PageSpeed */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* Critical Typography - Mobile First */
h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 1rem;
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #0066cc;
  text-decoration: none;
}

/* Critical Layout */
.dnd_area {
  padding: 0 15px;
}

.dnd_section {
  padding: 30px 0;
}

.dnd_row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.dnd_column {
  padding: 0 15px;
  width: 100%;
}

/* Critical Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  min-height: 44px;
  border-radius: 0.25rem;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none;
  font-weight: 500;
}

.btn-primary {
  background: #0066cc;
  color: white;
  border: 2px solid #0066cc;
}

/* Critical Accordion (details/summary) */
details {
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  background: white;
}

summary {
  padding: 0.875rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 1.5em;
  line-height: 1;
}

details[open] summary::after {
  content: '−';
}

details > *:not(summary) {
  padding: 0.875rem 1rem;
}

/* Critical Mobile Helpers */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Prevent FOUC (Flash of Unstyled Content) */
.no-js {
  visibility: hidden;
}

/* Above the fold content should be visible immediately */
.hero-section,
.main-header,
h1,
h2:first-of-type {
  visibility: visible !important;
}