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

:root {
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-text-preview: #444;
  --color-bg: #fff;
  --color-border: #e5e5e5;
  --color-table-header-bg: #f5f5f5;
  --color-table-border: #666;
  --color-brand: #fb09ca;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e5e5e5;
    --color-text-muted: #999;
    --color-text-preview: #bbb;
    --color-bg: #1a1a1a;
    --color-border: #333;
    --color-table-header-bg: #2a2a2a;
    --color-table-border: #555;
    --color-brand: #fb09ca;
  }
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-text-muted);
  text-decoration: none;
}
a:hover {
  color: var(--color-brand);
  text-decoration: underline;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 24px;
  border-bottom: 1px solid var(--color-border);
}
.site-header .site-logo {
  align-items: center;
  display: flex;
  align-items: center;
  max-width: 160px;
  text-decoration: none;
  padding: 8px 16px;
}
.site-header .site-logo picture img {
  width: 64px;
  margin-left: auto;
  display: block;
}
.site-header .site-logo__tagline {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 300;
  margin-left: 18px;
  margin-right: auto;
}

.hamburger__toggle {
  display: none;
}

.hamburger {
  display: none;
  cursor: pointer;
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  position: relative;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger span {
  top: 50%;
  transform: translateY(-50%);
}
.hamburger span::before {
  content: "";
  top: -8px;
}
.hamburger span::after {
  content: "";
  top: 8px;
}

.hamburger__toggle:checked ~ .hamburger span {
  background: transparent;
}

.hamburger__toggle:checked ~ .hamburger span::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger__toggle:checked ~ .hamburger span::after {
  top: 0;
  transform: rotate(-45deg);
}

.div-dropdown {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  margin-right: 24px;
  padding: 0;
  margin-left: auto;
}
.div-dropdown .menu-item a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.div-dropdown .menu-item a:hover {
  color: var(--color-brand);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .site-header .site-logo {
    padding: 8px;
  }
  .div-dropdown {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
    gap: 0;
  }
  .div-dropdown .menu-item {
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-border);
  }
  .hamburger__toggle:checked ~ .div-dropdown {
    display: flex;
  }
}
p, ul, ol, h1, h2, h3, h4, h5, h6 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 2rem;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 2rem;
}

section {
  margin-top: 48px;
  margin-bottom: 48px;
}

.features {
  padding: 2rem 0;
}
.features h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.features__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
  padding: 0;
}
.features__item {
  text-align: center;
}
.features__item h3 {
  font-size: 1.1rem;
  margin: 0.75rem 0 0.25rem;
}
.features__item p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.features__image {
  aspect-ratio: 9/20;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--color-table-header-bg);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.features__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.features__image--expanded {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  border-radius: 0;
  aspect-ratio: auto;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: features-expand 0.5s ease;
}
.features__image--expanded img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

@keyframes features-expand {
  from {
    opacity: 0;
    transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(var(--from-scale-x, 0.7), var(--from-scale-y, 0.7));
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}
.app-icon {
  align-items: center;
}
.app-icon img {
  display: block;
}
.app-icon__text {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 300;
  margin-left: 18px;
  margin-right: auto;
}
.app-icon {
  width: 300px;
}

.download {
  padding: 16px;
}
.download .app-store-badge img {
  margin: auto;
  width: 120px;
}

.font-detail {
  padding: 3rem 0;
}
.font-detail h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.font-detail__cta {
  margin-top: 2rem;
}
.font-detail__license {
  margin-top: -16px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.font-preview {
  font-size: 1.25rem;
  color: var(--color-text-preview);
  margin: 1.5rem 0;
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 12px 0 8px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
@media (min-width: 769px) {
  .site-footer {
    display: flex;
    justify-content: center;
    gap: 0px;
    align-items: center;
  }
}
.site-footer .download {
  padding: 16px 6px 16px 16px;
}
.site-footer .extra-links {
  padding: 16px 16px 16px 0;
}
.site-footer .extra-links .divider {
  padding: 0 8px;
}
.site-footer a {
  color: var(--color-text-muted);
}
.site-footer a:hover {
  color: var(--color-brand);
}

.embed-mode .site-header,
.embed-mode .site-footer {
  display: none;
}
.embed-mode #hero {
  margin-top: 0;
}

table th {
  background: var(--color-table-header-bg);
}
table th, table td {
  border-bottom: var(--color-table-border) 1px solid;
  padding: 8px 16px 8px 16px;
}
table th:first-child, table td:first-child {
  width: 160px;
}

.plans {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 769px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
.plans .plan {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  text-align: left;
  padding-top: 64px;
}
.plans .plan .plan-title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}
.plans .plan .plan-cost {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.plans .plan .plan-description {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  min-height: 140px;
}
.plans .plan .plan-where-to-get {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-text-muted);
}
.plans .plan--recommended {
  border-color: var(--color-brand);
}
@media (min-width: 769px) {
  .plans .plan--double {
    padding: 1rem 1.5rem;
    grid-column: span 2;
  }
  .plans .plan--double .plan-description {
    min-height: 40px;
  }
}
.plans .plan .plan-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  overflow: hidden;
  pointer-events: none;
}
.plans .plan .plan-ribbon span {
  display: block;
  position: absolute;
  top: 26px;
  right: -35px;
  width: 200px;
  padding: 6px 0;
  background: var(--color-brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: rotate(35deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-form__field {
  margin-bottom: 1.25rem;
}
.contact-form__field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}
.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  transition: border-color 0.2s ease;
}
.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--color-text-muted);
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--color-text-muted);
}
.contact-form__field textarea {
  resize: vertical;
}
.contact-form__error {
  font-size: 0.8rem;
  color: #c33;
  margin: 0.25rem 0 0;
}
.contact-form__error:empty {
  display: none;
}
.contact-form__submit {
  margin-top: 1.5rem;
}
.contact-form__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-bg);
  background: var(--color-text);
  border: 1px solid var(--color-text);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.contact-form__btn:hover {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-text);
}
.contact-form__btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

@media (max-width: 768px) {
  .other-sources-list tr.link-item {
    display: flex;
    flex-direction: column;
  }
  .other-sources-list tr.link-item td {
    display: block;
    width: 100%;
  }
  .other-sources-list tr.link-item td:first-child {
    width: 100%;
  }
}
.contact-form__success {
  text-align: center;
  padding: 2rem 0;
}
.contact-form__success svg {
  width: 3rem;
  height: 3rem;
  color: #2a9d2a;
  margin-bottom: 1rem;
}
.contact-form__success h2 {
  margin-bottom: 0.5rem;
}
.contact-form__success p {
  color: var(--color-text-muted);
}

.contact-form__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cf-turnstile {
  margin-bottom: 0.25rem;
}

.last-updated {
  font-size: 0.8em;
  text-align: right;
  margin: 2em;
}