/* =========================================================================
   PORCHLYTE FORM TOOLS — SHARED DESIGN SYSTEM
   -------------------------------------------------------------------------
   This stylesheet is the cohesive base for every form tool in the suite.
   The shared base below is identical across the suite. Tool-specific rules
   for Instagram Insights Coach live in the clearly marked block at the bottom
   and only build on the tokens above; they never change them.

   Palette: white + cream surfaces, dark brown type, rust as an accent only.
   Type:    Chapza (display, falls back to Playfair Display) + Inter (body/UI).
   ========================================================================= */

:root {
  /* Brand palette */
  --cream: #efeae3;      /* page + section backgrounds */
  --white: #ffffff;      /* cards, tool surfaces, form fields */
  --tan: #d7c8ba;        /* secondary panels, hover, dividers, pills */
  --brown: #2b1f1b;      /* body text + headings, dark modules */
  --rust: #80441e;       /* accent only: buttons, active state, underlines */

  --text: var(--brown);
  --text-soft: #6f6157;  /* muted brown for sub text */
  --border: #e4dacd;     /* soft warm border */
  --error: #80441e;

  --font-display: "Chapza", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(43, 31, 27, 0.04), 0 6px 20px rgba(43, 31, 27, 0.05);

  --content-width: 760px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over display rules like flex/grid. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.screen { display: none; }
.screen.active {
  display: block;
  animation: fadein 0.35s var(--ease);
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== TOOL HEADER (reusable shell — same on every form) ===== */
.tool-header {
  text-align: center;
  margin: 0 0 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.tool-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--brown);
  margin: 0 0 12px;
}
.tool-tagline {
  margin: 0 auto;
  max-width: 540px;
  color: var(--text-soft);
  font-size: 16px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--rust);
  color: #fff;
  border: 1px solid var(--rust);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.18);
}
.btn-primary:hover {
  background: #6c3818;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(128, 68, 30, 0.24);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--brown);
  color: #fff;
  border: 1px solid var(--brown);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s var(--ease);
}
.btn-secondary:hover { background: #1c1512; transform: translateY(-1px); }

/* Quiet Copy button — tan pill */
.btn-copy {
  background: var(--tan);
  color: var(--brown);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn-copy:hover { background: #cbb9a8; }
.btn-copy.is-copied { background: var(--rust); color: #fff; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ===== FORM ===== */
#form, #loading, #results {
  margin: 0 auto;
}
.form-note {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 14.5px;
}
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 96px;
}
.form-section-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rust);
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.field-row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field.span-2 { grid-column: span 2; }
.field > span,
.field > legend {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
  text-align: left;
  padding-left: 2px;
}
.field > span em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--tan);
  margin-left: 6px;
}
.field input,
.field select,
.field textarea {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font: inherit;
  color: inherit;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(128, 68, 30, 0.15);
}

.form-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 4px;
}
.form-actions .microcopy { text-align: center; }
.microcopy {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}
.form-error {
  color: var(--error);
  font-size: 14px;
  margin: 8px 0 0;
  font-weight: 500;
  background: #fbf1ea;
  border: 1px solid #e7c9b6;
  border-left: 3px solid var(--rust);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

/* ===== SCREEN HEADERS (used on the results screen) ===== */
.screen-header {
  text-align: left;
  margin: 8px 0 28px;
}
.screen-header.center { text-align: center; }
.screen-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.05;
  color: var(--brown);
  margin: 0 0 12px;
}
.screen-header.center h2.underline { display: inline-block; }
.screen-header.center h2.underline::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--rust);
  border-radius: 2px;
  margin: 14px auto 0;
}
.screen-sub {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
}

/* ===== LOADING ===== */
.loader {
  text-align: center;
  padding: 72px 0;
}
.loader h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.5vw, 32px);
  color: var(--brown);
  margin: 0 0 8px;
}

/* ===== RESULTS ===== */
.result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.result-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--brown);
  color: #fff;
  padding: 12px 22px;
}
.result-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--tan);
}
.result-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
}
.result-body { padding: 22px 22px 8px; }
.content-body {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--brown);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.result-card .card-actions { padding: 0 22px 20px; }

.results-again {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.card-error-msg {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

.result-card.just-arrived { animation: card-in 0.35s var(--ease); }
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== COLLAPSIBLE CARDS (deeper sections, collapsed by default) ===== */
.result-card.is-collapsible .result-bar {
  cursor: pointer;
  user-select: none;
  transition: background 0.16s var(--ease);
}
.result-card.is-collapsible .result-bar:hover { background: #241a16; }
.collapse-ctrl { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.collapse-hint {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--tan);
}
.collapse-chevron { color: var(--tan); font-size: 12px; line-height: 1; }
.result-card.is-collapsed .result-body,
.result-card.is-collapsed > .card-actions { display: none; }

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 56px;
  padding: 26px 0 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-disclaimer {
  font-size: 12px;
  color: var(--text-soft);
  margin: 0 auto;
  max-width: 620px;
  opacity: 0.9;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE (shared) ===== */
@media (max-width: 520px) {
  .app { padding: 28px 18px 80px; }
  .result-bar { padding: 11px 18px; }
  .result-body { padding: 18px 18px 6px; }
  .result-card .card-actions { padding: 0 18px 18px; }
  .field.span-2 { grid-column: auto; }
}

/* =========================================================================
   TOOL-SPECIFIC ADDITIONS (Instagram Insights Coach only)
   Builds on the shared system above and reuses its tokens. Nothing here
   changes the shared components; it only adds the pieces this tool needs.
   ========================================================================= */

/* ---- Header badge + supporting copy (shared suite pattern) ---- */
.tool-badge-cat {
  display: inline-block;
  background: var(--brown);
  color: var(--tan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.tool-subhead {
  margin: 0 auto;
  max-width: 560px;
  color: var(--rust);
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 600;
}
.tool-support {
  margin: 12px auto 0;
  max-width: 560px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
.tool-support em { font-style: italic; }
.tool-header-cta { margin-top: 22px; }

.help-text {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.55;
}
.help-text strong { color: var(--brown); font-weight: 600; }

textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
textarea.tall { min-height: 150px; }

/* ---- Pill option groups (shared suite pattern) ---- */
.pill-group {
  border: 0; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 14.5px;
  color: var(--brown);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
  user-select: none;
}
.pill:hover { border-color: var(--tan); background: #faf7f2; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill:has(input:focus-visible) {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(128, 68, 30, 0.15);
}
.pill:has(input:checked) {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.2);
}

/* Prominent channel picker at the top of the form */
.channel-group { gap: 12px; }
.channel-group .pill { font-size: 15px; padding: 12px 22px; }

/* ---- Photo / screenshot uploader ---- */
.uploader { display: flex; flex-direction: column; gap: 16px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  padding: 40px 24px;
  background: var(--white);
  border: 2px dashed var(--tan);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--rust);
  background: #faf7f2;
  outline: none;
}
.dropzone.is-dragging {
  border-color: var(--rust);
  background: #f6efe7;
  box-shadow: 0 0 0 3px rgba(128, 68, 30, 0.12);
}
.dropzone-icon {
  width: 44px; height: 44px;
  fill: none; stroke: var(--rust); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.dropzone-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--brown); }
.dropzone-sub { margin: 0; font-size: 13.5px; color: var(--text-soft); max-width: 380px; }

.preview-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--cream);
  aspect-ratio: 3 / 4;
  animation: card-in 0.3s var(--ease);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-remove {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(43, 31, 27, 0.82); color: #fff;
  font-size: 15px; line-height: 1;
  display: grid; place-items: center;
  transition: background 0.16s var(--ease);
}
.preview-remove:hover { background: var(--rust); }
.uploader-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Loader: insights coach phone scene ---- */
.iic-loader { display: flex; justify-content: center; margin: 0 auto 32px; }
.iic-svg { width: 190px; height: auto; overflow: visible; }
.iic-phone { fill: var(--brown); }
.iic-screen { fill: var(--white); }
.iic-notch { stroke: #6b5c52; stroke-width: 3; stroke-linecap: round; }

.iic-axis { stroke: var(--border); stroke-width: 2; }
.iic-bar { fill: var(--tan); transform-box: fill-box; transform-origin: bottom; }
.iic-bar-4 { fill: var(--rust); }
.iic-glass { opacity: 0; }
.iic-glass-lens { fill: none; stroke: var(--rust); stroke-width: 3; }
.iic-glass-handle { stroke: var(--rust); stroke-width: 3; stroke-linecap: round; }
.iic-simple-ring { fill: none; stroke: var(--rust); stroke-width: 3; opacity: 0; }
.iic-simple-check { fill: none; stroke: var(--rust); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.iic-bulb { opacity: 0; }
.iic-bulb-glass { fill: #f4e4b8; stroke: var(--rust); stroke-width: 2.5; }
.iic-bulb-base { fill: var(--brown); }
.iic-bulb-ray { stroke: var(--rust); stroke-width: 2.5; stroke-linecap: round; }
.iic-plan-row { opacity: 0; }
.iic-check-box { fill: none; stroke: var(--tan); stroke-width: 2; }
.iic-check-tick { fill: none; stroke: var(--rust); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.iic-plan-line { stroke: var(--brown); stroke-width: 3; stroke-linecap: round; opacity: 0.5; }

/* One ~7s loop: bars rise, glass sweeps, numbers simplify, a bulb lights,
   then the action plan checks itself off. */
.iic-bar { animation: iic-bar 7s ease-in-out infinite; }
.iic-bar-1 { animation-delay: -7.0s; }
.iic-bar-2 { animation-delay: -6.9s; }
.iic-bar-3 { animation-delay: -6.8s; }
.iic-bar-4 { animation-delay: -6.7s; }
.iic-bar-5 { animation-delay: -6.6s; }
@keyframes iic-bar {
  0% { transform: scaleY(0); opacity: 0; }
  6% { transform: scaleY(1); opacity: 1; }
  34% { transform: scaleY(1); opacity: 1; }
  44%, 100% { transform: scaleY(1); opacity: 0; }
}
.iic-graph { animation: iic-graph-fade 7s ease-in-out infinite; }
@keyframes iic-graph-fade {
  0%, 34% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
.iic-glass { animation: iic-glass 7s ease-in-out infinite; }
@keyframes iic-glass {
  0%, 8% { opacity: 0; transform: translate(60px, 170px); }
  14% { opacity: 1; transform: translate(64px, 168px); }
  30% { opacity: 1; transform: translate(138px, 128px); }
  38% { opacity: 0; transform: translate(138px, 128px); }
  100% { opacity: 0; }
}
.iic-simple-ring { animation: iic-ring 7s ease-in-out infinite; }
.iic-simple-check { animation: iic-check 7s ease-in-out infinite; }
@keyframes iic-ring {
  0%, 42% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
  62% { opacity: 1; transform: scale(1); }
  70%, 100% { opacity: 0; }
}
.iic-simple { transform-box: fill-box; transform-origin: 110px 150px; }
.iic-simple-ring { transform-box: fill-box; transform-origin: center; }
@keyframes iic-check {
  0%, 46% { opacity: 0; }
  54% { opacity: 1; }
  62% { opacity: 1; }
  70%, 100% { opacity: 0; }
}
.iic-bulb { animation: iic-bulb 7s ease-in-out infinite; transform-box: fill-box; transform-origin: 110px 119px; }
@keyframes iic-bulb {
  0%, 56% { opacity: 0; transform: scale(0.5); }
  64% { opacity: 1; transform: scale(1.12); }
  70% { opacity: 1; transform: scale(1); }
  94% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
.iic-plan-1 { animation: iic-plan-row 7s ease-in-out infinite; animation-delay: -0.5s; }
.iic-plan-2 { animation: iic-plan-row 7s ease-in-out infinite; animation-delay: -0.35s; }
.iic-plan-3 { animation: iic-plan-row 7s ease-in-out infinite; animation-delay: -0.2s; }
@keyframes iic-plan-row {
  0%, 70% { opacity: 0; transform: translateX(-4px); }
  78% { opacity: 1; transform: translateX(0); }
  94% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .iic-bar, .iic-graph, .iic-glass, .iic-simple-ring, .iic-simple-check,
  .iic-bulb, .iic-plan-row {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .iic-glass, .iic-simple-ring, .iic-simple-check, .iic-bulb { opacity: 0 !important; }
}

/* ---- Report divider (separates the two reports when both run) ---- */
.report-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 8px 0 20px;
}
.report-divider::before, .report-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.report-divider-label {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 3vw, 26px); color: var(--brown);
  white-space: nowrap;
}
#grid-divider { margin-top: 40px; }

/* ---- Results toolbar (shared suite pattern) ---- */
.results-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border);
}

/* ---- Progressive loading: shimmer placeholders + writing indicator ---- */
#analysis-mount, #bigpicture-mount, #content-mount, #tactics-mount,
#scores-mount, #plan-mount, #toolkit-mount,
#grid-analysis-mount, #grid-report-mount, #grid-scores-mount { margin-bottom: 16px; }
.result-card + .result-card { margin-top: 16px; }
.result-card.is-pending { opacity: 0.85; }
.shimmer { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 16px; }
.shimmer span {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, var(--cream) 25%, #e7ddd0 37%, var(--cream) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.shimmer span:nth-child(1) { width: 100%; }
.shimmer span:nth-child(2) { width: 92%; }
.shimmer span:nth-child(3) { width: 68%; }
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
.results-writing {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 20px 0 0; color: var(--text-soft); font-size: 14px;
}
.writing-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--rust);
  animation: writing-pulse 1s ease-in-out infinite;
}
@keyframes writing-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer span, .writing-dot { animation: none; }
}

.piece-meta-line { margin: 0 0 4px; font-size: 14px; color: var(--text-soft); line-height: 1.55; }
.section-intro { margin: 0 0 16px; font-size: 15px; color: var(--text-soft); line-height: 1.55; }

/* ---- Analysis: what we read in your Insights ---- */
.analysis-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.analysis-top {
  background: var(--tan); color: var(--brown); padding: 12px 22px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.analysis-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.analysis-lead { margin: 0; font-size: 15.5px; color: var(--brown); line-height: 1.55; }

.analysis-sub {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--rust); margin: 0 0 8px;
}
.metric-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.metric-chip {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 14px;
}
.metric-value { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--brown); line-height: 1.1; }
.metric-label { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.metric-change { font-size: 12px; color: var(--rust); font-weight: 600; margin-top: 3px; }

.analysis-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.analysis-tag {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 5px 12px;
  font-size: 12.5px; color: var(--brown);
}
.mini-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.mini-list li { font-size: 14.5px; color: var(--brown); line-height: 1.5; }
.note-block {
  background: #f6efe7; border: 1px solid var(--border); border-left: 3px solid var(--tan);
  border-radius: var(--radius-md); padding: 12px 16px;
}
.note-block .analysis-sub { color: var(--text-soft); }
.note-block .mini-list li { color: var(--text-soft); font-size: 13.5px; }

/* ---- Wins / opportunities list ---- */
.point-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 4px; }
.point {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: var(--cream);
  border-radius: var(--radius-md); border-left: 3px solid var(--rust);
}
.point.is-win { border-left-color: #4f7a3f; }
.point-icon { flex: 0 0 auto; font-size: 18px; line-height: 1.2; }
.point-main { flex: 1; }
.point-title { margin: 0 0 3px; font-size: 15.5px; font-weight: 600; color: var(--brown); }
.point-detail { margin: 0; font-size: 14px; color: var(--text-soft); line-height: 1.55; }

/* ---- Three things this week ---- */
.week-actions { display: flex; flex-direction: column; gap: 12px; }
.week-action {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; background: var(--brown); color: #fff;
  border-radius: var(--radius-md);
}
.week-action-num {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--rust); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
}
.week-action-main { flex: 1; }
.week-action-title { margin: 0 0 3px; font-size: 15.5px; font-weight: 600; color: #fff; }
.week-action-why { margin: 0; font-size: 13.5px; color: var(--tan); line-height: 1.5; }

/* ---- Content breakdown bars ---- */
.breakdown-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.breakdown-row { display: flex; flex-direction: column; gap: 6px; }
.breakdown-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.breakdown-type { font-size: 14.5px; font-weight: 600; color: var(--brown); }
.breakdown-pct { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--rust); }
.breakdown-track { height: 10px; border-radius: var(--radius-pill); background: var(--cream); overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: var(--radius-pill); background: var(--rust); transition: width 0.6s var(--ease); }
.breakdown-why { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin: 0; }

/* ---- Numbered idea lists (shared line-list pattern) ---- */
.line-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 8px; }
.line-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.line-item:last-child { border-bottom: none; }
.line-num {
  flex: 0 0 auto; font-family: var(--font-display); font-weight: 600;
  color: var(--rust); font-size: 14px; min-width: 22px; margin-top: 1px;
}
.line-text { flex: 1; font-size: 15px; color: var(--brown); line-height: 1.5; }
.line-copy {
  background: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--rust); padding: 2px 4px; flex: 0 0 auto; align-self: flex-start; margin-top: 2px;
}
.line-copy.is-copied { color: var(--brown); }

/* ---- Advice cards (captions / profile / reels / stories) ---- */
.advice-points { display: flex; flex-direction: column; gap: 0; }
.advice-point {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 13px 0; border-top: 1px solid var(--border);
}
.advice-point:first-child { border-top: none; padding-top: 4px; }
.advice-label {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; color: var(--rust); padding-top: 1px;
}
.advice-text { font-size: 14.5px; color: var(--brown); line-height: 1.55; }
@media (max-width: 520px) {
  .advice-point { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- Score cards (local visibility + instagram health) ---- */
.score-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 4px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.score-ring {
  position: relative; flex: 0 0 auto;
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--rust) calc(var(--pct) * 1%), var(--cream) 0);
}
.score-ring::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--white);
}
.score-ring-inner { position: relative; z-index: 1; text-align: center; line-height: 1; }
.score-ring-num { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--brown); }
.score-ring-den { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.score-hero-copy { flex: 1; }
.score-hero-copy p { margin: 0; font-size: 14.5px; color: var(--text-soft); line-height: 1.55; }

.score-cats { display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.score-cat { display: flex; flex-direction: column; gap: 5px; }
.score-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.score-cat-label { font-size: 14px; font-weight: 600; color: var(--brown); }
.score-cat-val { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--rust); }
.score-cat-track { height: 8px; border-radius: var(--radius-pill); background: var(--cream); overflow: hidden; }
.score-cat-fill { height: 100%; border-radius: var(--radius-pill); background: var(--tan); }
.score-cat-fill.high { background: var(--rust); }
.score-cat-note { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; margin: 0; }

/* ---- 30-day plan ---- */
.plan-intro { margin: 0 0 18px; font-size: 15.5px; color: var(--brown); line-height: 1.6; }
.plan-weeks { display: flex; flex-direction: column; gap: 16px; }
.week-card {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.week-card-top {
  display: flex; align-items: baseline; gap: 12px;
  background: var(--brown); color: #fff; padding: 11px 18px;
}
.week-card-label {
  font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--tan);
}
.week-card-theme { font-size: 13px; letter-spacing: 0.04em; color: #fff; font-weight: 500; }
.week-card-body { padding: 6px 18px 12px; }
.week-goal {
  display: grid; grid-template-columns: 130px 1fr; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.week-goal:first-child { border-top: none; }
.week-goal-label {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; color: var(--rust); padding-top: 1px;
}
.week-goal-text { font-size: 14px; color: var(--brown); line-height: 1.5; }
@media (max-width: 520px) {
  .week-goal { grid-template-columns: 1fr; gap: 3px; }
}

/* ---- Toolkit (super bonus) ---- */
.toolkit-section { padding: 16px 0; border-top: 1px solid var(--border); }
.toolkit-section:first-child { border-top: none; padding-top: 4px; }
.toolkit-heading {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 700; color: var(--brown); margin: 0 0 12px;
}
.toolkit-heading .th-icon { font-size: 15px; }
.toolkit-heading .th-count {
  font-size: 11px; letter-spacing: 0.06em; color: var(--text-soft);
  background: var(--cream); border-radius: var(--radius-pill); padding: 2px 9px; font-weight: 600;
}
.named-list { display: flex; flex-direction: column; gap: 10px; }
.named-item {
  padding: 12px 14px; background: var(--cream);
  border-radius: var(--radius-md); border-left: 3px solid var(--rust);
}
.named-item-name { font-size: 14.5px; font-weight: 600; color: var(--brown); margin: 0 0 2px; }
.named-item-desc { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; margin: 0; }
.chip-list { display: flex; flex-direction: column; gap: 8px; }
.chip-row { display: flex; gap: 10px; align-items: flex-start; }
.chip-dot { flex: 0 0 auto; color: var(--rust); font-weight: 700; margin-top: 1px; }
.chip-text { flex: 1; font-size: 14.5px; color: var(--brown); line-height: 1.5; }
.mini-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.mini-col-title {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; color: var(--rust); margin: 0 0 8px;
}

/* =========================================================================
   PRINT / SAVE AS PDF
   ========================================================================= */
@media print {
  .tool-header-cta, .results-toolbar, .results-again,
  #form, #loading, .card-actions, .line-copy,
  .site-footer .footer-disclaimer { display: none !important; }
  body { background: #fff; }
  .app { padding: 0; max-width: 100%; }
  .result-card, .analysis-card, .week-card, .format-card {
    box-shadow: none; break-inside: avoid; page-break-inside: avoid;
  }
  .result-bar, .analysis-top, .week-card-top {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .score-ring, .breakdown-fill, .score-cat-fill {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .screen { display: block !important; }
  #form, #loading { display: none !important; }
}
