:root {
  --green: #355b6c;
  --green-soft: #e6eff3;
  --ink: #1d2430;
  --muted: #5b6472;
  --bg: #f6f8f7;
  --card: #ffffff;
  --line: #e3e8e5;
  --red: #b42318;
  --red-soft: #fdecea;
  --amber-soft: #fff7e6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand { font-weight: 800; font-size: 1.2rem; color: var(--green); text-decoration: none; }

main { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }

h1 { font-size: 1.7rem; line-height: 1.2; margin: 8px 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn.ghost { background: var(--card); color: var(--green); border: 1px solid var(--green); }
.btn.danger { background: var(--red); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

:focus-visible { outline: 3px solid #9fd8bd; outline-offset: 2px; }

.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 14px 0;
}

.hero p { font-size: 1.05rem; }
.cards { display: grid; gap: 12px; margin-top: 22px; }

.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; }
label.check, label.radio { display: flex; gap: 8px; align-items: center; font-weight: 400; }

input, select, textarea {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #c9d2cd;
  border-radius: 10px;
  background: #fff;
  width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: auto; }

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
  margin: 0;
}
legend { font-weight: 700; padding: 0 4px; }

.muted { color: var(--muted); font-size: 0.95rem; }
.big { font-size: 1.4rem; font-weight: 700; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--green-soft); margin: 10px 0; }
.notice.err { background: var(--red-soft); color: var(--red); }
.warn { background: var(--amber-soft); padding: 12px 14px; border-radius: 10px; }

.bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar span { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.4s; }

.rate-box { background: var(--green-soft); border-radius: 10px; padding: 12px; margin-top: 10px; }
.story { white-space: pre-wrap; }
.pre { white-space: pre-wrap; background: #f3f6f4; padding: 12px; border-radius: 10px; }

ul.list { list-style: none; padding: 0; margin: 0; }
ul.list li { padding: 10px 0; border-bottom: 1px solid #eef1ef; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.foot { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 24px 16px; }

/* Credit line */
.foot a { color: var(--green); font-weight: 600; }

/* Logo beside the wordmark */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; border-radius: 7px; }
