@import url("theme.css");

:root {
  color-scheme: light;
  color: var(--ink);
  background: var(--canvas);
  font: 100%/1.65 system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue-deep); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.wrap { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 1;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--surface);
  transform: translateY(calc(-100% - 12px));
}
.skip:focus { transform: none; }
.header { background: var(--sidebar); color: #fff; }
.header-inner {
  width: min(940px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 68px;
  padding-block: 10px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 790;
  font-size: 1.32rem;
  letter-spacing: -.055em;
  text-decoration: none;
}
.wordmark img { border-radius: 10px; }
nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: .875rem; }
nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #b5c2d8;
  font-weight: 600;
  text-decoration: none;
}
nav a:hover { background: #1b2944; color: #fff; }
nav a[aria-current="page"] { background: #233753; border-color: #2e4465; color: #f7faff; }
main { padding-block: clamp(28px, 6vw, 58px) 64px; }
h1, h2, p { margin: 0; }
h1 { margin-bottom: 14px; font-size: clamp(1.95rem, 5vw, 2.72rem); letter-spacing: -.036em; line-height: 1.12; font-weight: 785; }
h2 { margin-bottom: 8px; font-size: clamp(1.125rem, 3vw, 1.3rem); font-weight: 745; letter-spacing: -.025em; line-height: 1.25; }
p { color: var(--muted); overflow-wrap: anywhere; }
p + p { margin-top: 12px; }
.intro { max-width: 57ch; font-size: 1.0625rem; }
main > section, .support-form, .support-receipt, .support-aside > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
main > section {
  margin-top: 16px;
  padding: clamp(16px, 3vw, 24px);
  scroll-margin-top: 12px;
}
main > section + p { margin-top: 20px; }
main > .faq { margin-top: 24px; padding: 0; }
.faq h2 { margin: 0; padding: clamp(16px, 3vw, 24px); }
details { border-top: 1px solid var(--line); scroll-margin-top: 12px; }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 12px clamp(16px, 3vw, 24px);
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
summary:hover { background: var(--blue-tint); }
summary::-webkit-details-marker { display: none; }
summary:focus-visible { outline-offset: -2px; }
summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-right: 4px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-2px) rotate(45deg);
}
details[open] summary::after { transform: translateY(2px) rotate(225deg); }
details p { padding: 0 clamp(16px, 3vw, 24px) 16px; }
.policy { white-space: pre-line; }

.support-page { width: min(940px, calc(100% - 40px)); }
.support-intro { margin-bottom: 26px; }
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; align-items: start; }
.support-form, .support-receipt { padding: clamp(16px, 4vw, 24px); }
.support-form {
  display: grid;
  grid-row: 1;
  grid-column: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.support-form > :not(.support-field-pair) { grid-column: 1 / -1; }
.support-field { display: grid; align-content: start; gap: 6px; }
.support-field label { font-weight: 670; }
.support-field input, .support-field select, .support-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #8496b0;
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  line-height: 1.4;
}
.support-field textarea { resize: vertical; }
.support-hint { color: var(--muted); font-size: .875rem; font-weight: 400; }
.support-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.support-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 680;
  text-decoration: none;
}
.support-button:hover { background: var(--blue-deep); }
.support-aside { display: grid; grid-column: 2; gap: 20px; }
.support-aside > div { padding: 19px 20px; }
.support-aside h2 { font-size: 1.05rem; letter-spacing: -.01em; }
.support-aside .support-emergency { border-color: #e5d9bd; background: #fcf7e9; }
.support-emergency a { color: #713f20; font-weight: 670; }
.support-errors { padding: 12px 15px; border-radius: 8px; background: #fcf0ec; color: #751f15; }
.support-errors p { color: inherit; }
.support-errors ul { margin: 4px 0 0; padding-left: 22px; }
.support-receipt { max-width: 600px; }
.support-receipt dl { padding: 12px 15px; margin: 20px 0; border-radius: 8px; background: var(--blue-tint); }
.support-receipt dt { font-size: .875rem; font-weight: 680; }
.support-receipt dd { margin: 4px 0 0; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .support-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .support-aside, .support-form { grid-column: 1; grid-row: auto; }
  .support-aside > div { padding: 12px 15px; }
}

@media (max-width: 560px) {
  .support-form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 460px) {
  .wrap { width: calc(100% - 32px); }
  nav { width: 100%; font-size: .825rem; }
  nav a { flex: 1 0 auto; padding-inline: 7px; }
}
