/* service.ampd.energy — Claude Design "2a: mobile, gradient hero, inline
   expand", built on the Ampd design-system tokens (Brand Guidelines V4.1).
   One column on every screen; on a wide screen the column sits as a card on
   the pale grey canvas the design was drawn on. */

:root {
  --ampd-teal: #0FB694;
  --ampd-teal-dark: #0C9479;
  --ampd-teal-tint: #E7F8F4;
  --ampd-light-teal: #A3D9D0;
  --ampd-mid-grey: #A6A8AB;
  --ampd-light-grey: #DCDCDB;
  --ampd-grey-tint: #F4F4F4;
  --ampd-hairline: #F0F0EF;
  --ampd-white: #FFFFFF;
  --ampd-black: #231F20;
  --ampd-black-hover: #3A3536;
  --text-muted: #6E7073;
  --canvas: #EEF0F0;
  --gradient: linear-gradient(-45deg, #0FB694 0%, #A5CED3 87%, #A5CED3 100%);

  --font-primary: 'Lato', Arial, sans-serif;
  --font-ui: 'Poppins', Arial, sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-card: 20px;
  --shadow-card: 0 6px 20px rgba(35, 31, 32, .14);
  --shadow-card-hover: 0 10px 26px rgba(35, 31, 32, .20);
  --shadow-page: 0 10px 44px rgba(35, 31, 32, .16);
  --ring: 0 0 0 3px rgba(15, 182, 148, .35);
  --tap: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ampd-white);
  color: var(--ampd-black);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
button { font: inherit; color: inherit; }
a { color: var(--ampd-teal); text-decoration: none; }
a:hover { color: var(--ampd-teal-dark); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: none; box-shadow: var(--ring); }

.page { background: var(--ampd-white); min-height: 100vh; display: flex; flex-direction: column; }

@media (min-width: 640px) {
  body { background: var(--canvas); padding: 40px 16px 64px; }
  .page {
    max-width: 480px;
    margin: 0 auto;
    min-height: 0;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-page);
  }
}

/* ---- Header ------------------------------------------------------------ */
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ampd-light-grey);
}
.top-logo { height: 24px; width: auto; }
.top-domain { font-family: var(--font-mono); font-size: 11px; color: var(--ampd-teal-dark); }

/* ---- Hero -------------------------------------------------------------- */
.hero { background: var(--gradient); padding: 22px 16px 26px; }

.eyebrow {
  font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ampd-teal); margin-bottom: 8px;
}
.eyebrow-light { color: var(--ampd-white); margin-bottom: 10px; }

.hero-card {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--ampd-white); border: none; border-radius: var(--radius-lg);
  padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease-out;
}
.hero-card:hover { box-shadow: var(--shadow-card-hover); }
.hero-copy { display: flex; flex-direction: column; gap: 6px; }
.hero-title { font-weight: 300; font-size: 25px; line-height: 1.14; color: var(--ampd-black); }
.hero-sub { font-family: var(--font-ui); font-size: 12px; color: var(--text-muted); }
.hero-chevron {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--ampd-teal); color: var(--ampd-white);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease-out;
}
.hero-chevron .las { font-size: 22px; }
.hero-card[aria-expanded="true"] .hero-chevron { transform: rotate(180deg); }

.panel {
  background: var(--ampd-white); border-radius: var(--radius-lg);
  padding: 20px; margin-top: 10px; box-shadow: var(--shadow-card);
}
.panel-title, .panel-heading { font-family: var(--font-ui); font-weight: 600; color: var(--ampd-black); }
.panel-title { font-size: 14px; margin-bottom: 10px; }
.panel-heading { font-size: 16px; }
.panel-text { font-size: 12px; color: var(--text-muted); margin: 6px 0 14px; }
.panel-foot { font-size: 11px; color: var(--text-muted); margin-top: 10px; }
.panel-foot-sep { margin: 0 4px; }
.panel-back { display: inline-block; font-size: 12px; color: var(--text-muted); margin-top: 12px; }

.linkish {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--ampd-teal-dark); text-decoration: underline; font-size: inherit;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--ampd-white); border: 1px solid var(--ampd-light-grey); border-radius: 999px;
  padding: 11px 16px; font-family: var(--font-ui); font-size: 13px; color: var(--ampd-black);
  cursor: pointer; min-height: var(--tap);
  transition: border-color .2s ease-out, color .2s ease-out;
}
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--ampd-teal); color: var(--ampd-teal-dark); }

/* Contact card */
.contact { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--ampd-teal); color: var(--ampd-white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-weight: 600; font-size: 16px;
}
.contact-name { font-family: var(--font-ui); font-weight: 600; font-size: 16px; color: var(--ampd-black); }
.contact-role { font-size: 12px; color: var(--text-muted); }

.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.actions-row { display: flex; gap: 8px; }
.actions-row > .btn { flex: 1; }
.actions-row > .btn:first-child { flex: 1.7; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); border-radius: var(--radius-sm); padding: 0 16px;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s ease-out, border-color .2s ease-out, color .2s ease-out;
}
.btn .las, .btn .lab { font-size: 17px; }
.btn-teal { background: var(--ampd-teal); color: var(--ampd-white); }
.btn-teal:hover { background: var(--ampd-teal-dark); color: var(--ampd-white); }
.btn-outline { background: var(--ampd-white); color: var(--ampd-black); border-color: var(--ampd-light-grey); font-size: 13px; }
.btn-outline:hover { border-color: var(--ampd-teal); color: var(--ampd-teal-dark); }
.btn-dark { background: var(--ampd-black); color: var(--ampd-white); }
.btn-dark:hover { background: var(--ampd-black-hover); color: var(--ampd-white); }
.btn[disabled] { opacity: .6; cursor: default; }

.others { margin-top: 14px; border-top: 1px solid var(--ampd-hairline); padding-top: 12px; }
.others-title { font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ampd-teal-dark); margin-bottom: 6px; }
.other {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap);
  padding: 6px 0; border-top: 1px solid var(--ampd-hairline);
}
.other:first-of-type { border-top: none; }
.other-who { flex: 1; min-width: 0; }
.other-name { font-family: var(--font-ui); font-weight: 500; font-size: 13px; color: var(--ampd-black); }
.other-role { font-size: 11px; color: var(--text-muted); }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  border: 1px solid var(--ampd-light-grey); background: var(--ampd-white); color: var(--ampd-black);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: border-color .2s ease-out, color .2s ease-out;
}
.icon-btn:hover { border-color: var(--ampd-teal); color: var(--ampd-teal-dark); }
.icon-btn .las, .icon-btn .lab { font-size: 19px; }

/* Form */
.form { display: flex; flex-direction: column; gap: 8px; }
.field {
  min-height: var(--tap); padding: 0 14px; width: 100%;
  border: 1px solid var(--ampd-light-grey); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: 14px; color: var(--ampd-black); background: var(--ampd-white);
}
.field::placeholder { color: #84868A; }
.field:focus { border-color: var(--ampd-teal); outline: none; box-shadow: none; }
.field[aria-invalid="true"] { border-color: #a4342b; }
.trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 11px; color: var(--ampd-black); margin-top: 8px; }
.form-note .las { color: var(--ampd-teal); margin-right: 2px; }

.done { text-align: center; padding: 8px 0; }
.done-icon { font-size: 48px; color: var(--ampd-teal); }
.done-title { font-family: var(--font-ui); font-weight: 600; font-size: 20px; color: var(--ampd-black); margin-top: 6px; }
.done-text { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ---- Products ---------------------------------------------------------- */
.products { padding: 22px 16px 24px; flex: 1; }
.products-title { font-weight: 300; font-size: 21px; line-height: 1.2; margin: 0; }

.serial {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--ampd-light-grey); border-radius: var(--radius-sm);
  padding: 0 4px 0 12px; background: var(--ampd-white); margin-top: 14px;
  transition: border-color .2s ease-out;
}
.serial:focus-within { border-color: var(--ampd-teal); }
.serial-input {
  border: none; outline: none; flex: 1; min-width: 0; min-height: var(--tap);
  font-family: var(--font-ui); font-size: 13px; color: var(--ampd-black); background: transparent;
}
.serial-input:focus { box-shadow: none; }
.serial-input::placeholder { color: #84868A; }
.serial-go {
  width: 36px; height: 36px; border-radius: 6px; border: none; cursor: pointer;
  background: var(--ampd-teal); color: var(--ampd-white);
  display: inline-flex; align-items: center; justify-content: center;
}
.serial-go:hover { background: var(--ampd-teal-dark); }
.serial-go .las { font-size: 18px; }
.serial-status { font-size: 12px; color: var(--text-muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.serial-status .las { font-size: 16px; color: var(--ampd-teal); }
.serial-status.is-error .las { color: var(--ampd-mid-grey); }
.serial-status .mono { font-family: var(--font-mono); color: var(--ampd-black); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile {
  border: 1.5px solid var(--ampd-light-grey); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; background: var(--ampd-white); padding: 0; text-align: left;
  transition: border-color .2s ease-out, box-shadow .2s ease-out;
}
.tile:hover { border-color: var(--ampd-light-teal); }
.tile[aria-pressed="true"] { border-color: var(--ampd-teal); box-shadow: 0 0 0 1px var(--ampd-teal) inset; }
.tile-img { width: 100%; height: 96px; object-fit: contain; padding: 6px; background: var(--ampd-white); }
.tile-meta { padding: 8px 10px; border-top: 1px solid var(--ampd-hairline); }
.tile-name { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--ampd-black); }
.tile-tag { font-size: 11px; color: var(--text-muted); }

.downloads { border: 1px solid var(--ampd-light-grey); border-radius: var(--radius-md); margin-top: 14px; overflow: hidden; }
.downloads-head {
  background: #F7F8F8; padding: 10px 14px;
  font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ampd-teal-dark);
}
.downloads-head .mono { font-family: var(--font-mono); letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ampd-black); }
.dl {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 8px 14px;
  border-top: 1px solid var(--ampd-hairline);
  font-family: var(--font-ui); font-size: 13px; color: var(--ampd-black); text-decoration: none;
  transition: color .2s ease-out;
}
.dl:hover { color: var(--ampd-teal-dark); }
.dl .las { font-size: 18px; color: var(--ampd-teal); flex: none; }
.dl-text { flex: 1; min-width: 0; }
.dl-detail { display: block; font-family: var(--font-primary); font-size: 11px; color: var(--text-muted); }
.dl-badge { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.dl-more { border-top: 1px solid var(--ampd-hairline); }
.dl-more-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 12px; color: var(--text-muted); }
.dl-more-head::-webkit-details-marker { display: none; }
.dl-more-head:hover { color: var(--ampd-teal-dark); }
.dl-more-head .las { font-size: 16px; flex: none; transition: transform 0.15s ease; }
.dl-more[open] > .dl-more-head .las { transform: rotate(90deg); }
.dl-more-title { flex: 1; }
.dl-more-count { font-family: var(--font-mono); font-size: 10px; }
.dl-more .dl { padding-left: 26px; }
.dl-empty { padding: 12px 14px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--ampd-hairline); }

/* ---- Footer ------------------------------------------------------------ */
.foot {
  background: var(--ampd-black); display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
}
.foot-logo { height: 18px; width: auto; }
.foot-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Language picker --------------------------------------------------- */
.top-right { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); cursor: pointer;
}
.lang .la-globe { font-size: 16px; }
.lang-select {
  font-family: var(--font-ui); font-size: 12px; color: var(--ampd-black);
  background: transparent; border: none; padding: 4px 2px;
  cursor: pointer; max-width: 170px; text-overflow: ellipsis;
}
.lang-select:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
@media (max-width: 380px) {
  /* The domain is the first thing to go: the picker has to stay reachable
     with a thumb, and 320px phones are still on site. */
  .top-domain { display: none; }
}
