/* Brand font face */
@font-face {
  font-family: "Repetition Scrolling";
  src: url("../fonts/RepetitionScrolling.woff") format("woff"),
       url("../fonts/RepetitionScrolling.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Design Tokens: typography, colors, icons, spacing */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-ink: #000000;
  --color-ink-muted: #666666;
  --color-border: #000000;
  --color-accent: #1b761b; /* progress & positive */
  --color-danger: #ff4d4d;
  --color-surface: rgba(255,255,255,0.25);

  /* Graph paper background */
  --grid-line: rgba(0,0,0,0.05);
  --grid-size: 20px;

  /* Typography */
  --font-brand: "Repetition Scrolling", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-sans: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;

  /* Font sizes */
  --fs-xxl: 3rem;
  --fs-xl: 2.5rem;
  --fs-lg: 1.3rem;
  --fs-md: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  /* Spacing */
  --space-xxl: 2rem;
  --space-xl: 1.5rem;
  --space-lg: 1.25rem;
  --space-md: 1rem;
  --space-sm: 0.8rem;
  --space-xs: 0.5rem;
  --radius-xl: 1.25rem;
  --radius-lg: 1rem;
  --radius-md: 12px;
  --radius-pill: 25px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);

  /* Icon size scale */
  --icon-xxl: 3rem;
  --icon-xl: 2.5rem;
  --icon-lg: 2rem;
  --icon-md: 1.5rem;
  --icon-sm: 1.2rem;
}

/* Global background and base font */
html, body {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--color-ink);
  font-family: var(--font-sans);
}

/* Brand title */
.brand-style { font-family: var(--font-brand); font-weight: 400; font-style: normal; }
h1.brand-style { font-size: var(--fs-xxl); }
h1.masthead{
  font-size: 2rem;
  display: inline;
}
a#sign-in-link{
  color: #2e8b2e;
}

/* Nav links */
#sign-in-link{
  float: right;
}

/* Containers */
.container { box-sizing: border-box; margin: 0 auto; padding: 20px; max-width: 26rem; }
.container.wide { max-width: 40vw; }

/* Glass surface */
.glass {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  font: 500 var(--fs-md)/1.4 var(--font-sans);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Links as buttons */
.link-btn {
  display: block;
  padding: 13px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  font-weight: bold;
  font-size: var(--fs-lg);
  transition: background-color 0.2s ease;
}
.link-btn:hover { background-color: rgba(0,0,0,0.05); }

/* Muted text */
.text-muted { color: var(--color-ink-muted); }
.center { text-align: center; }

.prompt-input {
  width: 100%;
  min-height: 120px;
  padding: 20px 80px 20px 20px;
  border: 2px solid orange;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-ink);
  resize: vertical;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.prompt-input:focus {
  outline: none;
  border-color: orange;
  box-shadow: 0 0 0 3px rgba(27, 118, 27, 0.1);
}

.prompt-input::placeholder {
  color: var(--color-ink-muted);
  opacity: 0.7;
}

.submit-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px orange;
}

.submit-button:hover {
  background: orange;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px orange;
}

.submit-button:active {
  transform: translateY(-50%) scale(0.95);
}

.submit-button i {
  font-size: 20px;
}