/* Визуальный референс: go-up.info (Montserrat, teal / mint / золото) */
:root {
  --gu-teal: #00504d;
  --gu-teal-mid: #0a6b66;
  --gu-teal-dark: #023230;
  --gu-mint: #4dc7a0;
  --gu-cyan: #21f1e2;
  --gu-gold: #fdb32a;
  --gu-gold-soft: #ffdf9a;
  --gu-bg: #f6f4f3;
  --gu-bg-warm: #efe7e1;
  --gu-card: #ffffff;
  --gu-text: #2b241f;
  --gu-muted: #655d5d;
  --gu-border: #d2cdc9;
  --gu-danger: #c62828;
  --gu-radius: 12px;
  --gu-shadow: 0 8px 32px rgba(0, 32, 30, 0.08);
  --gu-font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--gu-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--gu-text);
  background: var(--gu-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(33, 241, 226, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 60% at -10% 100%, rgba(253, 179, 42, 0.08), transparent 45%);
}

.gu-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gu-header {
  background: linear-gradient(135deg, var(--gu-teal-dark) 0%, var(--gu-teal) 45%, var(--gu-teal-mid) 100%);
  color: #fff;
  padding: 0 1.25rem;
  border-bottom: 3px solid var(--gu-cyan);
  box-shadow: var(--gu-shadow);
}

.gu-header__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  flex-wrap: wrap;
  padding: 0.65rem 0;
}

.gu-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}

.gu-brand__title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.gu-brand__sub {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gu-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.gu-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.gu-nav a:hover {
  background: rgba(33, 241, 226, 0.2);
  color: #fff;
}

.gu-nav span {
  opacity: 0.45;
  user-select: none;
}

.gu-nav form {
  display: inline;
  margin: 0;
}

.gu-nav form button {
  font-size: 0.78rem;
  padding: 0.32rem 0.85rem;
  box-shadow: 0 1px 8px rgba(253, 179, 42, 0.28);
}

.gu-site-block {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--gu-card);
  border: 1px solid var(--gu-border);
  border-radius: var(--gu-radius);
  box-shadow: var(--gu-shadow);
  border-left: 4px solid var(--gu-mint);
}

.gu-site-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--gu-teal-dark);
}

.gu-main {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
}

.gu-main h1 {
  font-weight: 800;
  font-size: 1.65rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: var(--gu-teal-dark);
}

.gu-main h2 {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 1.5rem 0 0.65rem;
  color: var(--gu-teal);
}

.gu-footer {
  margin-top: auto;
  padding: 1rem 1.25rem 1.35rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--gu-muted);
  border-top: 1px solid var(--gu-border);
  background: rgba(255, 255, 255, 0.65);
}

.gu-footer a {
  color: var(--gu-teal);
  font-weight: 600;
  text-decoration: none;
}

.gu-footer a:hover {
  text-decoration: underline;
}

/* Карточки и формы */
.card {
  background: var(--gu-card);
  border: 1px solid var(--gu-border);
  border-radius: var(--gu-radius);
  padding: 1.35rem 1.5rem;
  max-width: 32rem;
  box-shadow: var(--gu-shadow);
}

.card label {
  display: block;
  margin: 0.85rem 0;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gu-text);
}

.card input,
.card textarea,
.card select {
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--gu-border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card input:focus,
.card textarea:focus,
.card select:focus {
  outline: none;
  border-color: var(--gu-mint);
  box-shadow: 0 0 0 3px rgba(33, 241, 226, 0.25);
}

button,
.card button,
input[type="submit"] {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gu-gold) 0%, #ffc139 100%);
  color: var(--gu-teal-dark);
  box-shadow: 0 2px 12px rgba(253, 179, 42, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}

button:hover,
.card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(253, 179, 42, 0.45);
}

button:active,
.card button:active {
  transform: translateY(0);
}

.btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--gu-teal-dark);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--gu-cyan);
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: rgba(33, 241, 226, 0.15);
  border-color: var(--gu-mint);
}

/* Таблицы */
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  background: var(--gu-card);
  border-radius: var(--gu-radius);
  overflow: hidden;
  border: 1px solid var(--gu-border);
  box-shadow: var(--gu-shadow);
}

table.tbl thead th {
  background: var(--gu-teal);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: none;
}

table.tbl tbody td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--gu-border);
  vertical-align: top;
}

table.tbl tbody tr:last-child td {
  border-bottom: none;
}

table.tbl tbody tr:nth-child(even) {
  background: rgba(246, 244, 243, 0.65);
}

table.tbl tbody tr:hover td {
  background: rgba(33, 241, 226, 0.06);
}

/* Утилиты */
.err {
  color: var(--gu-danger);
  font-weight: 600;
}

.note,
.warn {
  color: var(--gu-muted);
  font-size: 0.9rem;
}

.warn {
  color: #b35900;
}

.sec {
  margin: 1.5rem 0;
}

ul.sum {
  margin: 0.5rem 0 1rem 1.2rem;
  padding: 0;
}

.nav {
  margin: 0.75rem 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.nav a {
  font-weight: 600;
  color: var(--gu-teal);
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

.nav a.btn {
  text-decoration: none;
}

pre.algo,
pre.code {
  max-height: 28rem;
  overflow: auto;
  background: var(--gu-teal-dark);
  color: #e8f5f4;
  padding: 1.1rem 1.25rem;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  border-radius: var(--gu-radius);
  border: 1px solid rgba(33, 241, 226, 0.25);
}

.flash {
  border-radius: var(--gu-radius);
  border: 1px solid var(--gu-mint);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  background: rgba(77, 199, 160, 0.12);
  color: var(--gu-teal-dark);
}

/* Главная: карточки API */
.gu-hero {
  max-width: 40rem;
}

.gu-hero p {
  margin: 0.5rem 0 1rem;
  color: var(--gu-muted);
}

.gu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.gu-panels {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  margin-top: 1.25rem;
}

.gu-panel {
  background: var(--gu-card);
  border: 1px solid var(--gu-border);
  border-radius: var(--gu-radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--gu-shadow);
  border-top: 3px solid var(--gu-cyan);
}

.gu-panel strong {
  color: var(--gu-teal);
  font-size: 0.95rem;
}

.gu-panel code {
  font-size: 0.82rem;
  background: var(--gu-bg-warm);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

@media (max-width: 520px) {
  .gu-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .gu-main h1 {
    font-size: 1.35rem;
  }
}
