/* WeFixTech site styles. Terminal-tinted, light/dark aware, no external assets. */

:root {
  --bg: #fbfbf9;
  --bg-soft: #f1f2ee;
  --text: #21272b;
  --text-soft: #5a646b;
  --accent: #0b7a4b;
  --accent-soft: #e2f2ea;
  --link: #0a6e9e;
  --border: #dcdfd9;
  --code-bg: #14201b;
  --code-text: #d3e8dc;
  --code-accent: #7fd6a6;
  --note-bg: #fdf6e3;
  --note-border: #e5d9a8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171a;
    --bg-soft: #1a2125;
    --text: #dbe2e6;
    --text-soft: #93a0a8;
    --accent: #4cc38a;
    --accent-soft: #17352a;
    --link: #62b8e0;
    --border: #2b343a;
    --code-bg: #0c1310;
    --code-text: #cfe6d8;
    --code-accent: #6fcf9b;
    --note-bg: #251f10;
    --note-border: #4d4526;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

code, pre, kbd, .prompt { font-family: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.masthead { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; padding: 1.1rem 0 .4rem; }
.site-title { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.site-title a { color: var(--text); text-decoration: none; }
.site-title .prompt { color: var(--accent); }
.tagline { margin: 0; color: var(--text-soft); font-size: .95rem; }
.mainnav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: .5rem 0 .9rem; flex-wrap: wrap; }
.mainnav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.mainnav a:hover, .mainnav a.active { color: var(--accent); }

/* Hero */
.hero { padding: 2.6rem 0 2rem; }
.hero h1, .hero h2 { font-size: 2rem; line-height: 1.2; margin: 0 0 .8rem; letter-spacing: -0.02em; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 .5rem; }
.hero p { max-width: 60ch; color: var(--text-soft); }

/* Cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; padding: 0; list-style: none; }
.tile { border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.2rem; background: var(--bg-soft); }
.tile h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.tile p { margin: 0; font-size: .92rem; color: var(--text-soft); }
.tile a { text-decoration: none; }

/* Article layout */
main { padding: 2rem 0 3rem; }
article.post, .page { max-width: 720px; }
.crumbs { font-size: .85rem; margin: 0 0 1rem; color: var(--text-soft); }
.post h1, .page h1 { font-size: 1.85rem; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 .5rem; }
.post h2, .page h2 { font-size: 1.35rem; margin-top: 2.2rem; letter-spacing: -0.01em; }
.post h3 { font-size: 1.1rem; margin-top: 1.8rem; }
.meta { color: var(--text-soft); font-size: .88rem; margin: 0 0 1.4rem; }

.heritage {
  border: 1px solid var(--note-border);
  background: var(--note-bg);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .9rem;
  margin: 0 0 1.8rem;
}
.heritage p { margin: 0; }

/* Code */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.55;
}
pre .c { color: #8aa39b; } /* comment tint if used inline */
p > code, li > code, td > code, h2 > code, h3 > code {
  background: var(--accent-soft);
  color: inherit;
  padding: .1em .35em;
  border-radius: 4px;
  font-size: .88em;
}

/* Output tables */
table.result { border-collapse: collapse; margin: 1rem 0; font-size: .88rem; width: auto; display: block; overflow-x: auto; }
table.result th, table.result td { border: 1px solid var(--border); padding: .35rem .7rem; text-align: left; white-space: nowrap; }
table.result th { background: var(--bg-soft); }

/* Hosting comparison: wraps on a desktop column, stacks into cards on a phone */
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; margin: 1rem 0 1.4rem; }
.table-scroll table.host-table { margin: 0; width: 100%; table-layout: auto; font-size: .74rem; }
.table-scroll table.host-table th,
.table-scroll table.host-table td { overflow-wrap: normal; word-break: normal; }
@media (max-width: 640px) {
  .table-scroll table.host-table { font-size: .92rem; }
}
table.host-table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.4rem; font-size: .92rem; }
table.host-table th, table.host-table td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: left; vertical-align: top; }
table.host-table th { background: var(--bg-soft); }
table.host-table a { font-weight: 600; }

@media (max-width: 640px) {
  table.host-table thead { display: none; }
  table.host-table, table.host-table tbody, table.host-table tr, table.host-table td { display: block; width: 100%; }
  table.host-table tr { margin: 0 0 1rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  table.host-table td { border: 0; border-top: 1px solid var(--border); }
  table.host-table td:first-child { border-top: 0; background: var(--bg-soft); font-weight: 700; }
  table.host-table td::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: .15rem;
  }
  table.host-table td:first-child::before { content: none; }
}

/* Note boxes */
.tip { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; padding: .7rem 1rem; font-size: .93rem; margin: 1.2rem 0; }
.tip p { margin: 0; }

/* Article footer nav */
.post-footer { border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .92rem; }

/* Site footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 1.5rem 0 2rem; margin-top: 2rem; font-size: .88rem; color: var(--text-soft); }
.site-footer a { color: var(--text-soft); }
.site-footer p { margin: .3rem 0; }

@media (max-width: 540px) {
  body { font-size: 16px; }
  .hero h1, .hero h2 { font-size: 1.6rem; }
}

.byline { color: var(--text-soft); font-size: .9rem; margin: 0 0 1.4rem; }
.meta + .byline { margin-top: -1.05rem; }
.post figure { margin: 1.2rem 0 1.6rem; }
.post figure img { max-width: 100%; height: auto; border-radius: 8px; }
.post figure figcaption { margin: .45rem 0 0; color: var(--text-soft); font-size: .88rem; }
a.amazon-button {
  display: inline-block;
  margin: .15rem 0 .85rem;
  padding: .45rem .9rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.3;
  text-decoration: none;
  border-radius: 6px;
}
a.amazon-button:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) {
  a.amazon-button { color: #07140e; }
}
.guide-index { padding-left: 1.2rem; }
.guide-index li { margin: .2rem 0; }

/* Analytics consent. Hidden until consent.js opens it. */
body.consent-open { padding-bottom: 8rem; }
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--bg-soft);
  color: var(--text);
  border-top: 1px solid var(--border);
  padding: .85rem 1.25rem;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.consent-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.consent p { margin: 0; max-width: 62ch; font-size: .92rem; }
.consent-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.consent button,
button.cookie-settings {
  font: inherit;
  font-weight: 700;
  font-size: .88rem;
  line-height: 1.3;
  border-radius: 6px;
  padding: .4rem .85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.consent button[data-consent="accept"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.consent button:hover,
button.cookie-settings:hover { border-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .consent button[data-consent="accept"] { color: #07140e; }
}
@media (min-width: 720px) {
  body.consent-open { padding-bottom: 5.5rem; }
}
