/* Tungsten team site: the home page header.
   White page, square corners, Proxima Nova (Montserrat stands in), one accent color: Tungsten blue.
   The colors are the same ones the site's other pages use. */

/* Montserrat, regular and semibold: the house font files, served from this site itself.
   Nothing here calls another site, so the page works under strict security headers.
   font-display: swap shows the words at once in a fallback font and switches when the file arrives. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/montserrat-400.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/montserrat-600.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #141414;
  --muted: #5e5e5e;
  --rule: #e3e3e3;
  --wash: #f6f6f6;
  --accent: #315ca5;
  --font: "Proxima Nova", "Montserrat", system-ui, sans-serif;

  --wide: 1080px; /* the width of the page's column, as on the other pages */
  --gutter: 28px;

  --rest-height: 156px; /* the header at the top of the page */
  --slim-height: 58px; /* the header once the page has scrolled */

  /* The two logo files at the sizes the header shows them. The calc() keeps each logo's
     true shape: it multiplies by the height over the width of the file's artboard. */
  --primary-w: 92px;
  --primary-h: calc(var(--primary-w) * 592 / 504.5);
  --side-h: 30px;
  --side-w: calc(var(--side-h) * 553.5 / 172);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

/* One focus ring everywhere: 2px blue, 2px away from the thing. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- The page ---------- */

/* Tall on purpose, so the scrolling can be tried.
   The padding keeps its content clear of the header, which sits on top of the page. */
main {
  min-height: 200vh;
  padding-top: var(--rest-height);
}

/* A plain message, when nobody can be shown as signed in: "You're signed out", and the like.
   It sits in the page's column, under the header. Its button is the ink color with white words and
   square corners, like the Sign in button at login.tungsten.ad. */
.notice {
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 8px var(--gutter) 0;
}

.notice h1 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  outline: none; /* it takes focus only so a screen reader reads it */
}

.notice p {
  max-width: 36em;
  margin: 0 0 24px;
}

.notice-button {
  margin: 0;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

/* ---------- The header ---------- */

/* The header is fixed to the top of the window and doesn't take up room in the page.
   So when it gets slim, the page doesn't change height, and the scroll position can't jump. */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--rest-height);
  background: #fff;
  border-bottom: 1px solid transparent; /* always there, so the slim bar's line doesn't change the height */
  transition: height 0.25s ease, border-color 0.25s ease;
}

.top.is-slim {
  height: var(--slim-height);
  border-bottom-color: var(--rule);
}

/* The same column as the page below. The logo and the account button sit inside the gutters. */
.top-inner {
  position: relative;
  height: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
}

/* The logo link is the size of the logo you can see, so the focus ring fits it.
   Both logo files sit in it, one on top of the other. The link changes size with the header,
   and the two logos cross-fade. */
.brand {
  position: absolute;
  left: var(--gutter);
  top: 24px;
  display: block;
  width: var(--primary-w);
  height: var(--primary-h);
  transition: top 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.top.is-slim .brand {
  top: 14px; /* (58 - 30) / 2: the 30px logo sits in the middle of the bar */
  width: var(--side-w);
  height: var(--side-h);
}

/* The pictures never catch the mouse. Only the link does, and the link is as big as the logo you
   can see. So the hidden square logo, which is taller than the slim bar, can't block what's under it. */
.brand img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.logo-primary {
  width: var(--primary-w);
  height: var(--primary-h);
}

.logo-side {
  width: var(--side-w);
  height: var(--side-h);
  opacity: 0;
}

.top.is-slim .logo-primary {
  opacity: 0;
}

.top.is-slim .logo-side {
  opacity: 1;
}

/* ---------- The account button ---------- */

.account {
  position: absolute;
  right: var(--gutter);
  top: 24px;
  transition: top 0.25s ease;
}

.top.is-slim .account {
  top: 12px; /* (58 - 34) / 2 */
}

.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.account-button:hover .account-name {
  color: var(--accent);
}

/* The ink square with the initials. */
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* A long first name is cut short with "...", so it can't push the button off the screen. */
.account-name {
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caret {
  color: var(--muted);
  font-size: 12px;
}

.account-button[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

/* ---------- The dropdown ---------- */

.account-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; /* lines up with the right edge of the button */
  width: 300px;
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: calc(100vh - 80px); /* on a short screen the panel scrolls inside itself */
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--ink);
}

/* Who is signed in. A long email wraps, so it can't run out of the panel. */
.who {
  padding: 14px 16px 12px;
}

.who-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.who-email {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.who-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

/* One row. The links and the "Here now" button look alike. Each has a rule above it. */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row:hover {
  background: var(--wash);
}

/* The row goes edge to edge, so its focus ring goes inside it. Outside, it would spill over the
   panel's border, and the panel can scroll, which would cut a ring drawn outside the row. */
.row:focus-visible {
  outline-offset: -2px;
  background: var(--wash);
}

/* The square on/off switch. Off: empty square, dot on the left.
   On: blue square, white dot on the right. It isn't only the color that changes. */
.switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 20px;
  border: 1px solid var(--ink);
  background: #fff;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--ink);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.row[aria-checked="true"] .switch {
  background: var(--accent);
  border-color: var(--accent);
}

.row[aria-checked="true"] .switch::after {
  background: #fff;
  transform: translateX(18px);
}

/* ---------- Small things ---------- */

/* Words only a screen reader reads. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* So nobody mistakes this page for the live site. */
.preview-tag {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 20;
  padding: 6px 10px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none; /* never in the way of what's under it */
}

/* People who ask their system for less motion get none. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* High-contrast mode throws away backgrounds. Keep the switch's dot and fill readable. */
@media (forced-colors: active) {
  .switch::after {
    background: CanvasText;
  }

  .row[aria-checked="true"] .switch {
    background: Highlight;
    border-color: Highlight;
  }
}

/* ---------- The question box ---------- */
/* The middle of the page (Mukul, November 30, 2026). Square corners, white, one accent. */

.ask {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 0 var(--gutter);
}

.ask-label {
  display: block;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.ask-field {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
  font-size: 17px;
  resize: vertical;
}

.ask-field:focus-visible,
.ask-model:focus-visible,
.ask-source:focus-visible,
.ask-keep input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ask-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 12px;
}

.ask-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ask-model-label,
.ask-source-label {
  font-size: 14px;
  color: var(--muted);
}

.ask-model,
.ask-source {
  font: inherit;
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: #fff;
}

.ask-keep {
  font-size: 14px;
  color: var(--muted);
}

.ask-send {
  margin-left: auto;
  padding: 10px 22px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ask-send[disabled] {
  opacity: 0.5;
  cursor: default;
}

.ask-where {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.ask-problem {
  margin: 10px 0 0;
  color: #a12a2a;
  font-size: 14px;
}

.ask-answer {
  margin-top: 32px;
}

.ask-waiting {
  color: var(--muted);
}

.ask-card {
  border-top: 2px solid var(--accent);
  padding-top: 16px;
}

.ask-card.is-general,
.ask-card.is-partly,
.ask-card.is-unanswered {
  border-top-color: var(--muted);
}

.ask-status {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ask-text {
  margin: 0;
  font-size: 17px;
}

.ask-sources-label {
  margin: 16px 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.ask-sources {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

.ask-by {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.ask-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
}

.ask-verdict-button {
  padding: 4px 14px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.ask-verdict-button:hover {
  border-color: var(--accent);
}
