@import url('/content-style.css?v=20261009-result-colors');
/* Theme tokens. Change these colors to customize the site. */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-soft: #f8f9fc;
  --text: #252b36;
  --muted: #788190;
  --border: #e5e9f1;
  --blue: #2567db;
  --blue-hover: #1855c3;
  --blue-soft: #eaf1fe;
  --danger: #c43b48;
  --shadow: 0 6px 30px #24396c06;
  --sheet-shadow: 0 3px 18px #314c7710;
  --highlight: #fff2a8;
  --highlight-blue: #bfdbfe;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151b26;
  --surface: #1d2532;
  --surface-soft: #232d3c;
  --text: #e3e8f1;
  --muted: #9ba9be;
  --border: #323e50;
  --blue: #77a7ff;
  --blue-hover: #96bcff;
  --blue-soft: #283e60;
  --danger: #ff96a3;
  --shadow: 0 6px 30px #0002;
  --sheet-shadow: 0 3px 18px #0002;
  --highlight: #665516;
  --highlight-blue: #24466d;
}

/* Base elements and accessible focus states. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial,Helvetica,sans-serif;
  font-size: calc(14px * var(--pelison-type-scale, 1));
  -webkit-font-smoothing: antialiased;
}

button,input,select {
  font: inherit;
}

button,a,input,select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button: disabled {
  cursor: wait;
  opacity: .55;
}

button {
  color: inherit;
}

a {
  color: var(--blue);
}

[hidden] {
  display: none!important;
}

svg.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button: focus-visible,a:focus-visible,select:focus-visible {
  outline: 3px solid #80adff;
  outline-offset: 3px;
}

input: focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

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

/* Shared brand, icons and buttons. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--text);
  font-size: calc(27px * var(--pelison-type-scale, 1));
  font-weight: 700;
  letter-spacing: -1.3px;
}

/* Shared opaque app icon: the same monogram as favicon and Apple icon. */
.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: #2567db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-dot {
  color: var(--blue);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
}

.icon-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: calc(13px * var(--pelison-type-scale, 1));
  font-weight: 600;
  min-height: 42px;
  padding: 10px 18px;
  text-decoration: none;
  transition: background .15s;
}

.button-primary {
  background: var(--blue);
  color: #fff;
}

.button-primary:hover {
  background: var(--blue-hover);
}

:root[data-theme="dark"] .button-primary {
  color: #12213b;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface-soft);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.initial-loading {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 12px;
}

.initial-loading .brand-mark {
  position: relative;
  opacity: 1;
  animation: initial-pulse 1.5s ease-in-out infinite;
}

.initial-loading .brand-mark > img { display: block; }

@keyframes initial-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Login and first-time administrator setup. */
.auth-view {
  min-height: 100dvh;
  background: var(--bg);
}

.auth-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 72px 24px;
}

.auth-theme {
  position: absolute;
  right: 24px;
  top: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand {
  justify-content: center;
  margin-bottom: 28px;
  font-size: calc(27px * var(--pelison-type-scale, 1));
}

.auth-brand .brand-mark {
  width: 32px;
  height: 32px;
  font-size: calc(29px * var(--pelison-type-scale, 1));
}

.auth-card h2 {
  font-size: calc(22px * var(--pelison-type-scale, 1));
  font-weight: 600;
  letter-spacing: -.5px;
  margin: 0 0 12px;
}

.auth-description {
  color: var(--muted);
  font-size: calc(12px * var(--pelison-type-scale, 1));
  line-height: 1.6;
  margin: 0 0 24px;
}

.auth-card form { width: 100%; }
.auth-card form > label:first-child { margin-top: 0; }
.auth-card .login-remember { display:flex; align-items:center; gap:8px; margin:14px 0 0; font-size:13px; color:var(--muted); cursor:pointer; }
.auth-card .login-remember[hidden] { display:none; }
.auth-card .login-remember input { width:17px; height:17px; margin:0; accent-color:var(--blue); }

.eyebrow,.sheet-eyebrow {
  font-size: calc(10px * var(--pelison-type-scale, 1));
  letter-spacing: 1.7px;
  font-weight: 700;
}

label {
  display: block;
  font-size: calc(12px * var(--pelison-type-scale, 1));
  font-weight: 600;
  margin: 19px 0 8px;
}

input {
  width: 100%;
  height: 45px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
}

input::placeholder {
  color: #939cac;
  font-size: calc(12px * var(--pelison-type-scale, 1));
}

input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-field .password-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
}

.password-toggle .icon {
  width: 17px;
  height: 17px;
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 25px;
  min-height: 46px;
  font-size: calc(12px * var(--pelison-type-scale, 1));
  padding: 12px 16px;
}


.setup-link {
  display: block;
  text-align: center;
  font-size: calc(11px * var(--pelison-type-scale, 1));
  margin: 20px 0;
}


.form-error {
  font-size: calc(12px * var(--pelison-type-scale, 1));
  color: var(--danger);
  line-height: 1.6;
  margin: 14px 0 0;
  padding: 10px 12px;
  background: color-mix(in srgb,var(--danger) 7%,var(--surface));
  border: 1px solid color-mix(in srgb,var(--danger) 18%,var(--surface));
  border-radius: 7px;
}

/* Notebook header, account menu and note tabs. */
.notebook-view {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  height: 76px;
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 20;
  gap: 24px;
}

.app-header .brand {
  font-size: calc(25px * var(--pelison-type-scale, 1));
}

.app-header .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: calc(29px * var(--pelison-type-scale, 1));
}

.header-divider {
  height: 23px;
  width: 1px;
  background: var(--border);
}

.workspace-label {
  font-size: calc(12px * var(--pelison-type-scale, 1));
  font-weight: 500;
  color: var(--muted);
}

.workspace-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.workspace-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 3px solid transparent;
}

.workspace-nav a[aria-current="page"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.workspace-nav a:hover { color: var(--blue); }

.header-actions > #prescription-history-link { border: 1px solid var(--border); width: 34px; height: 34px; }

@media (max-width: 600px) {
  .notebook-view .app-header { gap: 12px; padding: 0 12px; }
  .notebook-view .app-header .brand > span:last-child { display: none; }
  .workspace-nav { gap: 14px; font-size: calc(12px * var(--pelison-type-scale, 1)); }
  .notebook-view .header-actions { gap: 7px; }
  .header-actions > #prescription-history-link { width: 31px; height: 31px; }
}
@media (max-width: 360px) {
  .notebook-view .app-header { gap: 8px; padding: 0 8px; }
  .workspace-nav { gap: 10px; font-size: calc(11px * var(--pelison-type-scale, 1)); }
  .notebook-view .header-actions { gap: 5px; }
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 19px;
}

.header-actions>#theme-toggle {
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
}

.account-wrap,.note-options-wrap {
  position: relative;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 4px 0;
  font-size: calc(12px * var(--pelison-type-scale, 1));
  font-weight: 500;
}

.account-button>.icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: calc(12px * var(--pelison-type-scale, 1));
  font-weight: 700;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  min-width: 224px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 7px;
  box-shadow: 0 12px 40px #18396a20;
  z-index: 50;
}

.dropdown-menu p {
  margin: 6px 10px 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: calc(10px * var(--pelison-type-scale, 1));
  color: var(--muted);
}

.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 11px 9px;
  border-radius: 6px;
  font-size: calc(12px * var(--pelison-type-scale, 1));
  white-space: nowrap;
}

.dropdown-menu button:hover {
  background: var(--surface-soft);
}

.dropdown-menu .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.dropdown-menu .menu-danger,.dropdown-menu .menu-danger .icon {
  color: var(--danger);
}

.notes-navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 68px;
}

.note-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: thin;
  align-self: stretch;
  padding-bottom: 10px;
  align-items: center;
}

.note-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  max-width: 220px;
  height: 37px;
  padding: 0 17px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: calc(12px * var(--pelison-type-scale, 1));
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.note-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-tab {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.note-tab.is-dragging {
  cursor: grabbing;
  opacity: .6;
  border-color: var(--blue);
}

.note-tabs.is-reordering {
  cursor: grabbing;
}

.note-tab .icon {
  width: 15px;
  height: 15px;
}

.note-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.note-tab[aria-selected="true"] {
  background: var(--blue-soft);
  border-color: color-mix(in srgb,var(--blue) 10%,var(--blue-soft));
  color: var(--blue);
}

.add-note {
  align-self: flex-start;
  height: 37px;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed #bfccdf;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--blue);
  font-size: calc(11px * var(--pelison-type-scale, 1));
  font-weight: 600;
  white-space: nowrap;
}

.add-note:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.add-note .icon {
  width: 15px;
  height: 15px;
}

.editor-toolbar {
  min-height: 61px;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.toolbar-format {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
}

.toolbar-format select {
  background: var(--surface);
  border: 0;
  border-radius: 6px;
  color: var(--text);
  padding: 5px 18px 5px 0;
  min-width: 116px;
  font-size: calc(11px * var(--pelison-type-scale, 1));
  height: 32px;
  cursor: pointer;
}

.toolbar-divider {
  display: block;
  min-width: 1px;
  width: 1px;
  height: 18px;
  margin: 0 9px;
  background: var(--border);
}

.tool-button {
  width: 31px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  flex-shrink: 0;
  color: #6d788a;
}

.tool-button .icon {
  width: 17px;
  height: 17px;
}

.text-tool {
  font-family: Georgia,serif;
  font-size: calc(16px * var(--pelison-type-scale, 1));
}

.tool-button:hover,.tool-button[aria-pressed="true"] {
  background: var(--blue-soft);
  color: var(--blue);
}

.clear-format {
  position: relative;
  font: calc(16px * var(--pelison-type-scale, 1)) Georgia,serif;
}

.clear-format>span {
  font: calc(11px * var(--pelison-type-scale, 1)) Arial;
  position: absolute;
  bottom: -3px;
  right: -7px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.save-status {
  font-size: calc(10px * var(--pelison-type-scale, 1));
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.save-status .icon {
  height: 12px;
  width: 12px;
}

.save-status[data-state="error"] {
  color: var(--danger);
}

.save-status[data-state="saving"] {
  color: var(--blue);
}

.button-save {
  min-height: 32px;
  padding: 5px 10px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: calc(11px * var(--pelison-type-scale, 1));
  border-radius: 6px;
  gap: 6px;
}

.button-save:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
}

.button-save .icon {
  width: 14px;
  height: 14px;
}

.global-error {
  margin: 0;
  padding: 10px 32px;
  background: color-mix(in srgb,var(--danger) 9%,var(--surface));
  color: var(--danger);
  font-size: calc(12px * var(--pelison-type-scale, 1));
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

/* Editor sheet, heading styles and bottom shortcuts. */
.notebook-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 30px 32px 34px;
  scroll-behavior: smooth;
}

.note-sheet {
  position: relative;
  width: 100%;
  max-width: 1130px;
  min-height: calc(100% - 1px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--sheet-shadow);
  display: flex;
  flex-direction: column;
  padding: 37px 48px 0;
}

.sheet-tools {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
}

.sheet-eyebrow {
  font-size: calc(8px * var(--pelison-type-scale, 1));
  letter-spacing: 1.7px;
  color: var(--muted);
}

.note-title-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  margin-top: 9px;
  max-width: 100%;
}

.note-title-button h1 {
  margin: 0;
  font-size: calc(28px * var(--pelison-type-scale, 1));
  line-height: 1.3;
  letter-spacing: -.9px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.note-title-button .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s;
}

.note-title-button:hover .icon,.note-title-button:focus-visible .icon {
  opacity: 1;
}

.note-editor {
  outline: none;
  flex: 1;
  min-height: 240px;
  font-size: calc(15px * var(--pelison-type-scale, 1));
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding-bottom: 50px;
  padding-right: 18px;
  color: var(--text);
}

.note-editor:empty:before {
  content: attr(data-placeholder);
  white-space: pre-line;
  color: var(--muted);
  opacity: .7;
  pointer-events: none;
  line-height: 2;
  font-size: calc(14px * var(--pelison-type-scale, 1));
}

.note-editor p,.note-editor div {
  margin: 0 0 5px;
}

.note-editor h1,.note-editor h2,.note-editor h3 {
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.4px;
  scroll-margin: 30px;
  margin: 16px 0 7px;
  color: var(--text);
}

.note-editor h1 {
  font-size: calc(calc(26px * var(--pelison-type-scale, 1)) - calc(2pt * var(--pelison-type-scale, 1)));
}

.note-editor h2 {
  font-size: calc(calc(21px * var(--pelison-type-scale, 1)) - calc(2pt * var(--pelison-type-scale, 1)));
}

.note-editor h3 {
  font-size: calc(calc(18px * var(--pelison-type-scale, 1)) - calc(2pt * var(--pelison-type-scale, 1)));
}

.note-editor>:first-child {
  margin-top: 0;
}

.note-editor ul,.note-editor ol {
  padding-left: 25px;
  margin: 10px 0 20px;
}

.note-editor li {
  padding-left: 5px;
}

.note-editor li p {
  margin-bottom: 5px;
}

.note-editor a {
  color: var(--blue);
  text-decoration-color: color-mix(in srgb,var(--blue) 50%,var(--surface));
  text-underline-offset: 3px;
}

.note-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 18px 0;
}

.note-editor mark {
  background: var(--highlight);
  color: inherit;
  border-radius: 2px;
}

/* Blue marks use a sanitizer-safe inline color, with a readable dark variant. */
.note-editor mark[style*="rgb(191, 219, 254)"],
.note-editor mark[style*="#bfdbfe"] {
  background-color: var(--highlight-blue) !important;
}

.highlight-yellow .icon { color: #ba8d00; }
.highlight-blue .icon { color: var(--blue); }

.note-editor blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 17px;
  color: var(--muted);
  margin-left: 0;
}

.sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  min-height: 47px;
  color: var(--muted);
  font-size: calc(9px * var(--pelison-type-scale, 1));
}

.editor-tip {
  display: flex;
  align-items: center;
  gap: 4px;
}

.editor-tip kbd {
  font-family: inherit;
  padding: 2px 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.headings-footer {
  display: flex;
  align-items: center;
  gap: 23px;
  padding: 13px 32px calc(13px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  min-height: 59px;
  box-shadow: 0 -4px 25px #213d5e03;
}

.headings-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: calc(8px * var(--pelison-type-scale, 1));
  font-weight: 700;
  letter-spacing: 1.3px;
  white-space: nowrap;
}

.headings-label .icon {
  width: 16px;
  height: 16px;
}

.heading-links {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
}

.heading-button {
  padding: 7px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: calc(10px * var(--pelison-type-scale, 1));
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.heading-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.heading-button[data-level="2"] {
  padding-left: 10px;
}

.no-headings {
  font-size: calc(10px * var(--pelison-type-scale, 1));
  color: var(--muted);
  opacity: .8;
}

.empty-state {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 35px 0 70px;
}

.empty-icon {
  position: relative;
  width: 72px;
  height: 78px;
  border: 1px solid #d4e2fb;
  border-radius: 21px;
  background: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 33px;
  color: var(--blue);
  transform: rotate(-5deg);
}

.empty-icon .icon {
  width: 33px;
  height: 33px;
  stroke-width: 1.3;
}

.empty-icon>span {
  position: absolute;
  bottom: -7px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: calc(22px * var(--pelison-type-scale, 1));
  line-height: 25px;
  border: 3px solid var(--bg);
}

.empty-state .eyebrow {
  color: var(--blue);
  font-size: calc(8px * var(--pelison-type-scale, 1));
  letter-spacing: 1.4px;
}

.empty-state h1 {
  font-size: calc(27px * var(--pelison-type-scale, 1));
  line-height: 1.3;
  letter-spacing: -.8px;
  font-weight: 600;
  margin: 16px 0 10px;
}

.empty-state p {
  font-size: calc(13px * var(--pelison-type-scale, 1));
  line-height: 1.8;
  color: var(--muted);
  max-width: 370px;
  margin: 0 0 27px;
}

.empty-state .button {
  font-size: calc(12px * var(--pelison-type-scale, 1));
}

.empty-hint {
  font-size: calc(10px * var(--pelison-type-scale, 1));
  color: var(--muted);
  margin-top: 22px;
}

/* Native dialogs, administrator forms and notifications. */
.modal {
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 24px 100px #081b4240;
  padding: 28px;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: var(--surface);
  color: var(--text);
}

.modal::backdrop {
  background: #10234466;
  backdrop-filter: blur(4px);
}

.site-search-dialog {
  position: fixed !important;
  top: 40px !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;

  margin: 0 !important;
  transform: translateX(-50%) !important;

  width: calc(100% - 32px);
  max-width: 440px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.dialog-heading h2 {
  font-size: calc(20px * var(--pelison-type-scale, 1));
  font-weight: 600;
  letter-spacing: -.5px;
  margin: 0;
  line-height: 1.4;
}

.dialog-heading .icon-button {
  width: 30px;
  height: 30px;
  margin: -4px -4px 0 0;
}

.dialog-heading .sheet-eyebrow {
  display: block;
  margin-bottom: 7px;
}

.dialog-description {
  font-size: calc(12px * var(--pelison-type-scale, 1));
  color: var(--muted);
  line-height: 1.75;
  margin: 12px 0 18px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 26px;
}

.dialog-actions .button {
  font-size: calc(12px * var(--pelison-type-scale, 1));
  min-height: 39px;
  padding: 9px 14px;
}

.modal-wide {
  max-width: 630px;
  padding: 30px;
}

.users-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 9px;
  margin: 20px 0;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.user-row:last-child {
  border: 0;
}

.user-details {
  min-width: 0;
  flex: 1;
}

.user-details strong {
  display: block;
  font-size: calc(12px * var(--pelison-type-scale, 1));
  font-weight: 600;
  overflow-wrap: anywhere;
}

.user-details small {
  display: block;
  font-size: calc(10px * var(--pelison-type-scale, 1));
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.user-row .user-state {
  font-size: calc(9px * var(--pelison-type-scale, 1));
  color: var(--blue);
  padding: 4px 6px;
  background: var(--blue-soft);
  border-radius: 4px;
}

.user-row .user-state.inactive {
  color: var(--muted);
  background: var(--surface-soft);
}

.user-controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-controls button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
  padding: 7px 8px;
  font-size: calc(9px * var(--pelison-type-scale, 1));
}

.user-controls button:hover {
  background: var(--surface-soft);
}

.user-create-form {
  padding-top: 5px;
}

.user-create-form h3 {
  font-size: calc(15px * var(--pelison-type-scale, 1));
  font-weight: 600;
  margin: 12px 0 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid small {
  display: block;
  color: var(--muted);
  font-size: calc(9px * var(--pelison-type-scale, 1));
  line-height: 1.5;
  margin-top: 7px;
}

.conflict-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 25px;
}

.conflict-actions .button {
  font-size: calc(12px * var(--pelison-type-scale, 1));
}

.toast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 30px #15295325;
  background: var(--text);
  color: var(--surface);
  font-size: calc(12px * var(--pelison-type-scale, 1));
  z-index: 100;
  text-align: center;
}

/* Responsive adjustments: wide screens, tablets and phones. */
@media(min-width:1500px) {
  .notebook-main {
    padding-top: 36px;
  }
  .note-sheet {
    padding: 43px 62px 0;
  }
}

@media(max-width:1100px) {
  .editor-toolbar {
    padding-left: 24px;
    padding-right: 24px;
    gap: 8px;
  }
  .toolbar-divider {
    margin: 0 5px;
  }
  .toolbar-actions {
    gap: 9px;
  }
  .save-status {
    max-width: 120px;
    overflow: hidden;
  }
  .notebook-main {
    padding: 24px;
  }
  .app-header,.notes-navigation,.headings-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .note-sheet {
    padding: 32px 34px 0;
  }
}

@media(max-width:850px) {
  .toolbar-format {
    flex: 1;
  }
  .toolbar-actions .save-status {
    display: none;
  }
  .toolbar-divider {
    margin: 0 5px;
  }
  .tool-button {
    width: 30px;
  }
  .sheet-footer #last-saved {
    display: none;
  }
}

@media(max-width:600px) {
  .app-header {
    height: 64px;
    min-height: 64px;
    padding: 0 16px;
    gap: 14px;
  }
  .app-header .brand {
    font-size: calc(23px * var(--pelison-type-scale, 1));
    gap: 8px;
  }
  .app-header .brand-mark {
    width: 29px;
    height: 29px;
    font-size: calc(27px * var(--pelison-type-scale, 1));
    border-radius: 8px;
  }
  .workspace-label,.header-divider {
    display: none;
  }
  .header-actions {
    gap: 12px;
  }
  .account-button {
    gap: 6px;
  }
  .account-button #user-name {
    display: none;
  }
  .account-button>.icon {
    width: 12px;
  }
  .avatar {
    width: 30px;
    height: 30px;
  }
  .header-actions>#theme-toggle {
    width: 31px;
    height: 31px;
  }
  .header-actions>#theme-toggle .icon {
    width: 16px;
    height: 16px;
  }
  .notes-navigation {
    padding: 12px 16px 0;
    gap: 8px;
    min-height: 60px;
  }
  .note-tab {
    height: 34px;
    padding: 0 12px;
    font-size: calc(11px * var(--pelison-type-scale, 1));
    gap: 6px;
    max-width: 170px;
  }
  .note-tab .icon {
    width: 13px;
  }
  .add-note {
    width: 35px;
    height: 34px;
    padding: 0;
  }
  .add-note span {
    display: none;
  }
  .editor-toolbar {
    min-height: 53px;
    padding: 9px 12px;
    gap: 9px;
  }
  .toolbar-format select {
    min-width: 98px;
    width: 98px;
    font-size: calc(10px * var(--pelison-type-scale, 1));
    padding-right: 0;
  }
  .tool-button {
    height: 30px;
    width: 30px;
  }
  .toolbar-divider {
    margin: 0 4px;
  }
  .toolbar-actions {
    border-left: 1px solid var(--border);
    padding-left: 8px;
  }
  .button-save {
    width: 31px;
    height: 31px;
    padding: 0;
    border: none;
    color: var(--blue);
  }
  .button-save span {
    display: none;
  }
  .button-save .icon {
    width: 17px;
    height: 17px;
  }
  .notebook-main {
    padding: 15px 12px 20px;
  }
  .note-sheet {
    border-radius: 10px;
    padding: 26px 22px 0;
    box-shadow: 0 2px 10px #15295306;
  }
  .sheet-tools {
    top: 8px;
    right: 8px;
  }
  .sheet-eyebrow {
    font-size: calc(7px * var(--pelison-type-scale, 1));
    letter-spacing: 1.3px;
  }
  .note-title-button h1 {
    font-size: calc(23px * var(--pelison-type-scale, 1));
    letter-spacing: -.5px;
  }
  .note-title-button .icon {
    display: none;
  }
  .sheet-tools>.note-options-wrap>.icon-button {
    width: 27px;
    height: 27px;
  }
  .note-editor {
    font-size: calc(14px * var(--pelison-type-scale, 1));
    line-height: 1.45;
    padding-bottom: 40px;
    min-height: 230px;
  }
  .note-editor:empty:before {
    font-size: calc(12px * var(--pelison-type-scale, 1));
    line-height: 2;
  }
  .note-editor h1 {
    font-size: calc(calc(23px * var(--pelison-type-scale, 1)) - calc(2pt * var(--pelison-type-scale, 1)));
  }
  .note-editor h2 {
    font-size: calc(calc(20px * var(--pelison-type-scale, 1)) - calc(2pt * var(--pelison-type-scale, 1)));
  }
  .note-editor h3 {
    font-size: calc(calc(17px * var(--pelison-type-scale, 1)) - calc(2pt * var(--pelison-type-scale, 1)));
  }
  .sheet-footer {
    font-size: calc(8px * var(--pelison-type-scale, 1));
    min-height: 42px;
    gap: 8px;
  }
  .headings-footer {
    min-height: 53px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    gap: 12px;
  }
  .headings-label span {
    display: none;
  }
  .headings-label .icon {
    width: 15px;
    height: 15px;
  }
  .heading-button {
    font-size: calc(9px * var(--pelison-type-scale, 1));
    padding: 7px 10px;
    max-width: 200px;
  }
  .no-headings {
    font-size: calc(9px * var(--pelison-type-scale, 1));
  }
  .global-error {
    padding: 9px 16px;
    font-size: calc(11px * var(--pelison-type-scale, 1));
  }
  .empty-state {
    padding: 25px 15px 60px;
  }
  .empty-state .eyebrow {
    font-size: calc(7px * var(--pelison-type-scale, 1));
    line-height: 1.6;
    max-width: 230px;
  }
  .empty-state h1 {
    font-size: calc(23px * var(--pelison-type-scale, 1));
    max-width: 290px;
  }
  .empty-state p {
    font-size: calc(12px * var(--pelison-type-scale, 1));
  }
  .empty-icon {
    width: 63px;
    height: 68px;
    margin-bottom: 30px;
  }
  .modal {
    padding: 23px;
    max-height: calc(100dvh - 32px);
  }
  .modal-wide {
    padding: 23px;
  }
  .dialog-heading h2 {
    font-size: calc(18px * var(--pelison-type-scale, 1));
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .user-row {
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }
  .user-controls {
    width: 100%;
    padding-left: 42px;
    justify-content: flex-start;
  }
  .user-controls button {
    font-size: calc(10px * var(--pelison-type-scale, 1));
  }
  .toast {
    bottom: 68px;
    width: max-content;
  }
  .dialog-actions .button {
    font-size: calc(11px * var(--pelison-type-scale, 1));
  }
}

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

.reauth-button {
  padding:  0;
  border:  0;
  background:  transparent;
  color:  inherit;
  font-size:  inherit;
  text-decoration:  underline;
  text-underline-offset:  3px;
  font-weight:  600;
}

/* Keep the entry screen compact on phones and on-screen keyboards. */
@media (max-width: 600px) {
  .auth-side { padding: 72px 18px 32px; }
  .auth-card { padding: 28px 24px; }
  .auth-theme { top: 18px; right: 18px; }
}

.site-search-tags { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; flex-shrink:0; max-width:45%; }
.note-editor .note-hash-highlight { background:var(--highlight-blue); border-radius:4px; padding:3px 7px; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
#note-case { width:52px; }

/* Desktop reading scale. Fixed icon geometry, navigation and printed documents
   keep their current dimensions. All screen CSS font sizes share this token. */
:root{--pelison-type-scale:1;}
@media screen and (min-width:1100px) and (hover:hover) and (pointer:fine){
 :root{--pelison-type-scale:1.08;--content-leading:1.7;}
 body{line-height:1.5;}
}
.rx-topbar,.rx-main-nav,.workspace-header,.workspace-nav,.workspace-brand,.brand,.app-header,.topbar,.site-header{--pelison-type-scale:1;}
@media print{:root,body{--pelison-type-scale:1;}}

/* Ficha farmacológica: mesmos componentes e tokens do Guidebook. */
.md-tabs{display:flex;gap:.3rem;margin:.8rem 0}.md-tabs [role=tab]{flex:1;background:transparent;border:1px solid var(--border-color,#475569);border-radius:.5rem;padding:.55rem;color:inherit;font:inherit;cursor:pointer}.md-tabs [aria-selected=true]{background:var(--primary,#2563eb);color:#fff}.md-area[hidden]{display:none}.md-fragment+.md-fragment{border-top:1px solid var(--border-color,#475569);margin-top:.7rem;padding-top:.6rem}.md-fragment h4{font-size:1em;margin:.35rem 0}.md-source-context{font-size:.82em;opacity:.75;overflow-wrap:anywhere}.md-brands{line-height:1.8}.md-editor-field{display:flex;flex-direction:column;gap:.25rem;margin:.4rem 0}.md-editor-field input,.md-editor-field select,.md-editor-field textarea{width:100%;min-width:0;font:inherit;color:inherit;background:var(--input-bg,var(--surface,#1e293b));border:1px solid var(--border-color,#475569);border-radius:.4rem;padding:.45rem}.md-editor-row+.md-editor-row{border-top:1px solid var(--border-color,#475569);padding-top:.6rem;margin-top:.6rem}.md-reader .gr-search>input{min-width:0;flex:1}.md-reader .gr-search{display:flex}.md-reader .gr-category-body{overflow-wrap:anywhere}@media(max-width:600px){.md-tabs [role=tab]{padding:.45rem .2rem}.md-source-context{font-size:.8em}}
.md-area{display:grid;gap:.55rem}.md-reader .gw-content-tabs{padding-bottom:.55rem}.md-reader .gw-content-tabs:empty{display:none}

/* Content loading uses the same P. and pulse as initial page loading. */
.content-loading { min-height:30vh; width:100%; margin:0; }
.initial-loading[hidden] { display:none!important; }
@media(prefers-reduced-motion:reduce){.initial-loading .brand-mark{opacity:1;animation:none;}}
