/* ResaHost-kromi audit-pääsivulle. Tokenit design-system.md / raportti.html. */
@font-face {
  font-family: "Manrope";
  src: url("/static/rh-design/fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

#app-view {
  min-height: 100vh;
  width: 100%;
  background: var(--rh-harmaa, #f1eeef);
}

#app-view,
#login-view {
  --rh-sinipurppura: #4f55e2;
  --rh-vihrea: #84eda6;
  --rh-terva: #231f20;
  --rh-harmaa: #f1eeef;
  --rh-border: #e4e0e1;
  --rh-muted: #5c5758;
  --rh-radius: 12px;
  --rh-font: "Manrope", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

body:has(#app-view:not([hidden])) .theme-toggle,
body:has(#login-view:not([hidden])) .theme-toggle,
body:has(#boot-view:not([hidden])) .theme-toggle,
body:has(#callback-view:not([hidden])) .theme-toggle {
  display: none !important;
}

#app-view .rh-header,
#login-view .rh-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--rh-border);
}

#app-view .rh-bar,
#login-view .rh-bar {
  max-width: 1560px;
  min-height: 72px;
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#app-view .rh-logo,
#login-view .rh-logo {
  display: block;
  width: auto;
  height: 21px;
}

#app-view .rh-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

#app-view .rh-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--rh-terva);
  font: 600 0.875rem/1.5 var(--rh-font);
  text-decoration: none;
  letter-spacing: 0.02em;
}

#app-view .rh-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

#app-view .rh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#app-view .rh-user {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--rh-muted);
  font: 600 0.875rem/1.5 var(--rh-font);
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app-view .rh-btn,
#login-view .rh-btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--rh-radius);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rh-terva);
  background: transparent;
  font: 700 0.875rem/1 var(--rh-font);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

#app-view .rh-btn--green,
#login-view .rh-btn--green {
  background: var(--rh-vihrea);
  color: var(--rh-terva);
}

#app-view .rh-btn--secondary,
#login-view .rh-btn--secondary {
  background: #fff;
  border-color: var(--rh-border);
  color: var(--rh-terva);
}

#app-view .rh-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  background: #fff;
  color: var(--rh-terva);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

#app-view .rh-mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--rh-border);
  background: #fff;
}

#app-view .rh-mobile-nav.is-open {
  display: grid;
}

#app-view .rh-mobile-nav a,
#app-view .rh-mobile-nav button {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--rh-border);
  background: none;
  color: var(--rh-terva);
  font: 600 0.875rem/1.5 var(--rh-font);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

#app-view .rh-footer,
#login-view .rh-footer {
  margin-top: 64px;
  border-top: 1px solid var(--rh-border);
  background: #fff;
}

#app-view .rh-footer__inner,
#login-view .rh-footer__inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

#app-view .rh-footer__brand,
#login-view .rh-footer__brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

#app-view .rh-footer__brand img,
#login-view .rh-footer__brand img {
  display: block;
  height: 20px;
  width: auto;
}

#app-view .rh-footer__brand span,
#app-view .rh-footer__contacts,
#login-view .rh-footer__brand span,
#login-view .rh-footer__contacts {
  color: var(--rh-muted);
  font: 500 0.75rem/1.4 var(--rh-font);
}

#app-view .rh-footer__contacts,
#login-view .rh-footer__contacts {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

#app-view .rh-footer__contacts a,
#login-view .rh-footer__contacts a {
  color: inherit;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  #app-view .rh-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  #app-view .rh-actions .rh-btn,
  #app-view .rh-user {
    display: none;
  }
  #app-view .rh-menu-button {
    display: inline-flex;
  }
}

/* Hero + lomake */
#app-view .site-main {
  background: transparent;
}

#app-view .hero {
  padding: clamp(40px, 6vw, 72px) 0 32px;
  text-align: center;
}

#app-view .hero-title {
  margin: 0;
  color: var(--rh-terva);
  font: 700 clamp(32px, 5vw, 44px)/1.1 var(--rh-font);
  letter-spacing: -0.02em;
}

#app-view .hero-subtitle {
  margin: 16px auto 0;
  max-width: 46ch;
  color: var(--rh-muted);
  font: 400 1.05rem/1.5 var(--rh-font);
}

#app-view .analyze-form {
  margin: 32px auto 0;
  max-width: 640px;
}

#app-view .url-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--rh-border);
  border-radius: 16px;
  background: #fff;
  color: var(--rh-terva);
  font: 500 1rem/1.4 var(--rh-font);
  padding: 14px 20px;
}

#app-view .url-input::placeholder {
  color: #9a9596;
}

#app-view .mode-buttons {
  margin-top: 16px;
  gap: 12px;
}

#app-view .mode-btn {
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  background: #fff;
  color: var(--rh-terva);
  min-height: 56px;
}

#app-view .mode-btn-primary,
#app-view .mode-btn.mode-btn-primary {
  background: var(--rh-sinipurppura);
  border-color: var(--rh-sinipurppura);
  color: #fff;
}

#app-view .mode-btn-primary .mode-sec {
  color: rgba(255, 255, 255, 0.8);
}

#app-view .my-analyses {
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 24px color-mix(in oklch, var(--rh-terva) 7%, transparent);
}

/* Login */
#login-view {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--rh-harmaa);
}

#login-view .rh-header,
#login-view .rh-footer,
#app-view .rh-header,
#app-view .rh-footer {
  width: 100%;
  align-self: stretch;
  flex: 0 0 auto;
}

#login-view .login-outer {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

#login-view .login-container {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
}

#login-view .login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#login-view .login-logo-img,
#login-view .rh-logo {
  height: 28px;
  width: auto;
}

#login-view .login-logo-sub {
  display: none;
}

#login-view .login-title {
  margin: 24px 0 8px;
  color: var(--rh-terva);
  font: 700 1.75rem/1.15 var(--rh-font);
}

#login-view .login-desc,
#login-view .login-hint {
  color: var(--rh-muted);
  font: 400 0.95rem/1.5 var(--rh-font);
}

#login-view .login-btn {
  margin-top: 24px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--rh-radius);
  background: var(--rh-vihrea);
  color: var(--rh-terva);
  font: 700 0.95rem/1 var(--rh-font);
  cursor: pointer;
}
