/*
Theme Name: Key Fob Desk
Theme URI: https://fordkeyfobbattery.site
Description: Independent Ford key-fob battery notes. System fonts, one stylesheet.
Author: Key Fob Desk
Template: generatepress
Version: 1.1.0
Text Domain: fobnotes
*/

:root {
  --paper: #f4f1ea;
  --ink: #1e1c19;
  --muted: #5c564e;
  --line: #d9d1c4;
  --accent: #8c3d2a;
  --green: #1f4d3a;
  --card: #fffdf8;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
  z-index: 5;
}

.skip:focus { top: 0.5rem; }

.wrap {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.site-header .wrap {
  padding: 1rem 0 0.8rem;
}

.brand {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 1.35rem;
  margin: 0;
}

.brand a { color: var(--ink); text-decoration: none; }

.tag {
  margin: 0.15rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav { display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; }

.nav a {
  color: var(--green);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.45rem;
}

.search {
  margin: 0.8rem 0 0;
  display: flex;
  gap: 0.4rem;
}

.search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  border-radius: 2px;
}

.search button,
.contact-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  cursor: pointer;
  border-radius: 2px;
}

main { padding: 1.4rem 0 2.5rem; }

h1, h2, h3 {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 2rem; margin: 0.2rem 0 0.8rem; text-wrap: balance; }

h2 { font-size: 1.35rem; margin: 1.6rem 0 0.5rem; }

h3 { font-size: 1.08rem; margin: 1.1rem 0 0.3rem; }

a { color: var(--accent); }

a:hover { color: var(--green); }

.content a { text-underline-offset: 0.14em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.byline { color: var(--muted); font-size: 0.92rem; margin: 0 0 1rem; }

.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.8rem; }

.crumbs p { margin: 0; }

.crumbs a { color: var(--green); }

.content p { margin: 0.7rem 0; }

.content ul, .content ol { margin: 0.6rem 0 0.8rem; padding-left: 1.2rem; }

.content li { margin: 0.25rem 0; }

.content table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 0.8rem 0 1rem;
  background: var(--card);
}

.content th, .content td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.5rem;
  text-align: left;
  white-space: nowrap;
}

.content svg.cellfig {
  display: block;
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 420 / 180;
  margin: 0.8rem 0 1rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.lede { font-size: 1.12rem; line-height: 1.45; }

.note {
  background: var(--card);
  border-left: 4px solid var(--green);
  padding: 0.75rem 0.9rem;
  margin: 1rem 0;
}

.guide-list .when {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.35rem;
}

.guide-list { padding-left: 1.1rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap { padding: 1.1rem 0 1.6rem; }

.site-footer a { color: var(--green); }

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.contact-form label { display: block; margin: 0.7rem 0 0.2rem; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.6rem;
  min-height: 44px;
}

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

.form-note { color: var(--green); }

@media (max-width: 640px) {
  h1 { font-size: 1.65rem; }
  .lede { font-size: 1.05rem; }
  body { font-size: 1.0625rem; }
  .wrap { width: min(42rem, calc(100% - 1.4rem)); }
  .site-header .wrap { padding: 0.7rem 0 0.45rem; }
  .tag { margin-bottom: 0.35rem; }
  main { padding: 1rem 0 2rem; }
  .content th, .content td { padding: 0.5rem 0.45rem; }
}
