/* PKU Life — identidade FEPE.
   As quatro cores vêm da logo da FEPE (azul, amarelo, rosa e verde).
   As variações "ink" são tons mais escuros das mesmas cores, usados em texto e botões
   para manter contraste de leitura (WCAG AA) sobre fundo branco. */

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* cores da marca FEPE */
  --blue: #1a99d5;
  --yellow: #ffcb08;
  --pink: #ef59a0;
  --green: #a3ce4d;

  /* derivados */
  --blue-ink: #0f6fa8;
  --blue-deep: #0b5683;
  --blue-tint: #e8f5fb;
  --blue-soft: #c3e4f4;
  --yellow-ink: #7d5200;
  --yellow-tint: #fff8db;
  --yellow-soft: #ffe88a;
  --pink-ink: #bf2463;
  --pink-tint: #fdecf4;
  --pink-soft: #f9c9df;
  --green-ink: #4a7413;
  --green-tint: #f2f8e4;
  --green-soft: #d5eaa8;

  /* neutros */
  --ink: #25303b;
  --ink-2: #55606b;
  --ink-3: #68727d;
  --line: #e2e7ec;
  --line-strong: #c9d1d9;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --danger: #b3261e;
  --danger-tint: #fceceb;

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --pill: 999px;
  --shadow: 0 1px 2px rgba(22, 34, 46, 0.05), 0 10px 28px rgba(22, 34, 46, 0.06);
  --shadow-sm: 0 1px 2px rgba(22, 34, 46, 0.08);
  --font: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --accent: var(--blue);
  --accent-ink: var(--blue-ink);
  --accent-tint: var(--blue-tint);
  --accent-soft: var(--blue-soft);
}

[data-tone="blue"], .tone-blue { --accent: var(--blue); --accent-ink: var(--blue-ink); --accent-tint: var(--blue-tint); --accent-soft: var(--blue-soft); }
[data-tone="yellow"], .tone-yellow { --accent: var(--yellow); --accent-ink: var(--yellow-ink); --accent-tint: var(--yellow-tint); --accent-soft: var(--yellow-soft); }
[data-tone="pink"], .tone-pink { --accent: var(--pink); --accent-ink: var(--pink-ink); --accent-tint: var(--pink-tint); --accent-soft: var(--pink-soft); }
[data-tone="green"], .tone-green { --accent: var(--green); --accent-ink: var(--green-ink); --accent-tint: var(--green-tint); --accent-soft: var(--green-soft); }

/* ------------------------------------------------------------------ base */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.has-dialog { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-ink); text-underline-offset: 3px; }
b, strong { font-weight: 800; }

h1 {
  font-size: clamp(2rem, 1.35rem + 3vw, 3.15rem);
  font-weight: 900;
  line-height: 1.07;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1:focus { outline: none; }
h1 em {
  font-style: normal;
  color: var(--accent-ink);
  background: linear-gradient(transparent 64%, var(--accent-soft) 64%);
  border-radius: 4px;
}
h2 { font-size: 1.4rem; font-weight: 900; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.3; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--pill); font-weight: 800;
}
.skip:focus { top: 12px; }

.boot { padding: 3rem 1.25rem; text-align: center; color: var(--ink-2); }
.icon { flex: none; }
.icon.is-filled { fill: currentColor; }

.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 58ch; }
.hint { font-size: 0.88rem; color: var(--ink-3); }
.fineprint { font-size: 0.85rem; color: var(--ink-3); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent-ink);
}

.link { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 800; }

/* ------------------------------------------------------------------ botões e controles */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.65rem 1.25rem;
  border: 1.5px solid transparent; border-radius: var(--pill);
  font-weight: 800; font-size: 0.98rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--blue-ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-deep); }
.btn-soft { background: var(--blue-tint); color: var(--blue-deep); }
.btn-soft:hover:not(:disabled) { background: var(--blue-soft); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-3); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-tint); color: #8c1d18; }
.btn-danger-soft:hover { background: #f8d9d6; }
.btn-sm { min-height: 38px; padding: 0.4rem 0.95rem; font-size: 0.9rem; }
.btn-lg { min-height: 54px; padding: 0.8rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-2);
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 38px; padding: 0.35rem 0.95rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
  font-weight: 700; font-size: 0.9rem; color: var(--ink);
}
.chip:hover { border-color: var(--ink-3); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip b { font-weight: 800; color: var(--blue-ink); }
.chips-sep { width: 1px; height: 24px; background: var(--line-strong); margin: 0 0.2rem; }

.segmented {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--surface-2);
}
.segmented button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 40px; padding: 0.4rem 1.05rem; border: 0; border-radius: var(--pill); background: transparent;
  font-weight: 800; font-size: 0.93rem; color: var(--ink-2);
}
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented .count {
  min-width: 22px; padding: 0 6px; border-radius: var(--pill); background: var(--blue-ink); color: #fff;
  font-size: 0.75rem; line-height: 22px; text-align: center;
}
.segmented--small button { min-height: 36px; font-size: 0.88rem; }

.tag {
  display: inline-flex; align-items: center; padding: 0.15rem 0.65rem; border-radius: var(--pill);
  font-size: 0.76rem; font-weight: 800; white-space: nowrap; background: var(--surface-2); color: var(--ink-2);
}
.tag--blue { background: var(--blue-tint); color: var(--blue-deep); }
.tag--yellow { background: var(--yellow-tint); color: var(--yellow-ink); }
.tag--pink { background: var(--pink-tint); color: var(--pink-ink); }
.tag--green { background: var(--green-tint); color: var(--green-ink); }

.pill {
  display: inline-flex; align-items: center; padding: 0.15rem 0.7rem; border-radius: var(--pill);
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.8rem; font-weight: 700; color: var(--ink-2);
}
.pill--ok { border-color: var(--green); background: var(--green-tint); color: var(--green-ink); }

/* formulários */

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 800; color: var(--ink); }

input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; min-height: 46px; padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  font-weight: 600;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-3); font-weight: 500; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue-ink); border-radius: var(--radius-sm); }
input:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
select { appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355606b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 18px; }

.search { position: relative; display: flex; align-items: center; }
.search .icon { position: absolute; left: 0.9rem; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 2.6rem; border-radius: var(--pill); }

.check { display: flex; align-items: flex-start; gap: 0.65rem; font-weight: 600; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue-ink); cursor: pointer; }
.check--confirm { padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--blue-tint); }

.form-message { min-height: 1.4em; font-size: 0.93rem; font-weight: 700; color: var(--ink-2); }
.form-message.is-ok { color: var(--green-ink); }
.form-message.is-error { color: var(--danger); }
.form-message:empty { min-height: 0; }

details.help { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.2rem 1rem; background: var(--surface); }
details.help summary { padding: 0.65rem 0; font-weight: 800; cursor: pointer; }
details.help[open] { padding-bottom: 0.9rem; }
details.help p { font-size: 0.93rem; color: var(--ink-2); }
details.help p + p { margin-top: 0.6rem; }

/* blocos */

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, 0.8rem + 1.4vw, 1.75rem); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1rem; min-width: 0;
}
.panel--compact { padding: 1.2rem; gap: 0.75rem; }
.panel > p { color: var(--ink-2); }

.notice {
  display: flex; gap: 0.9rem; padding: 1rem 1.15rem; border-radius: var(--radius);
  background: var(--yellow-tint); border: 1px solid #f1dc8f;
}
.notice-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--yellow); color: #4a3200; }
.notice strong { display: block; font-size: 1.02rem; }
.notice p { font-size: 0.95rem; color: #4d4530; margin-top: 0.15rem; }
.notice .notice-extra { font-weight: 700; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem; text-align: center;
  padding: 1.6rem 1rem; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2);
}
.empty-state--wide { grid-column: 1 / -1; }

.callout { display: flex; gap: 0.8rem; padding: 1rem 1.1rem; border-radius: var(--radius-sm); }
.callout .icon { margin-top: 2px; }
.callout p { font-size: 0.95rem; margin-top: 0.3rem; }
.callout--tip { background: var(--green-tint); color: #2f4a0b; }
.callout--care { background: var(--yellow-tint); color: #4d4530; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.65rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody th { font-weight: 800; }
.data-table tbody th small { display: block; font-weight: 500; color: var(--ink-3); }
.data-table .num { font-weight: 800; }

/* ------------------------------------------------------------------ moldura */

.shell { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar::before {
  content: ""; display: block; height: 5px;
  background: linear-gradient(90deg, var(--blue) 0 25%, var(--yellow) 25% 50%, var(--pink) 50% 75%, var(--green) 75% 100%);
}
.topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 0.55rem clamp(0.9rem, 3vw, 1.75rem);
  display: flex; align-items: center; gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-fepe { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.brand-fepe img { height: 34px; width: auto; max-width: none; }
.brand-partner { font-size: 0.66rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; letter-spacing: 0.01em; line-height: 1.1; }
.brand-partner b, .partner-line b { color: var(--ink); }
.brand-sep { width: 1px; height: 40px; background: var(--line-strong); flex: none; }
.brand-product { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.product-name { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: var(--ink); white-space: nowrap; }
.product-name span { color: var(--blue-ink); }
.proto {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 7px; border-radius: var(--pill); background: var(--yellow-tint); color: var(--yellow-ink); border: 1px solid #f1dc8f;
}

.partner-line { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }

.mainnav { display: flex; gap: 0.15rem; margin-left: auto; }
.mainnav a {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.8rem; border-radius: var(--pill);
  font-weight: 800; font-size: 0.93rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.mainnav a:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); }
.mainnav .nav-short { display: none; }
.login-link { flex: none; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(1.1rem, 3vw, 2.2rem) clamp(0.9rem, 3vw, 1.75rem) 3rem; }
main:focus { outline: none; }
.view { display: flex; flex-direction: column; gap: clamp(1.1rem, 2.4vw, 1.75rem); }

.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-in {
  max-width: 1200px; margin: 0 auto; padding: 1.75rem clamp(0.9rem, 3vw, 1.75rem);
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.5rem; align-items: center;
}
.footer-brand img { width: 220px; }
.footer-brand .partner-line { margin-top: 0.5rem; }
.footer-text p + p { margin-top: 0.35rem; }
.footer-text { color: var(--ink-2); font-size: 0.93rem; max-width: 52ch; }
.footer-links { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.93rem; }
.footer-links a { font-weight: 700; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.tabbar { display: none; }

.shell.is-bare .mainnav, .shell.is-bare .login-link, .shell.is-bare .tabbar, .shell.is-bare .footer { display: none; }
.shell.is-bare .topbar-in { justify-content: center; }

/* ------------------------------------------------------------------ cabeçalhos de página e heros */

.page-head { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.4rem; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  padding: clamp(1.4rem, 1rem + 2.6vw, 3rem); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero--tint { background: var(--accent-tint); border-color: var(--accent-soft); box-shadow: none; }
.hero-copy { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; min-width: 0; }
.hero-foot { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }
.hero-points li { display: inline-flex; align-items: center; gap: 0.35rem; }
.hero-points .icon { color: var(--green-ink); }

.hero-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.7rem, 1.6vw, 1.1rem); max-width: 380px; margin-left: auto; width: 100%; }
.tile { display: grid; place-items: center; aspect-ratio: 1; color: #fff; }
.tile--blue { background: var(--blue); border-radius: 50%; }
.tile--yellow { background: var(--yellow); color: #4a3200; border-radius: 34% 34% 34% 12%; transform: rotate(4deg); }
.tile--pink { background: var(--pink); border-radius: 34% 12% 34% 34%; transform: rotate(-4deg); }
.tile--green { background: var(--green); color: #2c4708; border-radius: 50% 50% 50% 14%; }

.hero-photo { position: relative; border-radius: var(--radius); overflow: hidden; align-self: stretch; min-height: 240px; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-photo-caption {
  position: absolute; left: 0.8rem; bottom: 0.8rem; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; border-radius: var(--pill); background: rgba(255, 255, 255, 0.94); font-size: 0.86rem; font-weight: 800;
}
.hero-photo-caption .icon { color: var(--green-ink); }

/* ------------------------------------------------------------------ início */

.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.module-card {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.3rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--accent);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.module-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(22, 34, 46, 0.06), 0 16px 36px rgba(22, 34, 46, 0.1); }
.module-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-tint); color: var(--accent-ink); }
.module-card h2 { font-size: 1.2rem; }
.module-card p { font-size: 0.95rem; color: var(--ink-2); flex: 1; }
.module-cta { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 800; color: var(--accent-ink); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stats div { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--surface-2); }
.stats b { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.stats span { font-size: 0.92rem; color: var(--ink-2); line-height: 1.35; }

.about {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  padding: clamp(1.4rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.about-brand { display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start; }
.about-brand img { width: min(100%, 310px); }
.about-text { display: flex; flex-direction: column; gap: 0.75rem; }
.about-text p { color: var(--ink-2); }

.soon {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding: 1.3rem 1.5rem;
  border-radius: var(--radius); background: var(--blue-tint); border: 1px solid var(--blue-soft);
}
.soon > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; }
.soon p { color: var(--ink-2); font-size: 0.95rem; }
.soon-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--blue-ink); flex: none; }
.soon .btn-soft { background: var(--surface); }

/* ------------------------------------------------------------------ calculadora */

.calc-bar { display: flex; flex-wrap: wrap; gap: 0.9rem 1.25rem; align-items: flex-end; justify-content: space-between; }
.field--date { flex: 0 0 auto; }
.field--date input { width: auto; min-width: 180px; }
.segmented--tabs button { min-height: 46px; padding-inline: 1.2rem; }

.calc-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.calc-side { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 96px; }

.step { display: flex; align-items: center; gap: 0.7rem; }
.step + .segmented { align-self: flex-start; }
.step-num {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--blue-ink); color: #fff; font-weight: 900;
}
.step-body { display: flex; flex-direction: column; gap: 0.9rem; align-items: stretch; }
.step-body > .btn { align-self: flex-start; }
.panel > .step:not(:first-child) { margin-top: 0.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

.food-list { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; max-height: 380px; overflow-y: auto; }
.food-list li + li { border-top: 1px solid var(--line); }
.food-list .empty { padding: 1rem; color: var(--ink-2); font-size: 0.95rem; }
.food-row {
  display: flex; align-items: center; gap: 0.8rem; width: 100%; padding: 0.75rem 0.9rem; border: 0; background: var(--surface); text-align: left;
}
.food-row:hover, .food-row.is-current { background: var(--blue-tint); }
.food-row:focus-visible { outline-offset: -3px; }
.food-name { flex: 1; font-weight: 700; }
.food-phe { font-size: 0.88rem; color: var(--ink-2); white-space: nowrap; }
.food-phe b { font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.food-row .icon { color: var(--ink-3); }

.picked {
  display: grid; grid-template-columns: 1fr auto; gap: 0.8rem 1rem; align-items: center;
  padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--blue-tint); border: 1.5px solid var(--blue-soft);
}
.picked-main { display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-start; min-width: 0; }
.picked-main p { font-size: 0.88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.picked-main .link { font-size: 0.9rem; }
.picked-phe { display: flex; align-items: center; gap: 0.5rem; }
.picked-phe b { font-size: 2.2rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.picked-phe span { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.picked .btn { grid-column: 1 / -1; justify-self: start; }

.estimator { display: flex; flex-direction: column; gap: 0.8rem; padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.estimator .btn { align-self: flex-start; }
.measures { display: flex; flex-direction: column; gap: 0.5rem; }
.chip--measure { font-weight: 600; font-size: 0.86rem; text-align: left; }
.estimator-preview { font-weight: 800; }

.result-card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 1.4rem; border-radius: var(--radius);
  background: var(--blue-ink); color: #fff; box-shadow: var(--shadow);
}
.result-label { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.9; }
.result-value { font-size: clamp(2.8rem, 2rem + 3vw, 3.8rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.result-value small { font-size: 0.38em; font-weight: 800; letter-spacing: 0; }
.result-formula { font-size: 0.95rem; font-weight: 700; }
.result-status { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.result-card .pill { background: rgba(255, 255, 255, 0.16); border-color: transparent; color: #fff; }
.result-card .pill--ok { background: #fff; color: var(--green-ink); }
.result-note { font-size: 0.84rem; opacity: 0.92; }
.result-card--inline { background: var(--blue-tint); color: var(--ink); box-shadow: none; border: 1.5px solid var(--blue-soft); }
.result-card--inline .result-label { color: var(--blue-deep); opacity: 1; }
.result-card--inline .result-formula { color: var(--ink-2); font-weight: 600; }

/* Resultado logo abaixo do peso, só em telas estreitas (onde o cartão grande fica lá embaixo). */
.inline-result { display: none; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; padding: 0.7rem 1rem; border-radius: var(--radius-sm); background: var(--blue-ink); color: #fff; font-weight: 700; }
.inline-result b { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.inline-result.is-empty { background: var(--surface-2); color: var(--ink-2); }

.compare-out { font-size: 1.05rem; }
.compare-out b { font-size: 1.3rem; font-weight: 900; }

.entry-list { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
.entry { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.9rem; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry-main { flex: 1; min-width: 0; }
.entry-main p { font-size: 0.88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.entry-flags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.entry-phe { white-space: nowrap; font-size: 0.9rem; color: var(--ink-2); }
.entry-phe b { font-size: 1.25rem; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.subtotal { font-size: 1.02rem; }
.other-dates { display: flex; flex-direction: column; gap: 0.6rem; }

.transparency { display: flex; gap: 0.7rem; padding: 1rem 1.15rem; border-radius: var(--radius); background: var(--surface-2); color: var(--ink-2); font-size: 0.93rem; }
.transparency .icon { margin-top: 2px; color: var(--ink-3); }
.transparency .link { display: inline; }
.transparency .link .icon { display: inline; vertical-align: -2px; margin: 0; color: inherit; }

/* ------------------------------------------------------------------ cardápio */

.toolbar { display: flex; flex-direction: column; gap: 0.9rem; }
.toolbar-head { display: flex; flex-wrap: wrap; gap: 0.9rem 1.5rem; align-items: flex-end; justify-content: space-between; }
.toolbar-head > div:first-child { display: flex; flex-direction: column; gap: 0.3rem; }
.toolbar-head .search { flex: 1 1 280px; max-width: 420px; }
.result-count { font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.1rem; }
.recipe-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.recipe-card-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--accent-tint); overflow: hidden; }
/* Posição absoluta: altura em % não é confiável dentro de <button>. */
.recipe-card-media img, .recipe-card-media .media-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.recipe-card-media img { object-fit: cover; transition: transform 0.35s; }
.recipe-card:hover .recipe-card-media img { transform: scale(1.04); }
.media-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--yellow-tint), var(--green-tint)); color: var(--green-ink); }
.badge {
  position: absolute; left: 0.7rem; top: 0.7rem; padding: 0.2rem 0.7rem; border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.95); font-size: 0.76rem; font-weight: 800; color: var(--ink);
}
.fav-btn { position: absolute; right: 0.6rem; top: 0.6rem; border-color: transparent; background: rgba(255, 255, 255, 0.95); }
.fav-btn.is-on { color: var(--pink-ink); }
.recipe-card-body { display: flex; flex-direction: column; gap: 0.55rem; padding: 1rem 1.05rem 1.1rem; flex: 1; align-items: flex-start; }
.recipe-card-body h3 { font-size: 1.08rem; }
.recipe-card-body p { font-size: 0.92rem; color: var(--ink-2); flex: 1; }
.recipe-card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; align-items: center; }
.meta { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }

.legend { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 0.9rem; align-items: baseline; padding-top: 0.2rem; }
.legend dd { font-size: 0.92rem; color: var(--ink-2); }

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  padding: clamp(1.3rem, 1rem + 1.5vw, 2rem); border-radius: var(--radius-lg); background: var(--pink-tint); border: 1px solid var(--pink-soft);
}
.cta-band > div { display: flex; flex-direction: column; gap: 0.3rem; }
.cta-band .eyebrow { color: var(--pink-ink); }
.cta-band p { color: var(--ink-2); }

/* receita (diálogo) */

dialog.dialog {
  width: min(780px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px);
  padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 80px rgba(15, 25, 35, 0.35); overflow: hidden;
}
dialog.dialog::backdrop { background: rgba(20, 30, 40, 0.55); }
dialog.dialog--small { width: min(440px, calc(100vw - 20px)); }
.dialog-frame { max-height: calc(100dvh - 20px); overflow-y: auto; overscroll-behavior: contain; }
.dialog-close { position: absolute; right: 0.8rem; top: 0.8rem; z-index: 3; box-shadow: var(--shadow-sm); }

.confirm { display: flex; flex-direction: column; gap: 0.8rem; padding: 1.6rem 1.5rem 1.4rem; }
.confirm h2 { padding-right: 2.6rem; }
.confirm p { color: var(--ink-2); }
.confirm .actions { justify-content: flex-end; margin-top: 0.4rem; }

.recipe-figure { background: var(--surface-2); }
.recipe-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.recipe-figure figcaption { padding: 0.55rem 1.5rem; font-size: 0.82rem; color: var(--ink-2); background: var(--yellow-tint); }
.recipe-body { display: flex; flex-direction: column; gap: 1.2rem; padding: 1.5rem clamp(1.1rem, 4vw, 1.9rem) 1.8rem; }
.recipe-body > h2 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem); padding-right: 2.6rem; }
.recipe:not(:has(.recipe-figure)) .recipe-body { padding-top: 2rem; }
.recipe-body > .eyebrow { color: var(--yellow-ink); margin-bottom: -0.7rem; }
.recipe-body section { display: flex; flex-direction: column; gap: 0.7rem; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; align-items: center; padding: 0.9rem 0; border-block: 1px solid var(--line); }
.recipe-meta > div { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; }
.recipe-meta small { display: block; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; }
.recipe-meta .icon { color: var(--ink-3); }
.recipe-yield { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.recipe-yield p { font-size: 0.88rem; color: var(--ink-2); margin-top: 0.25rem; }
.equipment { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--ink-2); }

.checklist { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist .check { padding: 0.7rem 0.9rem; }
.checklist input:checked + span { color: var(--ink-3); text-decoration: line-through; }

.steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.steps-progress { font-size: 0.86rem; font-weight: 800; color: var(--ink-2); }
.steps { display: flex; flex-direction: column; gap: 0.5rem; }
.step-btn {
  display: flex; align-items: flex-start; gap: 0.8rem; width: 100%; padding: 0.8rem 0.9rem; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600;
}
.step-btn:hover { border-color: var(--ink-3); }
.step-index {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--yellow); color: #4a3200; font-size: 0.82rem; font-weight: 900;
}
.steps .is-done .step-btn { background: var(--green-tint); border-color: var(--green-soft); color: var(--ink-2); }
.steps .is-done .step-index { background: var(--green-ink); color: #fff; }

.ref-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; }
.ref-list small { display: block; color: var(--ink-3); }

.recipe-plan { padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--pink-tint); border: 1px solid var(--pink-soft); align-items: flex-start; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.6rem; width: 100%; }

/* ------------------------------------------------------------------ minha semana */

.hero--week { grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr); }
.counter-card {
  display: flex; flex-direction: column; gap: 0.45rem; padding: 1.3rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--accent-soft);
}
.counter-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--pink-tint); color: var(--pink-ink); }
.counter-value { font-size: 1.5rem; font-weight: 800; color: var(--ink-2); line-height: 1; }
.counter-value b { font-size: 3rem; font-weight: 900; letter-spacing: -0.04em; color: var(--ink); }
.counter-label { font-weight: 700; }
.meter { height: 10px; border-radius: var(--pill); background: var(--pink-tint); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--fill, 0%); border-radius: var(--pill); background: var(--pink-ink); transition: width 0.3s; }

.week-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 1.25rem; align-items: start; }
.week-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.week-side { display: flex; flex-direction: column; gap: 1.25rem; }

.day-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--surface-2); }
.day-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0.2rem 0.5rem;
  border: 0; border-radius: 16px; background: transparent; font-weight: 800; color: var(--ink-2);
}
.day-tabs button:hover { background: rgba(255, 255, 255, 0.7); }
.day-tabs button.is-active { background: var(--pink-ink); color: #fff; }
.dots { display: flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.dots i.is-on { background: var(--pink-ink); }
.day-tabs button.is-active .dots i { background: rgba(255, 255, 255, 0.4); }
.day-tabs button.is-active .dots i.is-on { background: #fff; }

.day-panel { display: flex; flex-direction: column; gap: 1rem; scroll-margin-top: 100px; }
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.day-head > div { display: flex; flex-direction: column; gap: 0.2rem; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.slot {
  display: flex; flex-direction: column; gap: 0.8rem; padding: 1.1rem; border-radius: var(--radius);
  background: var(--surface); border: 1.5px dashed var(--line-strong); min-width: 0;
}
.slot.is-filled { border-style: solid; border-color: var(--line); box-shadow: var(--shadow); }
.slot-head { display: flex; align-items: center; gap: 0.6rem; }
.slot-index { font-size: 0.8rem; font-weight: 900; color: var(--pink-ink); background: var(--pink-tint); border-radius: var(--pill); padding: 0.1rem 0.55rem; }
.slot-empty { font-size: 0.93rem; color: var(--ink-2); flex: 1; }
.slot-recipe { display: flex; gap: 0.8rem; flex: 1; min-width: 0; }
.slot-media { width: 84px; height: 84px; flex: none; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.slot-media img, .slot-media .media-placeholder { width: 100%; height: 100%; object-fit: cover; }
.slot-info { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.slot-info p { font-size: 0.86rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }

.shopping-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--green-tint); color: var(--green-ink); }
.shopping .eyebrow { color: var(--green-ink); }
.shopping-list { display: flex; flex-direction: column; }
.shopping-list li { display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline; padding: 0.45rem 0; border-bottom: 1px dashed var(--line-strong); font-weight: 700; }
.shopping-list small { font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.storage-note { display: flex; gap: 0.6rem; font-size: 0.9rem; color: var(--ink-2); }
.storage-note .icon { margin-top: 2px; }
.panel--compact > .btn { align-self: flex-start; }

.overview { display: flex; flex-direction: column; gap: 0.9rem; }
.overview-head > div { display: flex; flex-direction: column; gap: 0.2rem; }
.week-table { min-width: 760px; table-layout: fixed; background: var(--surface); }
.week-table thead th { text-align: center; }
.week-table tbody th { width: 118px; font-size: 0.86rem; font-weight: 800; background: var(--surface-2); vertical-align: middle; }
.week-table td { padding: 4px; border-left: 1px solid var(--line); height: 64px; }
.week-table td.is-filled { background: var(--pink-tint); }
.cell-btn { width: 100%; height: 100%; min-height: 56px; padding: 0.3rem 0.35rem; border: 0; border-radius: 8px; background: transparent; font-size: 0.8rem; font-weight: 700; line-height: 1.25; text-align: left; color: var(--ink); }
.cell-btn:hover { background: rgba(255, 255, 255, 0.75); }
.cell-btn--empty { text-align: center; color: var(--ink-3); font-size: 1.1rem; }
.cell-btn--empty:hover { background: var(--surface-2); }

.notes textarea { min-height: 140px; }

/* ------------------------------------------------------------------ fontes e método */

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.principle { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.3rem; border-radius: var(--radius); background: var(--green-tint); border: 1px solid var(--green-soft); }
.principle-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface); color: var(--green-ink); }
.principle p { font-size: 0.95rem; color: #3d4a2a; }

.formulas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.formula { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); background: var(--blue-tint); border: 1.5px solid var(--blue-soft); }
.formula small { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-deep); }
.formula p { font-size: 1.05rem; font-weight: 600; }
.formula span { font-size: 0.9rem; color: var(--ink-2); }

.bullets { display: flex; flex-direction: column; gap: 0.5rem; color: var(--ink-2); }
.bullets li { position: relative; padding-left: 1.3rem; }
.bullets li::before { content: ""; position: absolute; left: 0.2rem; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.section-head { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.section-head p { color: var(--ink-2); max-width: 75ch; }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.library-card {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 1.2rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent);
  color: var(--ink); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s;
}
.library-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.library-card small { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.library-card h3 { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.library-card h3 .icon { margin-top: 3px; color: var(--ink-3); }
.library-card p { font-size: 0.92rem; color: var(--ink-2); }

.limits { border-left: 6px solid var(--yellow); }
.credits {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; padding: clamp(1.3rem, 1rem + 1.5vw, 2rem);
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.credits img { width: 250px; }
.credits > div { flex: 1 1 300px; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.credits p { color: var(--ink-2); }

/* ------------------------------------------------------------------ entrar */

.view--login { align-items: center; padding-top: clamp(0.5rem, 3vw, 2rem); }
.login-card {
  width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 1.1rem;
  padding: clamp(1.4rem, 5vw, 2.2rem); border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); text-align: center; }
.login-brand img { width: 250px; }
.login-title { display: flex; flex-direction: column; gap: 0.3rem; }
.login-title .product-name { font-size: 1.1rem; }
.login-title h1 { font-size: 2rem; }
.login-title p:last-child { color: var(--ink-2); }
.login-soon { display: flex; gap: 0.6rem; padding: 0.85rem 1rem; border-radius: var(--radius-sm); background: var(--blue-tint); color: var(--blue-deep); font-size: 0.93rem; }
.login-soon .icon { margin-top: 2px; }
.login-form { display: flex; flex-direction: column; gap: 0.8rem; }
.login-divider { display: flex; align-items: center; gap: 0.8rem; color: var(--ink-3); font-size: 0.86rem; font-weight: 700; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-card > .hint { text-align: center; }
.login-foot { font-size: 0.86rem; color: var(--ink-3); text-align: center; }

/* ------------------------------------------------------------------ avisos rápidos */

.toast-region { position: fixed; left: 0; right: 0; bottom: 1.4rem; z-index: 90; display: flex; justify-content: center; padding: 0 1rem; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.1rem; border-radius: var(--pill);
  background: var(--ink); color: #fff; font-weight: 700; font-size: 0.93rem; box-shadow: 0 10px 30px rgba(15, 25, 35, 0.3);
  animation: toast-in 0.2s ease-out;
}
.toast .icon { color: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ telas menores */

/* Menu do topo compacto: sem ícones e com rótulos curtos. */
@media (max-width: 1240px) {
  .mainnav a { padding: 0.5rem 0.7rem; }
  .mainnav .nav-icon { display: none; }
  .mainnav .has-short .nav-label { display: none; }
  .mainnav .has-short .nav-short { display: inline; }
}

@media (max-width: 1040px) {
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Abaixo de 1024px a navegação vai para a barra inferior. */
@media (max-width: 1023px) {
  .mainnav { display: none; }
  .login-link { margin-left: auto; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0.2rem 0;
    font-size: 0.7rem; font-weight: 800; color: var(--ink-3); text-decoration: none;
  }
  .tabbar .nav-icon { display: grid; place-items: center; width: 52px; height: 30px; border-radius: var(--pill); }
  .tabbar a[aria-current="page"] { color: var(--accent-ink); }
  .tabbar a[aria-current="page"] .nav-icon { background: var(--accent-tint); }

  .footer { padding-bottom: 72px; }
  .toast-region { bottom: calc(84px + env(safe-area-inset-bottom)); }
  dialog .toast-region { bottom: 1.2rem; }
}

@media (max-width: 920px) {
  .calc-grid, .week-grid { grid-template-columns: minmax(0, 1fr); }
  .calc-side { position: static; }
  .inline-result { display: flex; }
  .hero, .hero--week, .about { grid-template-columns: minmax(0, 1fr); }
  .hero-tiles { max-width: 300px; margin: 0 auto; }
  .hero-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .principles, .formulas { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .modules, .stats, .slots { grid-template-columns: minmax(0, 1fr); }
  .footer-in { grid-template-columns: 1fr; }
  .login-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .login-link { width: 42px; min-height: 42px; padding: 0; }
  .calc-bar { align-items: stretch; flex-direction: column; }
  .field--date input { width: 100%; }
  .segmented--tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--radius); }
  .segmented--tabs button { flex-direction: column; gap: 0.15rem; padding: 0.5rem 0.2rem; border-radius: 16px; font-size: 0.82rem; position: relative; }
  .segmented--tabs .count { position: absolute; top: 4px; right: 6px; }
  .segmented--small { display: grid; grid-template-columns: 1fr 1fr; align-self: stretch; }
  .step + .segmented { align-self: stretch; }
  .picked { grid-template-columns: 1fr; }
  .plan-row { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
  .hero .actions { width: 100%; }
  .chips-sep { display: none; }
  .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .entry { flex-wrap: wrap; }
  .entry-main { flex-basis: 100%; }
  .entry-phe { margin-right: auto; }
}

@media (max-width: 400px) {
  .brand { gap: 0.6rem; }
  .brand-fepe img { height: 28px; }
  .brand-partner { font-size: 0.58rem; }
  .brand-sep { height: 34px; }
  .product-name { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ impressão */

@media print {
  body { background: #fff; }
  .topbar, .tabbar, .footer, .no-print, .notice, .toast-region, .skip { display: none !important; }
  main { padding: 0; max-width: none; }
  .hero, .panel, .slot { box-shadow: none; }
  .hero--week { grid-template-columns: 1fr auto; padding: 0; border: 0; background: none; }
  .week-grid { grid-template-columns: 1fr; }
  .table-scroll { overflow: visible; }
  .week-table { min-width: 0; }
  .cell-btn--empty { visibility: hidden; }
  .notes textarea { border: 1px solid #999; min-height: 180px; }
}
