/* The OpenAI migration page (/openai-fine-tuning/): the dates, the converter and the steps, each section an island on
   a computer like every page; black and white only. */

/* ---- the top */
.mg-hero { padding-top: clamp(32px, 4vw, 64px); }   /* (on a computer the island's padding is its top) */
.mg-kicker { margin: 0 0 14px; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--ink-2); }
.mg-lead { margin-top: clamp(14px, 1.2vw, 18px); }
.mg-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(22px, 2.4vw, 32px); }
.mg-dates {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px);
  margin: clamp(32px, 3.6vw, 52px) 0 0;
}
@media (max-width: 899px) { .mg-dates { grid-template-columns: minmax(0, 1fr); } }
.mg-dates > div {
  padding: clamp(16px, 1.6vw, 22px); border: 1px solid var(--edge); border-radius: clamp(14px, 1.4vw, 18px);
  background: var(--panel);
}
.mg-dates dt { font-size: 15.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.mg-dates dd { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.mg-left { display: block; margin-top: 6px; color: var(--ink); font-weight: 700; }
.mg-source { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); }
.mg-source a, .mg-step-list a, .mg-fine a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---- the converter */
.mg-convert .ov-h2, .mg-steps .ov-h2 { margin: 0; }
.mg-noscript { margin-top: 24px; color: var(--ink-2); }
.mg-tool { margin-top: clamp(24px, 2.6vw, 36px); }
.mg-drop {
  position: relative; display: grid; justify-items: center; gap: 14px; padding: clamp(28px, 3vw, 44px) 20px;
  border: 1.5px dashed var(--field); border-radius: clamp(14px, 1.4vw, 18px); background: var(--panel);
  text-align: center; transition: background-color .15s ease, border-color .15s ease;
}
.mg-drop.is-over { border-color: var(--ink); background: color-mix(in srgb, var(--panel) 90%, var(--ink)); }
.mg-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mg-drop-label { display: grid; justify-items: center; gap: 8px; cursor: pointer; font-size: 14px; line-height: 1.45; }
.mg-drop-label strong { text-decoration: underline; text-underline-offset: 3px; }
.mg-file:focus-visible + .mg-drop-label { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 8px; }
.mg-drop-hint { font-size: 12.5px; color: var(--ink-2); }
.mg-sample {
  min-height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--page);
  font-size: 12.5px; cursor: pointer;
}
@media (hover: hover) { .mg-sample:hover { border-color: var(--ink); } }
.mg-error { margin: 12px 0 0; color: var(--bad); font-size: 13.5px; }
.mg-error:empty { display: none; }

.mg-result { margin-top: clamp(24px, 2.6vw, 36px); outline: none; }
.mg-result-title { margin: 0; font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.mg-counts { display: flex; flex-wrap: wrap; gap: 16px clamp(28px, 4vw, 56px); margin: 16px 0 0; }
.mg-counts > div { display: flex; flex-direction: column-reverse; }
.mg-counts dd { margin: 0; font-size: clamp(26px, 1.8vw + 14px, 38px); line-height: 1; letter-spacing: -.045em; }
.mg-counts dt { margin-top: 8px; font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.mg-notes { margin: 18px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.mg-notes:empty { display: none; }
.mg-notes li + li { margin-top: 4px; }
.mg-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.mg-script, .mg-preview { margin-top: clamp(24px, 2.6vw, 32px); }
.mg-script-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-script h4, .mg-preview h4 { margin: 0; font-size: 14px; font-weight: 700; }
.mg-preview h4 { margin-bottom: 10px; }
.mg-script-note { margin: 6px 0 10px; font-size: 13px; color: var(--ink-2); }
.mg-script-text {
  display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--field); border-radius: 10px;
  background: var(--page); color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.5; resize: vertical;
}

/* ---- tables (the preview and the format map) */
.mg-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.mg-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.5; }
.mg-table th, .mg-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.mg-table tr:last-child td { border-bottom: 0; }
.mg-table th { font-weight: 700; background: var(--panel); }
.mg-table td { overflow-wrap: anywhere; min-width: 12em; }
.mg-table code { font-family: inherit; font-size: .95em; padding: 1px 5px; border-radius: 4px; background: var(--panel); }

/* ---- the steps */
.mg-step-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px);
  margin: clamp(24px, 2.6vw, 36px) 0 0; padding: 0; list-style: none;
}
@media (max-width: 899px) { .mg-step-list { grid-template-columns: minmax(0, 1fr); } }
.mg-step-list li {
  padding: clamp(16px, 1.6vw, 22px); border: 1px solid var(--edge); border-radius: clamp(14px, 1.4vw, 18px);
  background: var(--panel);
}
.mg-step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--page); font-size: 14px; font-weight: 700;
}
.mg-step-list h3 { margin: 14px 0 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.mg-step-list p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.mg-map-title { margin: clamp(36px, 4vw, 52px) 0 14px; font-size: 15.5px; font-weight: 700; }
.mg-fine { margin: 16px 0 0; max-width: 56em; font-size: 13px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* phones: the page keeps the site's padding (no islands under 1024px) */
@media (max-width: 1023px) {
  .mg-main > section { padding: clamp(36px, 8vw, 56px) 0 0; }
  .mg-main > section:last-child { padding-bottom: clamp(48px, 10vw, 72px); }
}
.mg-convert { scroll-margin-top: calc(var(--header) + 16px); }
