/* Watermark: brand colors, faded with --wm-opacity. */
:root {
  --logo-orange: #ff9900;
  --logo-blue: #336699;
  --logo-yellow: #ffffe0;
  --wm-hub: var(--logo-orange);
  --wm-ring: var(--logo-blue);
  --wm-tooth: var(--logo-orange);
  --wm-opacity: 0.15;
  --koriograf: #6699CC;
  --header-bg: #000044;
  --footer-bg: #000044;
  --collapse-border: #e7e4e4;
  --body-bg: #fff;
  --copy-bg: #fff;
  --muted: #8a8a8a;
  --body-fg: #1a1a1a;
  --focus: #ff9900;
  --header-h: 4.25rem;
  --footer-h: 4.25rem;
  --copy-h: 1.75rem;
  --content-max: 42rem;
  --content-pad: 1rem;
}

html {
  height: 100%;
  overflow-y: scroll;
  direction: rtl;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--logo-orange) #4a4a4a;
}

html::-webkit-scrollbar {
  width: 8px;
}

html::-webkit-scrollbar-track {
  background: #4a4a4a;
}

html::-webkit-scrollbar-thumb {
  background: var(--logo-orange);
  border-radius: 4px;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  margin: 0;
  direction: ltr;
  background: var(--body-bg);
  color: var(--body-fg);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: #000;
  color: #fff;
}

.skip-link:focus {
  top: 0.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-h);
  min-height: var(--header-h);
  padding: 0.35rem var(--content-pad);
  background: var(--header-bg);
  color: var(--muted);
}

.banner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: auto;
  max-width: var(--content-max);
}

.banner-wrap a {
  display: flex;
  align-items: center;
  height: 100%;
}

.banner-wrap svg {
  display: block;
  width: auto;
  height: 100%;
  max-height: 100%;
}

.watermark {
  position: fixed;
  top: calc(var(--header-h) * 2);
  left: 50%;
  bottom: calc(var(--footer-h) + var(--copy-h) + env(safe-area-inset-bottom, 0px));
  z-index: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: min(var(--content-max), calc(100% - 2 * var(--content-pad)));
  transform: translateX(-50%);
  padding: 0 1.25rem 1.25rem;
  box-sizing: border-box;
  pointer-events: none;
  opacity: var(--wm-opacity);
}

.watermark svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.site-main {
  position: relative;
  z-index: 1;
  padding: 1.25rem var(--content-pad) calc(var(--footer-h) + var(--copy-h) + 1.25rem);
}

.panel {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.site-modal {
  position: fixed;
  top: auto;
  left: 50%;
  bottom: calc(var(--footer-h) + var(--copy-h) + env(safe-area-inset-bottom, 0px) + 1.25em);
  z-index: 15;
  width: min(var(--content-max), calc(100% - 2 * var(--content-pad)));
  transform: translateX(-50%);
}

.site-modal-dialog {
  padding: 1rem 1.25rem;
  background: var(--logo-yellow);
  color: var(--logo-blue);
  border: 2px solid var(--logo-orange);
  border-radius: 0.75rem;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.35);
}

.site-modal-dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.site-modal-dialog p {
  margin: 0 0 0.75rem;
}

.site-modal-dialog a {
  color: var(--logo-blue);
}

.site-modal-dismiss {
  display: block;
  margin-left: auto;
  margin-right: auto;
  font-weight: 700;
  color: #fff;
  background: var(--logo-orange);
  border: 2px solid var(--logo-orange);
}

.site-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--copy-h);
  margin: 0;
  background: var(--copy-bg);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
  line-height: 1;
  text-align: center;
}

.site-copy p {
  margin: 0;
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
  color: var(--koriograf);
  padding: 0;
}

.site-footer-bar {
  display: flex;
  justify-content: center;
  background: var(--footer-bg);
  padding: 0 var(--content-pad) env(safe-area-inset-bottom, 0);
}

.tab-bar {
  display: flex;
  width: 100%;
  max-width: var(--content-max);
}

.tab-bar .tab-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.25rem;
  border: 0;
  background: transparent;
  color: var(--koriograf);
}

.tab-bar .tab-btn[aria-current="page"] {
  color: var(--koriograf);
}

.tab-bar .tab-btn:focus-visible,
.skip-link:focus-visible,
.site-main a:focus-visible,
.site-main button:focus-visible,
.site-main input:focus-visible,
.site-modal-dialog a:focus-visible,
.site-modal-dialog button:focus-visible {
  outline: 0.15rem solid var(--focus);
  outline-offset: 0.15rem;
}

.tab-icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-label {
  font-size: 0.75rem;
  line-height: 1.1;
}

.site-menu.offcanvas {
  width: min(20rem, 100%);
  color: var(--muted);
  background: #fff;
}

.site-menu .offcanvas-header {
  display: flex;
  align-items: center;
  height: var(--header-h);
  min-height: var(--header-h);
  padding: 0 1rem;
  background: var(--header-bg);
  color: var(--koriograf);
  border-bottom: 1px solid var(--header-bg);
}

.site-menu .offcanvas-header .btn-close {
  filter: invert(1) grayscale(1);
}

.site-menu .offcanvas-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 0;
  color: var(--koriograf);
  font-size: 1.15rem;
}

.site-menu-logo {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: inherit;
}

code {
  color: var(--logo-orange);
}

.home-topics {
  --topic-gap: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--topic-gap);
}

.home-collapse-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--collapse-border);
  border-radius: 0.75rem;
  color: var(--logo-blue);
  background: #f5f5f5;
  text-align: left;
}

.home-collapse-toggle::after {
  content: "";
  margin-left: auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.home-collapse-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg);
}

.home-collapse-toggle:focus-visible {
  outline: 0.15rem solid var(--focus);
  outline-offset: 0.15rem;
}

.home-collapse-panel {
  margin-top: var(--topic-gap);
  padding: 1rem 1.15rem;
  border: 1px solid var(--collapse-border);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.55);
}

.home-collapse-panel p:last-child {
  margin-bottom: 0;
}

.section-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.site-menu-auth {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #d0d0d0;
}

.site-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cookie-dump {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--collapse-border);
  border-radius: 0.75rem;
  background: #f5f5f5;
  color: var(--logo-blue);
}

#cc-main {
  --cc-btn-primary-bg: var(--logo-blue);
  --cc-btn-primary-color: #fff;
  --cc-btn-primary-hover-bg: var(--header-bg);
  --cc-btn-secondary-bg: #f5f5f5;
  --cc-btn-secondary-color: var(--body-fg);
  --cc-btn-secondary-border-color: var(--collapse-border);
  --cc-btn-secondary-hover-bg: #e7e4e4;
  --cc-z-index: 1080;
}

#cc-main .cm--bottom {
  bottom: calc(var(--footer-h) + var(--copy-h) + env(safe-area-inset-bottom, 0px) + 0.75rem);
}

#cc-main .cm--box.cm--center {
  left: 50%;
  right: auto;
  width: min(24rem, calc(100vw - 2rem));
  margin-left: 0;
  margin-right: 0;
  translate: -50% 0;
}

.cookie-settings-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--logo-orange);
  border: 2px solid var(--logo-orange);
  border-radius: 0.375rem;
}

.cookie-table {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.cookie-table th,
.cookie-table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--collapse-border);
  text-align: left;
  vertical-align: top;
}

.cookie-table th {
  background: #f5f5f5;
}

.activity-id {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  margin: 0 0 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
}

.btn-oauth:last-child {
  margin-bottom: 0;
}

.btn-oauth .bi {
  font-size: 1.2rem;
}

.btn-oauth-google {
  color: #3c4043;
  background: #fff;
  border: 1px solid #dadce0;
}

.btn-oauth-google:hover,
.btn-oauth-google:focus-visible {
  color: #3c4043;
  background: #f7f8f8;
}

.btn-oauth-x {
  color: #fff;
  background: #000;
  border: 1px solid #000;
}

.btn-oauth-x:hover,
.btn-oauth-x:focus-visible {
  color: #fff;
  background: #222;
}

.btn-oauth-linkedin {
  color: #fff;
  background: #0a66c2;
  border: 1px solid #0a66c2;
}

.btn-oauth-linkedin:hover,
.btn-oauth-linkedin:focus-visible {
  color: #fff;
  background: #004182;
}

.btn-oauth-facebook {
  color: #fff;
  background: #1877f2;
  border: 1px solid #1877f2;
}

.btn-oauth-facebook:hover,
.btn-oauth-facebook:focus-visible {
  color: #fff;
  background: #166fe5;
}

.site-menu-list a,
.site-menu-list button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  text-align: left;
  text-decoration: none;
}

.site-menu-list a:hover,
.site-menu-list button:hover,
.site-menu-list a:focus-visible,
.site-menu-list button:focus-visible {
  color: var(--logo-orange);
}

.site-menu-list .bi {
  font-size: 1.25rem;
  color: var(--muted);
}

.menu-avatar {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  object-fit: cover;
}

.console-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.console-photo {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.console-person .bi {
  font-size: 3rem;
  line-height: 1;
  color: var(--koriograf);
}

.console-name {
  margin: 0;
  font-weight: 700;
  color: var(--logo-blue);
}

.console-email {
  margin: 0;
  color: var(--muted);
}

.console-card {
  padding: 1rem;
  border: 1px solid var(--collapse-border);
  border-radius: 0.75rem;
  background: #f5f5f5;
}

.console-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--logo-blue);
}

.capability-body {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--collapse-border);
  border-radius: 0.75rem;
}

.capability-body p {
  margin: 0 0 0.75rem;
}

.capability-body p:last-child {
  margin-bottom: 0;
}

.capability-about {
  color: var(--body-fg);
}

.capability-term {
  font-weight: 700;
  color: var(--header-bg);
  quotes: '"' '"';
}

.capability-term::before {
  content: open-quote;
}

.capability-term::after {
  content: close-quote;
}

.capability-state-active {
  color: #1a7f37;
}

.capability-state-inactive {
  color: #c62828;
}

.capability-state-failed {
  color: #c62828;
}

.capability-result {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
  color: #8a8a8a;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - var(--footer-h) - var(--copy-h) - 2.5rem);
  min-height: calc(100dvh - var(--header-h) - var(--footer-h) - var(--copy-h) - 2.5rem);
}

.search-form {
  width: min(100%, 28rem);
  margin-left: auto;
  margin-right: auto;
}

.search-field {
  position: relative;
}

.search-field .form-control {
  width: 100%;
  padding-right: 2.5rem;
}

.search-field .form-control::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-clear .bi {
  font-size: 1.15rem;
  line-height: 1;
}

.search-clear:hover,
.search-clear:focus-visible {
  color: var(--logo-blue);
}

.search-submit {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--logo-blue);
  border: 2px solid var(--logo-blue);
  border-radius: 0.375rem;
}

.search-submit:disabled {
  color: #f4f4f4;
  background: #b5b5b5;
  border-color: #b5b5b5;
  cursor: not-allowed;
}

.log-submit {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-weight: 700;
  color: var(--koriograf);
  background: #fff;
  border: 2px solid var(--koriograf);
  border-radius: 0.375rem;
}

.mail-log-dump {
  white-space: pre-wrap;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  color: #333;
  background: #fff;
}

.kg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.5);
}

.offcanvas.offcanvas-start.kg-open,
.offcanvas.offcanvas-end.kg-open {
  transform: none;
  visibility: visible;
}

@media (min-width: 768px) {
  :root {
    --header-h: 4.5rem;
    --footer-h: 4.5rem;
  }

}

@media (prefers-contrast: more) {
  :root {
    --wm-opacity: 0.08;
    --body-bg: #fff;
    --body-fg: #000;
  }
}

.spinner-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 7.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.spinner-content {
  max-width: 70%;
  padding: 1.25rem;
  text-align: center;
  font-weight: 700;
  color: var(--header-bg);
  background-color: #fff;
  border: 2px solid var(--logo-orange);
  border-radius: 1.25rem;
}

.spinner-content .spinner-border {
  color: var(--koriograf);
}

.spinner-content p {
  margin: 0.75rem 0 0;
}

.spinner-proc-msg {
  font-weight: 400;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .spinner-modal .spinner-border {
    animation: none;
  }
}
