#smgTool{
  /* Uses the global .tool-shell container styling.
     Keep only tool-specific overrides scoped to this tool. */
  --smg-green: #2b4034;
  --smg-red: #8f3a1a;
  --smg-amber: #8a6519;
  --smg-blue: var(--blue-100);
  --smg-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Tool container (same visual language as other tools using .tool-shell) */
#smgTool.tool-shell{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 4px;
  border: 1px solid var(--berry-black-60-opacity10);
  background: #fbf8f1;
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#smgTool [hidden]{
  display:none !important;
}

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

#smgTool .section-title{
  font-weight: 700;
  color: var(--berry-black-60);
  margin: 2px 0 10px;
  font-size: 18px;
}

/* --- Schema type switcher --- */

#smgTool .smg-types{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

#smgTool .smg-type{
  border: 1px solid var(--berry-black-60-opacity33);
  background: var(--white);
  color: var(--berry-black-60);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

#smgTool .smg-type:hover{
  border-color: rgba(166, 67, 31, 0.45);
}

#smgTool .smg-type.is-active{
  border-color: transparent;
  background: var(--clay-600);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(30, 27, 21, 0.14);
}

#smgTool .smg-type:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(208, 138, 99, 0.20);
}

/* --- Form fields --- */

#smgTool .smg-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#smgTool .smg-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#smgTool .smg-field-wide{ grid-column: 1 / -1; }

#smgTool .smg-label{
  font-size: 13px;
  font-weight: 700;
  color: var(--berry-black-60-opacity80);
}

#smgTool .smg-req{
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--smg-red);
}

#smgTool input[type="text"],
#smgTool input[type="date"],
#smgTool input[type="time"],
#smgTool select,
#smgTool textarea{
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--berry-black-60-opacity33);
  background: var(--white);
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  color: var(--berry-black-60);
  transition: border-color .15s ease, box-shadow .15s ease;
}

#smgTool textarea{
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

#smgTool input:focus,
#smgTool select:focus,
#smgTool textarea:focus{
  border-color: rgba(166, 67, 31, 0.55);
  box-shadow: 0 0 0 4px rgba(166, 67, 31, 0.12);
}

#smgTool .smg-hint{
  margin-top: 10px;
  color: var(--berry-black-60-opacity60);
  font-size: 12px;
}

/* --- Repeatable rows (FAQ + breadcrumb) --- */

#smgTool .smg-rows{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#smgTool .smg-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--berry-black-60-opacity10);
  border-radius: 4px;
  background: #fbf8f1;
}

#smgTool .smg-remove{
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--berry-black-60-opacity10);
  background: var(--white);
  color: var(--smg-red);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

#smgTool .smg-remove:hover{
  background: rgba(184, 84, 58, 0.10);
  border-color: rgba(184, 84, 58, 0.28);
}

#smgTool .btn-add{
  margin-top: 12px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px dashed var(--berry-black-60-opacity33);
  background: var(--white);
  color: var(--berry-black-60);
}

#smgTool .btn-add:hover{
  border-color: rgba(166, 67, 31, 0.45);
  color: var(--smg-blue);
}

/* --- Opening days --- */

#smgTool .smg-days{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#smgTool .smg-check{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--berry-black-60-opacity33);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  color: var(--berry-black-60);
  cursor: pointer;
}

#smgTool .smg-check input{
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--turquoise-specialdark);
}

/* --- Actions row --- */

#smgTool .row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

#smgTool .subtle{
  color: var(--berry-black-60-opacity60);
  font-size: 12px;
}

#smgTool .actions{
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px){
  #smgTool .actions{ width: 100%; justify-content: flex-start; gap: 8px; }
  #smgTool .tool-btn,
  #smgTool .btn-ghost{ flex: 1 1 0; }
}

#smgTool .tool-btn{
  width: auto;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  gap: 10px;
  white-space: nowrap;
  border: 0;
  background: var(--clay-600);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#smgTool .tool-btn:hover{
  transform: translateY(-1px);
  filter: brightness(0.96) saturate(1.05);
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
}

#smgTool .tool-btn:active{
  transform: translateY(0);
  filter: brightness(0.94) saturate(1.05);
}

#smgTool .tool-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(208, 138, 99, 0.20), 0 20px 38px rgba(30, 27, 21, 0.18);
}

#smgTool .tool-btn .icon{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#smgTool .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

#smgTool .btn:active{ transform: translateY(1px); }

#smgTool .btn-ghost{
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  background: var(--ink-2);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#smgTool .btn-ghost:hover{
  transform: translateY(-1px);
  filter: brightness(0.96) saturate(1.05);
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
}

#smgTool .btn-ghost:active{
  transform: translateY(0);
  filter: brightness(0.94) saturate(1.05);
}

#smgTool .btn-ghost:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(207, 138, 114, 0.24), 0 20px 38px rgba(30, 27, 21, 0.18);
}

#smgTool .btn-success{
  height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--smg-green);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#smgTool .btn-success:hover{
  transform: translateY(-1px);
  filter: brightness(0.96) saturate(1.05);
  box-shadow: 0 1px 2px rgba(30, 27, 21, 0.04), 0 10px 28px rgba(30, 27, 21, 0.07);
}

#smgTool .btn-success:active{
  transform: translateY(0);
  filter: brightness(0.94) saturate(1.05);
}

#smgTool .btn-success:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(62, 92, 75, 0.24), 0 20px 38px rgba(30, 27, 21, 0.18);
}

#smgTool .btn-download{
  height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--berry-black-60-opacity33);
  background: var(--white);
  color: var(--berry-black-60);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

#smgTool .btn-download:hover{
  transform: translateY(-1px);
  border-color: rgba(166, 67, 31, 0.45);
}

#smgTool .btn-success .icon,
#smgTool .btn-download .icon{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#smgTool .btn-success .icon svg,
#smgTool .btn-download .icon svg,
#smgTool .tool-btn .icon svg{ display: block; width: 100%; height: 100%; }

#smgTool .btn[disabled],
#smgTool button[disabled]{
  opacity: .6;
  cursor: not-allowed;
}

/* --- Checks panel --- */

#smgTool .smg-issues{
  margin-top: 16px;
  border: 1px solid var(--berry-black-60-opacity10);
  border-radius: 4px;
  background: #fbf8f1;
  padding: 14px 16px;
}

#smgTool .smg-issues-title{
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--berry-black-60-opacity60);
  margin-bottom: 8px;
}

#smgTool .smg-issues ul{
  margin: 0;
  padding: 0;
  list-style: none;
}

#smgTool .smg-issues li{
  position: relative;
  padding: 6px 0 6px 26px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--berry-black-60);
}

#smgTool .smg-issues li::before{
  position: absolute;
  left: 0;
  top: 6px;
  font-weight: 700;
}

#smgTool .smg-issues li.is-error::before{ content: "\2715"; color: var(--smg-red); }
#smgTool .smg-issues li.is-warn::before{ content: "!"; color: var(--smg-amber); }
#smgTool .smg-issues li.is-ok::before{ content: "\2713"; color: var(--smg-green); }

/* --- Output --- */

#smgTool .results-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

#smgTool .results-left{
  display:flex;
  flex-direction:column;
  gap: 4px;
}

#smgTool .results-actions{
  margin-left: auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
}

#smgTool .results-title{
  font-weight: 700;
  color: var(--berry-black-60);
  font-size: 18px;
}

#smgTool .tool-meta{
  color: var(--berry-black-60-opacity60);
  font-size: 12px;
}

#smgTool .smg-output-wrap{
  margin-top: 12px;
  border: 1px solid var(--berry-black-60-opacity10);
  border-radius: 4px;
  background: #1e1b15;
  overflow: hidden;
}

#smgTool .smg-output{
  margin: 0;
  padding: 16px;
  max-height: 460px;
  overflow: auto;
  font-family: var(--smg-mono);
  font-size: 13px;
  line-height: 1.55;
  color: #e7ddc6;
  white-space: pre;
  tab-size: 2;
}

#smgTool .smg-output:focus-visible{
  outline: 2px solid var(--turquoise-specialdark);
  outline-offset: -2px;
}

@media (max-width: 720px){
  #smgTool .smg-grid{ grid-template-columns: minmax(0, 1fr); }
  #smgTool .smg-row{ grid-template-columns: minmax(0, 1fr); }
  #smgTool .smg-remove{ justify-self: end; }
  #smgTool .results-actions{ width: 100%; justify-content: flex-start; }
}

@media (max-width: 480px){
  #smgTool .actions{ width: 100%; gap: 8px; }
  #smgTool .tool-btn,
  #smgTool .btn-ghost{ flex: 1 1 0; }

  #smgTool .tool-btn,
  #smgTool .btn-ghost,
  #smgTool .btn-success,
  #smgTool .btn-download{
    height: 48px;
    padding: 0 18px;
    font-size: 15px;
  }

  #smgTool .btn-success,
  #smgTool .btn-download{ flex: 1 1 0; }

  #smgTool .tool-btn .icon,
  #smgTool .btn-success .icon,
  #smgTool .btn-download .icon{
    width: 16px;
    height: 16px;
  }
}

/* --- Content + FAQ (match SERP Preview Tool styling) --- */
#smgContent.content-card{
  margin-top: 100px; /* gap after tool section */
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#smgContent h2{
  margin: 0 0 12px 0;
  color: #1e1b15;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}

#smgContent h3{
  margin: 18px 0 8px;
  color: #1e1b15;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

#smgContent p{
  margin: 0 0 12px;
  color: #1e1b15;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}

#smgContent ol,
#smgContent ul{
  margin: 0 0 12px;
  padding-left: 26px;
  list-style-position: outside;
  color: #1e1b15;
  line-height: 1.55;
}

#smgContent ul{ list-style: disc; }
#smgContent ol{ list-style: decimal; }

#smgContent li{
  margin: 0 0 8px;
  color: #1e1b15;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  display: list-item;
  padding-left: 6px;
}

#smgContent a{
  color: #4a1e0d;
  text-decoration: underline;
}

#smgContent a:hover{ color: var(--blue-100); }

#smgContent code{
  font-family: var(--smg-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace);
  font-size: 14px;
  background: rgba(30, 27, 21, 0.06);
  border-radius: 4px;
  padding: 2px 6px;
  overflow-wrap: anywhere;
}

/* FAQ styles (accordion, matching SERP Preview Tool) */
#smgContent .serp-faq.FaqSection .FaqTitle h2 { margin-bottom: 30px; }

#smgContent .serp-faq.first-faq-block .accordian-wrapper {
  background: linear-gradient(138deg, #fff0 0%, #fff0 100%);
  padding: .15rem;
  border-radius: 4px;
  position: relative;
}

#smgContent .serp-faq.first-faq-block .faq-boxes {
  background-color: #fbf8f1;
  backdrop-filter: none;
  padding: 0;
  border-radius: 4px;
  border: 2px solid #b25f4438;
}

#smgContent .serp-faq.first-faq-block .faq-boxes.active {
  background-color: #f8ece5;
  border: 2px solid #a6431f;
}

#smgContent .serp-faq .accordion-body {
  padding: 0 15px 18px 22px;
  font-size: 20px;
  font-weight: 400;
  color: #1e1b15;
}

#smgContent .serp-faq .accordion-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 15px 18px 22px;
  font-size: 1rem;
  color: #2a261d;
  text-align: left;
  background-color: #fff0;
  border: 0;
  border-radius: 0;
  overflow-anchor: none;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out, border-radius .15s ease;
  cursor: pointer;
}

#smgContent .serp-faq .accordion-button h3 {
  font-weight: 600;
  font-size: 20px;
  margin: 0;
  line-height: 1.3;
  color: #1e1b15;
}

#smgContent .serp-faq .accordion-button:not(.collapsed) {
  color: #2a261d;
  background-color: #fff0;
  transition: 0.2s ease-in all;
  padding-bottom: 12px;
  border: 0;
  box-shadow: none;
}

#smgContent .serp-faq .accordion-button:focus {
  z-index: 3;
  border-color: #c9bb9c;
  outline: 0;
  box-shadow: 0 0 0 .25rem #fff0;
}

#smgContent .serp-faq.first-faq-block .accordion-item {
  background-color: #fff0;
  border: 0 solid rgba(30, 27, 21, .125);
  margin-bottom: 20px;
}

#smgContent .serp-faq.first-faq-block .accordion-body p {
  font-size: 16px;
  color: #1e1b15;
  font-weight: 400;
  margin-bottom: 0;
  padding-right: 11%;
  line-height: 26px;
}

#smgContent .serp-faq.first-faq-block .accordion-button:not(.collapsed)::after {
  content: "–";
  transform: none;
}

#smgContent .serp-faq.first-faq-block .accordion-button::after {
  margin-left: auto;
  content: "+";
  width: 24px;
  height: 24px;
  min-width: 24px;
  flex: 0 0 24px;
  align-self: center;
  margin-right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: #4a1e0d;
}

/* Collapse behavior (we implement via JS; keep same class names) */
#smgContent .serp-faq .accordion-collapse{ display: none; }
#smgContent .serp-faq .accordion-collapse.show{ display: block; }

@media (max-width: 480px){
  #smgContent .serp-faq.first-faq-block .faq-boxes{ padding-right: 18px; }
}

/* Remove the global container bottom gap for this tool page */
.main > .container{
  margin-bottom: 0;
}

/* The rule above also zeroed the gap above the footer, leaving the
   article flush against it. Restore the 96px the shared shell uses.
   Padding, not margin: the last child of .main is a <script>. */
.main {
  padding-bottom: 96px;
}
