@font-face {
  font-family: "Tendiqo Archive Serif";
  src: url("./assets/fonts/ibm-plex-serif-cyrillic-600-normal.woff2") format("woff2");
  font-display: swap;
}

:is(
  html[data-module-entry="meetings"],
  html[data-module-entry="estimates"],
  html[data-module-entry="proposals"],
  html[data-module-entry="norms"],
  html[data-module-entry="calculators"]
) body {
  background: #252724 url("./assets/graphite-texture.png") center / 520px repeat;
}

:is(
  html[data-module-entry="meetings"] .meetings-shell,
  html[data-module-entry="estimates"] .estimate-shell,
  html[data-module-entry="proposals"] .proposal-shell,
  html[data-module-entry="calculators"] .calculator-shell
) {
  min-height: 100vh;
  background: #e9e6dc url("./assets/paper-texture.png") center / 420px repeat;
  box-shadow: 0 0 0 1px rgba(231, 226, 214, .18), 0 20px 54px rgba(0, 0, 0, .2);
}

:is(
  html[data-module-entry="meetings"] .meetings-header,
  html[data-module-entry="estimates"] .estimate-header,
  html[data-module-entry="proposals"] .proposal-header,
  html[data-module-entry="calculators"] .calculator-header,
  html[data-module-entry="norms"] .topbar
) {
  background-color: #171a18;
  background-image: url("./assets/graphite-texture.png");
  background-position: center;
  background-size: 520px;
}

html[data-module-entry="meetings"] {
  --meeting-canvas: #252724;
  --meeting-surface: rgba(255, 254, 250, .7);
  --meeting-subtle: rgba(255, 255, 255, .43);
  --meeting-line: #aaa69c;
}

html[data-module-entry="meetings"] .meetings-intro {
  padding-right: 24px;
  padding-left: 24px;
}

html[data-module-entry="meetings"] :is(.meeting-upload, .meetings-workspace, .meeting-detail) {
  margin-right: 16px;
  margin-left: 16px;
  border-radius: 2px;
  background: rgba(255, 254, 250, .68) url("./assets/paper-texture.png") center / 420px repeat;
  box-shadow: 0 4px 13px rgba(30, 30, 27, .08);
}

html[data-module-entry="meetings"] .meetings-workbench {
  margin-right: 16px;
  margin-left: 16px;
}

html[data-module-entry="meetings"] .meetings-workbench > :is(.meetings-workspace, .meeting-detail) {
  margin-right: 0;
  margin-left: 0;
}

html[data-module-entry="meetings"] :is(.reference-files, .recognition-settings, .meeting-card, .analysis-grid section) {
  border-radius: 2px;
  background-color: rgba(255, 255, 255, .42);
}

html[data-module-entry="meetings"] :is(.meetings-intro h2, .section-heading h2, .detail-head h2, .analysis-grid h3) {
  font-family: "Tendiqo Archive Serif", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}

html[data-module-entry="meetings"] :is(.meetings-modules, .primary, .quiet, .danger, .download, input, textarea, .file-field span) {
  border-radius: 2px;
}

html[data-module-entry="estimates"] {
  --paper: #ece8dc;
  --paper-light: #f7f3e9;
  --line: #aaa59a;
  --soft: #ded9cd;
}

html[data-module-entry="estimates"] body:not([data-platform-role="public"]) .estimate-intro {
  padding-right: 24px;
  padding-left: 24px;
}

html[data-module-entry="estimates"] :is(.estimate-notice, .estimate-stage-nav) {
  margin-right: 16px;
  margin-left: 16px;
}

html[data-module-entry="estimates"] .estimate-stage-panel > :is(.saved-estimates, .tz-workspace, .learning-workspace, .estimate-workspace) {
  margin-right: 16px;
  margin-left: 16px;
}

html[data-module-entry="estimates"] :is(.estimate-notice, .estimate-stage-nav, .saved-estimates, .tz-workspace, .learning-workspace, .estimate-workspace) {
  border-radius: 2px;
  background-color: rgba(255, 254, 250, .7);
  background-image: url("./assets/paper-texture.png");
  background-position: center;
  background-size: 420px;
  box-shadow: 0 4px 13px rgba(30, 30, 27, .08);
}

html[data-module-entry="estimates"] :is(.tz-card, .saved-card, .learning-card, .estimate-editor, .estimate-summary, input, select, textarea) {
  border-radius: 2px;
  background-color: rgba(255, 255, 255, .5);
}

html[data-module-entry="estimates"] .estimate-shell :is(h1, h2, h3, h4, .tz-card h3, .tz-result-head h3, .tz-scan h3, .tz-method h4, .tz-additional-stages h4) {
  font-family: "Tendiqo Archive Serif", Georgia, serif;
  font-weight: 600;
}

html[data-module-entry="proposals"] .proposal-shell {
  --workbench: #e9e6dc;
  --sheet: rgba(247, 243, 233, .78);
  --control: #fffdf8;
}

html[data-module-entry="proposals"] .proposal-lead {
  padding-right: 24px;
  padding-left: 24px;
}

html[data-module-entry="proposals"] :is(.template-panel, .proposal-layout, .proposal-history, .message) {
  margin-right: 16px;
  margin-left: 16px;
}

html[data-module-entry="proposals"] :is(.template-panel, .proposal-editor, .proposal-history) {
  background-color: rgba(247, 243, 233, .7);
  background-image: url("./assets/paper-texture.png");
  background-position: center;
  background-size: 420px;
}

html[data-module-entry="proposals"] :is(.template-panel, .proposal-editor, .preview-column, .proposal-history, input, select, textarea, button) {
  border-radius: 2px;
}

html[data-module-entry="norms"] {
  --ground: #252724;
  --paper: rgba(255, 254, 250, .78);
  --line: #aaa69c;
}

html[data-module-entry="norms"] .topbar {
  color: #f4f1e8;
}

html[data-module-entry="norms"] .app-shell {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 32px 24px 72px;
  background: #e9e6dc url("./assets/paper-texture.png") center / 420px repeat;
  box-shadow: 0 0 0 1px rgba(231, 226, 214, .18), 0 20px 54px rgba(0, 0, 0, .2);
}

html[data-module-entry="norms"] :is(
  .search-box,
  .context-navigator,
  .filters,
  .catalog,
  .detail-panel,
  .workbench article,
  .updates-panel,
  .collections-panel,
  .corporate-panel,
  .project-contexts,
  .project-worklist,
  .project-update-worklist,
  .notifications-panel,
  .reader-quality-panel,
  .reader-history,
  .section-bookmarks-panel,
  .library-updates,
  .saved-searches,
  .reference-backlog,
  .reader-coverage,
  .reader-fund
) {
  border-radius: 2px;
  background-color: rgba(255, 254, 250, .72);
  background-image: url("./assets/paper-texture.png");
  background-position: center;
  background-size: 420px;
  box-shadow: 0 4px 13px rgba(30, 30, 27, .06);
}

html[data-module-entry="norms"] :is(.primary-button, .secondary-button, .context-chip, .catalog-health, input, select, textarea) {
  border-radius: 3px;
}

html[data-module-entry="calculators"] {
  --paper: #e9e6dc;
  --card: #e3e7e1;
  --line: #8e8b83;
}

html[data-module-entry="calculators"] .calculator-shell {
  width: min(1240px, calc(100% - 32px));
  max-width: 1240px;
}

html[data-module-entry="calculators"] .calculator-header {
  margin: -25px -34px 0;
  border: 0;
  padding: 21px 22px;
  color: #f5f2ea;
}

html[data-module-entry="calculators"] .calculator-intro {
  padding: 46px 4px 32px;
}

html[data-module-entry="calculators"] .calculator-intro h1 {
  margin: 10px 0 16px;
  font-family: "Tendiqo Archive Serif", Georgia, serif;
  font-size: 54px;
  line-height: .95;
  letter-spacing: 0;
}

html[data-module-entry="calculators"] :is(.calculator-catalog, .calculator-panel, .water-balance-panel, .saved) {
  background-color: rgba(255, 254, 250, .68);
  background-image: url("./assets/paper-texture.png");
  background-position: center;
  background-size: 420px;
}

html[data-module-entry="calculators"] :is(.calculator-catalog, .calculator-card, .calculator-panel, .water-balance-panel, input, select, textarea, button) {
  border-radius: 2px;
}

html[data-module-entry="calculators"] .calculator-card {
  min-height: 205px;
  background-color: rgba(255, 255, 255, .52);
}

@media (max-width: 900px) {
  :is(
    html[data-module-entry="meetings"],
    html[data-module-entry="estimates"],
    html[data-module-entry="proposals"],
    html[data-module-entry="norms"],
    html[data-module-entry="calculators"]
  ) body {
    background: #e9e6dc url("./assets/paper-texture.png") center / 420px repeat;
  }

  :is(
    html[data-module-entry="meetings"] .meetings-shell,
    html[data-module-entry="estimates"] .estimate-shell,
    html[data-module-entry="proposals"] .proposal-shell,
    html[data-module-entry="calculators"] .calculator-shell,
    html[data-module-entry="norms"] .app-shell
  ) {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    box-shadow: none;
  }

  html[data-module-entry="meetings"] :is(.meeting-upload, .meetings-workspace, .meeting-detail),
  html[data-module-entry="estimates"] :is(.estimate-notice, .estimate-stage-nav),
  html[data-module-entry="estimates"] .estimate-stage-panel > :is(.saved-estimates, .tz-workspace, .learning-workspace, .estimate-workspace),
  html[data-module-entry="proposals"] :is(.template-panel, .proposal-layout, .proposal-history, .message) {
    margin-right: 8px;
    margin-left: 8px;
  }

  html[data-module-entry="meetings"] .meetings-workbench {
    margin-right: 8px;
    margin-left: 8px;
  }

  html[data-module-entry="meetings"] .meetings-workbench > :is(.meetings-workspace, .meeting-detail) {
    margin-right: 0;
    margin-left: 0;
  }

  html[data-module-entry="norms"] .app-shell {
    margin-top: 0;
    margin-bottom: 0;
    padding: 25px 12px 58px;
  }

  html[data-module-entry="calculators"] .calculator-shell {
    padding: 20px;
  }

  html[data-module-entry="calculators"] .calculator-header {
    margin: -20px -20px 0;
  }
}

@media (max-width: 520px) {
  html[data-module-entry="meetings"] .meetings-intro,
  html[data-module-entry="estimates"] body:not([data-platform-role="public"]) .estimate-intro,
  html[data-module-entry="proposals"] .proposal-lead {
    padding-right: 16px;
    padding-left: 16px;
  }

  html[data-module-entry="calculators"] .calculator-intro h1 {
    font-size: 42px;
  }
}

@media print {
  :is(
    html[data-module-entry="meetings"],
    html[data-module-entry="estimates"],
    html[data-module-entry="proposals"],
    html[data-module-entry="norms"],
    html[data-module-entry="calculators"]
  ) body {
    background: #fff;
  }
}
