/* Ask Jeeves, about 1999.

   The lightest of the seven, and correctly so: this is the one page in the set
   whose job is to be read rather than admired. A late nineties search engine was
   a white page, a big box, and almost nothing else, which is why the layout
   still looks reasonable today and why the costume here is mostly typographic:
   the wordmark, the deep blue, the ruled result rows, the phrasing.

   The butler is a collar and a bow tie over a dark shoulder. That is a nod at
   the idea, not a reproduction of anybody's character artwork, and it is the
   right side of that line to be on. */

:root {
  --aj-blue:   #0b3d91;
  --aj-blue-2: #1257c9;
  --aj-link:   #0b3d91;
  --aj-rule:   #d6dbe6;
  --aj-note:   #5a6472;
  --aj-orange: #E87722;
}

body {
  background: #eef1f7;
  color: #1b1f27;
  font: 16px/1.65 Verdana, Geneva, Arial, sans-serif;
  padding: 22px 12px 46px;
}

.aj {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #c9d1e0;
  border-top: 5px solid var(--aj-blue);
  padding: 26px 34px 34px;
}

a { color: var(--aj-link); }

/* ── The wordmark and the butler ───────────────────────────────────────── */

.aj-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.aj-butler {
  position: relative;
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50% 50% 6px 6px;
  background: linear-gradient(#2b3242, #171b24);   /* the shoulders */
}
.aj-butler-collar {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  width: 22px; height: 18px; background: #fff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.aj-butler-tie {
  position: absolute; left: 50%; top: 21px; transform: translateX(-50%);
  width: 15px; height: 8px; background: #8b1a1a;
  clip-path: polygon(0 0, 42% 50%, 0 100%, 100% 100%, 58% 50%, 100% 0);
}
.aj-wordmark {
  margin: 0;
  font: 700 30px/1 Georgia, "Times New Roman", serif;
  color: var(--aj-blue);
  letter-spacing: -.5px;
}

.aj h1 { font-size: clamp(22px, 3.6vw, 30px); line-height: 1.25; color: var(--aj-blue); margin: 0 0 10px; }
.aj h2 { font-size: 17px; color: var(--aj-blue); margin: 30px 0 8px; }
.aj h3 { font-size: 15px; margin: 16px 0 2px; }
.aj p { margin: 8px 0; }
.aj-lead { color: #333; }
.aj-note { font-size: 13px; color: var(--aj-note); }
.aj-list { margin: 8px 0; padding: 0 0 0 24px; }
.aj-list li { margin-bottom: 9px; }

/* ── The question box ──────────────────────────────────────────────────── */

.aj-search {
  background: #f3f6fc;
  border: 1px solid #c9d1e0;
  padding: 16px 18px 12px;
  margin: 18px 0 10px;
}
.aj-search > label { display: block; font-weight: 700; color: var(--aj-blue); margin-bottom: 8px; }
.aj-search-row { display: flex; gap: 0; }
.aj-search input {
  flex: 1 1 auto; min-width: 0;
  padding: 9px 11px;
  font: 16px/1.4 Verdana, Geneva, Arial, sans-serif;
  border: 2px solid var(--aj-blue);
  border-right: 0;
  background: #fff;
}
.aj-search input:focus { outline: 2px solid var(--aj-orange); outline-offset: -2px; }
/* Not a button: the filtering happens as you type, so a control that looks
   pressable and does nothing would be a small lie. It is the right hand end of
   the box, which is what that shape was. */
.aj-ask {
  display: flex; align-items: center;
  background: linear-gradient(var(--aj-blue-2), var(--aj-blue));
  color: #fff; font-weight: 700; font-size: 14px;
  padding: 0 20px;
}
.aj-count { font-size: 13px; color: var(--aj-note); margin: 9px 0 0; }

/* ── The results ───────────────────────────────────────────────────────── */

.aj-results { margin-top: 10px; }
.aj-group + .aj-group { margin-top: 4px; }
.aj-group h2 { margin-bottom: 4px; }

.aj-item { border-bottom: 1px solid var(--aj-rule); }
.aj-item summary {
  cursor: pointer;
  padding: 11px 4px 11px 22px;
  position: relative;
  color: var(--aj-link);
  text-decoration: underline;
  list-style: none;
}
.aj-item summary::-webkit-details-marker { display: none; }
/* The disclosure arrow, drawn rather than inherited, so it points the right way
   in every browser and turns when the answer opens. */
.aj-item summary::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  border: 5px solid transparent; border-left-color: var(--aj-blue);
  transition: transform .12s linear;
  transform-origin: 2px 5px;
}
.aj-item[open] summary::before { transform: rotate(90deg); }
.aj-item summary:hover { background: #f6f8fd; }
.aj-item summary:focus-visible { outline: 2px solid var(--aj-orange); outline-offset: -2px; }

.aj-answer { padding: 2px 4px 16px 22px; color: #23282f; }
.aj-answer p { margin: 0 0 10px; }
.aj-answer p:last-child { margin-bottom: 0; }
/* The FAQ answers carry the site's own link class. It means nothing here, so it
   is given something sensible to mean rather than left unstyled. */
.aj-answer .link-go { font-weight: 700; text-decoration: none; }
.aj-answer .link-go::after { content: " \203A"; }
.aj-answer .link-go:hover, .aj-answer .link-go:focus { text-decoration: underline; }

.aj-none { background: #fffbe6; border: 1px solid #e0c86a; padding: 12px 14px; font-size: 15px; }

/* ── The form ──────────────────────────────────────────────────────────── */

.aj-box { border: 1px solid #c9d1e0; background: #f3f6fc; padding: 18px 20px 20px; margin: 28px 0 0; max-width: 560px; }
.aj-box h2 { margin-top: 0; }

.aj-field { margin: 0 0 12px; }
.aj-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.aj-field input, .aj-field textarea {
  width: 100%; padding: 7px 9px;
  font: 15px/1.5 Verdana, Geneva, Arial, sans-serif;
  border: 1px solid #9aa7bd; background: #fff;
}
.aj-field input:focus, .aj-field textarea:focus { outline: 2px solid var(--aj-orange); outline-offset: 1px; }
.aj-field.is-bad input, .aj-field.is-bad textarea { border-color: #b00020; background: #fff6f6; }

.rt-field-err { color: #b00020; font-size: 13px; font-weight: 700; margin: 4px 0 0; }
.rt-err { border: 1px solid #b00020; background: #fff6f6; color: #6b0014; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }

.aj-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 16px 0 0; }
.aj-actions button {
  background: linear-gradient(var(--aj-blue-2), var(--aj-blue));
  color: #fff; border: 0; padding: 10px 26px;
  font: 700 15px/1.2 Verdana, Geneva, Arial, sans-serif; cursor: pointer;
}
.aj-actions button:hover, .aj-actions button:focus { background: var(--aj-orange); }

@media (max-width: 560px) {
  .aj { padding: 18px 16px 24px; }
  .aj-search-row { display: block; }
  .aj-search input { width: 100%; border-right: 2px solid var(--aj-blue); }
  .aj-ask { display: none; }
}
