:root {
  --blue: #0588cf;
  --blue-dark: #0b76b6;
  --green: #43ad4a;
  --green-hover: #36983d;
  --text: #171717;
  --muted: #767676;
  --border: #c9c9c9;
  --notice-bg: #fff8e5;
  --notice-border: #f4e4b3;
  --notice-text: #957640;
  --danger: #c7423a;
  --header-height: 62px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input { font: inherit; }

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  height: var(--header-height);
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding-left: 28px;
  background: #fff;
  position: relative;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 170px;
}

.brand img {
  display: block;
  width: 156px;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: stretch;
  font-size: 13px;
  font-weight: 700;
}

.top-nav > a,
.top-nav > button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #0084cb;
  border: 0;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.top-nav > a:hover,
.top-nav > button:hover {
  text-decoration: none;
  background: #f7fbff;
}

.top-nav .lang {
  background: #edf6ff;
  border-left: 1px solid #e4edf3;
  border-right: 1px solid #e4edf3;
}

.caret { margin-left: 4px; font-size: 10px; }

.page-shell {
  width: min(1120px, calc(100% - 64px));
  margin: 28px auto 150px;
  display: grid;
  grid-template-columns: 490px 425px;
  gap: 78px;
  align-items: start;
  min-height: calc(100vh - 260px);
}

.left-column {
  padding-top: 94px;
  text-align: center;
}

.notice {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 16px 42px 14px 14px;
  border: 1px solid var(--notice-border);
  border-radius: 4px;
  background: var(--notice-bg);
  color: var(--notice-text);
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}

.notice p { margin: 0; }
.notice a { color: #2f7eae; }
.notice-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  color: #c7c1ad;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 3px;
}

.left-column h1 {
  margin: 18px 0 21px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

.pin-card {
  width: 248px;
  margin: 0 auto;
  padding: 15px;
  border: 1px solid #bdbdbd;
  border-radius: 5px;
  background: #fff;
  text-align: left;
}

.pin-card label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 700;
}

.pin-card input {
  width: 100%;
  height: 41px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  padding: 7px 10px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.pin-card input:focus {
  border-color: #78afd1;
  box-shadow: 0 0 0 2px rgba(0, 139, 214, .10);
}

.pin-card input.invalid {
  border-color: var(--danger);
  box-shadow: none;
}

.error-message {
  display: none;
  margin: 8px 0 2px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.2;
}

.error-message.visible { display: block; }

.pin-card button[type="submit"] {
  width: 100%;
  height: 41px;
  margin-top: 14px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.pin-card button[type="submit"]:hover { background: var(--green-hover); }
.pin-card button[type="submit"]:active { transform: translateY(1px); }
.pin-card button[type="submit"]:disabled { opacity: .72; cursor: wait; }

.pin-help {
  margin: 22px 0 0;
  color: #297db5;
  font-size: 13px;
  line-height: 1.4;
}

.preview-column {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.document-preview {
  display: block;
  width: 390px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .20);
}

.corner-visual {
  position: fixed;
  right: 27px;
  bottom: 67px;
  width: 185px;
  opacity: .53;
  pointer-events: none;
  z-index: 0;
}

.corner-visual img { width: 100%; height: auto; display: block; }

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  border-top: 1px solid #dfdfdf;
  background: rgba(255,255,255,.97);
  z-index: 3;
  overflow: hidden;
}

.footer-pattern {
  position: absolute;
  right: 0;
  bottom: -30px;
  width: 540px;
  opacity: .10;
  pointer-events: none;
}

.footer-pattern img { width: 100%; display: block; }

.copyright {
  position: relative;
  text-align: center;
  line-height: 52px;
  font-size: 12px;
  color: #555;
}

.noscript {
  position: fixed;
  left: 16px;
  bottom: 70px;
  z-index: 10;
  max-width: 420px;
  padding: 10px 12px;
  border: 1px solid #e0b4b4;
  background: #fff6f6;
  color: #9f3a38;
  font-size: 13px;
}

@media (max-width: 820px) {
  :root { --header-height: 45px; }

  .site-header { padding-left: 18px; }
  .brand { min-width: 110px; }
  .brand img { width: 102px; }

  .top-nav { font-size: 9px; }
  .top-nav > a,
  .top-nav > button { padding: 0 9px; }

  .page-shell {
    width: calc(100% - 28px);
    margin: 26px auto 110px;
    grid-template-columns: minmax(128px, .78fr) minmax(215px, 1.22fr);
    gap: 16px;
    min-height: calc(100vh - 180px);
  }

  .left-column {
    padding-top: 54px;
  }

  .notice {
    min-height: 88px;
    padding: 10px 21px 9px 9px;
    font-size: 8px;
    line-height: 1.38;
  }

  .notice-close {
    right: 5px;
    top: 5px;
    font-size: 14px;
  }

  .left-column h1 {
    margin: 12px 0 14px;
    font-size: 8px;
    line-height: 1.4;
  }

  .pin-card {
    width: min(100%, 143px);
    padding: 10px;
    border-radius: 3px;
  }

  .pin-card label {
    margin-bottom: 5px;
    font-size: 8px;
  }

  .pin-card input {
    height: 29px;
    padding: 4px 7px;
    font-size: 9px;
    border-radius: 3px;
  }

  .error-message {
    margin-top: 5px;
    font-size: 8px;
  }

  .pin-card button[type="submit"] {
    height: 28px;
    margin-top: 9px;
    font-size: 9px;
    border-radius: 2px;
  }

  .pin-help {
    margin-top: 15px;
    font-size: 8px;
  }

  .document-preview {
    width: 260px;
    box-shadow: 0 1px 6px rgba(0,0,0,.18);
  }

  .corner-visual {
    width: 122px;
    right: 9px;
    bottom: 55px;
    opacity: .45;
  }

  .site-footer { height: 39px; }
  .copyright { line-height: 39px; font-size: 7px; }
  .footer-pattern { width: 340px; bottom: -28px; opacity: .10; }
}

@media (max-width: 430px) {
  .site-header { padding-left: 10px; }
  .brand img { width: 90px; }
  .top-nav > a,
  .top-nav > button { padding: 0 6px; }

  .page-shell {
    width: calc(100% - 16px);
    grid-template-columns: 122px minmax(190px, 1fr);
    gap: 8px;
  }

  .document-preview { width: 235px; }
}
