:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --ink: #1f2024;
  --muted: #5f606b;
  --line: #e3e3e7;
  --brand: #02b793;
  --brand-ink: #007a62;
  --focus: #02b793;
  --danger: #c0322b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --surface: #1c1d21;
    --ink: #f2f2f4;
    --muted: #a3a4ad;
    --line: #2c2d33;
    --brand: #3fe0bb;
    --brand-ink: #3fe0bb;
    --danger: #ff7a70;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.top {
  display: flex; align-items: center; gap: 10px;
  padding: 28px 0 0;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
}
.top img { width: 28px; height: 28px; display: block; }
.top span { color: var(--muted); font-weight: 400; }

.hero { padding: 56px 0 40px; }
.hero h1 {
  margin: 0; max-width: 22ch; text-wrap: balance;
  font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 400; letter-spacing: -.02em;
}
.hero h1 b { font-weight: 700; }
.hero p { margin: 16px 0 0; max-width: 52ch; color: var(--muted); }

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  padding-bottom: 72px;
}
.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none;
  transition: border-color .2s, transform .2s cubic-bezier(.25,1,.5,1);
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
.cover {
  position: relative; aspect-ratio: 16 / 9;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 24px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(2, 183, 147, .28), transparent 55%),
    #4c4d58;
}
.cover::before {
  content: ''; position: absolute; left: 24px; top: 24px;
  width: 28px; height: 2px; background: #3fe0bb;
}
.mark {
  position: absolute; right: 22px; top: 18px;
  font-size: 14px; letter-spacing: .01em; color: #fff;
}
.mark span { font-weight: 400; opacity: .85; }
.mark b { font-weight: 700; }
.card .cover h2 {
  margin: 0; max-width: 14ch;
  font-size: clamp(26px, 3vw, 32px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.tag {
  font-weight: 600; font-size: 11px; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line);
}
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.open {
  margin-top: auto; padding-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--brand-ink);
}
.open svg { width: 14px; height: 14px; }

.foot { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: 13px; }

/* Tela de senha */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.panel {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px 28px;
}
.panel .top { padding: 0 0 28px; }
.panel .eyebrow { margin: 0; font-size: 13px; color: var(--muted); }
.panel h1 { margin: 4px 0 24px; font-size: 22px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field { position: relative; }
.field input { padding-right: 48px !important; }
input[type=password], .field input[type=text] {
  width: 100%; height: 44px; padding: 0 12px;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px;
}
input[type=password]:focus, .field input[type=text]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
input[aria-invalid=true] { border-color: var(--danger); }
.reveal {
  position: absolute; right: 4px; top: 4px;
  width: 36px; height: 36px; margin: 0; padding: 0;
  display: grid; place-items: center;
  color: var(--muted); background: transparent; border: 0; border-radius: 6px; cursor: pointer;
}
.reveal:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); filter: none; }
.reveal svg { width: 20px; height: 20px; }
.reveal .eye-off { display: none; }
.reveal[aria-pressed=true] .eye { display: none; }
.reveal[aria-pressed=true] .eye-off { display: block; }
.error { margin: 8px 0 0; font-size: 13px; color: var(--danger); min-height: 20px; }
button[type=submit] {
  margin-top: 12px; width: 100%; height: 44px;
  font: inherit; font-weight: 600; color: #fff; background: #1f2024;
  border: 0; border-radius: 8px; cursor: pointer;
}
@media (prefers-color-scheme: dark) { button[type=submit] { background: var(--brand); color: #06231d; } }
button[type=submit]:hover { filter: brightness(1.12); }
.back { display: inline-block; margin-top: 20px; font-size: 13px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
