:root {
    --bg: #ffffff;
    --text: #6A6868;
    --line: #d9d9d9;
    --bg-surface: #ffffff;
    --bg-surface-alt: #fafafa;
    --bg-surface-input: #ffffff;
    --bg-surface-hover: #e6e6e6;
    --bg-content: rgba(255, 255, 255, 0.5);
    --text-heading: #202020;
    --text-sub: #3B3A3A;
    --text-mid: #555757;
    --text-note: #444444;
    --text-muted: #999;
    --text-code: #555;
    --bg-code: #f0f0f0;
    --bg-pre: #f6f6f6;
    --shadow-nav: 0px 3px 4px #DBDBDB;
    --field-bg: #000000;
    --field-text: #F7F5F5;
    --node-active-bg: #ffffff;
    --node-active-text: black;
    --receipt-selected-bg: #f0fafa;
    --toolbar-bg: #f9f9f9;
}

/* Links */
a:link {
  color:#555757;
}

/* visited link */
a:visited {
  color: #555757;
}

/* mouse over link */
a:hover {
  color: #027A7A;
}

/* selected link */
a:active {
  color: #F54927;
}

input[type='text']:focus{
  outline:0;
}

/* page */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  height: 100%;
}

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12px;
  }
}

/* Backgrounds */
.bg-plain {
  position: fixed;
  inset: 0;
  background: url("./images/spiragraph.jpg") center center no-repeat;
  background-size: contain;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.bg-geometry {
  position: fixed;
  inset: 0;
  background: url("./images/spiragraph.jpg") center center no-repeat;
  background-size: contain;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.bg-torus {
  position: fixed;
  inset: 0;
  background: url("./images/spiragraph.jpg") center center no-repeat;
  background-size: contain;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.bg-rainbow {
  position: fixed;
  inset: 0;
  background: url("./images/rainbow_vector.jpg") center center no-repeat;
  background-size: contain;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.bg-api {
  position: fixed;
  inset: 0;
  background: url("./images/api.jpg") center center no-repeat;
  background-size: contain;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.bg-wave {
  position: fixed;
  inset: 0;
  background: url("./images/vector-wave.jpg") center center no-repeat;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Page container */
.page {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* navigation */
.dropdown {
  position: relative;
}

.dropbtn {
  background-color: #ffffff;
  color: #555757;
  padding: 8px 12px;
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  font-size: 14px;
  border: 1px solid var(--line);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.dropbtn:active {
  transform: scale(0.98);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  border: 1px solid #d9d9d9;
  z-index: 1;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:focus-within .dropdown-content {
  display: block;
}

.dropdown-content div {
  padding: 10px 12px;
  cursor: pointer;
}

.dropdown-content div:hover {
  background-color: #e6e6e6;
}

/* Header */
.header {
  text-align: left;
  margin-bottom: 25px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 10 0px auto;
}

.strap {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #202020;
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  word-break: break-word;
}

.subtitle {
  margin: 16px 0 8px 0;
  font-size: 16px;
  color: #606060;
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  word-break: break-word;
}

th, td {
  padding: 4px;
  word-break: break-word;
}

/* Tables */
.nav {
  border-radius: 25px;
  border: 1px solid var(--line);
  padding: 5px 5px;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table {
  border-radius: 25px;
  border: 1px solid var(--line);
  padding: 15px 15px;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table_white {
  background-color: var(--bg-surface);
  border-radius: 25px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 15px;
  width: 100%;
  table-layout: auto;
  word-break: break-word;
  overflow-x: auto;
  border-collapse: separate;
  border-spacing: 0;
}

@media (max-width: 768px) {

    .table,
    .table_white {
        padding: 10px 10px;
        border-radius: 15px;
    }

    .table td,
    .table_white td {
        padding: 6px 4px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {

    .table,
    .table_white {
        padding: 8px 6px;
        border-radius: 10px;
    }

    .table td,
    .table_white td {
        padding: 4px 2px;
        font-size: 11px;
        word-break: break-word;
    }
}


.table_api {
  border-radius: 25px;
  border: 1px solid var(--line);
  padding: 15px 15px;
  background: url("./images/api.jpg") center center no-repeat;
  background-size: contain;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.field {
  background-color: #000000;
  border-radius: 25px;
  border: 1px solid var(--line);
  padding: 10px 10px 10px 50px;
  color: #ffffff;
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

/* Content container */
.content {
  background: rgba(255, 255, 255, 0.5);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 25px;
  flex: 1;
}

.content p {
  margin: 0 0 16px 0;
}

.content ul {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.content li {
  margin: 6px 0;
}

/* Buttons */
button {
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 4px;
  min-height: 44px;
}

button:active {
  transform: scale(0.98);
}

button.request_key {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 25px;
  border: 1px solid var(--line);
  padding: 20px;
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  color: #555757;
  font-size: 14px;
}

button.email_button {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-family: "Liberation Sans", Tahoma, Verdana, sans-serif;
  color: #555757;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button.email_button:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: #027A7A;
}

button.email_button:active {
  transform: scale(0.98);
}

button.email_button a {
  text-decoration: none;
  color: #555757;
}

button.email_button a:hover {
  color: #027A7A;
}

/* Status block */
.status {
  margin: 20px 0 10px 0;
  font-size: 14px;
}

.status .pending {
  margin-top: 20px;
}

/* Motto */
.motto {
  margin-top: 40px;
  margin-bottom: 30px;
  text-align: center;
  font-family: "Poiret One", "Trajan Pro", serif;
  font-size: 16px;
  letter-spacing: 1.4px;
  color: #d9d9d9;
  white-space: normal;
  word-break: break-word;
}

/* Footer */
.footer {
  margin-top: 0px;
  text-align: right;
  font-size: 12px;
  color: #b5b5b5;
}

/* ── Image responsiveness ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Tablet responsiveness (768px and below) ── */
@media (max-width: 768px) {
  .page {
    padding: 16px 12px 12px;
    max-width: 100%;
  }

  .content {
    padding: 15px 12px;
    border-left: none;
    border-right: none;
  }

  .logo {
    max-width: 250px;
  }

  .strap {
    font-size: 14px;
    margin: 0 0 8px 0;
  }

  .subtitle {
    font-size: 14px;
    margin: 12px 0 6px 0;
  }

  h1 {
    font-size: 24px;
    margin: 1em 0 0.5em 0;
  }

  h2 {
    font-size: 20px;
    margin: 1em 0 0.5em 0;
  }

  h3 {
    font-size: 18px;
    margin: 1em 0 0.5em 0;
  }

  h4 {
    font-size: 16px;
    margin: 1em 0 0.5em 0;
  }

  .motto {
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: normal;
  }

  th, td {
    padding: 3px;
    font-size: 13px;
  }

  button,
  input,
  select,
  textarea {
    font-size: 14px;
    padding: 6px 10px;
  }

  button.email_button {
    padding: 8px 12px;
    font-size: 13px;
  }

  button.request_key {
    padding: 15px;
    font-size: 13px;
  }

  .table,
  .table_api {
    padding: 12px 10px;
  }

  .field {
    padding: 8px 8px 8px 40px;
  }

  .dropdown-content {
    min-width: 140px;
  }

  .dropbtn {
    padding: 6px 10px;
    font-size: 13px;
  }

  table {
    width: 100%;
  }
}

/* ── Mobile responsiveness (480px and below) ── */
@media (max-width: 480px) {
  .page {
    padding: 12px 8px 8px;
    max-width: 100%;
  }

  .content {
    padding: 10px 8px;
    border-left: none;
    border-right: none;
    min-height: auto;
  }

  .logo {
    max-width: 180px !important;
  }

  .strap {
    font-size: 12px;
    margin: 8px 0;
  }

  .subtitle {
    font-size: 13px;
    margin: 10px 0 5px 0;
  }

  h1 {
    font-size: 20px;
    margin: 0.8em 0 0.4em 0;
  }

  h2 {
    font-size: 18px;
    margin: 0.8em 0 0.4em 0;
  }

  h3 {
    font-size: 16px;
    margin: 0.8em 0 0.4em 0;
  }

  h4 {
    font-size: 14px;
    margin: 0.8em 0 0.4em 0;
  }

  p {
    font-size: 12px;
    margin: 8px 0;
  }

  .motto {
    font-size: 10px;
    letter-spacing: 0.2px;
    white-space: normal;
    word-break: break-word;
    margin-top: 20px;
    margin-bottom: 16px;
  }

  .footer {
    font-size: 10px;
    margin-top: 12px;
    text-align: center;
  }

  th, td {
    padding: 2px;
    font-size: 11px;
  }

  button,
  input,
  select,
  textarea {
    font-size: 14px;
    padding: 8px 12px;
    min-height: 44px;
    min-width: 44px;
  }

  button.email_button {
    padding: 10px 12px;
    font-size: 12px;
    min-height: 44px;
    width: 100%;
    margin: 6px 0;
  }

  button.request_key {
    padding: 12px;
    font-size: 12px;
    min-height: 44px;
    width: 100%;
  }

  .table,
  .table_api {
    padding: 10px 8px;
  }

  .field {
    padding: 8px 8px 8px 30px;
  }

  .table {
    width: 100% !important;
  }

  .nav {
    width: 100% !important;
    padding: 4px 4px;
  }

  .dropdown-content {
    min-width: 120px;
    position: fixed;
    max-width: 90vw;
  }

  .dropbtn {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 44px;
    min-width: 44px;
  }

  center {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Stack table cells vertically on mobile */
  table[align="center"] tr {
    display: flex;
    flex-wrap: wrap;
  }

  table[align="center"] td {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .content ul {
    padding-left: 16px;
  }

  .content li {
    margin: 4px 0;
  }
}

/* ── Landscape orientation adjustments ── */
@media (max-height: 600px) {
  .page {
    padding: 12px;
  }

  .content {
    padding: 12px;
    min-height: auto;
  }

  .motto {
    margin-top: 20px;
    margin-bottom: 16px;
  }

  .footer {
    margin-top: 8px;
  }
}
