/* Secondary pages (register.php form + response, terms.php) on top of site.css.
   Class names are the ones those pages already used; only the look changed. */
:root { --blue: var(--accent); --text: var(--ink); --border: var(--line); }

/* ---- Shared page header ---- */
.page-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px; padding: 0 max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  background: rgba(245, 245, 241, .9);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.15rem; letter-spacing: -.02em; }
.back-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.back-link:hover { color: var(--ink); background: var(--soft); }
.back-link svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
strong { font-weight: 650; }

/* ---- Register form ---- */
.page-body { max-width: 780px; margin: 0 auto; padding: clamp(32px, 6vw, 56px) var(--gutter) 72px; }
.page-intro { margin-bottom: 28px; }
.page-intro h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 760; letter-spacing: -.03em; margin-bottom: 8px; }
.page-intro p { color: var(--muted); }
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 30px); margin-bottom: 16px; }
.form-section-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.req { color: var(--danger); margin-left: 2px; }
.field input, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; resize: vertical;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: #fbfcf9; border: 1px solid #e2e7df; border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa49f; }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem !important; font-weight: 500 !important; color: var(--ink); cursor: pointer; }
.check-inline input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.field input[readonly] { background: var(--soft); color: var(--muted); cursor: not-allowed; }
.terms-row { display: flex; align-items: flex-start; gap: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.terms-row input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.terms-row label { font-size: .92rem; line-height: 1.5; cursor: pointer; }
.recaptcha-wrap { margin-top: 18px; }
.submit-area { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.btn-submit {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 28px;
  font: inherit; font-weight: 650; font-size: 1rem; color: #fff; cursor: pointer;
  background: var(--accent); border: 1px solid var(--accent); border-radius: 10px; transition: background .15s, transform .15s;
}
.btn-submit:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-submit svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.submit-note { font-size: .84rem; color: var(--muted); }

/* ---- Register response (success / error) ---- */
body.page-resp { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px var(--gutter); text-align: center; }
.page-resp .logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 36px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.25rem; letter-spacing: -.02em; }
.page-resp .logo .brand-logo { height: 36px; }
.icon-wrap { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 24px; }
.icon-wrap.ok { background: var(--accent-soft); color: var(--accent); }
.icon-wrap.err { background: var(--danger-soft); color: var(--danger); }
.icon-wrap svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.page-resp h1 { font-size: clamp(1.7rem, 4vw, 2.1rem); font-weight: 760; margin-bottom: 10px; }
.page-resp .sub { color: var(--muted); max-width: 500px; margin: 0 auto; }
.page-resp .sub strong { color: var(--ink); }
.page-resp .steps { display: flex; flex-direction: column; gap: 12px; margin: 32px auto; max-width: 460px; text-align: left; }
.page-resp .step { display: flex; align-items: flex-start; gap: 14px; background: var(--surface); padding: 16px 18px; }
.page-resp .step::before { content: none; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; flex: none; }
.page-resp .step h4 { font-size: .95rem; margin-bottom: 2px; }
.page-resp .step p { font-size: .88rem; color: var(--muted); }
.page-resp .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.error-msg { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 14px 18px; max-width: 460px; margin: 20px auto; font-size: .92rem; }
.page-resp > footer { margin-top: 48px; font-size: .82rem; color: var(--muted); }

/* ---- Terms ---- */
.terms-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: clamp(36px, 6vw, 56px) var(--gutter); text-align: center; }
.terms-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 760; margin-bottom: 8px; }
.terms-hero .meta { font-size: .88rem; color: var(--muted); }
.terms-hero .notice { display: inline-block; margin-top: 18px; background: var(--accent-soft); color: var(--accent-dark); font-size: .88rem; padding: 10px 16px; border-radius: 10px; line-height: 1.5; }
.terms-wrap { max-width: 1000px; margin: 0 auto; padding: 48px var(--gutter) 80px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-size: .85rem; max-height: calc(100vh - 110px); overflow: auto; }
.toc-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 6px; }
.toc ol li::before { counter-increment: toc; content: counter(toc) ". "; color: var(--accent); font-weight: 650; }
.toc a { color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.terms-content { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.tc-section { scroll-margin-top: 90px; }
.tc-num { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }
.tc-section h2 { font-size: 1.3rem; font-weight: 720; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tc-section p { font-size: .95rem; line-height: 1.75; margin-bottom: 12px; }
.tc-section p:last-child { margin-bottom: 0; }
.tc-section ul, .tc-section ol { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding-left: 20px; }
.tc-section ul { list-style: none; padding-left: 0; }
.tc-section ul li { position: relative; padding-left: 20px; font-size: .95rem; line-height: 1.7; }
.tc-section ul li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .6; }
.tc-section ol li { font-size: .95rem; line-height: 1.7; }
.highlight-box { background: var(--accent-soft); border-radius: 10px; padding: 16px 18px; margin: 6px 0 14px; }
.highlight-box p { margin: 0; }
.warning-box { background: var(--warning-soft); border-left: 3px solid var(--warning); border-radius: 10px; padding: 16px 18px; margin: 6px 0 14px; }
.warning-box p { margin: 0; color: #5e4d2c; }
.price-table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.price-table th { text-align: left; padding: 10px 14px; background: var(--soft); color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.price-table td { padding: 11px 14px; border-top: 1px solid var(--line); line-height: 1.5; vertical-align: top; }
.tc-section .price-note { font-size: .88rem; color: var(--muted); margin: 4px 0 10px; }
.terms-footer { border-top: 1px solid var(--line); padding: 28px var(--gutter); text-align: center; }
.terms-footer p { font-size: .84rem; color: var(--muted); }

@media (max-width: 860px) {
  .terms-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc { position: static; max-height: none; }
}
@media (max-width: 580px) {
  .grid-2 { grid-template-columns: 1fr; }
  .back-link span { display: none; }
  .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
}
