@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Libre+Caslon+Display&display=swap');

:root {
  --bg: #f8faf8;
  --panel: #ffffff;
  --ink: #16291e;
  --muted: #5e7367;
  --line: #dbe6df;
  --blue: #e3f2e7;
  --accent: #238554;
  --deep: #18653f;
  --soft: #edf6f1;
  --shadow: 0 12px 36px rgba(24, 101, 63, 0.06);
  color-scheme: light;
}

body.dark {
  --bg: #0a0a0a;
  --panel: #141414;
  --ink: #f5f5f5;
  --muted: #a3a3a3;
  --line: #262626;
  --blue: #142a1b;
  --accent: #22c55e;
  --deep: #16a34a;
  --soft: #1a1a1a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 'DM Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  overflow-x: hidden;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sidebar Backdrop para Mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 18, 0.5);
  backdrop-filter: blur(2px);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar */
aside {
  width: 256px;
  background: var(--panel);
  height: 100dvh;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.sidebartop {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
}

.brandlogo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.dark .brandlogo {
  filter: drop-shadow(0 0 2px rgba(34, 197, 94, 0.45));
}

.brandmark {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
  color: var(--deep);
  position: relative;
}

.brandmark span {
  font-size: 14px;
  position: absolute;
  top: -4px;
  right: -6px;
}

.brandname small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.navlabel {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 36px 10px 14px;
  font-weight: 600;
}

nav {
  display: grid;
  gap: 5px;
}

nav a {
  padding: 11px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.navicon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

nav a.active {
  background: var(--blue);
  color: var(--deep);
  font-weight: 600;
}

nav a:hover:not(.active) {
  background: var(--soft);
  color: var(--ink);
}

.sidebottom {
  margin-top: auto;
  padding-top: 20px;
}

.smallnote {
  font-family: Georgia, serif;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 10px 0;
  border-top: 1px solid var(--line);
}

/* Layout Shell */
.shell {
  margin-left: 256px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb span {
  margin: 0 10px;
  color: #b4c7bb;
}

.breadcrumb b {
  color: var(--ink);
  font-weight: 600;
}

.headerend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.statusdot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

.header-status-text {
  margin-right: 6px;
  font-size: 11px;
}

.icon {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  padding: 0;
}

.icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--soft);
}

.mobile {
  display: none;
}

/* Main Content */
main {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 36px 60px;
  flex: 1;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: var(--accent);
  text-transform: uppercase;
}

.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 24px;
  gap: 20px;
}

h1 {
  font: 36px 'Libre Caslon Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin: 8px 0 6px;
  color: var(--ink);
}

h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

p {
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.pagehead p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Hero Banner */
.hero {
  min-height: 290px;
  background: var(--blue);
  border: 1px solid #cce4d4;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  margin-bottom: 24px;
}

.hero-copy {
  width: 62%;
  padding: 36px 38px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h2 {
  font: 38px 'Libre Caslon Display', Georgia, serif;
  line-height: 1.15;
  max-width: 480px;
  margin: 12px 0 10px;
  color: var(--ink);
}

.hero p {
  max-width: 420px;
  font-size: 12px;
  color: var(--deep);
  line-height: 1.65;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-photo {
  position: absolute;
  right: 0;
  top: 0;
  width: 38%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  mix-blend-mode: multiply;
}

.dark .hero-photo {
  mix-blend-mode: normal;
  mask-image: linear-gradient(to right, transparent, #000 25%);
}

.hero-signature {
  position: absolute;
  bottom: 18px;
  right: 20px;
  font-size: 10px;
  color: var(--deep);
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 500;
}

.dark .hero {
  background: #141414;
  border-color: #262626;
}

.dark .hero-signature {
  background: rgba(14, 14, 14, 0.95);
  color: var(--accent);
  border-color: #262626;
}

.dark .stat, .dark .specialty, .dark .record, .dark .guidebox, .dark .flowpanel, .dark .searchbox {
  box-shadow: none;
}

.dark .other-match-box {
  background: #102417;
  border-color: #22c55e;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--deep);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:hover {
  opacity: 0.92;
}

.btn.secondary {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--soft);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Estatísticas */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.stat-symbol {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 20px;
  flex-shrink: 0;
}

.stat strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
}

.stat small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

/* Barra de Pesquisa */
.searchbar {
  margin-bottom: 24px;
}

.searchbox {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  padding: 6px 10px 6px 14px;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.searchbox:focus-within {
  border-color: var(--accent);
}

.search-icon {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.searchbox input {
  border: none;
  background: none;
  color: var(--ink);
  height: 34px;
  flex: 1;
  min-width: 0;
  outline: none;
  font-size: 13px;
}

.search-clear {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.search-clear:hover {
  color: var(--ink);
}

.search-btn {
  padding: 8px 16px;
  font-size: 11px;
  flex-shrink: 0;
}

/* Grade Home */
.homegrid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 24px;
  margin-bottom: 30px;
}

.sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 16px;
}

.sectionhead p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.textlink {
  font-size: 12px;
  color: var(--deep);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

.textlink:hover {
  text-decoration: underline;
}

.specialties {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.specialty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  min-height: 110px;
  transition: transform 0.2s, border 0.2s;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.specialty:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.specialty .glyph {
  color: var(--accent);
  font-size: 22px;
  display: block;
  margin-bottom: 12px;
}

.specialty b {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.specialty small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

/* Guia Box */
.guidebox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.guidebox h3 {
  font: 24px 'Libre Caslon Display', Georgia, serif;
  margin: 8px 0 10px;
}

.stepsmini {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.stepsmini div {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}

.stepsmini i {
  font-style: normal;
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* Filtros */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}

.filters select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 12px;
  min-width: 170px;
  outline: none;
  cursor: pointer;
}

.filters select:focus {
  border-color: var(--accent);
}

/* Barra de Resultados */
.resultsbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin: 20px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* Grade de Cards */
.records {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.record {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 20px;
  position: relative;
  transition: transform 0.2s, border 0.2s;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.record:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.record .tag {
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: block;
  padding-right: 28px;
  margin-bottom: 10px;
}

.record h3 {
  font-size: 14px;
  min-height: 38px;
  color: var(--ink);
}

.record p {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
  margin: 8px 0 12px;
}

.record .meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.badge-done {
  color: var(--accent);
  font-weight: 600;
}

.favorite {
  position: absolute;
  right: 14px;
  top: 14px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.record .card-btn {
  width: 100%;
  background: var(--soft);
  color: var(--deep);
  font-size: 11px;
}

.record .card-btn:hover {
  background: var(--blue);
}

/* Empty State & Cross Search */
.empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--panel);
}

.other-match-box {
  background: var(--soft);
  border: 1px solid #c2e2cc;
  border-radius: 8px;
  padding: 20px;
  max-width: 480px;
  margin: 20px auto 0;
  color: var(--ink);
}

.other-match-box p {
  margin: 0 0 14px;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin: 32px 0 12px;
}

.page-indicator {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Notice */
.notice {
  font-size: 11px;
  color: var(--muted);
  border-left: 3px solid #7ec498;
  padding: 12px 18px;
  background: var(--soft);
  line-height: 1.65;
  margin-top: 24px;
  border-radius: 0 8px 8px 0;
}

/* Modal Leitor / Dialog */
dialog {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(1000px, 94vw);
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 20px 80px rgba(10, 25, 18, 0.25);
  overflow-y: auto;
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(10, 25, 18, 0.6);
  backdrop-filter: blur(4px);
}

.readerhead {
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 5;
}

.readerhead h2 {
  margin-top: 4px;
  font-size: 20px;
}

.readerbody {
  padding: 24px 28px;
}

.readertools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.readergrid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  margin-top: 20px;
}

.source-text {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.source-text h3 {
  margin: 22px 0 10px;
  color: var(--deep);
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

.source-text p {
  margin: 0 0 10px;
}

.readeraside {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.aside-block {
  font-size: 12px;
}

.aside-detail-item {
  margin: 10px 0;
}

.aside-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.readeraside label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 600;
}

.readeraside textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 12px;
  border-radius: 8px;
  resize: vertical;
  outline: none;
}

.readeraside textarea:focus {
  border-color: var(--accent);
}

/* Roteiro Guiado */
.flowlayout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.flowsteps {
  display: grid;
  align-content: start;
  gap: 10px;
}

.flowsteps button {
  padding: 16px 18px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.flowsteps button span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.flowsteps .active {
  background: var(--blue);
  border-color: var(--accent);
  color: var(--deep);
}

.flowpanel {
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.flowpanel h2 {
  font: 28px 'Libre Caslon Display', Georgia, serif;
  margin: 10px 0 12px;
}

.flowpanel p {
  color: var(--muted);
  font-size: 13px;
}

.flow-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.checklist {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0;
  font-size: 12px;
  cursor: pointer;
}

.check-item input[type=checkbox] {
  margin-top: 3px;
  accent-color: var(--deep);
  cursor: pointer;
}

.field {
  margin: 20px 0;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.flowbottom {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* Meu Estudo */
.progress-container {
  background: var(--line);
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0 28px;
}

.progress-bar {
  background: var(--accent);
  height: 100%;
  transition: width 0.3s ease;
}

.notes-grid {
  display: grid;
  gap: 12px;
}

.studyitem {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.studyitem:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.studyitem-text {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.studyitem-arrow {
  font-size: 16px;
  color: var(--accent);
  margin-left: 14px;
}

/* Sobre */
.about {
  max-width: 800px;
  line-height: 1.8;
}

.about h2 {
  margin-top: 32px;
  font-size: 18px;
}

.about p, .about ul {
  color: var(--muted);
  font-size: 13px;
}

.about ul {
  padding-left: 20px;
}

.about li {
  margin-bottom: 8px;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 999;
  display: none;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Rodapé */
footer {
  padding: 24px 36px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  display: flex;
  gap: 20px;
  color: var(--muted);
  background: var(--panel);
  align-items: center;
}

footer a {
  margin-left: auto;
  color: var(--deep);
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVIDADE */

/* Tablets / Telas médias (768px a 1150px) */
@media (max-width: 1150px) {
  aside {
    width: 220px;
    padding: 22px 14px;
  }
  .shell {
    margin-left: 220px;
  }
  main {
    padding: 26px;
  }
  .homegrid {
    grid-template-columns: 1fr;
  }
  .guidebox {
    display: none;
  }
  .records {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  aside {
    transform: translateX(-100%);
    width: 260px;
    box-shadow: none;
  }

  aside.open {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35);
  }

  .shell {
    margin-left: 0;
  }

  .mobile {
    display: inline-flex;
    margin-right: 12px;
    flex-shrink: 0;
  }

  header {
    height: 60px;
    padding: 0 18px;
  }

  .header-status-text, .statusdot {
    display: none;
  }

  .headerend {
    margin-left: auto;
    gap: 6px;
  }

  .breadcrumb {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .breadcrumb span {
    margin: 0 6px;
  }

  main {
    padding: 20px 16px 40px;
  }

  h1 {
    font-size: 28px;
  }

  .hero {
    min-height: auto;
    flex-direction: column;
  }

  .hero-copy {
    width: 100%;
    padding: 24px 20px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero-photo {
    position: relative;
    width: 100%;
    height: 220px;
    object-position: center 20%;
    mask-image: linear-gradient(to bottom, #000 60%, transparent);
  }

  .hero-signature {
    bottom: auto;
    top: 14px;
    right: 14px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat {
    padding: 14px;
    gap: 10px;
  }

  .stat-symbol {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .stat strong {
    font-size: 18px;
  }

  .specialties {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .records {
    grid-template-columns: 1fr;
  }

  .filters {
    gap: 8px;
  }

  .filters select {
    flex: 1 1 140px;
    min-width: 130px;
  }

  .readergrid {
    grid-template-columns: 1fr;
  }

  .readeraside {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 20px;
  }

  .flowlayout {
    grid-template-columns: 1fr;
  }

  .flowsteps {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .flowsteps button {
    padding: 10px 4px;
    font-size: 11px;
    flex-direction: column;
    text-align: center;
    gap: 2px;
  }

  .flowpanel {
    padding: 20px;
  }

  footer {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  footer a {
    margin-left: 0;
  }
}
