@import url("./theme.css");

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1rem calc(var(--nav-h) + 1.25rem);
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand__mark {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--fg);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  font-size: 0.65rem;
  line-height: 1;
}

.topbar__actions {
  display: flex;
  gap: 0.35rem;
}

.icon-btn {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  cursor: pointer;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.hero p {
  margin: 0 0 1rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-size: 1rem;
}

.search::placeholder {
  color: var(--fg-faint);
}

.section-label {
  margin: 1.15rem 0 0.5rem;
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 5.5rem;
  padding: 0.9rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.tile__icon {
  font-size: 1.25rem;
  opacity: 0.9;
}

.tile__label {
  font-size: 0.92rem;
  font-weight: 600;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  z-index: 20;
}

.bottom-nav a,
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.68rem;
  cursor: pointer;
}

.bottom-nav .is-active {
  color: var(--fg);
}

/* Tool page — fold hierarchy */
.tool-header {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--fg-muted);
}

.panel {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-input);
  margin-bottom: 0.75rem;
}

.panel--result {
  background: var(--bg-result);
}

.panel__label {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-bottom: 0.35rem;
}

.panel input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  min-height: 2.75rem;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.util-bar {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.fold-below {
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
  color: var(--fg-muted);
  font-size: 0.85rem;
}

.fold-below details {
  margin-bottom: 0.5rem;
}

@media (min-width: 720px) {
  .app {
    padding-top: 1.25rem;
  }
  .grid {
    gap: 0.85rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --max: 32rem;
  }
}
