/* Shared styles for martintinkerhess.com. Mobile first, light and dark. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1d2125;
  --muted: #5d6670;
  --border: #e3e0d8;
  --accent: #b23a48;      /* deep red, a nod to circulation */
  --accent-2: #2f6f8f;    /* calm blue for the templates side */
  --code-bg: #f1efe9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1b1e21;
    --text: #e9eaec;
    --muted: #9aa3ad;
    --border: #2c3136;
    --accent: #e0707c;
    --accent-2: #6fb3d6;
    --code-bg: #16191c;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

header.site { padding: 28px 0 8px; }
header.site .crumbs { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
header.site .crumbs a { color: var(--muted); text-decoration: none; }
header.site .crumbs a:hover { text-decoration: underline; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 21px; margin: 32px 0 10px; }
.lede { color: var(--muted); margin: 0 0 8px; font-size: 18px; }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
a.card:hover, a.card:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.card .kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card h3 { margin: 4px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card.big { padding: 24px 20px; }
.card.big h3 { font-size: 23px; }
.card.sims { border-top: 4px solid var(--accent); }
.card.tpl { border-top: 4px solid var(--accent-2); }
.tpl-page a { color: var(--accent-2); }

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 15px;
  margin: 18px 0;
}

/* Template text block */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 10px; }
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;               /* comfortable tap target */
  display: inline-flex; align-items: center;
}
.btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn:active { transform: scale(.98); }
.count { font-size: 14px; color: var(--muted); }
pre.template {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin: 0 0 24px;
  font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;          /* wrap long lines on phones */
  word-break: break-word;
  max-height: 70vh;
  overflow: auto;
}

/* Placeholder page for a simulation not uploaded yet */
.placeholder {
  text-align: center;
  padding: 48px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  margin: 24px 0;
}

footer.site { color: var(--muted); font-size: 14px; padding: 36px 0 40px; border-top: 1px solid var(--border); margin-top: 40px; }

/* Small floating "back" link you can drop into any simulation page */
.sim-back {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 10px; z-index: 1000;
  background: rgba(0,0,0,.55); color: #fff; text-decoration: none;
  font: 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 10px 14px; border-radius: 999px; backdrop-filter: blur(6px);
}

/* ---- Patient-facing home page ---- */
.hero { display: flex; gap: 16px; align-items: center; }
.avatar {
  flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; background: var(--accent-2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; letter-spacing: .02em;
}
@media (min-width: 640px) { .avatar { width: 112px; height: 112px; font-size: 38px; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.btn.big { padding: 12px 22px; font-size: 16px; font-weight: 600; }
.btn-row .btn { flex: 1 1 220px; justify-content: center; }
section { margin-top: 8px; }
section h3 { font-size: 17px; margin: 0 0 6px; }
.facts { padding-left: 20px; margin: 10px 0 0; }
.facts li { margin: 4px 0; }
.office {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
@media (min-width: 640px) { .office { grid-template-columns: 3fr 2fr; } }
.office p { margin: 0 0 10px; }
.small { font-size: 14px; color: var(--muted); }
.alert {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 10px;
  padding: 12px 14px; margin: 14px 0;
}
.alert p { margin: 0 0 8px; }
.alert p:last-child { margin-bottom: 0; }

img.avatar { object-position: center 25%; background: none; }

.card.game { border-top: 4px solid #7a5cc4; }
