:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #263e30;
  background: #f6f7f1;
  font-synthesis: none;
  --green: #254d37;
  --muted: #69766a;
  --line: #dce3d7;
  --soft: #e8eedc;
  --white: #fff;
  --orange: #93632b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 16px;
  color: var(--green);
  background: #fff;
  font-weight: 600;
}
button:hover {
  background: #eef3e5;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #376448;
}
.danger {
  color: #913e31;
}
.quiet {
  background: transparent;
}
.small {
  font-size: 13px;
  padding: 7px 10px;
}
a {
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  font-weight: 650;
  line-height: 1.2;
}
h2 {
  font-size: 21px;
  font-weight: 650;
}
h3 {
  font-size: 16px;
  line-height: 1.5;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 12px;
}
.brand {
  font-size: 29px;
  font-family: Georgia, serif;
  font-weight: bold;
  letter-spacing: 3px;
  line-height: 1.15;
}
.brand span {
  display: block;
  font: 10px system-ui;
  letter-spacing: 2px;
  margin-top: 10px;
}
.layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 32px 20px;
  background: #edf1e6;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 0 14px;
  margin-bottom: 36px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav button {
  text-align: left;
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 14px;
}
.nav button.active {
  background: var(--green);
  color: white;
}
.nav .divider {
  margin: 16px 14px 7px;
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar footer {
  margin-top: auto;
  padding: 22px 12px 0;
  font-size: 12px;
}
.sidebar footer p {
  margin: 8px 0;
}
.main {
  padding: 28px 42px 60px;
  max-width: 1500px;
  width: 100%;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 38px;
}
.search {
  max-width: 440px;
  width: 100%;
  position: relative;
}
.search input {
  background: #fff;
  border: 1px solid var(--line);
  padding: 11px 14px;
  border-radius: 9px;
  width: 100%;
  font-size: 13px;
}
.avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 13px;
}
.avatar b {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: #e1e9d4;
  border-radius: 50%;
  font-size: 12px;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.heading p {
  margin-bottom: 0;
}
.hero {
  background: var(--green);
  color: white;
  border-radius: 18px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 25px;
  margin-bottom: 28px;
  overflow: hidden;
}
.hero .eyebrow {
  color: #c2d3b6;
}
.hero h2 {
  font:
    35px/1.2 Georgia,
    serif;
  max-width: 420px;
  margin-bottom: 16px;
}
.hero p {
  max-width: 430px;
  color: #dce6d5;
  font-size: 14px;
  margin-bottom: 0;
}
.hero-side {
  border-left: 1px solid #ffffff30;
  padding-left: 30px;
  align-content: center;
}
.hero-side strong {
  font-size: 46px;
  font-weight: 450;
}
.hero-side p {
  margin-top: 6px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 23px;
  min-width: 0;
}
.card .eyebrow {
  font-size: 10px;
  margin-bottom: 14px;
}
.card p {
  font-size: 14px;
  color: var(--muted);
}
.card h3 {
  margin-bottom: 12px;
}
.card button {
  margin-top: 8px;
}
.tag {
  display: inline-block;
  padding: 4px 8px;
  background: var(--soft);
  color: var(--green);
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
}
.tag.warm {
  background: #f6ebd9;
  color: #885c23;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 16px;
}
.section-heading h2 {
  margin: 0;
}
.empty {
  padding: 40px 24px;
  border: 1px dashed #cbd4c3;
  border-radius: 12px;
  text-align: center;
  background: #fcfdf9;
  color: var(--muted);
}
.empty p {
  max-width: 460px;
  margin: 10px auto 0;
  font-size: 14px;
}
.catalog {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
}
.tree {
  align-self: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.tree button {
  display: block;
  text-align: left;
  border: 0;
  width: 100%;
  font-size: 12px;
  padding: 10px 8px;
}
.tree details {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}
.tree summary {
  cursor: pointer;
  padding: 9px 0;
  font-size: 12px;
}
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.item h3 {
  margin-bottom: 5px;
}
.item p {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--muted);
}
.item button {
  flex-shrink: 0;
}
.prose {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.document-dialog,
.upload-dialog {
  max-width: 1240px;
}
.upload-dialog .dialog-foot {
  flex-wrap: wrap;
}
.document-dialog[open] {
  display: flex;
  flex-direction: column;
  height: 90vh;
  height: 90dvh;
  overflow: hidden;
}
.document-dialog .dialog-head {
  flex: 0 0 auto;
}
.document-dialog .dialog-body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.reader-meta {
  padding: 16px 24px;
  flex-shrink: 0;
}
#document-reader {
  min-height: 0;
  flex: 1;
}
.reader-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.reader-index {
  background: #f5f7ef;
  padding: 14px 10px 16px 14px;
  border-right: 1px solid var(--line);
  overflow: auto;
  min-height: 0;
}
.reader-index > summary {
  cursor: pointer;
  padding: 8px 6px 14px;
  font-weight: 700;
}
.reader-index > summary span {
  font-size: 11px;
  font-weight: 400;
  margin-left: 12px;
  color: var(--muted);
}
.reader-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reader-index ul ul {
  margin-left: 13px;
  padding-left: 9px;
  border-left: 1px solid #d4ddcc;
}
.reader-index [hidden] {
  display: none;
}
.reader-node {
  display: flex;
  align-items: flex-start;
}
.reader-index button {
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.reader-node > [data-reader-target] {
  min-width: 0;
  flex: 1;
  padding: 9px 6px;
  overflow-wrap: anywhere;
}
.reader-index button:hover {
  background: #e6eddc;
}
.reader-index button[aria-current] {
  background: #dfebd4;
  color: #183e2d;
}
.reader-toggle,
.reader-leaf {
  width: 25px;
  flex-shrink: 0;
  text-align: center !important;
  padding: 7px 0 !important;
  font-size: 19px !important;
}
.reader-toggle[aria-expanded="true"] {
  transform: rotate(90deg);
}
.reader-start {
  width: 100%;
  padding: 8px;
}
.reader-tree-tools {
  display: flex;
  gap: 5px;
  margin: 4px 0 10px;
}
.reader-tree-tools button {
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
}
.reader-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  min-width: 0;
  min-height: 0;
  padding: 24px 36px 40px;
}
.reader-prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.reader-prose p {
  margin: 0 0 16px;
}
.reader-prose h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 20px;
}
.reader-prose h2 {
  font-size: 23px;
  line-height: 1.4;
  margin: 30px 0 14px;
}
.reader-prose h3 {
  font-size: 18px;
  margin: 22px 0 10px;
}
.reader-prose h4,
.reader-prose h5,
.reader-prose h6 {
  font-size: 16px;
  margin: 18px 0 8px;
}
.reader-prose ul,
.reader-prose ol {
  padding-left: 25px;
  margin: 12px 0 20px;
}
.reader-prose li {
  margin: 5px 0;
}
.reader-prose li > p {
  margin: 0;
}
.reader-prose li ul,
.reader-prose li ol {
  margin: 6px 0;
}
.reader-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.reader-prose blockquote {
  border-left: 3px solid #7e9667;
  background: #f1f5e9;
  margin: 18px 0;
  padding: 14px 18px;
}
.reader-prose blockquote > :last-child {
  margin-bottom: 0;
}
.reader-prose pre {
  overflow: auto;
  white-space: pre;
  background: #f1f4ed;
  border-radius: 8px;
  padding: 16px;
}
.reader-prose code {
  font:
    13px/1.7 ui-monospace,
    monospace;
  background: #f1f4ed;
  padding: 2px 4px;
}
.reader-prose pre code {
  padding: 0;
}
.reader-table {
  overflow: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.reader-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.reader-table th,
.reader-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  min-width: 110px;
}
.reader-table .align-left {
  text-align: left;
}
.reader-table .align-center {
  text-align: center;
}
.reader-table .align-right {
  text-align: right;
}
.reader-image-note {
  color: var(--muted);
  font-size: 13px;
}
.reader-foot {
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
}
.reader-foot small {
  overflow-wrap: anywhere;
}
.reader-foot button {
  flex-shrink: 0;
}
.import-info {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin: 16px 0;
  background: #f8faf3;
}
.import-info p {
  margin: 8px 0;
  font-size: 13px;
}
#import-options {
  margin: 20px 0;
}
#import-options > summary {
  cursor: pointer;
  margin-bottom: 14px;
}
#import-preview {
  height: 540px;
  margin-top: 24px;
}
@media (max-width: 760px) {
  .document-dialog[open] {
    width: calc(100% - 16px);
    max-height: 94vh;
    max-height: 94dvh;
    height: 94vh;
    height: 94dvh;
  }
  .document-dialog .dialog-head {
    padding: 14px 16px;
  }
  .document-dialog .dialog-head h2 {
    font-size: 17px;
  }
  .reader-meta {
    padding: 10px 16px;
    gap: 7px;
  }
  .reader-meta small {
    font-size: 10px;
  }
  .reader-layout {
    display: flex;
    flex-direction: column;
  }
  .reader-index {
    flex-shrink: 0;
    max-height: 42%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 7px 12px;
  }
  .reader-index > summary {
    padding: 7px 4px;
    font-size: 13px;
  }
  .reader-index nav {
    margin-top: 5px;
  }
  .reader-node > [data-reader-target] {
    padding: 10px 6px;
    font-size: 13px;
  }
  .reader-scroll {
    flex: 1;
    padding: 22px 18px 30px;
  }
  .reader-prose {
    font-size: 14px;
    line-height: 1.8;
  }
  .reader-prose h1 {
    font-size: 25px;
  }
  .reader-prose h2 {
    font-size: 21px;
  }
  .reader-foot {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .reader-foot small {
    max-height: 36px;
    overflow: auto;
    font-size: 11px;
  }
  .reader-foot button {
    margin-left: auto;
    font-size: 12px;
  }
  #import-preview {
    height: 560px;
  }
}
.callout {
  background: #eef2e7;
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.callout.warning {
  background: #fff1dd;
  color: #865d22;
}
.welcome {
  max-width: 680px;
  margin: 10vh auto;
  padding: 40px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.welcome .brand {
  margin-bottom: 45px;
}
.welcome h1 {
  font-family: Georgia, serif;
  font-size: 38px;
}
.welcome p {
  color: var(--muted);
}
.welcome .row {
  margin-top: 28px;
}
.full {
  width: 100%;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  max-width: 900px;
  width: calc(100% - 32px);
  max-height: 90vh;
  color: inherit;
  box-shadow: 0 24px 100px #13281a35;
}
dialog::backdrop {
  background: #13281a70;
  backdrop-filter: blur(3px);
}
.dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 0;
}
.dialog-body {
  padding: 26px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
label.field {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  display: block;
  width: 100%;
  border: 1px solid #cfd8c9;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: inherit;
  margin-top: 7px;
  font-size: 14px;
}
textarea {
  min-height: 115px;
  resize: vertical;
}
textarea.tall {
  min-height: 300px;
}
label.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin: 0 0 18px;
  min-width: 0;
}
legend {
  font-size: 13px;
  font-weight: 650;
  padding: 0 6px;
}
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 9px 0;
  font-size: 14px;
  cursor: pointer;
}
.option:has(input:checked) {
  background: var(--soft);
  border-color: #6f8857;
}
.quiz {
  max-width: 780px;
  margin: auto;
}
.quiz h1 {
  font-size: 26px;
}
.quiz .timer {
  position: sticky;
  top: 12px;
  padding: 12px 20px;
  background: #254d37;
  color: white;
  border-radius: 9px;
  z-index: 3;
  margin: 20px 0;
}
.quiz fieldset {
  background: #fff;
}
.quiz legend {
  max-width: 95%;
  line-height: 1.6;
}
.score {
  font-size: 42px;
  font-weight: 450;
  letter-spacing: -2px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
progress {
  width: 100%;
  height: 9px;
  accent-color: var(--green);
}
.tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.tabs button {
  white-space: nowrap;
  font-size: 13px;
}
.tabs button.active {
  background: var(--green);
  color: #fff;
}
.money {
  font-size: 28px;
  letter-spacing: -1px;
  margin: 12px 0;
}
.photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.photos img {
  max-width: 100%;
  height: 170px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #f6f7f1;
}
.error {
  color: #a53c28;
  font-size: 13px;
  white-space: pre-wrap;
}
.hidden {
  display: none !important;
}
.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 10px;
  background: #233f2e;
  color: #fff;
  z-index: 99;
  max-width: 90vw;
  box-shadow: 0 4px 20px #0002;
  display: none;
}
#toast.show {
  display: block;
}
.mobile-brand {
  display: none;
}
.receipt {
  background: #f1f4ea;
  padding: 16px;
  overflow-wrap: anywhere;
  font-family: monospace;
  user-select: all;
}
.divider-line {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.result-review {
  border-left: 3px solid #b8c8a5;
  padding-left: 16px;
  margin-bottom: 22px;
}
.result-review.bad {
  border-color: #ca9b79;
}
@media (min-width: 1500px) {
  .main {
    padding-left: 64px;
    padding-right: 64px;
  }
}
@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 12px;
  }
  .main {
    padding: 25px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-side {
    border-left: 0;
    border-top: 1px solid #ffffff30;
    padding: 18px 0 0;
  }
  .hero-side strong {
    font-size: 30px;
  }
}
@media (max-width: 720px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 23px;
    margin: 0 0 18px;
    padding: 0;
  }
  .sidebar .brand span {
    display: inline;
    font: 9px system-ui;
    letter-spacing: 1.3px;
    margin-left: 14px;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
    gap: 5px;
  }
  .nav button {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 12px;
  }
  .nav .divider,
  .sidebar footer {
    display: none;
  }
  .main {
    padding: 22px 16px 45px;
  }
  .topbar {
    margin-bottom: 28px;
    gap: 12px;
  }
  .avatar span {
    display: none;
  }
  .search {
    max-width: none;
  }
  .heading {
    gap: 12px;
  }
  h1 {
    font-size: 28px;
  }
  .heading p {
    font-size: 13px;
  }
  .hero {
    padding: 26px 23px;
    margin-bottom: 22px;
  }
  .hero h2 {
    font-size: 30px;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .catalog {
    display: block;
  }
  .tree {
    margin-bottom: 18px;
  }
  .tree details {
    display: inline-block;
    border: 0;
  }
  .tree button {
    display: inline-block;
    width: auto;
  }
  .item {
    padding: 16px;
    gap: 10px;
  }
  .item h3 {
    font-size: 14px;
  }
  .item button {
    font-size: 12px;
    padding: 9px 11px;
  }
  .card {
    padding: 20px;
  }
  .welcome {
    margin: 24px 16px;
    padding: 28px 22px;
  }
  .welcome h1 {
    font-size: 32px;
  }
  .dialog-head {
    padding: 18px;
  }
  .dialog-body {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .photos {
    grid-template-columns: 1fr 1fr;
  }
  .quiz .timer {
    top: 6px;
  }
  .heading > button {
    font-size: 12px;
    padding: 9px 11px;
  }
}
