:root{
  --navy:#0a2463;
  --blue:#1e4fa3;
  --gold:#f4b942;
  --ink:#172033;
  --muted:#5f6b7a;
  --soft:#f5f7fb;
  --line:#d9e2ef;
  --white:#ffffff;
  --danger:#c62828;
  --success:#176b3a;
  --shadow:0 20px 50px rgba(10,36,99,.12);
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,#eef3fb 0%,#ffffff 42%);
  line-height:1.6;
}

.story-page{
  width:min(1060px,92vw);
  margin:0 auto;
  padding:48px 0 72px;
}

.wide-page{
  width:min(1280px,94vw);
}

.story-hero{
  padding:34px;
  border-radius:28px;
  background:linear-gradient(135deg,var(--navy),var(--blue));
  color:var(--white);
  box-shadow:var(--shadow);
  margin-bottom:28px;
}

.section-kicker{
  margin:0 0 10px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:700;
  font-size:.78rem;
  color:var(--gold);
}

.story-hero h1{
  margin:0 0 12px;
  font-size:clamp(2rem,5vw,3.5rem);
  line-height:1.05;
}

.story-hero p{
  max-width:850px;
  margin:0;
  font-size:1.05rem;
  color:rgba(255,255,255,.9);
}

.form-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:32px;
}

.success-card h2,
.form-section h2,
.table-card h2{
  margin:0 0 8px;
  color:var(--navy);
  line-height:1.2;
}

.form-section{
  padding:24px 0;
  border-bottom:1px solid var(--line);
}

.form-section:first-child{
  padding-top:0;
}

.form-section:last-of-type{
  border-bottom:none;
}

.section-note,
.form-note{
  margin:0 0 18px;
  color:var(--muted);
}

.form-note{
  font-size:.95rem;
}

.form-grid{
  display:grid;
  gap:18px;
}

.two-columns{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

label{
  display:block;
  font-weight:700;
  color:var(--ink);
  margin-bottom:18px;
}

label span{
  display:block;
  margin-bottom:7px;
}

input,
select,
textarea{
  width:100%;
  border:1px solid #c9d4e5;
  border-radius:14px;
  padding:12px 14px;
  font:inherit;
  background:#fff;
  color:var(--ink);
  transition:border-color .2s ease, box-shadow .2s ease;
}

textarea{
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(30,79,163,.14);
}

.required-star{
  color:var(--danger);
  font-weight:900;
}

.hidden-field{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
}

.permission-box{
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  margin-top:24px;
}

.check-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:16px 0;
  font-weight:600;
}

.check-row input{
  width:auto;
  margin-top:5px;
  flex:0 0 auto;
}

.check-row span{
  margin:0;
}

.form-actions{
  padding-top:24px;
}

.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:48px;
  padding:12px 22px;
  border-radius:14px;
  border:none;
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
}

.button:hover{
  transform:translateY(-1px);
}

.button-primary{
  background:linear-gradient(135deg,var(--gold),#ffd875);
  color:#1f2a44;
  box-shadow:0 12px 25px rgba(244,185,66,.28);
}

.alert{
  border-radius:18px;
  padding:16px 18px;
  margin-bottom:18px;
  font-weight:700;
}

.alert-error{
  color:#7a1f1f;
  background:#fff1f1;
  border:1px solid #ffcaca;
}

.success-card{
  border-color:#bfe5ce;
}

.responsive-table{
  width:100%;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:18px;
}

table{
  width:100%;
  border-collapse:collapse;
  min-width:900px;
}

th,
td{
  text-align:left;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}

th{
  background:#eef3fb;
  color:var(--navy);
}

tr:last-child td{
  border-bottom:none;
}

@media (max-width:760px){
  .story-page{
    width:min(94vw,680px);
    padding:28px 0 48px;
  }

  .story-hero,
  .form-card{
    padding:24px;
    border-radius:22px;
  }

  .two-columns{
    grid-template-columns:1fr;
    gap:0;
  }

  .button{
    width:100%;
  }
}
