/* RAT teacher landing — бренд как в панели v1 (Segoe UI + logo + name + slogan) */
:root {
  --ink: #070d0b;
  --ink-2: #0e1814;
  --surface: #12201b;
  --line: rgba(232, 244, 236, 0.12);
  --text: #e8f4ec;
  --muted: #8fa698;
  --green: #1bbf7a;
  --green-deep: #0f8f58;
  --violet: #6a5ce0;
  --violet-soft: rgba(106, 92, 224, 0.35);
  --green-soft: rgba(27, 191, 122, 0.22);
  --radius: 18px;
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #4fe0a4; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— Brand (как AdminPanel / Shared.html) —— */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.3em;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.brand-slogan {
  font-size: 0.72em;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
  opacity: 0.9;
}

.brand.compact { gap: 10px; }
.brand.compact .brand-logo { width: 36px; height: 36px; }
.brand.compact .brand-name { font-size: 1.05em; }
.brand.compact .brand-slogan { font-size: 0.65em; }

.brand-center {
  justify-content: center;
  margin: 0 auto 18px;
}

/* —— Top bar —— */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(7, 13, 11, 0.92), rgba(7, 13, 11, 0.55) 70%, transparent);
  backdrop-filter: blur(8px);
}

.top-brand {
  text-decoration: none !important;
  color: inherit;
  margin-right: auto;
}

.top-brand .brand-name { color: var(--text); }
.top-brand .brand-slogan { color: var(--muted); }

.top-nav {
  display: none;
  gap: 22px;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.top-nav a:hover { color: var(--text); }

.top-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green);
  color: #04140c !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  font-family: var(--font);
}

.top-cta:hover { background: #4fe0a4; color: #04140c !important; }

@media (min-width: 760px) {
  .top-nav { display: flex; }
}

/* —— Hero —— */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 96px 22px 28px;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(106, 92, 224, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(27, 191, 122, 0.12), transparent 50%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.hero-orb-a {
  width: 280px;
  height: 280px;
  top: 18%;
  left: 8%;
  background: var(--violet-soft);
  animation: drift 14s ease-in-out infinite alternate;
}

.hero-orb-b {
  width: 220px;
  height: 220px;
  bottom: 12%;
  right: 10%;
  background: var(--green-soft);
  animation: drift 11s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -18px) scale(1.08); }
}

.hero-brand {
  margin-bottom: 16px;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand .brand-logo {
  width: 56px;
  height: 56px;
}

.hero-brand .brand-name {
  font-size: clamp(1.55rem, 4.5vw, 2.1rem);
}

.hero-brand .brand-slogan {
  font-size: clamp(0.85rem, 2vw, 1rem);
  margin-top: 4px;
}

.hero-lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 2.2vw, 1.12rem);
  margin-bottom: 12px;
  animation: rise 0.9s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  animation: rise 0.9s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-actions .btn { border: none; cursor: pointer; }

.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  text-decoration: none !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: rise 0.9s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-scroll:hover { color: var(--text); }

.hero-scroll-chevron {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: scrollCue 1.8s ease-in-out infinite;
}

@keyframes scrollCue {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.55; }
  50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

.sub-hint {
  max-width: 28rem;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sub-hint.is-visible { opacity: 1; }

.hero-student { margin-top: 14px; font-size: 14px; color: var(--muted); }
.hero-student a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.hidden { display: none !important; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--green);
  color: #04140c !important;
  box-shadow: 0 10px 40px rgba(27, 191, 122, 0.28);
}

.btn-primary:hover {
  background: #4fe0a4;
  color: #04140c !important;
}

.btn-ghost {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: rgba(232, 244, 236, 0.35);
  color: #fff !important;
}

/* —— Sections —— */
.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 22px;
}

.section.about {
  padding-top: 40px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  line-height: 1.2;
  font-weight: 700;
  max-width: 22ch;
  margin-bottom: 14px;
}

.section-lead {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 40px;
}

/* —— Pillars —— */
.pillars {
  list-style: none;
  display: grid;
  gap: 28px;
}

@media (min-width: 720px) {
  .pillars {
    grid-template-columns: 1fr 1fr;
    gap: 36px 48px;
  }
}

.pillars li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pillar-num {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--green);
  margin-bottom: 10px;
}

.pillars h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pillars p { color: var(--muted); font-size: 0.95rem; }

/* —— Steps —— */
.how {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(18, 32, 27, 0.65), transparent);
}

.steps {
  list-style: none;
  display: grid;
  gap: 28px;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

.step-index {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #04140c;
  background: linear-gradient(145deg, var(--green), var(--green-deep));
  box-shadow: 0 0 0 6px rgba(27, 191, 122, 0.12);
}

.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.steps p { color: var(--muted); font-size: 0.95rem; }

/* —— FAQ —— */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0 14px;
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 14px 36px 10px 0;
  position: relative;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 12px;
  font-size: 1.35rem;
  color: var(--green);
}

.faq-list details[open] summary::after { content: "–"; }

.faq-list details p {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 6px;
  max-width: 52ch;
}

.faq-format {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(18, 32, 27, 0.85);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  max-width: 52ch;
}

/* —— Panel CTA —— */
.panel { padding-bottom: 100px; }

.panel-stage {
  text-align: center;
  padding: 48px 24px;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(106, 92, 224, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(27, 191, 122, 0.16), transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
}

.panel-stage h2 {
  max-width: none;
  margin: 0 auto 10px;
}

.panel-stage > p {
  max-width: 34rem;
  margin: 0 auto 28px;
  color: var(--muted);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* —— Footer —— */
.foot {
  padding: 28px 22px 40px;
  border-top: 1px solid var(--line);
}

.foot .brand-name { font-size: 1em; }
.foot .brand-slogan { font-size: 0.7em; }

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* —— Guide page —— */
.guide-page .top { background: rgba(7, 13, 11, 0.92); }

.guide-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 96px 22px 80px;
}

.guide-hero {
  margin-bottom: 36px;
}

.guide-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 12px;
}

.guide-toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
  margin-bottom: 40px;
}

.guide-toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
}

.guide-toc ol {
  padding-left: 1.2em;
  columns: 1;
}

@media (min-width: 640px) {
  .guide-toc ol { columns: 2; column-gap: 28px; }
}

.guide-toc li {
  margin-bottom: 6px;
  break-inside: avoid;
  color: var(--muted);
}

.guide-toc a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.guide-toc a:hover { color: var(--green); }

.guide-section {
  margin-bottom: 48px;
  scroll-margin-top: 88px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.guide-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 16px 0 10px;
  max-width: none;
}

.guide-section h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 22px 0 8px;
}

.guide-lead {
  color: var(--muted);
  margin-bottom: 16px;
}

.guide-steps {
  padding-left: 1.25em;
  margin-bottom: 14px;
}

.guide-steps li {
  margin-bottom: 8px;
}

.guide-steps li::marker {
  font-weight: 700;
  color: var(--green);
}

.guide-list {
  padding-left: 1.25em;
  margin-bottom: 14px;
  color: var(--muted);
}

.guide-list li { margin-bottom: 6px; }

.guide-callout {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 0.95rem;
}

.guide-callout strong {
  display: block;
  margin-bottom: 4px;
}

.guide-callout.tip {
  background: rgba(27, 191, 122, 0.12);
  border: 1px solid rgba(27, 191, 122, 0.28);
  color: #b8f0d2;
}

.guide-callout.warn {
  background: rgba(201, 148, 40, 0.12);
  border: 1px solid rgba(201, 148, 40, 0.3);
  color: #f0d78a;
}

.guide-callout.info {
  background: rgba(106, 92, 224, 0.14);
  border: 1px solid rgba(106, 92, 224, 0.3);
  color: #c8c2f5;
}

.guide-callout.danger {
  background: rgba(180, 50, 70, 0.14);
  border: 1px solid rgba(180, 50, 70, 0.32);
  color: #f2b4c0;
}

.guide-figure {
  margin: 18px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a1210;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-figure figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: rgba(18, 32, 27, 0.65);
}

.guide-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.guide-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.guide-pill.irat { background: rgba(196, 92, 18, 0.18); color: #f0b078; border-color: rgba(196, 92, 18, 0.35); }
.guide-pill.grat { background: rgba(20, 113, 61, 0.2); color: #7ed9a4; border-color: rgba(20, 113, 61, 0.4); }
.guide-pill.essay { background: rgba(107, 33, 168, 0.2); color: #d4b4f0; border-color: rgba(107, 33, 168, 0.4); }

.guide-table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 480px;
}

.guide-table th,
.guide-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.guide-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(18, 32, 27, 0.8);
}

.guide-table tr:last-child td { border-bottom: none; }
.guide-table td { color: var(--muted); }
.guide-table td:first-child { color: var(--text); font-weight: 500; }

.guide-timeline {
  border-left: 3px solid var(--green);
  padding-left: 18px;
  margin: 16px 0 20px;
}

.guide-timeline > div {
  margin-bottom: 12px;
  color: var(--muted);
}

.guide-timeline span {
  display: inline-block;
  min-width: 3.5rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  margin-right: 8px;
}

.guide-check {
  list-style: none;
  margin: 12px 0 18px;
}

.guide-check li {
  position: relative;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--surface);
}

.guide-check li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--green);
  border-radius: 4px;
}

.guide-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.guide-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(232, 244, 236, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

/* —— Support modal —— */
body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

@media (min-width: 640px) {
  .modal { align-items: center; }
}

.modal.hidden { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 24px 22px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
}

.modal-close:hover { color: var(--text); }

.modal-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 28px 8px 0;
}

.modal-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.modal-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 6px;
}

.modal-card .opt {
  font-weight: 500;
  color: var(--muted);
}

.modal-card input,
.modal-card textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 13, 11, 0.45);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  resize: vertical;
}

.modal-card input:focus,
.modal-card textarea:focus { border-color: var(--green); }

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions .btn { width: auto; min-width: 120px; }

.modal .msg {
  margin-top: 12px;
  font-size: 14px;
  display: none;
}

.modal .msg.error { color: #ff7a8a; display: block; }
.modal .msg.ok { color: var(--green); display: block; }

button.linkish {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

button.linkish:hover { color: #4fe0a4; }

