/*
 * Illustrations for step-by-step guides (/wifi_transfer/, /transfer_to_pc/).
 * Drawn in HTML and CSS. Pictures of the app are kept to a minimum because the
 * app changes with every update; most pictures show the computer side or a
 * plain diagram. The audio editor article has its own editor.css.
 */

/* ---------- Figure basics ---------- */
.g-figure {
  margin: 24px 0 0;
}

.g-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.article-card .g-figure + p,
.article-card .g-figure + ol,
.article-card .g-figure + ul {
  margin-top: 22px;
}

/* Amber annotation, never part of the pictured screen */
.g-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #f5b83d;
  color: #2a1d00;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.g-note .material-symbols-outlined {
  font-size: 1rem;
}

.g-key {
  width: 24px;
  height: 24px;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: #f5b83d;
  color: #2a1d00;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.g-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 9px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
}

.g-verdict .material-symbols-outlined {
  font-size: 1.1rem;
}

.g-verdict--good { background: var(--tint-green); color: var(--tint-green-fg); }
.g-verdict--bad  { background: var(--tint-red);   color: var(--tint-red-fg); }

.g-key .material-symbols-outlined {
  font-size: 0.95rem;
}

/* ---------- Same-network diagram ---------- */
.g-net {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.g-net__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.g-net__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.g-dev {
  display: flex;
  flex: 0 0 31%;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.g-dev__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--tint-blue);
  color: var(--tint-blue-fg);
}

.g-dev__icon .material-symbols-outlined {
  font-size: 1.8rem;
}

.g-dev__icon--off {
  background: var(--tint-gray);
  color: var(--tint-gray-fg);
}

.g-dev__name {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.3;
}

.g-dev__net {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* Dashed link between devices, with a small icon in the middle */
.g-link {
  position: relative;
  flex: 1;
  height: 52px;
  display: grid;
  place-items: center;
}

.g-link::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  border-top: 2px dashed var(--tint-blue-fg);
}

.g-link .material-symbols-outlined {
  position: relative;
  padding: 0 4px;
  background: var(--bg);
  color: var(--tint-blue-fg);
  font-size: 1.1rem;
}

.g-link--broken::before {
  border-top-color: var(--border-strong);
}

.g-link--broken .material-symbols-outlined {
  color: var(--tint-red-fg);
}

/* ---------- Phone: schematic of the transfer screen ---------- */
.g-phone {
  --p-bg: #242e3a;
  --p-raised: #2f3a48;
  --p-text: #f1f5f9;
  --p-muted: #94a3b8;
  --p-accent: #8ec5ff;

  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
  aspect-ratio: 9 / 14.5;
  overflow: hidden;
  border-radius: 22px;
  background: var(--p-bg);
  color: var(--p-text);
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.08), 0 12px 32px rgba(15, 15, 15, 0.12);
  user-select: none;
}

.g-phone__screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1.6em 1.3em 1.4em;
  font-size: 13px; /* browsers without container units */
  font-size: 4.8cqw;
  line-height: 1.35;
}

.g-phone__title {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1.2em;
  font-size: 1.05em;
  font-weight: 650;
}

.g-phone__title .material-symbols-outlined {
  color: var(--p-accent);
  font-size: 1.3em;
}

.g-phone__step + .g-phone__step {
  margin-top: 1.1em;
}

.g-phone__step b {
  display: block;
  color: var(--p-accent);
  font-size: 0.78em;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.g-phone__step span {
  display: block;
  margin-top: 0.15em;
  color: var(--p-muted);
  font-size: 0.82em;
}

.g-phone__value {
  position: relative;
  margin-top: 0.5em;
  padding: 0.5em 0.7em;
  border-radius: 0.7em;
  background: var(--p-raised);
  color: var(--p-text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.g-phone__ex {
  position: absolute;
  top: -0.65em;
  right: -0.35em;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: #f5b83d;
  color: #2a1d00;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.g-phone__value--pin {
  display: inline-block;
  font-size: 1.5em;
  letter-spacing: 0.18em;
}

.g-phone__cancel {
  margin-top: auto;
  padding: 0.65em;
  border-radius: 999px;
  background: var(--p-accent);
  color: #12345a;
  font-size: 0.9em;
  font-weight: 650;
  text-align: center;
}

/* The phone with its notes beside it */
.g-side {
  display: grid;
  grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.g-side__notes {
  margin: 0;
  padding: 0 !important;
  list-style: none;
}

.g-side__notes li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.g-side__notes li + li {
  margin-top: 14px;
}

/* ---------- Browser window ---------- */
.g-browser {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.06), 0 10px 28px rgba(15, 15, 15, 0.08);
  user-select: none;
}

.g-browser__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f1f2f4;
}

.g-browser__dots {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.g-browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d5d7db;
}

.g-browser__url {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.3;
}

.g-browser__url .material-symbols-outlined {
  color: var(--muted);
  font-size: 1.05rem;
}

.g-browser__url span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-browser__warn {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.g-browser__url.is-marked {
  box-shadow: 0 0 0 2px #f5b83d;
}

.g-browser__url .g-caret {
  width: 1.5px;
  height: 1.05em;
  margin-left: -6px;
  background: var(--text);
}

.g-browser__page {
  position: relative;
  min-height: 210px;
}

/* A browser's empty start page */
.g-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 210px;
  padding: 28px 20px;
}

.g-start__search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 340px);
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--faint);
  font-size: 0.88rem;
}

.g-start__search .material-symbols-outlined {
  font-size: 1.1rem;
}

/* Notes laid over a browser picture */
.g-tag {
  position: absolute;
  z-index: 1;
}

/* The transfer page served by the phone: dark, as in the app */
.g-web {
  --w-bg: #0f1116;
  --w-card: #1a1d25;
  --w-text: #eef2f7;
  --w-dim: #9aa4b2;
  --w-faint: #6b7584;
  --w-accent: #8fc8ff;

  min-height: 240px;
  padding: 18px 20px 22px;
  background: linear-gradient(160deg, #141720, var(--w-bg));
  color: var(--w-text);
}

.g-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  margin: 8px auto 0;
  text-align: center;
}

.g-login img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.g-login h4 {
  margin: 4px 0 0;
  color: var(--w-text);
  font-size: 1.05rem;
  font-weight: 650;
}

.g-login p {
  margin: 0 !important;
  color: var(--w-dim) !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
}

.g-login__pin {
  width: 120px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #2c3240;
  border-radius: 10px;
  background: var(--w-card);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: 0.3em;
  text-align: center;
}

.g-login__btn {
  width: 120px;
  padding: 8px;
  border-radius: 10px;
  background: var(--w-accent);
  color: #0d2a47;
  font-size: 0.9rem;
  font-weight: 650;
}

.g-list__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.g-list__head b {
  font-size: 1.15rem;
  font-weight: 650;
}

.g-list__head i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--w-accent);
  box-shadow: 0 0 0 3px rgba(143, 200, 255, 0.18);
}

.g-list__head .material-symbols-outlined {
  color: var(--w-dim);
  font-size: 1.3rem;
}

.g-list__head .g-key {
  margin-left: auto;
}

.g-list__cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(143, 200, 255, 0.16);
  color: var(--w-accent);
  font-size: 0.78rem;
  font-weight: 650;
}

.g-rec {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--w-card);
}

.g-rec + .g-rec {
  margin-top: 6px;
}

.g-rec__top,
.g-rec__bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-rec__top b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-rec__top span {
  color: var(--w-dim);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.g-rec__bottom {
  margin-top: 3px;
  color: var(--w-dim);
  font-size: 0.76rem;
}

.g-rec__bottom i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--w-accent);
}

.g-rec__bottom span:nth-of-type(2) {
  margin-left: auto;
  color: var(--w-faint);
}

.g-rec__bottom .material-symbols-outlined {
  color: var(--w-accent);
  font-size: 1.15rem;
}

.g-rec .g-key {
  color: #2a1d00;
  font-size: 0.78rem;
}

.g-rec.is-marked {
  box-shadow: 0 0 0 2px #f5b83d;
}

/* ---------- Method chooser (transfer to computer) ---------- */
.g-choose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.g-choose__cell {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.g-choose__pair {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
}

.g-choose__pair .material-symbols-outlined {
  color: var(--muted);
  font-size: 1.15rem;
}

.g-choose__pair .g-plus {
  color: var(--faint);
  font-weight: 400;
}

.g-choose__ways {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.g-choose__ways a {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.g-choose__ways a:hover {
  background: var(--tint-blue);
}

/* ---------- Folder path ---------- */
.g-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 0.86rem;
}

.g-path span {
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-weight: 550;
  overflow-wrap: anywhere;
}

.g-path span:last-child {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.g-path i {
  color: var(--faint);
  font-style: normal;
}

/* ---------- Small screens ---------- */
@media (max-width: 680px) {
  .g-net,
  .g-side,
  .g-choose {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-side {
    gap: 24px;
  }

  .g-web {
    padding: 16px 14px 18px;
  }

  .g-browser__warn {
    display: none;
  }
}
