/* Cutting Room — what to cut from a deck. Same parchment/ink tokens as
   the chat, the matchmaker and Goldfish. Light only, like the app. */

:root {
  --parchment-primary:   #FFFAF5;
  --parchment-secondary: #FFF6ED;
  --parchment-tertiary:  #F5EFE4;
  --ink-primary:   #2C3E50;
  --ink-secondary: #34495E;
  --ink-muted:     rgba(44, 62, 80, 0.58);
  --blue:      #3498DB;
  --blue-ink:  #1F6FA0;
  --blue-soft: rgba(52, 152, 219, 0.10);
  --border-light:  #DEE2E6;
  --border-strong: #CBD2D9;
  --success:      #27AE60;
  --success-ink:  #1E8449;
  --success-soft: rgba(39, 174, 96, 0.10);
  --error:      #E74C3C;
  --error-ink:  #B03A2E;
  --error-soft: rgba(231, 76, 60, 0.10);
  --gold:      #B7791F;
  --gold-soft: rgba(183, 121, 31, 0.12);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--parchment-primary);
  color: var(--ink-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.cr-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.cr-hint { font-size: 12px; color: var(--ink-muted); }

/* header */
.cr-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); background: var(--parchment-secondary); }
.cr-brand { display: flex; align-items: center; gap: 8px; color: var(--ink-primary); text-decoration: none; font-weight: 600; }
.cr-logo { width: 28px; height: 28px; }
.cr-title { font-family: 'Cinzel', Georgia, serif; font-size: 24px; margin: 0; letter-spacing: .02em; }
.cr-title a { color: inherit; text-decoration: none; }
.cr-tagline { margin: 2px 0 0; font-size: 13px; color: var(--ink-secondary); max-width: 80ch; }
.cr-foot { padding: 16px; font-size: 12px; color: var(--ink-muted); border-top: 1px solid var(--border-light); }
.cr-version { margin-left: 8px; }

.cr-app { padding-inline: 16px; padding-block: 18px 40px; max-width: 1240px; margin: 0 auto; }
.cr-error { background: var(--error-soft); color: var(--error-ink); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }

/* landing */
.cr-panel { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 16px; }
.cr-panel h2 { font-size: 15px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.cr-deckrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-light); }
.cr-deckrow:last-child { border-bottom: 0; }
.cr-pb { padding: 12px 14px; }

/* deck head */
.cr-deckhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.cr-deckhead h2 { font-size: 20px; margin: 0; }
.cr-deckhead a { color: var(--blue-ink); font-size: 13px; }

/* guardrails */
.cr-guard { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; flex-wrap: wrap; }
.cr-guard h3 { font-size: 13px; margin: 0; }
.cr-core { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 760px) { .cr-core { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cr-meter { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cr-meter .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cr-meter .big { font-size: 20px; font-weight: 700; }
.cr-meter .of { font-size: 12px; color: var(--ink-muted); }
.cr-meter p { margin: 0; font-size: 12px; color: var(--ink-muted); }
.cr-bar { height: 6px; background: var(--parchment-tertiary); border-radius: 3px; position: relative; overflow: hidden; }
.cr-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink-primary); border-radius: 3px; }
.cr-bar b { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); }
.cr-state { font-size: 12px; font-weight: 600; }
.cr-state.protected { color: var(--success-ink); }
.cr-state.open { color: var(--gold); }
.cr-state.goldfish { color: var(--blue-ink); }
.cr-state.goldfish a { color: inherit; }

/* layout */
.cr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cr-layout { grid-template-columns: minmax(0, 1fr); } }

.cr-pass { border-top: 4px solid var(--ink-primary); background: #fff; border-radius: var(--radius); border-left: 1px solid var(--border-light); border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); padding: 12px 14px; margin-bottom: 16px; }
.cr-pass .step { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cr-pass .q { font-family: 'Cinzel', Georgia, serif; font-size: 18px; font-weight: 700; margin: 2px 0; }
.cr-pass p { margin: 0; font-size: 13px; color: var(--ink-secondary); max-width: 72ch; }

/* curve chart */
.cr-chart { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 12px 14px 8px; margin-bottom: 16px; }
.cr-chart .head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.cr-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); }
.cr-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.cr-chart svg { display: block; width: 100%; height: auto; }
.cr-chart svg text { font-family: 'Inter', sans-serif; }

/* bands */
.cr-band { margin-bottom: 18px; }
.cr-bandhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border-strong); margin-bottom: 4px; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--parchment-primary); z-index: 2; }
.cr-bandhead h3 { font-family: 'Cinzel', Georgia, serif; font-size: 16px; margin: 0; }
.cr-bandhead .job { color: var(--ink-secondary); font-size: 13px; }
.cr-bandhead .cnt { margin-left: auto; font-size: 12px; color: var(--ink-muted); }
.cr-more { background: #fff; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px 14px; width: 100%; text-align: left; color: var(--ink-secondary); }

.cr-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 6px; border-bottom: 1px solid var(--border-light); align-items: start; }
.cr-card.is-cut { background: var(--error-soft); }
.cr-card.is-maybe { background: var(--gold-soft); }
.cr-card.is-locked .name { color: var(--ink-secondary); }
.cr-pip { width: 28px; height: 28px; border-radius: 50%; background: var(--parchment-tertiary); border: 1px solid var(--border-strong); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.cr-pip.land { font-size: 10px; font-weight: 600; }
.cr-card .name { font-weight: 600; }
.cr-card .name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
.cr-card .meta { font-size: 12px; color: var(--ink-muted); }
.cr-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cr-chip { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border-light); background: #fff; color: var(--ink-secondary); white-space: nowrap; }
.cr-chip.tag::before { content: "#"; color: var(--ink-muted); }
.cr-chip.role { background: var(--success-soft); border-color: transparent; color: var(--success-ink); }
.cr-chip.ramp { background: var(--blue-soft); border-color: transparent; color: var(--blue-ink); }

.cr-verdict { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; background: #fff; }
.cr-verdict button { border: 0; background: none; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.cr-verdict button + button { border-left: 1px solid var(--border-light); }
.cr-verdict button[aria-pressed="true"][data-v="keep"] { background: var(--success-soft); color: var(--success-ink); }
.cr-verdict button[aria-pressed="true"][data-v="maybe"] { background: var(--gold-soft); color: var(--gold); }
.cr-verdict button[aria-pressed="true"][data-v="cut"] { background: var(--ink-primary); color: #fff; }
.cr-verdict button:disabled { cursor: not-allowed; opacity: .45; }
.cr-lockline { font-size: 12px; color: var(--success-ink); text-align: right; margin-top: 4px; max-width: 220px; }
.cr-lockline button { background: none; border: 0; padding: 0; color: var(--ink-muted); text-decoration: underline; font-size: 12px; }

/* floor */
.cr-floor { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .cr-floor { position: static; } }
.cr-floor h2 { font-family: 'Cinzel', Georgia, serif; font-size: 18px; margin: 0; }
.cr-floor h2 small { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
.cr-incoming { display: flex; flex-direction: column; gap: 4px; }
.cr-incoming textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 8px; background: var(--parchment-primary); resize: vertical; font-size: 13px; }
.cr-progress { height: 8px; border-radius: 4px; background: var(--parchment-tertiary); overflow: hidden; }
.cr-progress i { display: block; height: 100%; background: var(--ink-primary); transition: width .2s; }
.cr-progress.done i { background: var(--success); }
.cr-status { font-size: 13px; font-weight: 600; }
.cr-pile { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cr-pile li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; background: var(--parchment-secondary); }
.cr-pile li .cr-pip { width: 22px; height: 22px; font-size: 11px; }
.cr-pile li .why { display: block; font-size: 11px; color: var(--ink-muted); }
.cr-pile li button { border: 0; background: none; color: var(--ink-muted); font-size: 16px; line-height: 1; padding: 2px 6px; }
.cr-pile .empty { background: none; display: block; font-size: 12px; color: var(--ink-muted); font-style: italic; }
.cr-actions { display: flex; flex-direction: column; gap: 6px; }
.cr-btn { border: 1px solid var(--border-strong); background: #fff; border-radius: 6px; padding: 6px 12px; font-weight: 600; font-size: 13px; text-align: center; text-decoration: none; color: var(--ink-primary); display: inline-block; }
.cr-btn.small { padding: 3px 9px; font-size: 12px; }
.cr-btn.primary { background: var(--ink-primary); color: #fff; border-color: var(--ink-primary); }
.cr-btn:disabled { opacity: .5; cursor: not-allowed; }
.cr-actions .cr-btn { width: 100%; }
.cr-toast { font-size: 12px; color: var(--success-ink); background: var(--success-soft); border-radius: 6px; padding: 8px 10px; }
.cr-toast.err { color: var(--error-ink); background: var(--error-soft); }
.cr-toast a { color: inherit; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
