/* Shared styles for /prompts (CI Prompts library and prompt pages)
   Light layout: navy brand band on top, warm paper body, white cards, orange accents */
:root {
  --navy: #0C1744;
  --navy-dark: #080F2E;
  --navy-ink: #1B2550;        /* body text on light */
  --accent: #F97316;          /* brand orange: fills, borders, on-navy text */
  --accent-strong: #C2410C;   /* orange text on light backgrounds (readable) */
  --accent-btn: #EA580C;      /* button fill with white text */
  --accent-btn-hover: #C2410C;
  --accent-soft: #FFF1E6;
  --accent-border: #FDBA8C;
  --blue-strong: #1D4ED8;
  --blue-soft: #E8EEFC;
  --paper: #F7F6F2;
  --card: #FFFFFF;
  --line: #E6E3DA;
  --line-strong: #D4D0C4;
  --muted: #5B6480;
  --faint: #8A91A8;
  --code-bg: #FBFAF6;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(12, 23, 68, 0.04), 0 4px 16px rgba(12, 23, 68, 0.05);
  --shadow-hover: 0 2px 4px rgba(12, 23, 68, 0.06), 0 12px 28px rgba(12, 23, 68, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.6;
  color: var(--navy-ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.modal-open { overflow: hidden; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--navy); }

/* ----- Navy brand band (header + title) ----- */
.band {
  background:
    radial-gradient(900px 300px at 85% -10%, rgba(249, 115, 22, 0.18), transparent 60%),
    linear-gradient(180deg, var(--navy-dark), var(--navy));
  color: #CBD5E1;
  padding-bottom: 36px;
}
.page-header {
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto;
}
.page-header .logo-link img { height: 28px; filter: brightness(0) invert(1); display: block; }
.page-header .back-link {
  color: #94A3B8; font-size: 13px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
}
.page-header .back-link:hover { color: #FFFFFF; }
.band-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.band-inner.narrow { max-width: 860px; }

.hero { text-align: center; padding-top: 4px; }
.hero h1 {
  font-family: var(--font-serif); font-size: 36px; color: #FFFFFF;
  line-height: 1.12; margin: 0 0 8px; font-weight: 400;
}
.hero h1 .accent { color: var(--accent); }
.hero .subtitle {
  font-size: 16px; color: #CBD5E1; max-width: 880px; margin: 0 auto 20px;
  line-height: 1.55;
}
.hero .search { display: block; max-width: 640px; margin: 0 auto; }

/* ----- Body ----- */
.container { max-width: 1080px; margin: 0 auto; padding: 24px 24px 72px; }
.container.narrow { max-width: 860px; }

/* Tags */
.tier {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tier.tested { color: var(--accent-strong); background: var(--accent-soft); }
.tier.quick { color: var(--blue-strong); background: var(--blue-soft); }
.band .tier.tested { color: var(--accent); background: rgba(249, 115, 22, 0.15); }

/* Search (in the navy band) and filter chips */
.search {
  width: 100%; padding: 13px 16px 13px 44px;
  font: inherit; font-size: 15px; color: var(--navy);
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235B6480' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
  border: 1px solid transparent; border-radius: 10px;
}
.search::placeholder { color: var(--faint); }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  color: var(--navy-ink); background: #FFFFFF;
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.chip .count { opacity: 0.55; margin-left: 5px; }

.group-head {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px;
  margin: 0 0 14px;
}
.group-label {
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.group-note { font-size: 14px; color: var(--muted); margin: 0; }

/* Cards */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 48px;
}
.card {
  display: flex; flex-direction: column; text-align: left;
  padding: 24px 24px 22px; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card:focus-visible { outline: 3px solid rgba(249, 115, 22, 0.4); outline-offset: 2px; }
[data-group="tested"] .card { border-top: 3px solid var(--accent); }
.card .card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card .cat {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--faint);
}
.card h2, .card h3 {
  font-family: var(--font-serif); font-size: 23px; font-weight: 400;
  color: var(--navy); margin: 0 0 8px; line-height: 1.22;
}
.card p { font-size: 14px; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.card .needs {
  font-size: 12.5px; color: var(--muted); margin-top: auto; margin-bottom: 16px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.card .card-link {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.card:hover .card-link { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.empty { display: none; text-align: center; padding: 32px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 13px 26px; background: var(--accent-btn); color: #FFFFFF;
  font: inherit; font-size: 14px; font-weight: 600;
  border: 0; border-radius: 999px; transition: background 0.2s;
}
.btn:hover { background: var(--accent-btn-hover); color: #FFFFFF; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 15px; font: inherit; font-size: 13px; font-weight: 500;
  color: var(--navy); background: #FFFFFF;
  border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--navy); }
.btn-ghost .rec {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px;
}

/* Prompt block */
.use-bar { margin: 0 0 16px; }
.use-bar .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.use-bar .open-label { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
.use-bar .note { font-size: 13px; color: var(--muted); margin: 12px 0 0; line-height: 1.55; }
.copied-msg { font-size: 13px; font-weight: 500; color: var(--accent-strong); min-height: 20px; margin: 8px 0 0; }
.prompt-text {
  margin: 0; padding: 22px 24px;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7;
  color: var(--navy-ink); white-space: pre-wrap; word-wrap: break-word;
  background: var(--code-bg); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 10px;
  max-height: 560px; overflow: auto;
}
.prompt-text .ph {
  color: var(--accent-strong); background: var(--accent-soft);
  padding: 1px 5px; border-radius: 4px; font-weight: 600;
}

/* Prompt page */
.prompt-head { padding-top: 8px; }
.prompt-head .crumbs { font-size: 13px; color: #94A3B8; margin-bottom: 12px; }
.prompt-head .crumbs a { color: #CBD5E1; }
.prompt-head .crumbs a:hover { color: #FFFFFF; }
.prompt-head .tags { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.prompt-head .cat {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #94A3B8;
}
.prompt-head h1 {
  font-family: var(--font-serif); font-size: 40px; font-weight: 400;
  color: #FFFFFF; line-height: 1.12; margin: 0 0 10px;
}
.prompt-head .lede { font-size: 17px; color: #CBD5E1; margin: 0; line-height: 1.6; max-width: 700px; }

.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 44px;
}
.facts > div {
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow);
}
.facts h2, .section h2 {
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.facts p, .facts li { font-size: 15px; color: var(--navy-ink); line-height: 1.6; }
.facts p { margin: 0; }
.facts ul { margin: 0; padding-left: 18px; }
.facts li { margin-bottom: 6px; }
.facts li::marker { color: var(--accent); }

.section { margin-bottom: 44px; }
.section.use-scope {
  padding: 28px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
}
.section h2.big {
  font-family: var(--font-serif); font-size: 30px; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--navy); margin: 0 0 16px;
}
.section ol { padding-left: 22px; margin: 0; }
.section ol li { color: var(--navy-ink); margin-bottom: 10px; font-size: 15.5px; }
.section ol li::marker { color: var(--accent-strong); font-weight: 700; }
.section ol li strong { color: var(--navy); font-weight: 600; }
.section > p { color: var(--muted); }

.closing {
  text-align: center; padding: 40px 24px; border-radius: 14px;
  background:
    radial-gradient(600px 200px at 50% -20%, rgba(249, 115, 22, 0.2), transparent 70%),
    var(--navy);
}
.closing h2 {
  font-family: var(--font-serif); font-size: 30px; font-weight: 400;
  color: #FFFFFF; margin: 0 0 10px;
}
.closing p { font-size: 15px; color: #CBD5E1; margin: 0 auto 22px; max-width: 560px; }
.closing .btn { background: var(--accent); }
.closing .btn:hover { background: var(--accent-btn); }

/* Modal (quick prompts) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(8, 15, 46, 0.55); padding: 24px 16px; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal-backdrop.open { display: block; }
.modal {
  position: relative; max-width: 760px; margin: 24px auto;
  padding: 32px 32px 28px; background: var(--paper);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(8, 15, 46, 0.3);
}
.modal .close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  font-size: 22px; line-height: 1; cursor: pointer; border-radius: 999px;
  color: var(--muted); background: transparent; border: 0;
}
.modal .close:hover { color: var(--navy); background: var(--line); }
.modal .tags { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.modal .cat { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); }
.modal h2 {
  font-family: var(--font-serif); font-size: 32px; font-weight: 400;
  color: var(--navy); margin: 0 0 6px; line-height: 1.2;
}
.modal .lede { font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.modal .prompt-text { max-height: 380px; background: #FFFFFF; }
.modal .quick-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.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;
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .band { padding-bottom: 24px; }
  .hero h1 { font-size: 28px; }
  .hero .subtitle { font-size: 15px; margin-bottom: 16px; }
  .card-grid, .facts { grid-template-columns: 1fr; }
  .page-header { padding: 16px; }
  .band-inner { padding: 0 16px; }
  .container { padding: 20px 16px 56px; }
  /* One scrollable row of chips instead of several wrapped rows */
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px 24px; padding: 0 16px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .prompt-head h1 { font-size: 30px; }
  .section.use-scope { padding: 20px 16px; }
  .modal { padding: 28px 18px 22px; margin: 8px auto; }
  .prompt-text { padding: 16px; font-size: 12.5px; }
}
