* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #eaecde;
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: #ec2526;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  background: #ec2526;
  color: #eaecde;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

header h1 {
  margin: 0;
  font-size: 24px;
  color: #eaecde;
}

nav {
  margin-top: 14px;
}

nav a {
  color: #eaecde;
  margin-right: 18px;
  font-weight: bold;
}

nav a:hover {
  color: white;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.card {
  background: #fffdf7;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: #ec2526;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

table th {
  background: #f3d7d3;
  text-align: left;
}

table th,
table td {
  border: 1px solid #d8d8d0;
  padding: 10px;
  vertical-align: top;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #cfcfc4;
  border-radius: 6px;
  background: white;
  font-size: 14px;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

button,
input[type="submit"] {
  background: #ec2526;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: bold;
}

button:hover,
input[type="submit"]:hover {
  background: #c81d1e;
}

.inline-form {
  display: inline-block;
}

.small-text {
  color: #f5e9e3;
  font-size: 13px;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Portal property card */

.portal-property-card {
  border: 5px solid #111;
  background: #fff8ef;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.18);
}

.portal-property-header {
  background: #ec2526;
  color: #fff8ef;
  border-bottom: 5px solid #111;
  text-align: center;
  padding: 34px 26px 30px;
}

.portal-property-header h2 {
  color: #fff8ef;
  font-size: 38px;
  line-height: 1.1;
  margin: 8px 0 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.portal-kicker {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.portal-property-body {
  padding: 44px 30px 34px;
}

.portal-prompt {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 28px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-tile,
.portal-tile-button {
  min-height: 150px;
  border: 4px solid #111;
  background: #eaecde;
  color: #111;
  padding: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.35;
  border-radius: 0;
}

.portal-tile {
  text-decoration: none;
}

.portal-tile:hover,
.portal-tile-button:hover {
  background: #ec2526;
  color: #fff8ef;
  text-decoration: none;
}

.portal-tile strong,
.portal-tile-button strong {
  display: block;
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.2;
}

.portal-tile span,
.portal-tile-button span {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: normal;
}

.portal-tile-form {
  margin: 0;
  height: 100%;
}

.portal-tile-button {
  width: 100%;
  height: 100%;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 768px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  nav a {
    display: inline-block;
    margin-bottom: 10px;
  }

  .signature-pad {
    width: 100%;
    max-width: 500px;
    height: 180px;
    border: 3px solid #111;
    background: #fff;
    display: block;
    touch-action: none;
  }

  .signature-clear {
    margin-top: 8px;
  }
}
