:root {
  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --line: #e3e6ea;
  --line-strong: #c9cdd4;
  --ink: #0b1220;
  --muted: #50565f;
  --faint: #8a93a0;
  --absent: #eceef1;
  --accent: #ff9500;
  --blue: #1d4ed8;
  --danger: #ff3b30;
  --hl: #ffe14d;
  --font-sans: Arial, Helvetica, "Helvetica Neue", sans-serif;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --shadow: 0 10px 30px rgb(11 18 32 / 0.16), 0 2px 6px rgb(11 18 32 / 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.rule { height: 4px; background: var(--accent); }

.page { width: min(1440px, 100%); margin: 0 auto; padding: 18px 48px 16px; }

/* cabeçalho */
.back {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 0 6px -3px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.title-row { display: flex; align-items: center; gap: 14px; min-height: 52px; }
.title-row .layer-icon { display: grid; place-items: center; }
h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h1 a { text-decoration: none; }
h1 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.corner {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  text-decoration: none;
}
.corner:hover { color: var(--ink); }

/* abas em texto: sublinhado indica a ativa, sem caixas */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 14px; }
.tabs button, .tabs a {
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs .is-on { color: var(--ink); border-bottom-color: var(--ink); }

/* ícones de voz: marca-texto atrás do traço */
.vicon { position: relative; display: inline-grid; place-items: center; isolation: isolate; color: var(--ink); }
.vicon::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: -1px;
  height: 55%;
  background: var(--c);
  z-index: -1;
}
.vicon svg { display: block; }

/* realce de texto */
mark.hl, .hl-line {
  background: var(--hl);
  color: var(--ink);
  padding: 0.08em 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* menu de tarefas */
.tmenu {
  position: fixed;
  z-index: 60;
  width: 340px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.tmenu-head {
  padding: 10px 14px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.tmenu ul { margin: 0; padding: 0; list-style: none; max-height: 260px; overflow: auto; }
.tmenu li, .tmenu .new {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
}
.tmenu .dot { flex: none; margin-top: 1px; color: var(--line-strong); }
.tmenu .txt { flex: 1 1 auto; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.tmenu .txt[contenteditable="true"] { outline: none; }
.tmenu .rm {
  flex: none;
  visibility: hidden;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
}
.tmenu li:hover .rm { visibility: visible; }
.tmenu .rm:hover { color: var(--danger); }
.tmenu .new input { flex: 1 1 auto; min-width: 0; border: 0; padding: 0; background: none; line-height: 1.35; }
.tmenu .new input::placeholder { color: var(--faint); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  transform: translate(-50%, 140%);
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* modo "ver no texto" */
body.is-seeing, body.is-seeing * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z' fill='%23ffe14d' stroke='%230b1220' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%230b1220'/%3E%3C/svg%3E") 14 14, zoom-in !important;
}
.see-veil { position: fixed; inset: 0; z-index: 70; background: rgb(11 18 32 / 0.22); }
.see-box {
  position: fixed;
  z-index: 71;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(820px, 94vw);
  height: 90vh;
  background: #fff;
  box-shadow: var(--shadow);
}
.see-box iframe { display: block; width: 100%; height: 100%; border: 0; }

.status { margin: 18px 0 0; color: var(--muted); }

input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #fff;
  padding: 8px 10px;
}

@media (max-width: 860px) {
  .page { padding: 16px 16px 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  .toast { transition: transform 160ms ease, opacity 160ms ease; }
}

.title-row .layer-icon:empty { display: none; }
.tmenu .new input, .tmenu .new input:focus, .tmenu .new input:focus-visible { border: 0; outline: none; box-shadow: none; }
