/* ReadTime Calc – Editorial Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #1e1e1e;
  --paper: #faf7f2;
  --warm-white: #fffcf7;
  --accent: #b75c3a;
  --accent-soft: #d48c6e;
  --border: #e0d7cc;
  --muted: #6b5e53;
  --surface: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --radius: 12px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", monospace;
  --max-width: 780px;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ink);
  color: var(--warm-white);
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}
.logo svg {
  color: var(--accent);
  flex-shrink: 0;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-list a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--ink);
}

/* Main */
main {
  flex: 1;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--warm-white) 0%, var(--paper) 100%);
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Tool card */
.tool-section {
  padding-top: 0;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.tool-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
}
.input-group {
  margin-bottom: 1.5rem;
}
.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#text-input {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--warm-white);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183, 92, 58, 0.15);
}
.input-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Settings */
.settings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding: 1rem;
  background: var(--warm-white);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.setting {
  flex: 1 1 240px;
}
.setting label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
#wpm-slider {
  width: 100%;
  accent-color: var(--accent);
  margin-bottom: 0.3rem;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.preset-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 0.2rem;
}
.btn-preset {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--ink);
  font-weight: 500;
}
.btn-preset:hover {
  background: var(--accent-soft);
  color: #fff;
  border-color: var(--accent-soft);
}
.btn-preset.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Result */
.result-panel {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fdf8f3 0%, #fefaf6 100%);
  border-radius: 8px;
  border: 1px dashed var(--border);
}
.result-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.result-time {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.result-detail {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Info sections */
.info-section {
  padding: 1.5rem 0;
}
.info-section h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
  text-align: center;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}
.info-card h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
}
.info-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* FAQ */
.faq-list {
  max-width: 680px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.faq-item dt {
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.faq-item dd {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.footer-nav {
  list-style: none;
  display: flex;
  gap: 1.25rem;
}
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
}
.footer-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 15px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .tool-card {
    padding: 1.25rem;
  }
  .settings-row {
    flex-direction: column;
    gap: 1rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
