/* --------------------------------------------------
   Global Design Tokens
-------------------------------------------------- */
:root {
  --brand: #AF1C2E;
  --bg: #f7f4f4;
  --text: #111;
  --typebox: #ffffff;
  --muted: #6b6b6b;
  --border: #ddd;
}

/* --------------------------------------------------
   Base / Reset
-------------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px 20px 0;
  font-family: "Anek Kannada", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------
   Header / Logo
-------------------------------------------------- */
.site-header {
  text-align: center;
  margin-bottom: 24px;
}

.site-logo {
  margin: 0;
}

.site-logo a {
  position: relative;
  display: inline-block;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
}

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

/* Hover Kannada logo */
.site-logo a::after {
  content: "ಕನ್ನಡ ಫಾಂಟ್ ಲೈಬ್ರರಿ";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100%;
  text-align: center;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;

  font-family: "Anek Kannada", system-ui, sans-serif;
  color: var(--brand);
  transition: opacity 0.2s ease;
}

.site-logo a:hover {
  color: transparent;
}

.site-logo a:hover::after {
  opacity: 1;
}

/* --------------------------------------------------
   Controls Bar
-------------------------------------------------- */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  max-width: 1100px;
  margin: 20px auto;
  padding: 12px 16px;

  background: var(--typebox);
  border: 1px solid var(--border);
  border-radius: 10px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.controls select,
.controls input {
  height: 40px;
  padding: 0 12px;

  font-family: inherit;
  font-size: 15px;

  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  color: var(--text);

  outline: none;
}

.controls select:hover,
.controls input:hover {
  border-color: var(--brand);
}

.controls select:focus,
.controls input:focus {
  border-color: var(--brand);
  background: var(--bg);
}

#testText {
  flex: 1;
  min-width: 240px;
}

/* Font size control */
.size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.size-control input[type="range"] {
  width: 120px;
  cursor: pointer;
  color: var(--brand);
    accent-color: var(--brand);


}

/* Font count */
.font-count {
  padding: 8px 14px;
  font-size: 14px;
  white-space: nowrap;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
}

.reset-btn {
  height: 40px;
  padding: 0 12px;

  font-size: 18px;
  font-weight: 600;

  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 6px;

  color: var(--brand);
  cursor: pointer;
}

.reset-btn:hover {
  background: var(--brand);
  color: #fff;
}


/* --------------------------------------------------
   Table
-------------------------------------------------- */
table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--typebox);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
}



/* --------------------------------------------------
   Font Preview Column
-------------------------------------------------- */
th:first-child,
td.preview {
  width: 70%;
  max-width: 70%;
}

td.preview {
  font-size: 38px;
  line-height: 1.4;
  background: #fafafa;
  border-right: 2px solid var(--border);
  white-space: nowrap;
  overflow-x: auto;
}

/* --------------------------------------------------
   Page Frame (Legal / Static pages)
-------------------------------------------------- */
.page-frame {
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px;
}

.page-content {
  max-width: 800px;
  width: 100%;
  background: var(--typebox);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  line-height: 1.6;
}

.page-content h1 {
  margin-top: 0;
  color: var(--brand);
}

/* --------------------------------------------------
   Links
-------------------------------------------------- */
a {
  color: var(--brand);
  text-decoration: none;
}


/* --------------------------------------------------
   Footer
-------------------------------------------------- */
.site-footer {
  padding: 28px 16px;
  background: var(--bg);
  text-align: center;
}

.footer-nav {
  margin-bottom: 14px;
}

.footer-nav a {
  margin: 0 10px;
  font-size: 18px;
  color: var(--brand);
  font-weight: 700;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}


.footer-note {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-note a {
  color: var(--text);
}

.footer-note a:hover {
  color: var(--brand);
}

/* --------------------------------------------------
   Responsive
-------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls select,
  .controls input {
    width: 100%;
  }

  td.preview {
    font-size: 22px;
  }

  .footer-nav a {
    display: inline-block;
    margin: 6px 8px;
  }
}
