/* Arusha Peptides. Light paper, black ink, sage and gold accents. */
:root {
  --ink: #202525;
  --muted: #556565;
  --paper: #f4f5f3;
  --panel: #ffffff;
  --line: #d6e0da;
  --teal: #0f5f57;
  --teal-dark: #0a4942;
  --soft: #eaf3ef;
  --coral: #b63a2c;
  --peach: #fff1e9;
  --warn: #8a5a00;
  --warn-soft: #fff6e3;
  --radius: 20px;
  --accent: var(--teal);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body { min-height: 100vh; }

a { color: var(--teal-dark); }
a:hover { text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel);
  padding: 10px 14px;
  z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* --- header ------------------------------------------------------------- */

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.brand img, .brand svg { width: 32px; height: 32px; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--accent-surface, var(--accent));
  color: var(--accent-ink, #fff);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.topnav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; align-items: center; }
.topnav a { color: var(--ink); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.topnav a:hover, .topnav a[aria-current="page"] { border-bottom-color: var(--accent-edge, var(--accent)); }
.whoami { color: var(--muted); font-size: 0.85rem; }

/* --- layout ------------------------------------------------------------- */

main { max-width: 1080px; margin: 0 auto; padding: 22px 18px 64px; }
main.wide { max-width: 1240px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 1.2rem; margin: 26px 0 8px; }
h3 { font-size: 1.02rem; margin: 18px 0 6px; }
p { margin: 0 0 12px; }
.lede { font-size: 1.05rem; color: var(--muted); margin-bottom: 18px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 0 16px;
}
.card.narrow { max-width: 520px; margin: 48px auto; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.tile {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-edge, var(--accent));
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
}
.tile:hover { border-color: var(--accent); background: var(--soft); }
.tile h3 { margin: 0 0 4px; }
.tile p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* --- badges and notices -------------------------------------------------- */

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--accent-strong, var(--teal-dark));
  white-space: nowrap;
}
.badge.hold { background: var(--peach); border-color: #f0c6b5; color: var(--coral); }
.badge.warn { background: var(--warn-soft); border-color: #e8cf9a; color: var(--warn); }
.badge.grade { background: #fff; }
.badge.draft { background: #f1f1f1; color: #3a3a3a; }
.badge.ok { background: #e7f4ec; border-color: #b9ddc6; color: #15633a; }

.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-edge, var(--accent));
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.notice.hold { background: var(--peach); border-left-color: var(--coral); }
.notice.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.notice.ok { background: #e7f4ec; border-left-color: #15633a; }
.notice h3 { margin: 0 0 4px; font-size: 0.98rem; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.mono { font-family: "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 0.9rem; word-break: break-all; }

/* --- buttons and forms --------------------------------------------------- */

.btn, button, input[type="submit"] {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent-hover, var(--teal-dark));
  background: var(--accent-surface, var(--teal));
  color: var(--accent-ink, #fff);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover, button:hover { background: var(--accent-hover, var(--teal-dark)); color: var(--accent-ink, #fff); }
.btn.secondary, button.secondary {
  background: var(--panel);
  color: var(--accent-strong, var(--teal-dark));
  border-color: var(--line);
}
.btn.secondary:hover, button.secondary:hover { background: var(--soft); }
.btn.danger, button.danger { background: var(--coral); border-color: #8d2b20; }
.btn[aria-disabled="true"], button:disabled {
  background: #e6e9e7;
  color: #6c7a74;
  border-color: var(--line);
  cursor: not-allowed;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 0; }
.actions.right { justify-content: flex-end; }

fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
label { display: block; font-weight: 600; margin: 0 0 4px; }
.field { margin: 0 0 18px; }
.field > .help { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="password"], input[type="search"], select, textarea {
  font: inherit;
  width: 100%;
  max-width: 560px;
  padding: 9px 10px;
  border: 1px solid #a8b5ae;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 92px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent-edge, var(--teal)); }
.choice { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 7px; font-weight: 400; }
.choice label, label.choice { font-weight: 400; margin: 0; }
.states { margin: 8px 0 0; padding: 8px 10px; background: var(--soft); border-radius: 8px; }
.states legend, .states .states-title { font-size: 0.85rem; font-weight: 700; color: var(--accent-strong, var(--teal-dark)); }
.states .choice { display: inline-flex; margin: 0 14px 0 0; font-size: 0.9rem; }
.err { color: var(--coral); font-weight: 600; }
.errorbox { border: 1px solid var(--coral); background: var(--peach); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.errorbox ul { margin: 6px 0 0 18px; }

/* --- tables -------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; margin: 0 0 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
th { background: var(--soft); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-wrap { overflow-x: auto; }
.repeat-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0 0 12px; background: #fcfdfc; }
.repeat-row h4 { margin: 0 0 8px; font-size: 0.95rem; }

/* --- disclosure tiles ---------------------------------------------------- */

details.tilebox {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  margin: 0 0 10px;
}
details.tilebox > summary {
  cursor: pointer;
  padding: 13px 15px;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
details.tilebox > summary:hover { background: var(--soft); }
details.tilebox[open] > summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
details.tilebox .tilebody { padding: 2px 15px 14px; }
details.tilebox .summaryline { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
details.sub { border-style: dashed; margin-left: 0; }
.sourcelist { margin: 8px 0 0; padding: 0; list-style: none; }
.sourcelist li { font-size: 0.88rem; padding: 4px 0; border-top: 1px dotted var(--line); }
.sourcelist li:first-child { border-top: 0; }

.stage { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stepbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.stepbar li {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef1ef;
  color: var(--muted);
  border: 1px solid var(--line);
}
.stepbar li.done { background: var(--soft); color: var(--accent-strong, var(--teal-dark)); }
.stepbar li.now { background: var(--accent-surface, var(--teal)); color: var(--accent-ink, #fff); border-color: var(--accent-hover, var(--teal-dark)); font-weight: 700; }

.progress {
  height: 10px;
  background: #e8ece9;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 12px;
  max-width: 360px;
}
.progress span { display: block; height: 100%; background: var(--teal); }

.taskrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-edge, var(--accent));
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 10px;
  background: var(--panel);
}
.taskrow .when { font-weight: 700; }
.taskrow form { display: inline; }

footer.sitefoot {
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 16px 18px 40px;
}
footer.sitefoot .inner { max-width: 1080px; margin: 0 auto; }

body.plain { display: grid; place-items: start center; }

@media (max-width: 620px) {
  main { padding: 16px 12px 56px; }
  h1 { font-size: 1.35rem; }
  .topnav { width: 100%; margin-left: 0; }
  th, td { font-size: 0.9rem; padding: 7px 8px; }
  .btn, button { width: 100%; text-align: center; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn, .actions button { width: 100%; }
}

@media print {
  .topnav, .actions { display: none; }
}

/* --- utility classes ------------------------------------------------------ */
/* These replace inline style attributes, which the content security policy
   blocks on purpose. */

.mt-xs { margin-top: 6px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 14px; }
.mb-md { margin: 0 0 14px; }
.m-0 { margin: 0; }
.tight { margin: 6px 0 0; }
.tight-xs { margin: 4px 0 0; }
.sourcehead { margin: 10px 0 2px; }
.inline-form { display: inline; }
.inline-label { display: inline; font-weight: 400; }
.narrow-form { max-width: 520px; }
.narrow-form.sign-in { max-width: 460px; }
.state-menu { width: auto; max-width: 220px; padding: 4px 6px; }
.mark-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-right: 6px;
}

/* A progress bar with no inline width: the browser draws the value. */
progress.progress {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 360px;
  height: 10px;
  margin: 6px 0 12px;
  border: 0;
  border-radius: 999px;
  background: #e8ece9;
  color: var(--teal);
}
progress.progress::-webkit-progress-bar { background: #e8ece9; border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--accent-edge, var(--teal)); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--accent-edge, var(--teal)); border-radius: 999px; }

/* The established tile layout, with Dena's neutral, coral, green and teal colours. */
h1,h2,h3{font-family:Georgia,'Times New Roman',serif;font-weight:500;letter-spacing:-.025em}
h1{font-size:clamp(2rem,5vw,3rem);line-height:1.15}
h2{font-size:1.7rem}h3{font-size:1.3rem}
main{max-width:880px;padding-top:32px;padding-bottom:48px}
main.wide{max-width:1120px}
.topbar{background:#fff;border-bottom:1px solid #dce4e1}
.topbar-inner{padding:14px 22px;gap:24px}
.brand{font-family:Georgia,serif;font-size:1.25rem;letter-spacing:-.015em}
.brand-monogram{display:flex;align-items:baseline;gap:2px;font-size:2rem;color:#11685e;white-space:nowrap}
.brand-monogram span{font-family:Georgia,serif;font-size:.65rem;font-style:italic;color:#bd594d;padding:0 2px}
.tile-icon{display:block;font-family:'Segoe UI Emoji','Apple Color Emoji',sans-serif;font-size:2.5rem;line-height:1.4;margin-bottom:10px}
.heading-icon{font-family:'Segoe UI Emoji','Apple Color Emoji',sans-serif;font-size:1.6rem;line-height:1;margin-right:12px}
.dashboard-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0}
.tile,.peptide-card{border:1px solid #ccdcd5;box-shadow:0 5px 18px #173d3310;text-decoration:none;border-radius:20px;padding:24px;background:#edf4ef;transition:transform .15s,border-color .15s}
.tile:nth-child(3n+2),.peptide-card:nth-child(3n+2){background:#fff0eb;border-color:#efd3cb}
.tile:nth-child(3n),.peptide-card:nth-child(3n){background:#e9f3f2;border-color:#cadeda}
.tile:hover,.peptide-card:hover{transform:translateY(-2px);border-color:#11685e}
.tile h2,.tile h3,.peptide-card h3{color:#253a32;margin:0 0 10px}
.tile p,.peptide-card p{color:#455c53}
.card{border-radius:20px;box-shadow:0 3px 15px #173d3308;padding:24px}
.intro-hero{background:linear-gradient(135deg,#11685e,#3c7057);color:#fff;border:0;border-radius:20px;padding:26px;margin:22px 0}
.intro-hero h2,.intro-hero p,.intro-hero>summary{color:#fff}
.intro-hero .tilebody{background:#f7faf7;color:#202525;border-radius:14px}
.intro-hero .tilebody p{color:#202525}
.tilebox{border-radius:20px;border-color:#d6e0da;overflow:hidden}
.tilebox>summary{padding:20px;background:#edf4ef;font-size:1.15rem;display:flex;align-items:center;gap:4px}
.tilebox:nth-of-type(3n+2)>summary{background:#fff0eb}
.tilebox:nth-of-type(3n)>summary{background:#e9f3f2}
.tilebox.intro-hero>summary{background:transparent;color:#fff;padding:0}
.tilebox>summary .summaryline{font-family:inherit;font-size:.85rem}
.tilebox[open]>summary{border-bottom:1px solid #d6e0da}
.tilebox.sub>summary{font-size:1rem;padding:16px}
.sitefoot{background:transparent;border-top:1px solid #d6e0da;font-size:.85rem}
.sitefoot .inner{padding:20px 22px}
fieldset.states{background:#f5f7f5;padding:12px;border-radius:12px}
input,textarea,select{background:#fff;border-color:#bdcbc4;border-radius:10px}
input[type=file]{max-width:100%;padding:12px;font-size:1rem}
label{display:block;margin-bottom:12px}
.intro-hero a{color:#fff}.intro-hero .tilebody a{color:#0a4942}
@media(max-width:640px){.topbar-inner{display:block;padding:12px 16px}.brand{margin-bottom:10px}.topnav{gap:8px 18px;justify-content:flex-start;font-size:.9rem}.topnav button{padding:6px 10px}.dashboard-tiles{gap:12px}.tile,.peptide-card{padding:18px}.tile h2{font-size:1.35rem}.card{padding:20px}main,main.wide{padding:22px 16px 40px}.tilebox>summary{font-size:1.05rem}.heading-icon{font-size:1.35rem}.intro-hero{padding:22px}.tile-icon{font-size:2.2rem}}
.grid.two.peptide-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.peptide-grid .tile{min-width:0;overflow-wrap:anywhere}
@media(max-width:640px){.grid.two.peptide-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.peptide-grid .tile,.peptide-grid .peptide-card{padding:16px 12px}.peptide-grid h3{font-size:1.1rem;line-height:1.3}.peptide-grid p{font-size:.82rem}.peptide-grid .badge{font-size:.64rem;padding:3px 5px}}

/* Future Health Phase Two: exact layout and colour roles. */
:root{--bg:#F5F2EA;--surface:#FFFFFF;--surface2:#FAF8F2;--ink:#1C1C1A;--muted:#6B6B60;--sage:#2D5A2D;--gold:#C8960A;--gold-soft:#FBF3DD;--green:#2D7D3A;--green-soft:#E8F3E4;--blue:#1E5A96;--radius:20px}
body{background:var(--bg);color:var(--ink);font-family:'DM Sans',Arial,sans-serif}
.p2-shell{max-width:560px;margin:auto}.p2-shell h1,.p2-read h2,.p2-read h3{font-family:'Cormorant Garamond',Georgia,serif;font-weight:600}.p2-shell h1{font-size:2rem}.p2-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.p2-tile{background:var(--surface);border:none;border-radius:20px;padding:1.2rem 1rem 1.1rem;text-align:left;color:var(--ink);text-decoration:none;box-shadow:0 1px 6px rgba(0,0,0,.05);display:flex;flex-direction:column;gap:.55rem;min-height:118px}.p2-tile:active{transform:scale(.98)}.p2-tile .ic{font-size:1.9rem;line-height:1}.p2-tile .nm{font-size:1.08rem;font-weight:700;line-height:1.25}.p2-tile .more{margin-top:auto;font-size:.8rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gold);font-weight:700}.p2-tile.wide{grid-column:1/-1;background:linear-gradient(145deg,#5C6E33,#7D8F4E);color:white;min-height:0;flex-direction:row;align-items:center;gap:1rem;padding:1.3rem}.p2-tile.wide .nm{font-family:'Cormorant Garamond',Georgia,serif;font-size:1.7rem;font-weight:600}.p2-tile.wide .more{color:#F3E6B8;margin:0 0 0 auto}.p2-back{display:inline-flex;background:white;border:1.5px solid var(--sage);color:var(--sage);font-weight:700;font-size:.95rem;border-radius:999px;padding:.5rem 1rem;margin-bottom:1rem;text-decoration:none}.p2-kicker{font-size:.85rem;letter-spacing:.1em;color:var(--muted);margin:0 0 .3rem}.p2-read{background:white;border-radius:20px;padding:1.4rem 1.35rem;box-shadow:0 1px 6px rgba(0,0,0,.04);font-size:1.05rem;line-height:1.7}.p2-read p{margin:0 0 .95rem}.p2-read h2,.p2-read h3{color:var(--sage);font-size:1.45rem;line-height:1.2}.p2-ask{display:block;text-align:center;margin-top:1rem;background:var(--sage);color:white;border-radius:16px;padding:1rem;text-decoration:none;font-weight:700}.p2-sub{margin-top:1.4rem}.p2-sources{margin-top:1.3rem;font-size:.88rem}.p2-search{margin:1.2rem 0}.p2-search input{width:100%}.p2-search button{margin-top:.5rem}

:root{--brand:#2D5A2D;--brand-dark:#244824;--brand-soft:#E8F3E4}.brand,.brand-monogram{color:#2D5A2D;font-family:'Cormorant Garamond',Georgia,serif}.brand-monogram span{color:#C8960A}.tile,.peptide-card,.tile:nth-child(3n+2),.tile:nth-child(3n),.peptide-card:nth-child(3n+2),.peptide-card:nth-child(3n){background:#FFFFFF;border-color:#E5E2D8}.tilebox>summary,.tilebox:nth-of-type(3n+2)>summary,.tilebox:nth-of-type(3n)>summary{background:#FAF8F2}.intro-hero{background:linear-gradient(145deg,#5C6E33,#7D8F4E)}.dashboard-tiles{gap:.75rem}.tile-icon{font-size:1.9rem}.tile h2,.tile h3{color:#1C1C1A}.p2-kicker{font-family:'Oswald','DM Sans',sans-serif}

/* Arusha Peptides: one leaf mark, then the name once. PragmaBuild credit in the footer. */
.brand-mark-leaf{display:inline-flex;flex:0 0 auto;width:30px;height:30px}
.brand .brand-leaf{width:30px;height:30px;display:block}
.sitefoot .poweredby{display:inline-flex;align-items:center;gap:6px;vertical-align:middle;color:#4A5D23;text-decoration:none}
.sitefoot .poweredby:hover span{text-decoration:underline}
.sitefoot .poweredby img{width:18px;height:18px;display:block;flex:0 0 auto}
