:root {
  color-scheme: light;
  --bg: #f7f5f3;
  --card: #ffffff;
  --text: #1a1717;
  --body: #3a3533;
  --muted: #6b6461;
  --line: #ece7e3;
  --divider: #f0ece8;
  --skeleton: #ece7e3;
  --accent: #a3134a;
  --accent-tint: #fbeaf0;
  --focus: #a3134a;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(20px, env(safe-area-inset-left));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
}

.logo { display: block; height: 22px; width: auto; }

.lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e5dfda;
  border-radius: 999px;
  background: var(--card);
  color: var(--body);
  font-size: 13px;
  font-weight: 500;
}

.lang .icon { width: 16px; height: 16px; }

.lang select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 9.5rem;
  border: 0;
  padding: 0 18px 0 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-overflow: ellipsis;
}

.lang select:focus { outline: none; }
.lang:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

.lang .lang-chevron {
  position: absolute;
  right: 12px;
  width: 12px;
  height: 12px;
  stroke-width: 2;
  pointer-events: none;
}

/* Hero */

.page { flex: 1; padding-bottom: 8px; }

.hero { padding: 28px 0 24px; }

.title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.meta {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  flex: 1 1 auto;
}

.meta dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Groups and lists */

.group + .group { margin-top: 28px; }

.group-title {
  margin: 0 0 10px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
}

.row { position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: 1px; background: var(--divider); }

.row-link { transition: background-color .15s ease; -webkit-tap-highlight-color: transparent; }
.row-link:hover, .row-link:active { background: #faf8f7; }
.row-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--radius); }

.row-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
}

.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; }
.row-sub { font-size: 13px; color: var(--muted); }
.row-action { color: #8a827e; }

.row-disabled .row-icon { background: var(--bg); color: var(--muted); }
.row-disabled .row-title { color: var(--muted); }

/* Accordion sections */

.section + .section,
.row + .section,
.section + .row { border-top: 1px solid var(--divider); }

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.section-head::-webkit-details-marker { display: none; }
.section-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 12px; }

.section-title { flex: 1; font-weight: 600; }

.section-chevron {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  color: #8a827e;
  transition: transform .2s ease;
}

.section[open] .section-chevron { transform: rotate(180deg); }

.section-body { padding: 0 16px 16px; color: var(--body); }
.section-body p { margin: 0 0 12px; }
.section-body > :last-child { margin-bottom: 0; }

.html { overflow-wrap: anywhere; }
.html > :first-child { margin-top: 0; }
.html > :last-child { margin-bottom: 0; }
.html p, .html ul, .html ol { margin: 0 0 12px; }
.html ul, .html ol { padding-left: 20px; }
.html li { margin-bottom: 6px; }
.html h1, .html h2, .html h3, .html h4 { margin: 16px 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.html a { color: var(--accent); }
.html img { max-width: 100%; height: auto; border-radius: 12px; }
.html table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.html th, .html td { padding: 6px 10px 6px 0; text-align: left; border-bottom: 1px solid var(--divider); }

.muted { color: var(--muted); }

.note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
}

.note .icon { width: 16px; height: 16px; margin-top: 2px; stroke-width: 1.8; }

/* States */

.message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18vh 12px 40px;
}

.message-inline { padding: 24px 12px; }

.message-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--accent-tint);
  color: var(--accent);
}

.message-icon .icon { width: 28px; height: 28px; }

.message-text {
  margin: 20px 0 0;
  max-width: 18rem;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.button {
  margin-top: 24px;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

@keyframes pulse { 50% { opacity: 1; } }

.sk {
  background: var(--skeleton);
  border-radius: 8px;
  opacity: .55;
  animation: pulse 1.4s ease-in-out infinite;
}

.sk-title { width: 75%; height: 30px; }
.sk-card { flex: 1 1 80px; height: 58px; border-radius: 14px; }
.sk-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.sk-line { height: 14px; width: 60%; }
.sk-line.short { height: 10px; width: 30%; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  .section-chevron, .row-link { transition: none; }
}

/* Footer */

.foot {
  display: flex;
  justify-content: center;
  padding: 40px 0 32px;
}

.foot img { height: 14px; width: auto; opacity: .3; }
