/* Portal de Coproduções · base: fontes, cores, tipografia e controles.
   Tema claro e quente. Cada coprodução define --pc (a cor dela); os tons suaves saem de color-mix. */
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-normal-latin.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-normal-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ground: #f7f4ef;
  --surface: #ffffff;
  --rail: #f0ece4;
  --sunk: #f2eee7;
  --line: #e7e1d7;
  --line-2: #d8d0c3;
  --ink: #26231e;
  --ink-2: #554f46;
  --ink-3: #736c61;
  --copper: #9a5632;
  --copper-ink: #7b4324;
  --copper-soft: #f4e6da;
  --ok: #2c7550;   --ok-soft: #e2f0e7;
  --warn: #8f6210; --warn-soft: #f7ecd2;
  --bad: #ad3d32;  --bad-soft: #f9e3df;
  --info: #3f5f9a; --info-soft: #e4eaf6;
  --pc: var(--copper);
  --r: 12px; --r-s: 8px; --r-xs: 6px;
  --shadow-1: 0 1px 2px rgba(64, 48, 28, .05), 0 3px 10px rgba(64, 48, 28, .04);
  --shadow-2: 0 2px 6px rgba(64, 48, 28, .06), 0 14px 36px rgba(64, 48, 28, .13);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --side: 232px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; -webkit-tap-highlight-color: transparent; }
img, svg { display: block; }
/* todo ícone tem tamanho mesmo fora de um componente que o defina */
svg[aria-hidden] { width: 16px; height: 16px; flex: none; }
[hidden] { display: none !important; }
::selection { background: #ecd4bf; color: var(--ink); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 4px; }
input, textarea { caret-color: var(--copper); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.link { color: var(--copper-ink); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--copper) 35%, transparent); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 550; font-size: 14px; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, transform .14s var(--ease-out), box-shadow .15s ease; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--copper); border-color: var(--copper); color: #fffaf5; box-shadow: 0 1px 2px rgba(123, 67, 36, .28); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icb { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--ink-3); transition: background-color .15s ease, color .15s ease, transform .14s var(--ease-out); }
.icb svg { width: 17px; height: 17px; }
.icb:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--sunk); border-color: var(--line-2); }
  .btn.primary:hover { background: var(--copper-ink); border-color: var(--copper-ink); }
  .btn.quiet:hover { background: var(--sunk); color: var(--ink); }
  .btn.danger:hover { background: var(--bad-soft); border-color: color-mix(in oklab, var(--bad) 30%, var(--line)); }
  .icb:hover { background: var(--sunk); color: var(--ink); }
}

/* ---------- campos ---------- */
.in, .sel, .ta { width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; transition: border-color .15s ease, box-shadow .15s ease; }
.ta { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; line-height: 1.5; }
.sel { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23736c61' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; cursor: pointer; }
.in:focus, .sel:focus, .ta:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px color-mix(in oklab, var(--copper) 18%, transparent); }
.in::placeholder, .ta::placeholder { color: var(--ink-3); }
.in.sm, .sel.sm { height: 32px; font-size: 13.5px; padding-left: 10px; border-radius: 8px; }
.sel.bare, .in.bare { border-color: transparent; background-color: transparent; }
.sel.bare:hover, .in.bare:hover { border-color: var(--line-2); background-color: var(--surface); }
.field { display: grid; gap: 6px; }
.field > label, .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { color: var(--bad); font-size: 13.5px; min-height: 20px; }
input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"] { accent-color: var(--copper); width: 16px; height: 16px; }

/* ---------- etiquetas e sinais ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.pc { background: color-mix(in oklab, var(--pc) 13%, #fff); color: color-mix(in oklab, var(--pc) 82%, #1c1915); }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.tag { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: #c08a1e; } .dot.bad { background: var(--bad); } .dot.off { background: var(--line-2); }
.av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c, var(--ink-3)); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; flex: none; user-select: none; }
.av.lg { width: 36px; height: 36px; font-size: 13.5px; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.av.none { background: var(--sunk); color: #a39c90; }
.av.none svg { width: 14px; height: 14px; }
.av.sm.none svg { width: 12px; height: 12px; }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 var(--line-2); font-size: 11px; font-weight: 600; color: var(--ink-3); }

/* ---------- carregando ---------- */
.skel { border-radius: 8px; background: linear-gradient(100deg, var(--sunk) 30%, #faf8f4 50%, var(--sunk) 70%); background-size: 300% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
