@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg-start: #f8f2e8;
  --bg-middle: #eef6ff;
  --bg-end: #eefaf5;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(18, 38, 63, 0.1);
  --text: #1f2937;
  --muted: #52606d;
  --accent: #0f766e;
  --accent-deep: #0e7490;
  --accent-warm: #d97706;
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(31, 41, 55, 0.12);
  --radius-lg: 22px;
  --radius-xl: 30px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(14, 116, 144, 0.16), transparent 26%),
    linear-gradient(160deg, var(--bg-start) 0%, var(--bg-middle) 50%, var(--bg-end) 100%);
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.orb-one {
  top: 72px;
  right: 8%;
  width: 170px;
  height: 170px;
  background: rgba(14, 116, 144, 0.18);
}

.orb-two {
  bottom: 90px;
  left: 6%;
  width: 220px;
  height: 220px;
  background: rgba(217, 119, 6, 0.14);
}

.hero,
.tool-grid,
.site-footer,
.no-script {
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 760px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.8rem, 5.2vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

.no-script {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(180, 35, 24, 0.16);
  color: var(--danger);
  box-shadow: var(--shadow);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.card {
  grid-column: span 4;
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise-in 0.65s ease both;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.card-wide {
  grid-column: span 8;
}

.card:nth-child(2) {
  animation-delay: 0.06s;
}

.card:nth-child(3) {
  animation-delay: 0.12s;
}

.card:nth-child(4) {
  animation-delay: 0.18s;
}

.card:nth-child(5) {
  animation-delay: 0.24s;
}

.card-head h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.1;
}

.card-head p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.tool-form {
  display: grid;
  gap: 14px;
}

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

.field-group {
  text-align: left;
}

.field-hint {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.date-field {
  position: relative;
}

.date-text-input {
  padding-right: 58px;
}

.calendar-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  box-shadow: none;
  transform: translateY(-50%);
}

.calendar-toggle:hover {
  background: rgba(15, 118, 110, 0.14);
  box-shadow: none;
  filter: none;
  transform: translateY(-50%);
}

.calendar-toggle:active {
  transform: translateY(-50%);
}

.calendar-toggle[aria-expanded="true"] {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.16);
}

.calendar-toggle:focus-visible,
.date-picker-day:focus-visible,
.date-picker-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.calendar-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.date-picker-popover {
  position: fixed;
  z-index: 30;
  width: min(320px, calc(100vw - 24px));
}

.date-picker-panel {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 56px rgba(31, 41, 55, 0.18);
  backdrop-filter: blur(18px);
}

.date-picker-toolbar {
  margin-bottom: 14px;
}

.date-picker-selects {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}

.date-picker-select {
  padding: 11px 12px;
}

.date-picker-weekdays,
.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.date-picker-weekdays {
  margin-bottom: 8px;
}

.date-picker-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.date-picker-day {
  min-height: 42px;
  padding: 9px 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(238, 246, 255, 0.92);
  color: var(--text);
  font-weight: 700;
  box-shadow: none;
}

.date-picker-day:hover {
  background: rgba(208, 240, 236, 0.96);
  box-shadow: none;
  filter: none;
  transform: none;
}

.date-picker-day:active {
  transform: none;
}

.date-picker-day.is-selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #ffffff;
}

.date-picker-day.is-today:not(.is-selected) {
  border-color: rgba(15, 118, 110, 0.24);
  color: var(--accent);
  background: rgba(15, 118, 110, 0.12);
}

.date-picker-day.is-empty {
  display: block;
  background: transparent;
  pointer-events: none;
}

.date-picker-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.date-picker-action {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  box-shadow: none;
}

.date-picker-action:hover {
  background: rgba(15, 118, 110, 0.16);
  box-shadow: none;
  filter: none;
  transform: none;
}

.date-picker-action:active {
  transform: none;
}

.date-picker-action.muted {
  background: rgba(31, 41, 55, 0.08);
  color: var(--text);
}

.date-picker-action.muted:hover {
  background: rgba(31, 41, 55, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2f4252;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

button {
  border: none;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 14px 26px rgba(14, 116, 144, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(14, 116, 144, 0.28);
  filter: saturate(1.05);
}

button:active {
  transform: translateY(0);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.result-panel {
  margin-top: 18px;
  min-height: 170px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.74));
  border: 1px solid rgba(15, 118, 110, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.result-placeholder {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.result-badge {
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.14);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-badge.error {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.18);
}

.result-title {
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.38rem;
  line-height: 1.18;
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.result-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-value {
  font-weight: 700;
  text-align: right;
}

.result-note {
  margin: 12px 0 0;
  color: #325567;
  line-height: 1.65;
  font-size: 0.93rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}

.site-footer a:hover {
  text-decoration: underline;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .card,
  .card-wide {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding-top: 36px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .card-wide {
    grid-column: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .result-item {
    flex-direction: column;
  }

  .result-value {
    text-align: left;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }
}
