/* Snowday — Tool dashboard styles
   Brand: snowy white background, alpine teal #0E7C7B, cabin red #C7402E, deep night #0A1F2B */

:root {
  --bg: #F4F8FB;
  --paper: #FFFFFF;
  --ink: #0A1F2B;
  --ink-soft: #3D4F5C;
  --muted: #788896;
  --teal: #0E7C7B;
  --teal-dark: #0A5C5B;
  --teal-soft: #E0F2F1;
  --red: #C7402E;
  --red-soft: #FBE6E1;
  --line: #D9E4EC;
  --shadow: 0 1px 2px rgba(10,31,43,0.05), 0 12px 32px rgba(10,31,43,0.06);
  --shadow-lg: 0 4px 8px rgba(10,31,43,0.08), 0 24px 48px rgba(10,31,43,0.12);
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(14,124,123,0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(199,64,46,0.04) 0%, transparent 40%);
}

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

/* ============ TOPBAR ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--teal);
  color: #fff;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}
nav { display: flex; gap: 6px; }
.nav-link {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--teal-soft); color: var(--teal-dark); }
.nav-link.active { background: var(--ink); color: #fff; }

/* ============ TOOL SHELL ============ */
.tool-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tool-hero {
  text-align: center;
  padding-bottom: 4px;
}
.tag {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tool-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 12px;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.kicker {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 540px;
}
.kicker em { color: var(--red); font-style: italic; font-weight: 500; }

/* ============ FORMS ============ */
.tool-card,
.result-card,
.capture-card,
.history-card,
.error-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.excuse-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row-split { grid-template-columns: 1fr; } }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
input, select {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); }
input:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,124,123,0.15);
}

/* ============ BUTTONS ============ */
.cta-button {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 14px 22px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  letter-spacing: -0.01em;
}
.cta-button:hover { background: var(--teal-dark); }
.cta-button:active { transform: translateY(1px); }
.cta-button:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-loading { font-style: italic; }

.copy-btn, .regen-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.copy-btn:hover, .regen-btn:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.copy-btn.copied { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }

/* ============ RESULT CARD ============ */
.result-card { border-left: 4px solid var(--teal); }
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.result-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
}
.result-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: var(--font-mono);
}
.result-body {
  font-family: var(--font-body);
  font-size: 15px;
  background: #FBFDFE;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  color: var(--ink);
  max-height: 460px;
  overflow-y: auto;
}
.result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.upgrade-link {
  font-size: 13px;
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 600;
}
.upgrade-link:hover { text-decoration: underline; }

/* ============ ERROR ============ */
.error-card {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
}
.error-card strong { color: var(--red); font-family: var(--font-display); font-size: 16px; }
.error-card p { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; }

/* ============ CAPTURE ============ */
.capture-card { text-align: center; border-top: 4px solid var(--red); }
.capture-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.capture-card p { color: var(--ink-soft); margin: 0 auto 18px; max-width: 460px; font-size: 15px; }
.subscribe-form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.subscribe-form input { flex: 1; }
@media (max-width: 520px) { .subscribe-form { flex-direction: column; } }

.subscribe-success {
  margin-top: 14px !important;
  color: var(--teal-dark);
  font-weight: 600;
}
.subscribe-error {
  margin-top: 14px !important;
  color: var(--red);
  font-weight: 600;
}

/* ============ HISTORY ============ */
.history-card h3 {
  font-family: var(--font-display);
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.muted { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-list li {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--teal-soft);
}
.history-list li .pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
  letter-spacing: 0.05em;
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 13px;
}
