:root {
  --ink: #1c2430;
  --ink-soft: #3d4a5c;
  --mist: #dfe8ef;
  --paper: #f4f7fa;
  --line: rgba(28, 36, 48, 0.12);
  --accent: #2f6f6a;
  --accent-deep: #214f4b;
  --warn: #8a3b2d;
  --warn-soft: #f3e4df;
  --shadow: 0 24px 60px rgba(28, 36, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Figtree", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(47, 111, 106, 0.16), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(28, 36, 48, 0.1), transparent 50%),
    linear-gradient(160deg, #edf3f7 0%, var(--paper) 45%, #e7eef4 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(28, 36, 48, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 36, 48, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  color: var(--accent-deep);
}

.shell {
  position: relative;
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 64px 0 80px;
}

.brand {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 18px;
  animation: rise 420ms ease both;
}

.lang-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  margin-bottom: 28px;
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #f7fafc;
}

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

.intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 0 36px;
  min-height: 8.5rem;
  animation: rise 420ms ease both;
}

.panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise 520ms ease both;
  animation-delay: 60ms;
}

.panel h2 {
  font-family: "Fraunces", serif;
  font-weight: 540;
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.panel .sub {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.field {
  margin-bottom: 18px;
}

input[type="text"],
input[type="date"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="text"]:focus,
input[type="date"]:focus {
  border-color: rgba(47, 111, 106, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 111, 106, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

button.submit,
a.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #f5fbfa;
  font: inherit;
  font-weight: 650;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

button.submit:hover,
a.button:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

button.submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.meta {
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.92rem;
  border: 1px solid rgba(138, 59, 45, 0.18);
}

.page-shell {
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.topbar strong {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
}

.topbar a {
  text-decoration: none;
  font-weight: 650;
}

.story {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.story h1 {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.story p {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}

.link-list {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.link-list a {
  word-break: break-all;
  line-height: 1.6;
}

.center-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .shell,
  .page-shell {
    padding-top: 40px;
  }

  .panel {
    padding: 22px;
  }

  .intro {
    min-height: 0;
  }
}
