/* textbook.css — e-answersolutions.com */

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

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #f5f4f1;
  color: #2c2c2c;
  line-height: 1.72;
}

a { color: #1a5fa8; text-decoration: none; }
a:hover { text-decoration: underline; color: #0d3e70; }

img { max-width: 100%; display: block; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Georgia', serif;
  font-weight: normal;
  line-height: 1.28;
  color: #1a1a1a;
}

h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1.1rem; }

/* ── Root layout: sidebar + content ── */
.eas-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* ── Left sidebar ── */
.eas-toc {
  width: 230px;
  flex-shrink: 0;
  background: #1e3a5a;
  color: #c8dff0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.eas-toc-brand {
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.eas-toc-brand a {
  font-size: 1.1rem;
  font-weight: normal;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: block;
  line-height: 1.3;
}

.eas-toc-brand a strong {
  color: #a8d4f5;
  font-weight: bold;
}

.eas-toc-brand a:hover { opacity: 0.9; text-decoration: none; }

.eas-toc-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6a9abf;
  padding: 16px 20px 6px;
}

.eas-toc nav { flex: 1; }

.eas-toc nav ul {
  list-style: none;
  padding: 0 0 8px;
}

.eas-toc nav ul li a {
  display: block;
  padding: 7px 20px 7px 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.875rem;
  color: #b0cfe8;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  text-decoration: none;
}

.eas-toc nav ul li a:hover,
.eas-toc nav ul li a[aria-current="page"] {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-left-color: #a8d4f5;
  text-decoration: none;
}

/* utility links at bottom of sidebar */
.eas-toc-meta {
  padding: 12px 0 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.eas-toc-meta ul {
  list-style: none;
}

.eas-toc-meta ul li a {
  display: block;
  padding: 5px 20px 5px 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.80rem;
  color: #7aaac8;
  text-decoration: none;
  transition: color 0.12s;
}

.eas-toc-meta ul li a:hover { color: #c8e4f5; text-decoration: none; }

/* ── Main content column ── */
.eas-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Page body (scrollable content area) ── */
.eas-body {
  flex: 1;
  padding: 40px 44px 64px;
  max-width: 820px;
}

/* ── Homepage welcome ── */
.eas-welcome {
  margin-bottom: 2.4rem;
  padding-bottom: 1.8rem;
  border-bottom: 2px solid #ddd8cf;
}

.eas-welcome h1 {
  font-size: 1.85rem;
  margin-bottom: 0.45rem;
}

.eas-welcome p {
  color: #4a4a4a;
  font-size: 1rem;
  max-width: 600px;
}

/* ── Stream section heading ── */
.eas-index-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6830;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e0d9ce;
}

/* ── Article stream ── */
ul.stream {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.stream > li {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e2dbd1;
}

ul.stream > li:last-child { border-bottom: none; }

ul.stream .dek {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #888;
  margin-bottom: 4px;
}

ul.stream h3 {
  font-size: 1.1rem;
  margin-bottom: 0.28rem;
}

ul.stream h3 a { color: #1a3a5c; }
ul.stream h3 a:hover { color: #c06020; text-decoration: none; }

ul.stream p {
  color: #555;
  font-size: 0.93rem;
  margin-bottom: 0;
}

/* ── Article reading layout ── */
.eas-article-body {
  max-width: 720px;
}

.eas-article-crumb {
  font-family: Arial, sans-serif;
  font-size: 0.83rem;
  color: #888;
  margin-bottom: 1.2rem;
}

.eas-article-crumb a { color: #2a6496; }

.eas-article-meta {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.5rem;
}

.eas-article-body h1 {
  font-size: 1.85rem;
  margin-bottom: 0.45rem;
}

.eas-article-deck {
  font-size: 1.05rem;
  color: #555;
  font-style: italic;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid #e5dfd4;
}

.eas-article-body h2 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: #1a3a5c;
}

.eas-article-body h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: #2a5070;
}

.eas-article-body ul,
.eas-article-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.1rem;
}

.eas-article-body li { margin-bottom: 0.4rem; }

/* Key concept box */
.eas-keybox {
  background: #edf4fb;
  border-left: 4px solid #2a6496;
  border-radius: 0 5px 5px 0;
  padding: 16px 20px;
  margin: 1.6rem 0;
}

.eas-keybox .eas-keybox-label {
  font-family: Arial, sans-serif;
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2a6496;
  margin-bottom: 6px;
}

.eas-keybox p { margin-bottom: 0; font-size: 0.97rem; }

/* Formula/code block */
.eas-formula {
  background: #f0ece5;
  border: 1px solid #d4cec5;
  border-radius: 5px;
  padding: 14px 18px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  margin: 1.2rem 0;
  overflow-x: auto;
}

/* ── Prose pages (about, contact) ── */
.eas-prose h2 { margin-top: 1.8rem; font-size: 1.25rem; color: #1a3a5c; }
.eas-prose p  { margin-bottom: 1rem; }
.eas-prose ul { padding-left: 1.6em; margin-bottom: 1rem; }
.eas-prose li { margin-bottom: 0.4rem; }

/* Contact form */
.eas-form { margin-top: 1.4rem; }

.eas-field { margin-bottom: 1.2rem; }

.eas-field label {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  color: #444;
  margin-bottom: 5px;
  font-weight: bold;
}

.eas-field input,
.eas-field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #c8c0b4;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 0.97rem;
  color: #2c2c2c;
  transition: border-color 0.15s;
}

.eas-field input:focus,
.eas-field textarea:focus {
  outline: none;
  border-color: #2a6496;
  box-shadow: 0 0 0 3px rgba(42,100,150,0.12);
}

.eas-field textarea { resize: vertical; min-height: 130px; }

.eas-submit {
  background: #1a5fa8;
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: 4px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.eas-submit:hover { background: #0d3e70; }

.eas-notice-ok {
  background: #eaf7ec;
  border: 1px solid #82c891;
  color: #2d6a3a;
  padding: 14px 18px;
  border-radius: 5px;
  margin-bottom: 1.2rem;
}

.eas-notice-err {
  background: #fdf1f0;
  border: 1px solid #e08080;
  color: #8b2020;
  padding: 14px 18px;
  border-radius: 5px;
  margin-bottom: 1.2rem;
}

.eas-honeypot { display: none !important; visibility: hidden; }

/* ── Footer strip ── */
.eas-strip {
  background: #1e3a5a;
  color: #7aaac8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.80rem;
  padding: 18px 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.eas-strip a { color: #a0c8e8; }
.eas-strip a:hover { color: #fff; text-decoration: none; }

.eas-strip-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Mobile: collapse sidebar to top banner ── */
@media (max-width: 740px) {
  .eas-shell { flex-direction: column; }

  .eas-toc {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .eas-toc-brand {
    padding: 14px 16px;
    border-bottom: none;
    border-right: 1px solid rgba(255,255,255,0.10);
  }

  .eas-toc-label { display: none; }

  .eas-toc nav { flex: none; }

  .eas-toc nav ul {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 8px;
    gap: 2px;
  }

  .eas-toc nav ul li a {
    padding: 6px 12px;
    border-left: none;
    border-radius: 3px;
    font-size: 0.82rem;
  }

  .eas-toc-meta { display: none; }

  .eas-body { padding: 28px 18px 48px; }

  .eas-strip { padding: 16px 18px; }

  h1 { font-size: 1.55rem; }
}
