*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1c1917;
  background: #fdfaf3;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  line-height: 1.5;
}

header {
  text-align: center;
  padding: 1rem 0 2rem;
}
header img {
  display: block;
  margin: 0 auto 0.5rem;
}
header h1 {
  margin: 0.25rem 0 0.25rem;
  font-size: 2rem;
  color: #b45309;
  letter-spacing: -0.01em;
}
.tagline {
  margin: 0;
  color: #57534e;
  font-size: 0.95rem;
}
.tagline a {
  color: #b45309;
}

section {
  background: #fff7ed;
  border: 1px solid #fcd9a8;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
section h2 {
  margin: 0 0 0.5rem;
  color: #92400e;
  font-size: 1.15rem;
}
section p {
  margin: 0 0 1rem;
  color: #57534e;
  font-size: 0.9rem;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  max-width: 260px;
}
.control label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #57534e;
}
input[type="date"],
input[type="number"] {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid #d97706;
  border-radius: 6px;
  background: #fff;
  color: #1c1917;
  width: 100%;
}
input:focus {
  outline: 2px solid #b45309;
  outline-offset: 1px;
}

.output {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 1rem;
  min-height: 3rem;
}
.result-line strong {
  display: block;
  font-size: 1.35rem;
  color: #92400e;
}
.result-line-ar {
  margin-top: 0.35rem;
  font-size: 1.2rem;
  color: #92400e;
  font-weight: 600;
}
.result-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #78716c;
}
.hint {
  color: #a8a29e;
  font-style: italic;
}
.err {
  color: #b91c1c;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #fde68a;
}
th {
  background: #fef3c7;
  font-weight: 600;
  color: #92400e;
}
tr:last-child td {
  border-bottom: none;
}
.date-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #57534e;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-fixed { background: #dbeafe; color: #1e40af; }
.badge-moveable { background: #fde68a; color: #92400e; }

footer {
  margin-top: 2.5rem;
  text-align: center;
  color: #78716c;
  font-size: 0.85rem;
}
footer a {
  color: #b45309;
}
