:root {
  --portal-ink: #17324d;
  --portal-muted: #60778b;
  --portal-sky: #eaf7ff;
  --portal-mint: #eafaf3;
  --portal-sun: #fff6d8;
  --portal-coral: #fff0ed;
  --portal-line: #d8e6ec;
}

* { box-sizing: border-box; }
html { color: var(--portal-ink); font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, #f7fcff 0, #ffffff 44%, #f5fbf8 100%);
}
.portal { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card {
  position: relative;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 23px 28px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  color: var(--portal-ink);
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(34, 83, 105, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tool-card::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -24px;
  width: 142px;
  height: 142px;
  border: 18px solid rgba(255, 255, 255, .52);
  border-radius: 50%;
}
.tool-card:hover { transform: translateY(-4px); border-color: #8ec4d5; box-shadow: 0 18px 42px rgba(34, 83, 105, .14); }
.tool-card:focus-visible { outline: 3px solid #188cc4; outline-offset: 3px; }
.tool-card small { position: relative; z-index: 1; color: #28718f; font-size: 13px; font-weight: 800; }
.tool-card h2 { position: relative; z-index: 1; margin: 12px 0 7px; font-size: 27px; line-height: 1.25; letter-spacing: 0; }
.tool-card p { position: relative; z-index: 1; margin: 0; color: var(--portal-muted); font-size: 14px; line-height: 1.65; }
.tool-card span { position: relative; z-index: 1; width: fit-content; margin-top: auto; padding-top: 12px; color: #176f91; font-weight: 800; }
.tool-card span::after { content: " →"; }
.tool-card--generation { background: var(--portal-sky); }
.tool-card--self-use { background: var(--portal-mint); }
.tool-card--layout { background: var(--portal-sun); }
.tool-card--proposal { background: var(--portal-coral); }
.tool-card--tariff { grid-column: 1 / -1; min-height: 130px; background: #eef7ff; }
.tool-card--tariff p { max-width: 660px; }

@media (max-width: 720px) {
  .portal { width: min(100% - 28px, 620px); padding-top: 22px; }
  .tool-grid { grid-template-columns: 1fr; gap: 14px; }
  .tool-card, .tool-card--tariff { grid-column: auto; min-height: 156px; padding: 22px 24px; }
  .tool-card h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
}
