:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #5f6673;
  --line: #e6e8ec;
  --brand: #1f6feb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.nav a.active {
  color: var(--brand);
}

main {
  flex: 1;
  padding: 28px 0 36px;
}

.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 17px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.card a {
  align-self: flex-start;
  text-decoration: none;
  font-size: 14px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.panel h1,
.panel h2 {
  margin-top: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  font-size: 14px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.actions button {
  width: auto;
  min-width: 110px;
  padding: 10px 14px;
  cursor: pointer;
}

.actions .primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.help {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.result {
  margin-top: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer .container {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer a {
  font-size: 13px;
  text-decoration: none;
  color: #606b7a;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  .header-inner {
    min-height: 56px;
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
  }

  .hero {
    padding: 18px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .card-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .actions button {
    flex: 1 1 100%;
    min-height: 44px;
  }
}
