/* ═══════════════════════════════════════════════════════════
   ZAJUGA · Reset Mode (page-scoped)
   Mobile-first. Spring palette (master patch May 8).
   bg #FFFFFF · surface #F5F8F5 · accent sage · text #000000
   ═══════════════════════════════════════════════════════════ */

.reset-page {
  --r-bg: #FFFFFF;          /* spring --bg-primary */
  --r-surface: #F5F8F5;     /* spring --bg-secondary */
  --r-line: #D0DDD0;        /* spring --border-primary */
  --r-gold: #4A6B4A;        /* spring --accent-deep (replaces gold) */
  --r-gold-d: #1A2E1A;      /* spring --accent-text-on-sage */
  --r-text: #000000;        /* spring --text-primary */
  --r-text-dim: #4A4A4A;    /* spring --text-secondary */
  --r-text-faint: #6B6B6B;  /* spring --text-tertiary */
  --r-font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --r-font-body: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.reset-page *,
.reset-page *::before,
.reset-page *::after { box-sizing: border-box; margin: 0; padding: 0; }

.reset-page {
  background: var(--r-bg);
  color: var(--r-text);
  font-family: var(--r-font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Top bar ── */
.r-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--r-line);
}
.r-mark {
  font-family: var(--r-font-display);
  font-size: 18px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--r-text); text-decoration: none; font-weight: 500;
}
.r-mark:hover { color: var(--r-gold); }
.r-profile {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--r-surface);
  border: 1px solid var(--r-line);
  color: var(--r-text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.r-profile:hover { border-color: var(--r-gold); color: var(--r-gold); }

/* ── Main column ── */
.r-main {
  max-width: 720px; margin: 0 auto;
  padding: 32px 16px 96px;
  display: flex; flex-direction: column; gap: 32px;
}

/* ── Greeting ── */
.r-greet { text-align: left; }
.r-date {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--r-gold); margin-bottom: 12px; font-weight: 600;
}
.r-hello {
  font-family: var(--r-font-display);
  font-size: 28px; line-height: 1.15; letter-spacing: -0.01em;
  font-weight: 500; color: var(--r-text);
}

/* ── Cards (Anchor / Push / Response) ── */
.r-card {
  background: var(--r-surface);
  border: 1px solid var(--r-line);
  border-radius: 8px;
  padding: 20px;
}
.r-card-tag {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--r-gold); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.r-card-tag::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--r-gold); display: inline-block;
}
.r-anchor-quote {
  font-family: var(--r-font-display);
  font-style: italic; font-weight: 400;
  font-size: 18px; line-height: 1.45;
  color: var(--r-text); margin-bottom: 14px;
}
.r-anchor-source {
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--r-text-faint); font-weight: 500;
}

.r-push { border-color: var(--r-gold); border-width: 2px; }
.r-push-h {
  font-family: var(--r-font-display);
  font-size: 22px; line-height: 1.2;
  color: var(--r-gold); margin-bottom: 8px; font-weight: 500;
}
.r-push-sub {
  font-size: 15px; line-height: 1.6;
  color: var(--r-text-dim);
}

/* ── Mirror line ── */
.r-mirror {
  font-family: var(--r-font-display);
  font-style: italic;
  font-size: 14px; line-height: 1.5;
  color: var(--r-text); opacity: 0.6;
  text-align: center; padding: 0 8px;
}

/* ── Divider ── */
.r-rule {
  border: none;
  border-top: 1px solid var(--r-line);
  margin: 4px 0;
}

/* ── Prompt + Input ── */
.r-prompt {
  font-family: var(--r-font-display);
  font-size: 18px; line-height: 1.3;
  color: var(--r-text); font-weight: 500;
  text-align: left;
}
.r-input-wrap {
  position: relative;
  background: var(--r-surface);
  border: 1px solid var(--r-line);
  border-radius: 8px;
  padding: 16px 56px 16px 16px;
  transition: border-color 0.2s;
}
.r-input-wrap:focus-within { border-color: var(--r-gold); }
.r-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--r-text);
  font-family: var(--r-font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 84px;
}
.r-input::placeholder { color: var(--r-text-faint); }
.r-input:disabled { color: var(--r-text-dim); }
.r-mic {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--r-line);
  border-radius: 50%;
  color: var(--r-text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s;
}
.r-mic:hover { border-color: var(--r-gold); color: var(--r-gold); }
.r-mic[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.r-mic-tip {
  position: absolute; right: 0; top: 44px;
  background: var(--r-surface);
  border: 1px solid var(--r-line);
  color: var(--r-text-dim);
  padding: 6px 10px;
  font-size: 11px; letter-spacing: 0.04em;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}
.r-mic:hover + .r-mic-tip,
.r-mic:focus + .r-mic-tip { opacity: 1; }

/* ── Actions row ── */
.r-actions {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 14px; flex-wrap: wrap;
}
.r-btn {
  font-family: var(--r-font-body);
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600;
  padding: 12px 28px;
  background: var(--r-gold);
  color: #FFFFFF;
  border: none; border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.r-btn:hover:not(:disabled) { background: var(--r-gold-d); transform: translateY(-1px); }
.r-btn:active { transform: translateY(0); }
.r-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.r-btn-ghost {
  background: transparent;
  color: var(--r-text);
  border: 1px solid var(--r-line);
}
.r-btn-ghost:hover:not(:disabled) {
  background: #E8F0E8;
  border-color: var(--r-gold);
  color: var(--r-gold);
}
.r-btn-crisis {
  background: #fff;
  color: #000000;
  border: 1px solid var(--r-line);
}
.r-btn-crisis:hover { background: #F5F8F5; transform: translateY(-1px); }

/* ── Loading state on RESET button ── */
.r-btn.is-loading {
  pointer-events: none;
  background: var(--r-gold-d);
  color: rgba(255,255,255,0.75);
}
.r-btn.is-loading::after {
  content: '...';
  display: inline-block;
  margin-left: 4px;
  animation: rPulse 1.2s ease-in-out infinite;
}
@keyframes rPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Submitted text echo ── */
.r-echo {
  font-size: 14px; line-height: 1.5;
  color: var(--r-text-faint);
  font-style: italic;
  padding: 12px 16px;
  border-left: 2px solid var(--r-line);
}

/* ── Response card ── */
.r-response {
  background: var(--r-surface);
  border: 1px solid var(--r-line);
  border-left: 3px solid var(--r-gold);
  border-radius: 8px;
  padding: 24px;
  font-size: 18px; line-height: 1.6;
  color: var(--r-text);
  animation: rSlideDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.r-response.is-crisis {
  border-left-color: #ff6b6b;
}
@keyframes rSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.r-response-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* ── System link ── */
.r-system-link {
  text-align: right;
  margin-top: 24px;
}
.r-system-link a {
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--r-text-faint);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}
.r-system-link a:hover { opacity: 1; color: var(--r-gold); }

/* ── Hidden util ── */
.is-hidden { display: none !important; }

/* ── Desktop scale-up ── */
@media (min-width: 768px) {
  .reset-page { font-size: 17px; }
  .r-topbar { padding: 18px 32px; }
  .r-main { padding: 56px 24px 120px; gap: 40px; }
  .r-hello { font-size: 36px; }
  .r-card { padding: 24px; }
  .r-anchor-quote { font-size: 22px; }
  .r-push-h { font-size: 28px; }
  .r-push-sub { font-size: 16px; }
  .r-prompt { font-size: 22px; }
  .r-input { font-size: 17px; min-height: 96px; }
  .r-response { font-size: 19px; padding: 28px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .r-response, .r-btn { animation: none !important; transition: none !important; }
}

/* ════════════════════════════════════════════════════════════════════
   Tier 2 · Block 2A · /reset compress to one screen (1440x900 target)
   ──────────────────────────────────────────────────────────────────── */
.r-main {
  padding: 16px 16px 24px !important;
  gap: 16px !important;
}
.r-greet-compact .r-hello {
  font-size: 22px;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  margin: 0;
}
.r-date-inline {
  font-size: 11px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--r-gold); font-weight: 600;
  font-family: var(--r-font-sans, 'Inter', sans-serif);
}
.r-card { padding: 14px 18px !important; }
.r-anchor-quote { font-size: 17px !important; margin-bottom: 8px !important; line-height: 1.4 !important; }
.r-card-tag { margin-bottom: 8px !important; }
.r-push-h { font-size: 20px !important; margin-bottom: 6px !important; }
.r-push-sub { font-size: 14px !important; line-height: 1.5 !important; margin-bottom: 14px !important; }
.r-push-merged .r-form-merged { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--r-line); }
.r-prompt { font-size: 13px !important; margin-bottom: 8px !important; }
.r-input { min-height: 56px !important; padding-top: 12px !important; padding-bottom: 12px !important; }
.r-actions { margin-top: 10px !important; }
.r-system-link { margin-top: 12px !important; }
@media (min-height: 880px) {
  .r-main { padding-top: 24px !important; gap: 18px !important; }
  .r-input { min-height: 72px !important; }
}
