:root {
  color-scheme: light;
  --ink: #17221f;
  --muted: #65736f;
  --line: #dce6e2;
  --surface: #ffffff;
  --soft: #f3f8f5;
  --accent: #087f5b;
  --accent-dark: #056345;
  --warning: #a05a16;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #edf4f0; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.panel { width: min(100%, 960px); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 55px rgba(23, 55, 43, .08); }
.auth-panel { width: min(100%, 460px); padding: 38px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; }
h2 { margin-bottom: 8px; font-size: 22px; }
.lede { color: var(--muted); line-height: 1.6; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; }
.field input { width: 100%; padding: 12px 13px; border: 1px solid #c9d9d2; border-radius: 7px; background: #fcfefd; color: var(--ink); }
.field input:focus { outline: 3px solid rgba(8, 127, 91, .15); border-color: var(--accent); }
.primary { border: 0; border-radius: 7px; padding: 12px 16px; color: white; background: var(--accent); font-weight: 750; }
.primary:hover { background: var(--accent-dark); }
.primary:disabled { cursor: wait; opacity: .78; }
.primary.sending { background: #39715f; }
.primary.sending::before { content: ''; display: inline-block; width: .8em; height: .8em; margin: 0 .55em -.05em 0; border: 2px solid rgba(255, 255, 255, .45); border-top-color: white; border-radius: 50%; animation: button-spin .7s linear infinite; }
.primary.sent { color: #176744; background: #e6f5eb; box-shadow: inset 0 0 0 1px #9bcdb0; }
.primary.sent:hover { background: #d8efdf; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.secondary { border: 1px solid var(--line); border-radius: 7px; padding: 10px 14px; color: var(--ink); background: white; font-weight: 700; }
.tool-link { text-decoration: none; }
.notice { margin: 0; padding: 11px 13px; border-radius: 7px; color: #5d3c12; background: #fff8e9; font-size: 13px; line-height: 1.5; }
.error { color: #a92f27; background: #fff1ef; }
.success { color: #176744; background: #eef9f1; }
.notice.success.error { color: #a92f27; background: #fff1ef; box-shadow: inset 4px 0 0 #c93a31; }
.app-panel { overflow: hidden; }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: white; background: var(--accent); font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.user { color: var(--muted); font-size: 13px; }
.app-body { padding: 34px 26px 40px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 20px; }
.env { padding: 5px 9px; border-radius: 99px; color: var(--accent-dark); background: var(--soft); font-size: 12px; font-weight: 750; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 15px; }
.tool { min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; }
.tool h3 { margin-bottom: 8px; font-size: 18px; }
.tool p { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tool-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.status { color: var(--warning); font-size: 12px; font-weight: 750; }
.test-console { margin-top: 28px; padding: 22px; border: 1px dashed #a8cbb9; border-radius: 9px; background: #f7fbf8; }
.test-console .section-head { margin-bottom: 8px; }
.test-copy, .test-result { color: var(--muted); font-size: 13px; line-height: 1.55; }
.test-form { display: flex; align-items: end; gap: 12px; margin: 16px 0; }
.test-form .field { flex: 1; }
.test-result { margin-bottom: 10px; }
.test-result.success { color: #176744; }
.test-records { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.test-records li { padding: 9px 11px; border: 1px solid #d9e8df; border-radius: 6px; background: white; color: var(--ink); font-size: 13px; }
.footer-note { margin: 28px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 560px) {
  .shell { padding: 12px; align-items: start; }
  .auth-panel { margin-top: 8vh; padding: 26px 22px; }
  .app-header { align-items: flex-start; padding: 17px; }
  .app-header, .header-actions { flex-wrap: wrap; }
  .app-body { padding: 25px 17px 28px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .test-form { align-items: stretch; flex-direction: column; }
  .user { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
}
