/* ============================================================
   Scout Leader Online — design system
   Inspired by Scouts Victoria's dark-green + yellow palette
   without using their official trademarks/logos.
   ============================================================ */
:root {
  /* Palette */
  --green-900: #0E2E1A;
  --green-800: #14401F;
  --green-700: #1B5226;   /* primary brand green */
  --green-600: #2A6B36;
  --green-500: #4A8550;
  --green-100: #E5EFE3;
  --yellow:    #F4C300;   /* Scouts-y accent */
  --yellow-soft:#FBE787;
  --yellow-dark:#C29A00;

  --ink:       #14211B;
  --ink-soft:  #38453E;
  --muted:     #6E7B72;
  --rule:      #DAD7CB;
  --bg:        #FAF9F4;
  --bg-2:      #F2EFE3;
  --surface:   #FFFFFF;
  --surface-2: #F7F5EB;

  --bad:       #A83232;
  --good:      #2E7D32;

  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20,33,27,.04);
  --shadow:    0 2px 8px rgba(20,33,27,.06), 0 12px 32px rgba(20,33,27,.07);
  --shadow-lg: 0 16px 40px rgba(20,33,27,.12);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --focus: 0 0 0 3px rgba(244,195,0,.45);
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }
*:focus { outline: none; }
*:focus-visible { box-shadow: var(--focus); border-color: var(--yellow) !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-900); text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ============================== HEADER ===================== */
.site-header {
  background: var(--green-900);
  color: #fff;
  border-bottom: 3px solid var(--yellow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--yellow); color: var(--green-900);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  letter-spacing: -.5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 18px; }
.brand-sub { font-size: 11.5px; opacity: .75; }

.site-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-nav a {
  color: #fff; opacity: .9; font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.site-nav a:hover { opacity: 1; text-decoration: none; border-bottom-color: var(--yellow); }
.site-nav .nav-strong {
  background: var(--yellow); color: var(--green-900);
  padding: 6px 12px; border-radius: 999px; font-weight: 600;
  border-bottom: none;
}
.site-nav .nav-strong:hover { background: #ffd425; border-bottom-color: transparent; }

/* ============================== HERO ======================= */
.hero {
  background:
    radial-gradient(circle at 85% 25%, rgba(244,195,0,.12), transparent 45%),
    linear-gradient(180deg, var(--green-900), var(--green-800));
  color: #fff;
  padding: 70px 0 80px;
}
.hero-inner { max-width: 880px; }
.eyebrow {
  color: var(--yellow); font-size: 13px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase; margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--serif); font-size: 56px; line-height: 1.05;
  font-weight: 600; letter-spacing: -1px; margin: 0 0 22px;
}
.hero h1 .hi { color: var(--yellow); font-style: italic; }
.lede {
  color: rgba(255,255,255,.85); font-size: 18px; max-width: 700px;
  margin: 0 0 30px; line-height: 1.6;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: flex; gap: 32px; flex-wrap: wrap;
  color: rgba(255,255,255,.75); font-size: 14px;
}
.hero-stats strong { color: var(--yellow); font-weight: 700; }

/* ============================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 12px; border: 2px solid transparent;
  font-family: inherit; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all .12s ease;
  text-decoration: none;
}
.btn-primary { background: var(--yellow); color: var(--green-900); border-color: var(--yellow); }
.btn-primary:hover { background: #ffd425; border-color: #ffd425; transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; text-decoration: none; }
.btn-dark { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.btn-dark:hover { background: var(--green-700); border-color: var(--green-700); text-decoration: none; }
.btn-secondary {
  background: var(--surface); color: var(--ink); border-color: var(--rule);
}
.btn-secondary:hover { background: var(--surface-2); }

/* ============================== SECTIONS =================== */
.section { padding: 64px 0; }
.section h2 {
  font-family: var(--serif); font-size: 36px; font-weight: 600;
  margin: 0 0 12px; letter-spacing: -.5px; color: var(--ink);
}
.section-lede { font-size: 17px; color: var(--ink-soft); max-width: 720px; margin: 0 0 36px; }

/* ============================== TOOL CARDS ================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex; flex-direction: column;
  color: var(--ink); transition: all .15s ease;
  box-shadow: var(--shadow-sm);
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--green-500);
}
.tool-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--green-700); color: var(--yellow);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  margin-bottom: 18px;
}
.tool-icon svg { width: 30px; height: 30px; }
.tool-card:hover .tool-icon { background: var(--green-800); }
.tool-card h3 {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 0 0 10px; color: var(--ink);
}
.tool-card p {
  color: var(--ink-soft); font-size: 14.5px; line-height: 1.55;
  margin: 0 0 18px; flex: 1;
}
.tool-link {
  color: var(--green-700); font-weight: 600; font-size: 14px;
}

/* ============================== HOW IT WORKS =============== */
.how { background: transparent; }
.how-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}
.how-steps li {
  background: var(--surface); padding: 28px 26px; border-radius: var(--radius);
  border: 1px solid var(--rule); position: relative;
}
.how-num {
  position: absolute; top: -16px; left: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--yellow); color: var(--green-900);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 18px;
  border: 3px solid var(--bg);
}
.how-steps h3 {
  font-family: var(--serif); font-size: 20px; font-weight: 600;
  margin: 12px 0 8px;
}
.how-steps p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ============================== SAFETY STRIP =============== */
.safety-strip {
  background: linear-gradient(135deg, #f9e9c2, #fbe787);
  border-top: 3px solid var(--yellow-dark);
  border-bottom: 3px solid var(--yellow-dark);
  padding: 32px 0;
}
.safety-inner { display: flex; align-items: center; gap: 22px; }
.safety-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green-900); color: var(--yellow);
  display: grid; place-items: center;
  font-size: 28px; font-weight: 700; flex-shrink: 0;
}
.safety-strip h3 {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 0 0 6px; color: var(--green-900);
}
.safety-strip p { margin: 0; color: var(--ink); font-size: 14.5px; line-height: 1.55; max-width: 700px; }
.safety-strip a { color: var(--green-900); text-decoration: underline; font-weight: 600; }

/* ============================== FAQ ======================== */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.faq details {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: 16px 20px;
}
.faq summary {
  font-weight: 600; cursor: pointer; font-size: 16px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+ '; color: var(--green-700); font-weight: 700; }
.faq details[open] summary::before { content: '− '; }
.faq p { color: var(--ink-soft); font-size: 14.5px; margin: 12px 0 0; }

/* ============================== FOOTER ===================== */
.site-footer {
  background: var(--green-900); color: rgba(255,255,255,.85);
  padding: 32px 0 28px; margin-top: 0; font-size: 14px;
  border-top: 3px solid var(--yellow);
}
.footer-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.site-footer a { color: var(--yellow); }
.site-footer a:hover { color: #fff; }
.site-footer .muted { color: rgba(255,255,255,.55); }
.footer-credit { font-size: 12px; opacity: .7; }

/* ============================== TOOL PAGES ================= */
.page-hero {
  background: var(--green-900); color: #fff;
  padding: 50px 0 40px;
  border-bottom: 3px solid var(--yellow);
}
.page-hero h1 {
  font-family: var(--serif); font-size: 38px; font-weight: 600;
  margin: 8px 0 6px; letter-spacing: -.5px;
}
.page-hero .lede { font-size: 16px; max-width: 700px; }

.workspace {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px;
  margin-top: 40px; margin-bottom: 60px;
}
@media (max-width: 880px) { .workspace { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.panel h2 {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 0 0 8px; color: var(--ink);
}
.panel-lede { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--ink); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 2px solid var(--rule); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: 15px; line-height: 1.4;
  transition: border-color .12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-700); }
.field textarea { min-height: 80px; resize: vertical; }
.field-help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }

/* Output panel */
.output {
  min-height: 400px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.output-empty {
  color: var(--muted); font-style: italic;
  text-align: center; padding: 80px 20px;
}
.output-result {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink);
}
.output-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule);
}

/* Sandbox banner */
.sandbox-banner {
  background: var(--yellow-soft);
  border-bottom: 2px solid var(--yellow-dark);
  padding: 10px 0;
  text-align: center;
  font-size: 13.5px; color: var(--green-900);
  font-weight: 500;
}
.sandbox-banner strong { color: var(--green-900); }
.sandbox-banner.live {
  background: var(--green-100);
  border-bottom-color: var(--green-500);
}

/* Loading state */
.loading {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 14px;
}
.loading::before {
  content: ''; width: 14px; height: 14px;
  border: 2px solid var(--rule); border-top-color: var(--green-700);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Prompt cards */
.prompt-list { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.prompt-item {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 22px 24px;
}
.prompt-item h3 {
  margin: 0 0 4px; font-family: var(--serif); font-size: 19px;
  color: var(--ink);
}
.prompt-item .prompt-when { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.prompt-item pre {
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: 10px; padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.55;
  color: var(--ink); overflow-x: auto; margin: 0;
  white-space: pre-wrap; word-wrap: break-word;
}
.prompt-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.copy-btn {
  background: var(--green-700); color: #fff; border: none;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.copy-btn:hover { background: var(--green-600); }
.copy-btn.copied { background: var(--good); }

/* Safety page specifics */
.rules-list {
  list-style: none; padding: 0; margin: 0 0 32px;
  display: grid; gap: 14px;
}
.rules-list li {
  background: #fff; border-left: 4px solid var(--bad);
  border-radius: 10px; padding: 18px 22px;
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.rules-list h3 {
  margin: 0 0 6px; color: var(--bad); font-size: 16px; font-weight: 700;
}
.rules-list p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* Utility */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-right { text-align: right; }

/* ============================== CONTACT FORM ================== */
.contact-workspace { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 880px) { .contact-workspace { grid-template-columns: 1fr; } }

/* ============================== ADSENSE / AD SLOT ============= */
/*
  Tasteful ad placement — clearly demarcated, never above the fold,
  never inside the form/output panels. Always announced as "Sponsored"
  so leaders aren't confused.
*/
.ad-slot {
  margin: 36px auto;
  padding: 16px 20px 18px;
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  text-align: center;
  position: relative;
}
.ad-slot::before {
  content: 'Sponsored';
  position: absolute; top: -9px; left: 16px;
  background: var(--bg);
  color: var(--muted); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 600;
  padding: 0 8px;
}
.ad-slot ins {
  display: block; min-height: 90px;
}
.ad-slot.ad-empty {
  /* In sandbox / pre-AdSense state, show a soft placeholder rather than nothing */
  min-height: 120px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 13px; font-style: italic;
  background: var(--surface-2);
  border-style: dashed;
}

/* ============================== CTA STRIP (subtle, footer-adjacent) === */
.cta-strip {
  background: var(--green-100);
  border-top: 1px solid var(--rule);
  padding: 28px 0;
  margin-top: 0;
}
.cta-strip .container {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.cta-strip h3 {
  font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 0 0 4px;
  color: var(--green-900);
}
.cta-strip p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* Responsive tweaks */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 14px; font-size: 13px; }
  .hero { padding: 50px 0 60px; }
  .hero h1 { font-size: 38px; }
  .section { padding: 44px 0; }
  .section h2 { font-size: 28px; }
  .safety-inner { flex-direction: column; align-items: flex-start; }
}
