/* graphingcalculator.dev — shared stylesheet (below-the-fold / non-critical).
   Variables, header, page heading and the calculator stage live in
   critical.css, which is inlined into every page <head>. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.main-nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.logo:hover { text-decoration: none; }

/* ---------- breadcrumb / generic hero (pages without a calculator) ---------- */
.breadcrumb { font-size: .9rem; color: var(--muted); padding: 14px 0 0; }
.breadcrumb a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.hero { padding: 22px 0 6px; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 10px; color: var(--head); }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 780px; margin: 0; }
.stage-note { margin: 0; padding: 8px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.stage-note.container { max-width: 1120px; }

/* ---------- mini-tool / no-JS placeholder keypad ---------- */
.tool-display { background: #111827; color: #a7f3d0; border-radius: 12px; padding: 18px 20px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25rem; min-height: 66px; display: flex; align-items: center; gap: 10px; }

/* ---------- content blocks ---------- */
section.block { padding: 22px 0; }
section.block h2 { font-size: 1.5rem; line-height: 1.3; color: var(--head); border-bottom: 3px solid var(--amber); display: inline-block; padding-bottom: 4px; margin: 0 0 14px; }
section.block h3 { color: var(--head2); margin: 22px 0 8px; }
section.block p { margin: 0 0 12px; }
section.block ul, section.block ol { margin: 0 0 12px; padding-left: 22px; }
section.block li { margin-bottom: 6px; }

/* ---------- cards grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool-card { border: 1px solid var(--line); border-top: 3px solid var(--amber); border-radius: var(--radius); padding: 18px; background: var(--surface); transition: transform .15s, box-shadow .15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(2,6,23,.12); }
.tool-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.tool-card h3 a { color: var(--head); }
.tool-card p { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }
.tool-card .cta { font-weight: 700; }
.related-links { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin: 0; }
.related-links a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); color: var(--head); font-weight: 600; font-size: .95rem; }
.related-links a:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.related-links a { transition: transform .12s, border-color .12s; }

/* ---------- comparison tables ---------- */
table.compare { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
table.compare th { background: var(--navy); color: #fff; text-align: left; padding: 10px 12px; }
table.compare td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; background: var(--surface); }
table.compare tr:nth-child(even) td { background: var(--bg-soft); }

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.faq-q { width: 100%; text-align: left; background: var(--surface); border: 0; padding: 14px 16px; font-size: 1rem; font-weight: 700; color: var(--head); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: inherit; min-height: 48px; }
.faq-q:hover { background: var(--bg-soft); }
.faq-q .sign { color: #b45309; font-size: 1.3rem; line-height: 1; flex-shrink: 0; transition: transform .2s; }
.faq-a { display: none; padding: 0 16px 16px; color: var(--ink); }
.faq-a p { margin: 0 0 8px; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q .sign { transform: rotate(45deg); }

/* ---------- callout box ---------- */
.cta-box { background: var(--cta-bg); border: 1px solid var(--cta-line); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.cta-box p { margin: 0 0 8px; }
.cta-box p:last-child { margin: 0; }
.btn { display: inline-block; background: #b45309; color: #fff; font-weight: 700; padding: 10px 20px; border-radius: 10px; }
.btn:hover { background: #92400e; color: #fff; text-decoration: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; margin-top: 36px; padding: 38px 0 24px; font-size: .95rem; }
.site-footer h4, .site-footer .footer-title { color: #fff; margin: 0 0 10px; font-size: 1rem; font-weight: 700; }
.site-footer a { color: #cbd5e1; text-decoration: underline; text-underline-offset: 2px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; }
.site-footer .disclaimer { font-size: .85rem; color: #a8b5c8; margin-top: 26px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; }
.site-footer .disclaimer p { margin: 0 0 6px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero h1 { font-size: 1.6rem; }

}
@media (max-width: 699px) {
  .container { padding: 0 14px; }
  section.block h2 { font-size: 1.3rem; }
}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:16px 0}.table-wrap table.compare{margin:0;min-width:480px}

.theme-toggle:hover, .nav-toggle:hover { background: rgba(255,255,255,.22); }
:root[data-theme=dark] .site-footer { background: #070c18; }
:root[data-theme=dark] .btn { background: #d97706; }
:root[data-theme=dark] code { background: #1b2740; color: #e2e8f0; }
code { background: #eef2f7; padding: 1px 6px; border-radius: 5px; font-size: .92em; }
@media (min-width: 700px) { .head-title h1 { border-left: 4px solid var(--amber); padding-left: 12px; } }
@media (prefers-reduced-motion: reduce) { .tool-card, .related-links a { transition: none; } }
