:root {
  --text: #1b2130;
  --nav-blue: #2d76b2;
  --nav-line: #909090;
  --impressum-left: #6685a3;
  --impressum-right: #39577b;
  --hero-left: #c6d0da;
  --hero-right: #39577c;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("../assets/fonts/SourceSansPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("../assets/fonts/SourceSansPro-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("../assets/fonts/SourceSansPro-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Blogger Sans";
  src: url("../assets/fonts/BloggerSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Blogger Sans";
  src: url("../assets/fonts/BloggerSans-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--text);
}
body {
  font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
}
a { color: inherit; }

.page { min-height: 100vh; }

.impressumbar {
  height: 30px;
  background: linear-gradient(to right, var(--impressum-left), var(--impressum-right));
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.linkbar {
  display: flex;
  align-items: center;
  gap: 0;
}

.linkbar a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 10px 20px 0 0;
  font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
}

.mainbar {
  height: 175px;
  background: linear-gradient(to right, var(--hero-left), var(--hero-right));
}

.mainbar-inner {
  max-width: 1516px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mainbar-title {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
}

.brand-logo img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.brand-copy { min-width: 0; }

.bartitle {
  font-family: "Blogger Sans", "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-size: calc(12px + 1.8vw);
  line-height: 1.05;
  color: #fff;
  font-weight: 500;
}

.bartitle .nowrap,
.nowrap { white-space: nowrap; }

.bartitle-small {
  margin-top: 6px;
  font-family: "Blogger Sans", "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-size: calc(6px + 1vw);
  line-height: 1.1;
  color: #fff;
  font-weight: 300;
}

.mainbar-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0;
}

.mainbar-logos .image {
  display: block;
  height: calc(40px + 1vw);
  width: auto;
  max-width: 140px;
  object-fit: contain;
  padding-right: 20px;
}

.content {
  max-width: 1516px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.nav-header { padding-top: 20px; }
.nav-content { padding-bottom: 40px; }

.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.nav-item {
  padding-right: calc(50px + 10vw);
  list-style: none;
  border-bottom: 2px solid #909090;
  display: list-item;
  margin: 16px 30px 16px 0;
}

/* Official site: blue underline only on hover (no default active tab) */
.nav-item:hover { border-bottom: 2px solid #2d76b2; }
.nav-item:hover a { color: #2d76b2; text-decoration: none; }

.nav-item a,
.nav-item a:link,
.nav-item a:visited {
  text-decoration: none;
  font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.5;
  color: #2d76b2;
}

.workspace {
  max-width: 100%;
}

/* Home — two columns like cert.ihk.de */
.home {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.home-left {
  flex: 0 1 40%;
  max-width: 520px;
  min-width: 0;
}
.home-right {
  flex: 0 1 50%;
  max-width: 640px;
  min-width: 0;
  padding-top: 38px;
}
.caption {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #222;
}
.text {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 16px;
  color: #222;
}
.italics { font-style: italic; }

.form-container { padding-top: 20px; }

.verify-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  min-width: 0;
}

.input-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.input-line input,
.input-line select {
  flex: 1 1 auto;
  min-width: 0;
}

.field label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #555;
  white-space: normal;
}
.field.country label { white-space: normal !important; }
.req { color: #b3261e; }

.field input,
.field select {
  width: 100%;
  height: 48px;
  border: 1px solid #79747e;
  border-radius: 4px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
  color: #1b2130;
}

.field input:hover,
.field select:hover {
  border-color: #1b2130;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #2d76b2;
  border-width: 2px;
  padding: 0 13px;
}

.field.has-error input,
.field.has-error select {
  border-color: #b3261e;
}

.help-btn.tooltip,
.help-spacer {
  flex: 0 0 10%;
  max-width: 56px;
  min-width: 40px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-btn.tooltip {
  border: 0;
  padding: 0;
  background: #fff;
  color: #e0e0e0;
  cursor: pointer;
}
.help-btn.tooltip:hover { color: #335c85; }
.help-btn.tooltip svg {
  display: block;
  width: 28px;
  height: 28px;
}

.form-actions.submit {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.btn-primary {
  min-width: 120px;
  height: 42px;
  border: 0;
  border-radius: 2px;
  background: #2d76b2;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.btn-primary:disabled {
  background: #c5c5c5;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.coo-sample {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
}

/* Shared content helpers (verification / other pages) */
.home-panel { max-width: 760px; }
.home-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 18px;
}
.home-lead {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 16px;
  color: #222;
}

.field-error {
  color: #b11226;
  font-size: 13px;
  margin-top: 4px;
}

.result-box {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #d9dee7;
  background: #f7f9fc;
  font-size: 15px;
}
.result-box.error {
  border-color: #e2b4ba;
  background: #fff5f6;
  color: #8f1524;
}

/* Chambers list */
.list {
  width: 570px;
  max-width: 100%;
}

.chamber-item {
  padding: 14px 0 12px;
  border-top: 1px solid #8e8e8e;
}
.chamber-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.chamber-name {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 700;
  color: #101010;
}
.chamber-address,
.chamber-city {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
}
.chamber-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.2;
  color: #1e5fb9;
  text-decoration: underline;
}
.chamber-muted {
  display: inline-block;
  margin-top: 2px;
  font-size: 13px;
  color: #888;
}

.back-link {
  color: #1e5fb9;
  text-decoration: underline;
  font-size: 16px;
}
.result-actions { margin-top: 20px; }

/* Help dialog */
body.dialog-open { overflow: hidden; }
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e0e0e0;
}
.dialog-title {
  font-size: 18px;
  font-weight: 600;
}
.dialog-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  padding: 0 4px;
}
.dialog-body {
  padding: 16px 18px 22px;
}
.dialog-body img {
  display: block;
  width: 100%;
  height: auto;
}

/* License */
.license-page h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
}
.license-page h2 + p,
.license-page p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
}
.license-page a {
  color: #1e5fb9;
  text-decoration: underline;
}
.license-page .section { margin-top: 28px; }

.error-page {
  padding: 18px 0;
  color: #b11226;
  font-size: 16px;
}

@media (max-width: 900px) {
  .mainbar { height: auto; padding: 18px 0; }
  .mainbar-inner { flex-direction: column; align-items: flex-start; }
  .mainbar-logos { padding-top: 8px; }
  .nav-item {
    padding-right: 0;
    width: 100%;
    max-width: 420px;
    margin-right: 0;
  }
  .home {
    flex-direction: column;
  }
  .home-left,
  .home-right {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }
  .home-right { padding-top: 8px; }
  .list, .workspace { width: 100%; max-width: 100%; }
}
